Mercurial > 510ConnectbotMonitor
annotate xml/510connectbotmonitor.in @ 25:3975d341e3dd stable-1.0.4-0
document synchronization issues
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Fri, 01 May 2015 12:31:25 -0700 |
parents | 2586a4f5c8c3 |
children | 0bc0b4798d9e |
rev | line source |
---|---|
1 | 1 <reference> |
2 <title>@PACKAGE@ - Version @VERSION@</title> | |
3 <partintro> | |
4 <title>Packages</title> | |
5 | |
6 <para>The various source and binary packages are available at <ulink | |
7 url="http://www.five-ten-sg.com/@PACKAGE@/packages/">http://www.five-ten-sg.com/@PACKAGE@/packages/</ulink>. | |
8 The most recent documentation is available at <ulink | |
9 url="http://www.five-ten-sg.com/@PACKAGE@/">http://www.five-ten-sg.com/@PACKAGE@/</ulink>. | |
10 </para> | |
11 | |
12 <para>A <ulink | |
13 url="http://www.selenic.com/mercurial/wiki/">Mercurial</ulink> source | |
14 code repository for this project is available at <ulink | |
15 url="http://hg.five-ten-sg.com/@PACKAGE@/">http://hg.five-ten-sg.com/@PACKAGE@/</ulink>. | |
16 </para> | |
17 | |
18 </partintro> | |
19 | |
20 <refentry id="x@PACKAGE@.1"> | |
21 <refentryinfo> | |
25
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
22 <date>2015-05-01</date> |
1 | 23 <author> |
24 <firstname>Carl</firstname> | |
25 <surname>Byington</surname> | |
26 <affiliation><orgname>510 Software Group</orgname></affiliation> | |
27 </author> | |
28 </refentryinfo> | |
29 | |
30 <refmeta> | |
31 <refentrytitle>@PACKAGE@</refentrytitle> | |
32 <manvolnum>1</manvolnum> | |
33 <refmiscinfo>@PACKAGE@ @VERSION@</refmiscinfo> | |
34 </refmeta> | |
35 | |
36 <refnamediv id='name.1'> | |
37 <refname>@PACKAGE@</refname> | |
38 <refpurpose>a monitoring package for the android terminal emulator</refpurpose> | |
39 </refnamediv> | |
40 | |
41 <refsect1 id='build.1'> | |
42 <title>Build method</title> | |
43 <para> | |
44 This is an android project with no native code, so | |
45 "android update project -p . -t android-16; ant debug" | |
46 should build cleanly. | |
47 </para> | |
48 </refsect1> | |
49 | |
50 <refsect1 id='introduction.1'> | |
51 <title>Introduction</title> | |
52 <para> | |
53 This is a stub monitoring application for the related | |
54 510 Connectbot android terminal emulator package. | |
55 </para> | |
56 </refsect1> | |
57 | |
58 <refsect1 id='monitor.1'> | |
59 <title>Terminal Monitor</title> | |
60 <para> | |
2 | 61 For every terminal session (local, telnet, ssh or tn5250), the |
1 | 62 terminal emulator also makes a connection to a terminal monitor |
2 | 63 process, which can see cursor movement and screen contents, and can |
1 | 64 inject characters to send to the host. |
65 </para> | |
66 | |
67 <para> | |
68 The terminal monitor is invoked by calling an android Intent | |
69 named "com.five_ten_sg.connectbot.monitor.MonitorService". That | |
70 ensures that the monitor process is running, and should then | |
71 be listening on TCP port 6000 for incoming connections. The terminal | |
72 emulator then connects to the terminal monitor on port 6000. | |
73 The native android Intent and Service communication mechanisms | |
74 are not used. | |
75 </para> | |
76 | |
77 <para> | |
78 The messages exchanged between the terminal emulator and the | |
79 terminal monitor are arrays of uint16 values in network byte | |
80 order. Each message starts with a uint16 message byte length, | |
81 followed by that many bytes of data. Note that the message length | |
82 will always be even. The next uint16 contains the message | |
83 command value, and the remaining uint16 values are the arguments | |
84 if any for that command. | |
85 </para> | |
86 | |
87 <para> | |
88 Any arguments that are keystrokes or characters are represented | |
89 as 16 bit unicode. Note that the first 256 such characters are | |
90 identical to the ISO-8859-1 latin character set. | |
91 </para> | |
92 | |
93 <para> | |
94 INIT = 0 (TE -> Monitor). The argument is a string of uint16 | |
95 characters. The meaning of these characters is defined by the | |
96 monitor. It might be a fully qualified path name, or some other | |
97 data used by the monitor to drive the monitoring of this | |
98 connection. | |
99 </para> | |
100 | |
101 <para> | |
102 ACTIVATE = 1 (TE -> Monitor). The first argument is the | |
103 number of lines. The second argument is the number of columns. | |
25
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
104 That is followed by lines*columns uint16 character codes for |
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
105 the current screen contents. |
1 | 106 This connection is now the active connection. It is the |
107 topmost (or only) window visible to the user - typed keystrokes | |
108 will be sent to the host on the other end of this connection. | |
109 </para> | |
110 | |
111 <para> | |
2 | 112 KEYSTATE = 2 (TE -> Monitor). The argument is a single uint16 |
113 value, 1 for key down, 0 for key up. The TE tracks a single special | |
114 key for the monitor, and reports key up/down state when it changes. | |
25
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
115 The actual key should be configurable. |
1 | 116 </para> |
117 | |
118 <para> | |
119 CURSORMOVE = 3 (TE -> Monitor). | |
23
2586a4f5c8c3
add mechanism to allow getfield from other threads
Carl Byington <carl@five-ten-sg.com>
parents:
18
diff
changeset
|
120 The first argument is the line number (0..23), |
2586a4f5c8c3
add mechanism to allow getfield from other threads
Carl Byington <carl@five-ten-sg.com>
parents:
18
diff
changeset
|
121 the second argument is the column number (0..79), and the third |
2586a4f5c8c3
add mechanism to allow getfield from other threads
Carl Byington <carl@five-ten-sg.com>
parents:
18
diff
changeset
|
122 argument is the reason for sending this cursor update. REASON=0 is |
2586a4f5c8c3
add mechanism to allow getfield from other threads
Carl Byington <carl@five-ten-sg.com>
parents:
18
diff
changeset
|
123 from a previous CURSORREQUEST command. REASON=1 is a cursor update |
2586a4f5c8c3
add mechanism to allow getfield from other threads
Carl Byington <carl@five-ten-sg.com>
parents:
18
diff
changeset
|
124 related to the previous SCREENCHANGE buffer update. REASON=2 is |
2586a4f5c8c3
add mechanism to allow getfield from other threads
Carl Byington <carl@five-ten-sg.com>
parents:
18
diff
changeset
|
125 a cursor update caused by user keystrokes. |
1 | 126 </para> |
127 | |
128 <para> | |
129 SCREENCHANGE = 4 (TE -> Monitor). The first argument is the | |
130 number of lines. The second argument is the number of columns. | |
25
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
131 That is followed by lines*columns uint16 character codes for |
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
132 the current screen contents. |
1 | 133 </para> |
134 | |
135 <para> | |
136 FIELDVALUE = 5 (TE -> Monitor). | |
137 SETFIELD = 5 (Monitor -> TE). | |
138 The first argument is the line number (0..23) | |
139 and the second argument is the column number (0..79). | |
140 That is followed by the field value, a sequence of uint16 | |
141 character codes from the screen buffer. The field | |
142 covers N columns, where N = (message length - 4) / 2. | |
143 When sent from the monitor to the emulator, this causes | |
18
a94ca5a89fe8
add cursor request command to the TE
Carl Byington <carl@five-ten-sg.com>
parents:
16
diff
changeset
|
144 the emulator to send the field codes to the host (for async |
a94ca5a89fe8
add cursor request command to the TE
Carl Byington <carl@five-ten-sg.com>
parents:
16
diff
changeset
|
145 modes) or to set the specified field contents (for block modes). |
a94ca5a89fe8
add cursor request command to the TE
Carl Byington <carl@five-ten-sg.com>
parents:
16
diff
changeset
|
146 This is also used as the reply message from the emulator to the |
1 | 147 monitor for a previous GETFIELD from the monitor. |
148 </para> | |
149 | |
150 <para> | |
151 GETFIELD = 6 (Monitor -> TE). | |
152 The first argument is the line number (0..23) | |
153 and the second argument is the starting column number (0..79), | |
154 and the third argument is the field length in columns. | |
155 This command causes the emulator to send a FIELDVALUE message | |
156 back to the monitor. | |
157 </para> | |
158 | |
159 <para> | |
160 SCREENWATCH = 7 (Monitor -> TE). | |
161 The first argument is the line number (0..23) | |
162 and the second argument is the starting column number (0..79), | |
163 and the third argument is the field length in columns. | |
164 This command causes the emulator to watch the specified | |
165 part of the screen for changes. When that part of the screen | |
166 changes, the emulator will send a SCREENCHANGE message back | |
25
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
167 to the monitor. The initial screen watch area is the entire |
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
168 screen. |
1 | 169 </para> |
2 | 170 |
171 <para> | |
13 | 172 DEPRESS = 8 (Monitor -> TE). The argument is a single uint16 |
173 value containing the vk_key value. This command causes the emulator | |
174 to simulate a keypress for that key. The codes are defined | |
175 <ulink url="http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731">here</ulink>. | |
176 </para> | |
177 | |
178 <para> | |
179 SHOWURL = 9 (Monitor -> TE). The single argument is a sequence | |
180 of uint16 character codes forming a URL to be displayed. | |
2 | 181 </para> |
16
a481d8fb5571
add switch session command to the TE
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
182 |
a481d8fb5571
add switch session command to the TE
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
183 <para> |
a481d8fb5571
add switch session command to the TE
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
184 SWITCHSESSION = 10 (Monitor -> TE). There are no arguments. The TE |
a481d8fb5571
add switch session command to the TE
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
185 should display this session. |
a481d8fb5571
add switch session command to the TE
Carl Byington <carl@five-ten-sg.com>
parents:
13
diff
changeset
|
186 </para> |
18
a94ca5a89fe8
add cursor request command to the TE
Carl Byington <carl@five-ten-sg.com>
parents:
16
diff
changeset
|
187 |
a94ca5a89fe8
add cursor request command to the TE
Carl Byington <carl@five-ten-sg.com>
parents:
16
diff
changeset
|
188 <para> |
a94ca5a89fe8
add cursor request command to the TE
Carl Byington <carl@five-ten-sg.com>
parents:
16
diff
changeset
|
189 CURSORREQUEST = 11 (Monitor -> TE). There are no arguments. The TE |
a94ca5a89fe8
add cursor request command to the TE
Carl Byington <carl@five-ten-sg.com>
parents:
16
diff
changeset
|
190 should send a CURSORMOVE update to the monitor. Cursor movement caused |
a94ca5a89fe8
add cursor request command to the TE
Carl Byington <carl@five-ten-sg.com>
parents:
16
diff
changeset
|
191 by SETFIELD or DEPRESS commands does not trigger CURSORMOVE updates |
a94ca5a89fe8
add cursor request command to the TE
Carl Byington <carl@five-ten-sg.com>
parents:
16
diff
changeset
|
192 in block mode (tn5250) sessions. Those commands do trigger CURSORMOVE |
a94ca5a89fe8
add cursor request command to the TE
Carl Byington <carl@five-ten-sg.com>
parents:
16
diff
changeset
|
193 updates in async mode (telnet, ssh) sessions. |
a94ca5a89fe8
add cursor request command to the TE
Carl Byington <carl@five-ten-sg.com>
parents:
16
diff
changeset
|
194 </para> |
1 | 195 </refsect1> |
196 | |
25
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
197 <refsect1 id='synchronization.1'> |
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
198 <title>Synchronization issues</title> |
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
199 <para> |
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
200 The terminal emulator should delay sending CURSORMOVE and SCREENCHANGE |
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
201 messages until the socket has been quiet for 10 milliseconds or until |
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
202 the 5250 block mode terminal keyboard has been unlocked by the host. |
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
203 The monitor might send SETFIELD or DEPRESS messages in response to |
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
204 those CURSORMOVE or SCREENCHANGE messages. If the 5250 block mode |
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
205 keyboard is locked, the terminal emulator should buffer those keystrokes |
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
206 and send them when the keyboard unlocks. |
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
207 </para> |
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
208 </refsect1> |
3975d341e3dd
document synchronization issues
Carl Byington <carl@five-ten-sg.com>
parents:
23
diff
changeset
|
209 |
1 | 210 <refsect1 id='todo.1'> |
211 <title>TODO</title> | |
212 <para> | |
213 Nothing. | |
214 </para> | |
215 </refsect1> | |
216 | |
217 <refsect1 id='copyright.1'> | |
218 <title>Copyright</title> | |
219 <para> | |
220 Copyright (C) 2014 by 510 Software Group <carl@five-ten-sg.com> | |
221 </para> | |
222 <para> | |
223 This program is free software; you can redistribute it and/or modify it | |
224 under the terms of the GNU General Public License as published by the | |
225 Free Software Foundation; either version 3, or (at your option) any | |
226 later version. | |
227 </para> | |
228 <para> | |
229 You should have received a copy of the GNU General Public License along | |
230 with this program; see the file COPYING. If not, please write to the | |
231 Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. | |
232 </para> | |
233 </refsect1> | |
234 | |
235 <refsect1 id='version.1'> | |
236 <title>Version</title> | |
237 <para> | |
238 @VERSION@ | |
239 </para> | |
240 </refsect1> | |
241 </refentry> | |
242 | |
243 </reference> |