billvaglienti / ProtoGen

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

Added structureSufffix for structure naming #57

Closed SchrodingersGat closed 7 years ago

SchrodingersGat commented 7 years ago

This PR adds the suffix '_packet_t' to structures automatically created based on a packet, rather than simply '_t'

e.g. a packet defined as

<Packet name="Test">
 <Data name="a" inMemoryType="unsigned16"/>
</Packet>

will be structured as:


typedef struct
{
  uint16_t a;
} Test_packet_t;
SchrodingersGat commented 7 years ago

That's a great idea.

jefffisher commented 7 years ago

Maybe prefixes too while you're at it...?

SchrodingersGat commented 7 years ago

In the code there's already provision for:

packetStructureSuffix and packetParameterSuffix - do these achieve similar things?

billvaglienti commented 7 years ago

No, these are the suffix for the function names, not the structure names.

Bill Vaglienti 541 399 7883 4207 Post Canyon Hood River OR, 97031

On Sun, Jun 4, 2017 at 8:31 PM, Oliver notifications@github.com wrote:

In the code there's already provision for:

packetStructureSuffix and packetParameterSuffix - do these achieve similar things?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/billvaglienti/ProtoGen/pull/57#issuecomment-306095318, or mute the thread https://github.com/notifications/unsubscribe-auth/AKWWHnc2Yf7qfsRgmAYUhgtagrFjwsXFks5sA3Z5gaJpZM4Nt0K4 .

SchrodingersGat commented 7 years ago

Ah yes. Then structureSuffix and packetSuffix would make sense.