View Single Post
Old March 8th, 2010   #1
hamish's Avatar
Join Date: Apr 2009
Location: Dartmoor, Devon, England
Posts: 56
Send a message via Skype™ to hamish
Question Status Message Markers

Here is a problem that I've come up against when parsing Status messages with the % replaceable parameters.

In Table B-1 there are two format Markers, %d & %x and there is one Specifier %L for a Slot Label.

When producing an informative Status message for a UI, instead of printing "Sensor 2 out of range", printing "Sensor Array Temperature out of range" would be more helpful. The user does not want to go look up what sensor 2 is.

To achieve the above, involves parsing the Message to look for the string "Sensor" before inserting the sensor description.

Offering an additional marker such as %S specifically for sensor indexes would greatly simplify this process and make it more robust for Manufacturer defined Status Messages
hamish is offline   Reply With Quote