-
Notifications
You must be signed in to change notification settings - Fork 3
JSON RPC Protocol
bpiservicesdev edited this page Jan 10, 2018
·
2 revisions
The communication with the iMatch device is based on the JSON-RPC protocol. The messages consist of the following items:
-
imatch- A string with the protocol version as it's value. i.e. '1.0' -
id- A number used to match the response with the request that it is replying to. i.e. '1' -
device- A string with the name of the device which will perform the following method. i.e. 'sys' -
method- A string with the name of the method to be invoked. i.e. 'datetime' -
params- An object or array of values to be passed as parameters to the defined method. i.e. '(2018, 1, 5, 5, 13, 31, 6, 0)'
-
imatch- A string with the protocol version as it's value. i.e. '1.0' -
id- A number used to match the response with the request that it is replying to. i.e. '1' -
device- A string with the name of the device which sends this response. i.e. 'sys' -
method- A string with the name of the invoked method. i.e. 'datetime' -
data- A string containing the data returned by the invoked method. i.e. '1'
-
sys- The main iMatch device. Provides the following functions:-
datetimereturns the current datetime of the iMatch whenparamsis left empty. Needs to be set on startup! The datetime format is an 8-tuple: (year, month, day, weekday, hours, minutes, seconds, subseconds) -
echoreturns the suppliedparamsasdatain the response.
-