source: trunk/src/testing/bin/sageProxy/README @ 4

Revision 4, 4.3 KB checked in by ajaworski, 13 years ago (diff)

Added modified SAGE sources

Line 
1---------------------------------------------------
2               
3                SAGE PROXY README
4
5---------------------------------------------------
6(last updated on July, 2007)   
7
8
9(0) DESCRIPTION
10---------------------------------------------------
11SageProxy exposes SAGE commands through web-services (XML-RPC). This allows
12you to easily talk to SAGE without using sockets and writing your own
13complete 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
37Brings the application window to front (on top of the other ones).
38Returns: 1 if everythin went OK and the message was sent
39Returns: -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
46Closes the app corresponding to the specified appId.
47Returns: 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)
50Returns: -1 if failed for whatever reason
51
52
53
54********    executeApp    *********
55
56Starts a new application with appName (string) and configNum (int). You can also optionally specify
57initial position and size of the application window that you pass in as a tuple of integers.
58If the application itself requires some command line arguments during startup, those can be
59specified as well with the optionalArgs parameter (string).
60Shareable parameter is used when you want to run the application through sageBridge which
61means that it can be shared among other displays. If False it will run the app locally.
62Returns: 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)
65Returns: -1 if failed for whatever reason
66
67
68
69********    getAllAppID    *********
70
71Returns all the app ID currently running on SAGE
72
73
74
75********    getAppList    *********
76
77Returns: a list (strings) of app names available for running
78Returns: -1 if failed for whatever reason
79
80
81
82********    getAppStatus    *********
83
84If called without parameters it will return the status for all currently running applications.
85If called with appId parameter it will return the status just for that application.
86Returns: 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]
89Returns: -1 if failed for whatever reason
90
91
92
93********    getDisplayInfo    *********
94
95Returns: a list (integers): [totalNumTiles, numTilesX, numTilesY, totalWidth,
96                             totalHeight, tileWidth, tileHeight]
97Returns: -1 if failed for whatever reason
98
99
100
101********    getZValues    *********
102
103Returns: a list (integers) of z values [numChanges, appId, zValue, appId, zValue ....]
104Returns: -1 if failed for whatever reason
105
106
107
108********    moveWindow    *********
109
110Moves a window to the specified location (absolute position) in tiled display coordinates.
111The x,y is interpreted as the lower left corner of the application.
112All parameters are integers.
113Returns: 1 if successful.
114Returns: -1 if failed for whatever reason.
115
116
117
118********    resizeWindow    *********
119
120Resizes a window to the specified size in tiled display coordinates.
121The lower left corner of the display is considered 0,0.
122All parameters are integers.
123Returns: 1 if successful.
124Returns: -1 if failed for whatever reason.
125
126
127
128********    shareApp    *********
129
130Sends a request to fsManager to share the specified application to the specified display
131Parameters: - appId of the application you want to share
132            - ip address and port number of the machine to stream to
133Returns: 1 if succeeded
134Returns: -1 if failed for whatever reason
Note: See TracBrowser for help on using the repository browser.