Rust access library to read/write iChen® 4 Open Protocol™ messages.
Details on the protocol can be found in this document.
Beware that all data types defined in this crate use borrowed string slices (i.e.
This is because the most common usage pattern is to create a data variable, set fields, immediately
serialize it into JSON, then dispose of the data variable. The deserialization story is similar.
Error values also borrow heavily from the input fields as these errors are expected to be handled as soon as possible.
The result is minimal allocations and copying, but at the cost of stricter lifetime management, especially when deserializing -- the message struct cannot out-live the original JSON text string as fields are borrowed extensively from the original JSON string.
Another implication due to extensive usage of borrowed string slices is that string literals with
escape sequences will cause parsing errors because the actual string cannot be simply borrowed from
the original JSON string. Luckily this is extremely rare for most fields holding names, ID's etc.
For this reason, only certain user-defined text fields (such as
job_card_id) may contain
escaped characters (especially the double-quote); those are therefore modeled using
A data structure containing the current known status of a controller.
General authorizations to access the iChen System via Open Protocol.
A data structure containing a single physical geo-location.
A 32-bit numeric ID that cannot be zero or negative.
A data structure containing information on a production job (i.e. a job card).
A general data structure holding a key and value pair.
Common options of an Open Protocol message.
A data structure containing information on a single user on the system.
A data structure containing a snapshot of the current known states of the controller.
Job modes of the controller.
Supported UI languages for the controller's HMI.
All Open Protocol message types.
Operating modes of the controller.
Result error type.