a PHP function will take the first two characters to identify the nature of the data and use the rest of the data to parse values per the specific definition.
Given HEX data values (like 02000a670867350000010000 ),
*and* given an array definition of currently 17 different data types. the format to hold this information is TBD (currently on paper), but they will be something similar to this one example element:
typedef = [
byte = ID,
byte = status,
int16 = value1,
int16 = value2,
int8 = other1,
int8 = other2,
int8 = other3,
uint8 = other4,
uint8 = other5,
uint8 = other6,
take the first 2 digits to determine the message type, then take the typedef of the data to cut the data into pieces which are then translated from HEX to decimal/text, which gets returned as a simple, flat JSON (the above will translate as follows):
Looking for a simple function which takes the data and returns the JSON will do. Important is that at any time new data definitions and data types may be added and error messages are generated in case the data does not satisfy the format.
Testing: a data set and a REST webservice is available to check the outcome of each value. Ie. the values should match the outcome of the REST service.