All messages are utf-8 encoded.
A message consists of several fields
Each field is delimitered by a space (
), and each message is delimitered by a CRLF character (\r\n
).
This indicates the type of the message. Currently there are:
status
command
Depending on this field, there are other fields.
A status message will have a total of 4 fields.
The 1st field has already been discussed. The other fields are:
Type of status. Currently there are:
temperature
power
cycle
power
and cycle
both have just 1 more field: the actual state.
The state of power
is either on
or off
and indicates whether or not the machine is running a program. (e.g. status power on
)
The state of cycle
is a number, indicating the current cycle. (Every cycle starts at denaturation.) (e.g. status cycle 2
)
temperature
has two more, the sensor where the temperature has been measured, and then the temperature in celsius as a double. (e.g. status temperature thermistor_rear 82
)
The command sent. Currently there are:
request
returns all statusesstart
starts a thermocycle program.
request
doesn't have any other fields. (e.g. command request
)
start
has the number of cycles as its 3rd field. (e.g. command start 30
)