Please note the update to the Message structure. A unique random ID has been added to each message (auto-generated upon instantiation). Timestamp implementation has also been added (also auto-generated). The code has been added below (Just kidding, formatting fail, here's a Gdrive Link instead). It currently resides in the MonitoringAndLogging section of the 411 repository - Whoever is keeping the repos updated should update the 440 one with version 5 of the Message class.
As an example, here is how you create a message - notice the order of the parameters, this is important. Also notice how you are not passing in timestamp, checksum or uuid parameters - these are automatically created.
In order to decode a message coming from the serial port as a JSON string, you should use the following method. It returns a fully populated message object:
Health Code implementation rules and dictionaries are currently in development - We are still deciding whether this assigns a priority to the message, designates its type (error, control, info, ect) or both. If you have any ideas, feel free to contribute in the comments. The Payload formatting is still up to teams to decide - if nobody puts out anything in the next two weeks, the monitoring and logging team will step in and start putting together a standard.
No comments:
Post a Comment