I have a series of messages that are defined by independant structs. These structs share a common header are sent between applications. I am creating a decoder that will take the raw data captures in the messages that were built using these structs and decode/parse them to some plain text.
I have over 1000 different messages that need to be decoded so I am not sure if defining all the struct formats in xml and then using xsl or some translation is the way to go or if there is a better way to do this.
There are times when I will need to decode logs containing over a million messages so performance is a concern.
Any recommendations for techniques/tools/algorithms to go about creating the decoder/parser?
struct: struct { dword messageid; dword datavalue1; dword datavalue2; } struct1;
Example raw data: 0101010A0A0A0A0F0F0F0F
Decoded message (desired output): message id: 0x01010101, datavalue1: 0x0A0A0A0A, datavalue2: 0x0F0F0F0F
I am using c++ to do this development.