billvaglienti / ProtoGen

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

Redefine getPacketTypeID() functions as macros #20

Closed jefffisher closed 8 years ago

jefffisher commented 8 years ago

Not sure if it makes any sense to actually implement it, but it'd be nice to be able to do, e.g.:

switch (getNovatelPacketID())
{
case getBinaryResponsePacketID():
    // Do something...
    break;
};

So in that particular case, it'd be a change in NovatelPackets.h that'd look something like this:

- uint32_t getBinaryResponsePacketID(void);
+ #define getBinaryResponsePacketID() (1)
billvaglienti commented 8 years ago

Done, version 1.4.8.a