1 | --------------------------------------------------- |
---|
2 | |
---|
3 | SAGE PROXY README |
---|
4 | |
---|
5 | --------------------------------------------------- |
---|
6 | (last updated on July, 2007) |
---|
7 | |
---|
8 | |
---|
9 | (0) DESCRIPTION |
---|
10 | --------------------------------------------------- |
---|
11 | SageProxy exposes SAGE commands through web-services (XML-RPC). This allows |
---|
12 | you to easily talk to SAGE without using sockets and writing your own |
---|
13 | complete client. This is mainly used by the SAGE Web UI for now. |
---|
14 | |
---|
15 | |
---|
16 | |
---|
17 | (1) REQUIREMENTS (none for binary distributions): |
---|
18 | --------------------------------------------------- |
---|
19 | - Python 2.3 (www.python.org) |
---|
20 | |
---|
21 | |
---|
22 | |
---|
23 | (2) HOW TO RUN: |
---|
24 | --------------------------------------------------- |
---|
25 | - sageProxy is easily run through the SageLauncher included with SAGE v2.5 and later |
---|
26 | - to run by hand, see all the command line arguments with "python sageProxy.py -h" |
---|
27 | |
---|
28 | |
---|
29 | |
---|
30 | (3) CONTROLLING SAGE THROUGH SAGE PROXY (via XML-RPC): |
---|
31 | ------------------------------------------------------- |
---|
32 | - the description of the methods is as follows: |
---|
33 | |
---|
34 | |
---|
35 | ******* bringToFront ********* |
---|
36 | |
---|
37 | Brings the application window to front (on top of the other ones). |
---|
38 | Returns: 1 if everythin went OK and the message was sent |
---|
39 | Returns: -1 if the message was not sent for whatever reason (including |
---|
40 | if the app was already on top) |
---|
41 | |
---|
42 | |
---|
43 | |
---|
44 | ******** closeApp ********* |
---|
45 | |
---|
46 | Closes the app corresponding to the specified appId. |
---|
47 | Returns: the new status of all the apps in the same format as getAppStatus |
---|
48 | (sleeps 2 seconds before returning it to ensure that the datastructure was updated |
---|
49 | by the messages from SAGE about the closed app) |
---|
50 | Returns: -1 if failed for whatever reason |
---|
51 | |
---|
52 | |
---|
53 | |
---|
54 | ******** executeApp ********* |
---|
55 | |
---|
56 | Starts a new application with appName (string) and configNum (int). You can also optionally specify |
---|
57 | initial position and size of the application window that you pass in as a tuple of integers. |
---|
58 | If the application itself requires some command line arguments during startup, those can be |
---|
59 | specified as well with the optionalArgs parameter (string). |
---|
60 | Shareable parameter is used when you want to run the application through sageBridge which |
---|
61 | means that it can be shared among other displays. If False it will run the app locally. |
---|
62 | Returns: the new status of all the apps in the same format as getAppStatus |
---|
63 | (sleeps 2 seconds before returning it to ensure that the datastructure was updated |
---|
64 | by the messages from SAGE about the new app) |
---|
65 | Returns: -1 if failed for whatever reason |
---|
66 | |
---|
67 | |
---|
68 | |
---|
69 | ******** getAllAppID ********* |
---|
70 | |
---|
71 | Returns all the app ID currently running on SAGE |
---|
72 | |
---|
73 | |
---|
74 | |
---|
75 | ******** getAppList ********* |
---|
76 | |
---|
77 | Returns: a list (strings) of app names available for running |
---|
78 | Returns: -1 if failed for whatever reason |
---|
79 | |
---|
80 | |
---|
81 | |
---|
82 | ******** getAppStatus ********* |
---|
83 | |
---|
84 | If called without parameters it will return the status for all currently running applications. |
---|
85 | If called with appId parameter it will return the status just for that application. |
---|
86 | Returns: a hash where the key is appId (string) and the value is a list of app status: |
---|
87 | [string appName, int appId, int left, int right, int bottom, |
---|
88 | int top, int sailID, int zValue, int configNum, string title] |
---|
89 | Returns: -1 if failed for whatever reason |
---|
90 | |
---|
91 | |
---|
92 | |
---|
93 | ******** getDisplayInfo ********* |
---|
94 | |
---|
95 | Returns: a list (integers): [totalNumTiles, numTilesX, numTilesY, totalWidth, |
---|
96 | totalHeight, tileWidth, tileHeight] |
---|
97 | Returns: -1 if failed for whatever reason |
---|
98 | |
---|
99 | |
---|
100 | |
---|
101 | ******** getZValues ********* |
---|
102 | |
---|
103 | Returns: a list (integers) of z values [numChanges, appId, zValue, appId, zValue ....] |
---|
104 | Returns: -1 if failed for whatever reason |
---|
105 | |
---|
106 | |
---|
107 | |
---|
108 | ******** moveWindow ********* |
---|
109 | |
---|
110 | Moves a window to the specified location (absolute position) in tiled display coordinates. |
---|
111 | The x,y is interpreted as the lower left corner of the application. |
---|
112 | All parameters are integers. |
---|
113 | Returns: 1 if successful. |
---|
114 | Returns: -1 if failed for whatever reason. |
---|
115 | |
---|
116 | |
---|
117 | |
---|
118 | ******** resizeWindow ********* |
---|
119 | |
---|
120 | Resizes a window to the specified size in tiled display coordinates. |
---|
121 | The lower left corner of the display is considered 0,0. |
---|
122 | All parameters are integers. |
---|
123 | Returns: 1 if successful. |
---|
124 | Returns: -1 if failed for whatever reason. |
---|
125 | |
---|
126 | |
---|
127 | |
---|
128 | ******** shareApp ********* |
---|
129 | |
---|
130 | Sends a request to fsManager to share the specified application to the specified display |
---|
131 | Parameters: - appId of the application you want to share |
---|
132 | - ip address and port number of the machine to stream to |
---|
133 | Returns: 1 if succeeded |
---|
134 | Returns: -1 if failed for whatever reason |
---|