billvaglienti / ProtoGen

Communications protocol generation software
MIT License
30 stars 16 forks source link

Missing packet structure definitions for packets which have initial or verify values #70

Closed SchrodingersGat closed 6 years ago

SchrodingersGat commented 6 years ago
  1. Say you have a packet MyPacket which contains the variable MyStruct. The packet is set to parameterInterface (but not structureInterface).
  2. MyStruct contains variables that have initialValue or verifyMinValue or verifyMaxValue parameters
  3. Due to structureInterface not being set, the MyPacket_t structure is not defined
  4. Protogen will write code to initialize and verify MyPacket (due to the inclusion of MyStruct)
  5. These functions will reference a non-existent MyPacket_t struct

I believe that if a packet contains any variables or structures that have initial or verify values, then the packet structure must be also defined, even if structureInterface is set to false.

SchrodingersGat commented 6 years ago

Version: 2.11.c

SchrodingersGat commented 6 years ago

image

Here the functions (generated by Protogen) are failing because the structure definition for packet Servo_SetConfigBits_t has not been defined anywhere...

SchrodingersGat commented 6 years ago

Current workaround is to ensure that structureInterface is set to true for affected packets. But this is not ideal.

billvaglienti commented 6 years ago

I updated to logic that forces the structure declaration, version 2.11.d. Give that a try. If it doesn't solve it, then send me your protocol.xml file so I can debug more thoroughly.

SchrodingersGat commented 6 years ago

That's done the trick! Thanks very much :)