billvaglienti / ProtoGen

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

Added "pktPrefix" parameter #43

Closed SchrodingersGat closed 7 years ago

SchrodingersGat commented 7 years ago

For the purposes of "shorthand" I have added the pktPrefix property to the tag. The purpose of this parameter is to add a common prefix for packet ID values (but only where an ID value is not explicitly specified).

e.g.

<Protocol name="ProtocolName" pktPrefix="PROTOCOL_PKT_">
<Packet name="GPS_Data">
<Data ... />
</Packet>
</Protocol>

will produce a packet with name ProcotolName and ID _PROTOCOL_PKT_GPSDATA

If the pktPrefix parameter is not defined then there will be no change to generated code.

SchrodingersGat commented 7 years ago

Never mind, worked out a better way of doing this.