comp.lang.ada
 help / color / mirror / Atom feed
* Record Elements and Endian Conversion
@ 2013-01-10 17:31 awdorrin
  2013-01-10 18:32 ` Dmitry A. Kazakov
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: awdorrin @ 2013-01-10 17:31 UTC (permalink / raw)


I am migrating legacy code written for the PowerPC platform to X86, and have been running into Endian issues throughout the code.

In the latest issue I've discovered, a section of code in which a record has been defined that has 111 components of various data types.

Is there any mechanism within Ada that would provide a way to iterate across all components of a record, perhaps providing their data types?

Problem I have is that this record is used (via a MEMCPY call) to populate a buffer used to transmit an message via Ethernet. While I have adjusted the record's representation clause to put the data fields of the record into the correct bit location, those fields larger than a byte are of the wrong Endianness within the buffer.

Thanks,
-Al



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-01-11 14:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-10 17:31 Record Elements and Endian Conversion awdorrin
2013-01-10 18:32 ` Dmitry A. Kazakov
2013-01-10 18:47 ` Niklas Holsti
2013-01-10 19:40 ` awdorrin
2013-01-11 14:44 ` Marc C

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox