From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,FAKE_REPLY_C, MAILING_LIST_MULTI autolearn=unavailable autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e8550e5b10c2c0 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-02-28 11:41:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!news.telebyte.nl!proxad.net!freenix!enst.fr!not-for-mail From: "David C. Hoos" Newsgroups: comp.lang.ada Subject: Re: Variant Record Component Date: Fri, 28 Feb 2003 13:40:36 -0600 Organization: ENST, France Message-ID: Reply-To: "comp.lang.ada mail to news gateway" NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1046461271 12018 137.194.161.2 (28 Feb 2003 19:41:11 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Fri, 28 Feb 2003 19:41:11 +0000 (UTC) To: "comp.lang.ada mail to news gateway" Return-Path: X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.1 Precedence: list List-Id: comp.lang.ada mail to news gateway List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Xref: archiver1.google.com comp.lang.ada:34739 Date: 2003-02-28T13:40:36-06:00 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.