Advertisement
BaSs_HaXoR

Control Console Client API User Guide(2009)

Nov 29th, 2014
439
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 32.37 KB | None | 0 0
  1. //Download: http://www.mediafire.com/download/ml8t68hkuda8yk4/PS3+Networking.zip
  2.  
  3. Control Console Client API User's Guide © 2011 Sony Computer Entertainment Inc. All Rights Reserved. SCE Confidential
  4.  
  5.  
  6.  
  7.  
  8. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 2 -
  9.  
  10. Table of Contents
  11.  
  12. About This Manual.............................................................................................................................3 Purpose................................................................................................................................................3 Audience and Prerequisites.................................................................................................................3 1 Introduction.....................................................................................................................................4 Overview..............................................................................................................................................4 Compatibility.........................................................................................................................................4 2 The Target API.................................................................................................................................5 Overview of the Target-side API...........................................................................................................5 3 The TTY Interface............................................................................................................................8 4 The Control Console Client API...................................................................................................10 Installing the API.................................................................................................................................11 The Communication Class.................................................................................................................11 The Console Component Class.........................................................................................................11 The CommunicationFactory Class.....................................................................................................11 The VariableCommunicationFactory Class........................................................................................12 The CommandCommunicationFactory Class....................................................................................12 The PerformanceCommunicationFactory Class................................................................................12 The ConnectionPanel component Class............................................................................................12 The TTYBox Component Class.........................................................................................................14 The VariablePanel Component Class................................................................................................14 The CommandPanel Component Class............................................................................................16 The PerformancePanel Component Class........................................................................................17 5 The Control Console Sample Application...................................................................................21
  13.  
  14. 3.7.0
  15.  
  16.  
  17.  
  18.  
  19. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 3 -
  20.  
  21. About This Manual
  22.  
  23. Purpose The purpose of this document is to describe how to use the Control Console Client API to create applications. This document does not explain how to make modifications to the API’s components to make them fit particular requirements. If you need more details, please refer to the Control Console Client API Reference manual. Audience and Prerequisites Audience The Control Console Client API is aimed at all PlayStation®3 developers and, specifically, tools programmers. Prerequisites Minimal PlayStation®3 development experience is required to use the target-side API. A sample is provided to make development easier. To utilize the features of the Client API, minimal C# and Rapid Application Development experience is required. The components can also be used with CLI/C++. We assume that the reader is familiar with standard UI conventions, and therefore terms such as ‘drag’ ‘drop’ and ‘minimize’ are not explained in any depth.
  24.  
  25. 3.7.0
  26.  
  27.  
  28.  
  29.  
  30. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 4 -
  31.  
  32. 1 Introduction
  33.  
  34. Overview Control Console provides real-time control and monitoring access to a PlayStation®3 application or a game from a networked PC. Control Console does this using a target-side API. The API should be linked with the target application, and at least initialized from its main function or constructor. The target API provides a TTY interface with text commands to access all the building features. There are three ways of utilizing the features of the target-side Control Console: • Through a TTY console, using text commands • From the utilities provided with the target-side API • From the Control Console Client API This document mainly covers Control Console Client API, but it also includes information on the target-side API. Compatibility This version of Control Console documentation is compatible with PlayStation®3 SDK 2.4.0 and later. Some of the new features are only available in PlayStation®3 SDK 2.7.0 and later, these are DataSet handling in the PerformancePanel, and updated ConnectionPanel.
  35.  
  36. 3.7.0
  37.  
  38.  
  39.  
  40.  
  41. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 5 -
  42.  
  43. 2 The Target API
  44.  
  45. Overview of the Target-side API The Control Console Client API requires the target-side API to export variables, commands and real-time performance data. A small target-side sample application is included in the SDK samples (called control_console_sample), which demonstrates how to initialize and use the API features. The target-side sample uses the following definitions and calls: • Include files: • For exporting variables, commands: #include <cell/console/console.h> #include <cell/console/plugins/performance_data.h> • For using clock measurement: #include "clock.h" #include "performance_clock.h" • For network communication: #include <cell/console/io/network.h> • For taking screenshots: #include <cell/console/plugins/screen_shot.h> Please note that you need to compile PSGL first, if you want to use the screenshot feature. • Defining clock variables for performance report: CLOCK(CLOCK_VAR1, "Variable 1"); CLOCK(CLOCK_VAR2, "Variable 2"); CLOCK(CLOCK_VAR3, "Variable 3"); CLOCK(CLOCK_FULL, "Full cycle"); • Call initializing the API: cellConsoleInit(); • Calls initializing the network: cellConsoleNetworkInitialize(); cellConsoleNetworkServerInit(-1); • Call enabling screenshots: cellConsoleScreenShotPluginInit(); • Registering grouped variables for exporting: bool gbBool; int giInt; float gfFloat; int iGroupParam = cellConsoleVariableAddGroup( "Variable Group 1" ); cellConsoleVariableAddBool( iGroupParam, "bool_1", "A bool value", &gbBool ); cellConsoleVariableAddInt32( iGroupParam, "int_1", "An integer value", &giInt ); cellConsoleVariableAddFloat( iGroupParam, "float_1", "A float value", &gfFloat );
  46.  
  47. 3.7.0
  48.  
  49.  
  50.  
  51.  
  52. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 6 -
  53.  
  54. • Registering callback functions to export: cellConsoleInputProcessorAdd( "quit", "This call will make the main loop to quit", "", NULL, quit ); • Registering performance channels: uiPerfDataSet = cellConsolePerfDataSetColumns( "Demo data set", CELL_CONSOLE_PERF_TYPE_DOUBLE, 4, "Variable_1", "Variable_2", "Variable_3", "Variable_4"); • Example use of the performance measurement: CLOCK_START( CLOCK_FULL ); CLOCK_START( CLOCK_VAR1 ); Render(); CLOCK_END( CLOCK_VAR1 ); CLOCK_START( CLOCK_VAR2 ); Update(); CLOCK_END( CLOCK_VAR2 ); // … CLOCK_END( CLOCK_FULL ); // Processing IO. Set commands set the variables, and command // callbacks are executed here. The best place to put this // call is immediately after VSync. cellConsolePoll(); • Reporting performance counters: iTotalFrames++; // Let the console know what the performance numbers are. Scale can be // used to multiply the time elapsed so as to get an average time. For // example, if you call CLOCK_REPORT every 100 frames, you can set // scale to 0.01f so that the resulting numbers are per-frame numbers // instead of aggregate numbers over 100 frames. This allows you to // easily change the sampling rate and still produce numbers that are // consistent with each other. if (iTotalFrames % 100 == 0) { // In every 100th loop, a report is printed on the TTY. CLOCK_REPORT_AND_RESET( CLOCK_VAR1, 0.01f ); CLOCK_REPORT_AND_RESET( CLOCK_VAR2, 0.01f ); CLOCK_REPORT_AND_RESET( CLOCK_VAR3, 0.01f ); CLOCK_REPORT_AND_RESET( CLOCK_FULL, 0.01f ); printf("\n"); } else { fScale=(float) 1.0f/(iTotalFrames % 100);
  55.  
  56. 3.7.0
  57.  
  58.  
  59.  
  60.  
  61. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 7 -
  62.  
  63. // Otherwise, we return the value of the current clock without // resetting it. In order to be able to set new performance values, // we have to increment the counter: cellConsolePerfDataIncrementDataCounter(uiPerfDataSet); // Setting new values: cellConsolePerfDataSetValues(uiPerfDataSet, CLOCK_READ(CLOCK_VAR1, fScale), CLOCK_READ(CLOCK_VAR2, fScale), CLOCK_READ(CLOCK_VAR3, fScale), CLOCK_READ(CLOCK_FULL, fScale)); }
  64.  
  65. 3.7.0
  66.  
  67.  
  68.  
  69.  
  70. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 8 -
  71.  
  72. 3 The TTY Interface
  73.  
  74. The easiest way to access the Control Console target API is through telnetting to the game IP, on the default port 1713. The following commands are available from the TTY interface (Figure 1). This information can be requested by typing the help command. Table 1
  75.  
  76. Commands
  77.  
  78. Description
  79.  
  80. show_ip Shows system’s IP addresses.
  81.  
  82. perf_data_set Toggles the active perf data set.
  83.  
  84. perf_data_set_listReturns a list of the available perf data sets.
  85.  
  86. perf_data Returns performance numbers for the columns specified for the current data set.
  87.  
  88. perf_group_list Returns the list of the groups associated with each column of perf data for the current data set.
  89.  
  90. perf_list Returns the type and names of the columns with perf data for the current data set.
  91.  
  92. _dump_variables Dumps variables in a machine-readable format.
  93.  
  94. set ‘set <var> <value>’ sets variable <var> to <value>.
  95.  
  96. print Output variable state.
  97.  
  98. resume Resumes the application.
  99.  
  100. step Steps the application – does not return from _next_ console call.
  101.  
  102. pause Pauses the application – does not return from console.
  103.  
  104. _compatibility Requests a specific version of compatibility from the control console.
  105.  
  106. _dump_commands Dumps command list in machine-readable format.
  107.  
  108. help Outputs command list.
  109.  
  110. You can extend the command list above by adding callbacks to the target application. These callbacks must be registered with the target-side API, and they must use a specific parameter signature. An example callback function is as follows: CellConsoleInputProcessorResult myCommand(unsigned int uiConnection, const char *pcInput, void *pvPrivateData, int iContinuation) { (void) pcInput; (void) pvPrivateData; (void) iContinuation; cellConsolePrintf(uiConnection, "The command was successful\n" ); return CELL_CONSOLE_INPUT_PROCESSED; } Registering the callback function: cellConsoleInputProcessorAdd( "myCommand", "This is my sample command", "", NULL, myCommand );
  111.  
  112. 3.7.0
  113.  
  114.  
  115.  
  116.  
  117. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 9 -
  118.  
  119. Figure 1 The TTY Interface of Control Console
  120.  
  121.  
  122.  
  123. 3.7.0
  124.  
  125.  
  126.  
  127.  
  128. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 10 -
  129.  
  130. 4 The Control Console Client API
  131.  
  132. The API is designed in a way that allows you to build a fully functional application. The modular design allows you to customize any part of the data flow, and you can easily make modifications to any of the GUI components to make them suit your needs. The communication between the components is asynchronous. This is implemented by using events and delegates, and handler callback functions. The source of the API is available in both managed C++ and C# languages. See the Control Console Client API Reference document for more information on using the API. Figure 2 Block Diagram of the Client API
  133.  
  134. The relations show how the API building blocks are supposed to work together.
  135.  
  136. 3.7.0
  137.  
  138.  
  139.  
  140.  
  141. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 11 -
  142.  
  143. Installing the API After compiling the API, a dll file becomes available in the Output\Release or in the Output\Debug folder, depending on whether you compile it in Release or Debug mode: (1) In Visual Studio, open the Toolbox, and create a new group called “Control Console API” by right-clicking on the Toolbox, and selecting the Add Tab option. (2) Then right-click in the newly created group, and select Choose items.... (3) In the Select dialog, go to the .NET Framework Components tab and click Browse. Find the ControlConsoleClientAPI.dll file, and open it. At this point, all the components available in the API should appear in the new group, and they are ready to be used in your applications. The Communication Class When data is received from the target, it is processed by the Communication class first. The Communication class is abstract, and can be instantiated as GamePortCommunication or DebugPortCommunication. Apart from this, there is no other difference between the instances when using them later. The DebugPortCommunication class connects to the target through the debug port, and it is using native DECI3 communication. This class may even be useful for you, if you want to write your own DECI3 communication which is not using DTLib. The GamePortCommunication class is using simple TCP/IP socket communication to communicate with the target through the game port. The Console Component Class This is a design time component, providing a base for communication. It uses the Communication classes for connecting to the target. Setting it up is fairly simple; you provide an IP Address/Host name for the target, a port number, and a port type: • The port number is 1713 for the game port by default, unless you set a different port number in your target application. • The debug port is always 8530. • The port type can either be CP_GAME or CP_DEBUG, indicating the type of port you are using for communication. You can add multiple Console components to your application, and each of them can use different port types. Please note that the debug and the game port of the Reference Tool are physically different: they are routed through separate ethernet ports. To be able to use the game port, you have to set the default gateway properly in your system software, otherwise routing problems will disable its communication. The CommunicationFactory Class This class is abstract, and contains the common functions between the Variable-, Command- and PerformanceCommunicationFactory classes.
  144.  
  145. 3.7.0
  146.  
  147.  
  148.  
  149.  
  150. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 12 -
  151.  
  152. The VariableCommunicationFactory Class This class filters and transforms incoming data stream from the target. It automatically finds variable lists, which are received in response to a _dump_variables command, and ignores everything else. If a variable list is found, the class works as follows: (1) Extracts all the variables from the list. (2) Instantiates Variable typed objects from the variables. (3) Stores the name, type, description and value of the variable in the object, and creates a list from these objects. (4) This list is forwarded towards the layers above. You can set the values of individual variables by calling the SetVariable methods. The class also has a polling mechanism, which can retrieve the values of variables every n milliseconds. The method StartPolling will start the timer, and its argument is the polling interval. You can stop the polling with the StopPolling call. The CommandCommunicationFactory Class This class serves the same purpose as the VariableCommunicationFactory class, except it filters command lists instead of variable lists. It filters and transforms incoming data stream from the target. This class looks for command lists in the incoming stream. If it finds one, it creates a list of its Command objects and forwards the list to the layer above. The command list is a response to the _dump_commands command. The PerformanceCommunicationFactory Class This class is very similar to the other two CommunicationFactory classes except it extracts performance variable lists and value lists from the incoming stream. The target sends a performance variable list as a response to the perf_list command. This list contains all the names of the performance variables. When such a list is found, it extracts the variable names from it, creates a List<String> object from them, and dispatches the PerfListReceived event. Once the number of these variables and their names are known, it can also retrieve their values, using the perf_data command. This command expects the variable names as arguments, and it will return the values of these variables as a comma separated list. Once received, the list of values are extracted from the stream, and forwarded to the layer above by the PerfDataReceived event. The ConnectionPanel Component Class This GUI control allows you to establish multiple connections to the same target, using multiple Console components (up to a maximum of four). You add as many Console components to your application as you need, then set the references to them in the properties of the ConnectionPanel. You must also specify handler functions for the ConnectClick and the DisconnectClick events. The ConnectionPanel itself is not initiating the connection, it only initializes the Consoles with the IP and the Port, and raises the ConnectClick or DisconnectClick events respectively. The reason for this solution is that the PerformancePanel component has to initiate the connection itself, when you press the Start button.
  153.  
  154. 3.7.0
  155.  
  156.  
  157.  
  158.  
  159. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 13 -
  160.  
  161. Figure 3 Using the ConnectionPanel Component at Design Time
  162.  
  163. 3
  164.  
  165. 1
  166.  
  167. 2 (1) The ConnectionPanel component on the form. (2) The type of the CommunicationPort (CP_GAME or CP_DEBUG). (3) Multiple references to Console components in the application. Figure 4 Using the ConnectionPanel Component at Design Time
  168.  
  169. (1) Setting the event handlers for the ConnectionPanel.
  170.  
  171. 3.7.0
  172.  
  173.  
  174.  
  175.  
  176. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 14 -
  177.  
  178. The TTYBox Component Class This is a GUI component. It provides a TTY interface for a Console component. You have to specify a Console component at design or run time, using the ConsoleComponent property. Once the referenced Console component is connected, the TTY starts displaying output from it. Commands typed in the input field of the component will be sent to the target immediately. Please note that this TTY is slightly different from regular, real time TTY connections (like telnet), since it is using an asynchronous connection instead of blocking. Figure 5 Using the TTYBox Component at Design Time
  179.  
  180. (1) The TTYBox component on the form. (2) The Console component you are willing to use along with it. (3) The ConsoleComponent property of the TTYBox, set to the Console component reference. The VariablePanel Component Class This component displays controls to change the values of variables available from the target. It stores a reference to a Console component through a property available at design time. When the Console component is connected, the VariablePanel component initializes itself by sending a _dump_variables command to the Console. The list of variables is received by the VariableCommunicationFactory class, which transforms it into an easy-to-handle list of objects. The panel creates a Group component for each variable group, and creates custom components for the variables. These custom components are of the VariableIOControl type. This is another custom component class of the API, which simply displays: • A text label for the variable name • A control for the value of the variable
  181.  
  182. 3.7.0
  183.  
  184.  
  185.  
  186.  
  187. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 15 -
  188.  
  189. Figure 6 The VariablePanel Control at Design Time
  190.  
  191. (1) The VariablePanel component at design time. (2) The ConsoleComponent property. (3) The Apply changes button, which finalizes any changes made to the value controls. (4) The Apply automatically checkbox. When it is turned on, changes made to value controls are applied immediately, and values are continuously checked by polling the list of variables periodically. Figure 7 The VariablePanel Component After Connecting to the Target
  192.  
  193. (1) Group component to encapsulate variables belonging to the same group. (2) A VariableIOControl component. The type of the value control used depends on the type of the variable. (3) Read-only values. If a variable name contains spaces, it cannot be modified through the set command of the console. This way, these variables are considered as read-only.
  194.  
  195. 3.7.0
  196.  
  197.  
  198.  
  199.  
  200. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 16 -
  201.  
  202. The CommandPanel Component Class This component displays controls to trigger callbacks with arguments on the target. It stores a reference to a Console component, just like all the other controls in the API. After connecting, it retrieves the list of available commands by sending a _dump_commands command to the target. The list of commands is received through the CommandCommunicationFactory class. The component creates custom controls for each command. These custom components are of CommandIOControl type. It displays a button for triggering the command, with the name of the command on it. It also displays input fields for the arguments, if there are any. The description of the command is displayed as a tooltip when you move the mouse pointer over the button. Figure 8 The CommandPanel Control at Design Time
  203.  
  204. (1) The CommandPanel at design time. (2) The ConsoleComponent property.
  205.  
  206. 3.7.0
  207.  
  208.  
  209.  
  210.  
  211. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 17 -
  212.  
  213. Figure 9 The CommandPanel Component After Connecting to the Target
  214.  
  215. (1) Button to trigger the command. (2) TextBoxes for the arguments. The PerformancePanel Component Class This is the most complex component of the API. It deals with performance data retrieved from the target, and displays the data in different ways. The perf_list command is used to retrieve the list of performance variables. The perf_data <string name> ... command is used to get the momentary values of the variables listed in the argument list. Before starting to capture with the PerformancePanel component, the attached Console component has to be connected to the target. Capturing can be started by pressing the Start button. After a single list of values has been received, another request is sent to the target to retrieve the next value. The retrieved values are placed to a ring buffer. The graphs are drawn by the PerformanceGraphPanel component. It has access to the ring buffer. It has 3 drawing modes, set by the GraphType property: • In SINGLE mode, only one graph is displayed. You should set the index of the graph by the GraphIndex property. • In STACKED mode, the values are added on top of each other. • In OVERLAID mode, all the graphs are drawn on the same canvas. The GraphIndex property is only used in SINGLE mode.
  216.  
  217. 3.7.0
  218.  
  219.  
  220.  
  221.  
  222. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 18 -
  223.  
  224. Figure 10 The PerformancePanel Component
  225.  
  226. (1) The Start button initializes the component and starts capturing the performance data. The Console component must be already connected before starting the capture. (2) The Pause button suspends the retrieving of values. (3) The Stop button stops the capture process. (4) The Zoom In button increases the zoom level at which the graphs are displayed. (5) The Zoom Out button decreases the zoom level. Please note that the number of values displayed (and the speed of drawing) does not depend on the zoom level, as the buffer is using mip-mapping for different zoom levels. (6) Saves the buffer to comma separated values. (7) Loads a CSV file into the buffer. (8) A desired FPS value, which serves as a base to calculate whether a graph value is longer than the duration of a frame. It only makes sense in non-normalized mode. (9) Checkbox to switch between normalized and frame-based views. In normalized view, the current values are summarized to form a maximum, and the displayed value is shown as the percentage out of 100%. In the frame-based view, the graph automatically extends its possible maximum limit to 1, 2, 3,... and so on, frames, which means 16.666, 33.333, and so on, in actual values. (10) A PerformanceGraphPanel component, which is responsible for drawing the graphs. (11) A drop-down list to select the currently monitored dataset.
  227.  
  228. 3.7.0
  229.  
  230.  
  231.  
  232.  
  233. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 19 -
  234.  
  235. Figure 11 Non-normalized View
  236.  
  237. (1) Non-normalized view, the graphs aligned to the multiples of 16.666ms (60 FPS). Figure 12 Non-normalized, Stacked Mode
  238.  
  239. 1 (1) Non-normalized, stacked mode, the graphs are added on top of each other.
  240.  
  241. 3.7.0
  242.  
  243.  
  244.  
  245.  
  246. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 20 -
  247.  
  248. Figure 13 Non-normalized, Overlaid Mode
  249.  
  250. (1) Non-normalized, overlaid mode. All the graphs are drawn on the same canvas.
  251.  
  252. 3.7.0
  253.  
  254.  
  255.  
  256.  
  257. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 21 -
  258.  
  259. 5 The Control Console Sample Application
  260.  
  261. The sample application (called SampleAllControls) demonstrates how easy it is to create a fully functional application from the API components. The components are intentionally designed in a way to minimize your interaction while using them. The only things that you need to program manually are connecting and disconnecting. Handle clicking on the connect button: private void connectionPanel1_ConnectClick(object sender, EventArgs e) { console.Connect(); } Handle clicking on the disconnect button: private void connectionPanel1_DisconnectClick(object sender, EventArgs e) { console.Disconnect(); } Figure 14 Control Console Sample 1 – Console Page
  262.  
  263. 1
  264.  
  265. 3
  266.  
  267. 4
  268.  
  269. 2
  270.  
  271. 5
  272.  
  273. 6 The Control Console sample graphically displays the variables and commands made available from within a PlayStation®3 application. (1) VariablePanel Displays a list of the variables made available from the remote PlayStation®3 application (retrievable by the _dump_variables command). Modified variable values appear bold until they are applied. In this view, the variables are organized into groups based on the group setting in your PlayStation®3 application.
  274.  
  275. 3.7.0
  276.  
  277.  
  278.  
  279.  
  280. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 22 -
  281.  
  282. (2) CommandPanel Displays a list of the commands made available from the remote PlayStation®3 application. Each command is represented by a button with its name printed on it. Press the button to execute its command. Commands may have parameters associated with them. If a parameter is mandatory, the command will not be executed until that mandatory parameter is supplied. (3) ConnectionPanel There are two ways to connect the Control Console sample to the remote PlayStation®3 application: • Connect to game port: The socket of the game port can be found in the middle of the back panel of the Reference Tool and has “LAN” printed above it. The term “Game IP” relates to the IP address of the PlayStation®3 board – the address used by games. This address can only be set by placing the Reference Tool into System Software mode and navigating to the settings menu using the wireless controller of the PlayStation®3. This is NOT the address that is set in the $DTNETM environment variable. Also, if you boot up the Reference Tool and look at the console output, the boot process will contain text that ends with the following message (if the game IP is set properly): Debug Agent Version 0.9.5 (1) (Built – Oct 5 2006 11:21:23) network ready. myaddr: XXX.XXX.XXX.XXX This XXX.XXX.XXX.XXX address is the Game IP address. The default game port number is 1713. • Connect to debug port: The socket of the debug port can be found at the bottom left side at the rear of the Reference Tool. “DEV LAN” is printed beside it. This is the IP address of the debug board. You use this when you connect ProDG Target Manager for PlayStation®3 or ProDG for PlayStation®3 to your Reference Tool. It is the address set in the $DTNETM environment variable. The default debug port number is 8530. Connect: Press this button to establish connection with the remote PlayStation®3 application. When connection is successfully established, the user interface is updated with the available variables and commands. Disconnect: Press to close the connection to the remote PlayStation®3 application. (4) Console output This control displays the control console output and facilitates command execution too. Type commands directly into this control and press the Return key. (5) Apply changes Click this button to apply any modified variable values to the remote PlayStation®3 application. (6) Apply automatically If this checkbox is ticked, the changes to variables are applied immediately after they are changed. The current values of the variables are also refreshed every 2 seconds, and the controls are reset to the currently retrieved values. This is useful when you specify constraints to variables (for example, prevent variable values decreasing below zero).
  283.  
  284. 3.7.0
  285.  
  286.  
  287.  
  288.  
  289. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 23 -
  290.  
  291. Figure 15 Control Console Sample 2 – Monitor Tab
  292.  
  293. Use the Control Console Monitor tab to track variable changes in real-time or to monitor how long methods take as a fraction of the current frame. The Monitor tab retrieves values from the console, and the last 12,500 (ten thousand) values are displayed in a series of graphs, as shown in the above screenshot. (1) Controlling the capture Use these buttons to start, stop, pause and resume further requests, captures and visualizations of data from the Control Console sample. • The Start button initializes the component and starts capturing the performance data. • The Pause button to suspend retrieving values. • The Stop button stops the capture process. (2) Zooming The Zoom In and Zoom Out buttons change the zoom level at which the graphs are displayed. (3) Settings • A desired FPS value, which serves as a base to work out whether a graph value is longer than the duration of a frame. It only makes sense in non-normalized mode. • Checkbox to switch between normalized and frame-based views. In normalized view, the current values are summarized to form a maximum, and the displayed value is shown as the percentage of it. (4) Loading and saving Click Load CSV or Save CSV to read or save the buffered data to or from a CSV format file on your local or network drive for viewing loaded data, regardless of the Reference Tool’s connected state.
  294.  
  295. 3.7.0
  296.  
  297.  
  298.  
  299.  
  300. SCE CONFIDENTIAL ©SCEI PlayStation®3 Programmer Tool Runtime Library Release x.x.x - 24 -
  301.  
  302. (5) The graphs The following view types are available: • Separated: All of the available graphs are shown with their own timeline. • Overlaid: All of the graphs are displayed on the same timeline, each one drawn over the other. • Stacked: Each of the series of data is stacked above the preceding series. The following modes are available: • Normalized: the graph values are expressed as a fraction of the sum of graph values at each sample point. • Non-normalized: the actual values of the graphs are shown.
  303.  
  304. 3.7.0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement