next up previous contents
Next: Operators in the group Up: Server stack machine Previous: MathCap

Examples

Example: We show examples of message_body. Serial numbers are omitted.

1.
executeStringByLocalParser("12345 ;");

is converted into the following packet. Each number denotes one byte in hexadecimal representation. (yy) in xx(yy) represents the corresponding ASCII code.

0   0   2   2   0   0   0   4   0   0   0   7  
31(1)  32(2)  33(3)  34(4)  35(5)  20  3b(;)   
0   0   2   1   0   0   1   c

Each data has the following meaning.

0   0   2   2  (OX_DATA) 0   0   0   4  (CMO_STRING)
0   0   0   7  (size)
31(1)  32(2)  33(3)  34(4)  35(5)  20  3b(;)   (data)
0   0   2   1  (OX_COMMAND) 
0   0   1   c  (SM_executeStringByLocalParser)
This is expressed by OXexpression as follows.
(OX_DATA, (CMO_STRING, 7, "12345 ;"))
(OX_COMMAND, (SM_executeStringByLocalParser))

2.
A message which requests SM_popString:
0   0   2   1  (OX_COMMAND) 
0   0   1   7  (SM_popString)
In OXexpression it is represented as (OX_COMMAND, (SM_popString)).

The server returns the following reply message:

0   0   2   2   (OX_DATA) 
0   0   0   4   (CMO_STRING) 0   0   0   5  (size)
31(1)  32(2)  33(3)  34(4)  35(5)
In OXexpression it is represented as (OX_DATA, (CMO_STRING, 7, "12345 ;")).



Nobuki Takayama 平成14年1月21日