JMP Protocol
MESSAGING
The JMP server implementation is not Master-Slave however there are a number
of 'Requests' that have 'Responses' which is typical for such a server. In
addition to this, unsolicited messages may be received from the server. These
provide immediate notification for changes in I/O status and updates in
configuration settings for instance. Any use of this implementation must
handle the presence of unsolicited messages. Care is also required to pair
responses with the associated requests as messaging order is not guaranteed.
Optional Meta data supplied with a Request is returned with the Response
unmodified. This can then be used to identify each response and the action
it then requires.
Common Message Structure
All messages use JSON formatting. Each consists of a set of members enclosed
by curly braces '{' and '}'. An empty set is acceptable '{}' although it
would be ignored by the server and solicit no response. A set may consist of
any number of members separated by commas. Each member represents a name/value
pair where the name is separated from the value by a colon ':'. The value
can be a string, number, object, array, true, false or null. The members are
referenced by name and therefore may appear in any order. An array however
consists of 0 or more elements each of which are values separated by a commas
and presented in sequence dependent order.
THE MESSAGE MEMBER
JMP requires that each valid message contain a 'Message' member. This is a
name/value pair where the name is exactly the string "Message" and the value
separated by the colon be any one of the following.
Client generated messages:
"Status"
"Control"
"Registry List"
"Registry Read"
"Registry Write"
"Registry Write Encrypted"
"Enumerate Devices"
"Read Devices"
"Write Devices"
"Console Open"
"Console Stdin"
"Console Close"
Server generated responses:
"Registry List Response"
"Registry Response"
"Enumerate Devices Response"
"Read Devices Response"
"Write Devices Response"
"Console Response"
"Error"
"Authenticated"
Server generated messages (unsolicited):
"Monitor"
"Registry Update"
"Console Stdout"
Messages received by the server not containing a valid "Message" member are
ignored. These will not cause an error or solicit any response.
META MESSAGE MEMBER
The "Meta" message member is entirely optional and since its associated value
may be an object it can contain any information and any amount of information.
The value of this message pair is ignored by the server. However, the entire
pair is returned unmodified with the associated response. The "Meta" object
then can contain detailed application specific information that later can be
used by the client to synchronize Responses and Requests or to determine
any other appropriate course of action when the Response is received.
GENERAL MESSAGE CONTENT
Any number of message members may appear in the message although only those
appropriate for the specific request will be used. All others will be ignored.
One possible use for any extra message members beyond those required by the
request is in providing debug information when viewed/logged on the wire
using Wireshark
https://wireshark.org for instance.
SEE ALSO
HELP Topics:
INITIALIZE,
JMP,
JMPCONNECT
[/flash/manpages/protocol.hlp:254]