comp.lang.ada
 help / color / mirror / Atom feed
From: "David C. Hoos" <david.c.hoos.sr@ada95.com>
To: "comp.lang.ada mail to news gateway" <comp.lang.ada@ada.eu.org>
Subject: Re: Variant Record Component
Date: Fri, 28 Feb 2003 13:40:36 -0600
Date: 2003-02-28T13:40:36-06:00	[thread overview]
Message-ID: <mailman.10.1046461270.1343.comp.lang.ada@ada.eu.org> (raw)

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.





             reply	other threads:[~2003-02-28 19:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-28 19:40 David C. Hoos [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-02-26 18:00 Variant Record Component 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
replies disabled

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