comp.lang.ada
 help / color / mirror / Atom feed
* Re: Variant Record Component
@ 2003-02-28 19:40 David C. Hoos
  0 siblings, 0 replies; 13+ messages in thread
From: David C. Hoos @ 2003-02-28 19:40 UTC (permalink / raw)
  To: comp.lang.ada mail to news gateway

If I understand you correctly, you have defined a variant
records for the variants of the J7.6 message.

It seems to me, then, that the discriminant would be based
upon the Label, Sublabel, and the Message length fields of
the message.  Correct?

If this is the case, then I would think that a case statement
covering all of the possible values of the discriminant would
prevent the code from looking for fields that are not present
in that variant.

In my own fairly significant experience with the generation
and interpretation of tactical messages has not been to
use variant records.  For bit-oriented messages I use a bit
array overlaid on the in-memory message, and use a
specification of the message format to pick out the pieces
of the message.

The original motivation for this approach is that my task
was to provide interoperability between various systems
that express the same or similar information with differing
message formats and communication protocols.  One of the
things I found in doing this was that despite various systems
having been built (supposedly) to the same specifications,
the implementations differ.

As a consequence of this we used a text-based message
format specification (e.g., XML) that could be changed in
the field in order to interpret or produce messages that
were produced by or accepted by the systems actually
encountered.

Thus, the different approach.





^ permalink raw reply	[flat|nested] 13+ messages in thread
* Variant Record Component
@ 2003-02-26 18:00 John Harbaugh
  2003-02-26 19:08 ` Stephen Leake
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: John Harbaugh @ 2003-02-26 18:00 UTC (permalink / raw)


Hi, all -

Is there a way to determine if an object of some variant record type
contains a specific variant component, other than a trying it and
handling a possible constraint error?  I looked for something like and
"in" operator or suitable attribute, but found nothing.

Thanks in advance,

	- John Harbaugh



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

end of thread, other threads:[~2003-03-03  9:24 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-28 19:40 Variant Record Component David C. Hoos
  -- strict thread matches above, loose matches on Subject: below --
2003-02-26 18:00 John Harbaugh
2003-02-26 19:08 ` Stephen Leake
2003-02-27  8:17   ` Anders Wirzenius
2003-02-27  8:46     ` John McCabe
2003-02-26 20:50 ` David C. Hoos
2003-02-28 16:15   ` John Harbaugh
2003-02-28 18:18     ` tmoran
2003-02-28 22:07       ` John Harbaugh
2003-02-28 20:51     ` Randy Brukardt
2003-03-01  2:34     ` Jeffrey Carter
2003-03-03  9:24     ` John McCabe
2003-02-26 21:37 ` tmoran

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