D
Damfino
Hi all,
Newbie question here wrt defining a class that will work on bits read
from a binary file. How would you go about doing it? As an example
please look at the structure of my data given below. The data comes in
40 byte packets via stdin or a binary file.
my_Data_pkt(){
syncByte (8bits)
XML_type (2bits)
XML_subtype (2bits)
record_value (3bits)
playout_flag (1bit)
if (playout_flag=='1') {
playout_length (8bits)
for (i=0; i< playout_length; i++){
playout_data
}
}
payload to fill the rest of the 40 bytes
}
How would this be defined as a class?
How would you retrieve the values for the different variables within
the packet?
How would you set the variables to a specific value?
Any help would be appreciated.
Regards
Newbie question here wrt defining a class that will work on bits read
from a binary file. How would you go about doing it? As an example
please look at the structure of my data given below. The data comes in
40 byte packets via stdin or a binary file.
my_Data_pkt(){
syncByte (8bits)
XML_type (2bits)
XML_subtype (2bits)
record_value (3bits)
playout_flag (1bit)
if (playout_flag=='1') {
playout_length (8bits)
for (i=0; i< playout_length; i++){
playout_data
}
}
payload to fill the rest of the 40 bytes
}
How would this be defined as a class?
How would you retrieve the values for the different variables within
the packet?
How would you set the variables to a specific value?
Any help would be appreciated.
Regards