At present, there is a very common data structure as follows:
typedef struct
{
union
{
unsigned short word;
struct
{
unsigned code1 :3;
unsigned code2 :5;
unsigned code3 :2;
unsigned code4 :6;
}block;
}order;
...
}
In order to be compatible with a large number of early module codes, this is a necessary data structure, and this data structure will be transmitted with high-level programming languages.
After careful study, the conclusion is that under the current use scenario, the union cannot be serialized in general, but can only be parsed in a targeted way. In consideration of the universality of Jstruct, it is recommended to negotiate the special data types that may be encountered at present and in the future.
At present, there is a very common data structure as follows:
In order to be compatible with a large number of early module codes, this is a necessary data structure, and this data structure will be transmitted with high-level programming languages.
After careful study, the conclusion is that under the current use scenario, the union cannot be serialized in general, but can only be parsed in a targeted way. In consideration of the universality of Jstruct, it is recommended to negotiate the special data types that may be encountered at present and in the future.