comp.lang.ada
 help / color / mirror / Atom feed
From: agate!dog.ee.lbl.gov!news!manta!psm@ucbvax.Berkeley.EDU  (Scot Mcintosh)
Subject: Can this data be represented in Ada?
Date: 31 Dec 92 01:47:19 GMT	[thread overview]
Message-ID: <1992Dec31.014719.22174@nosc.mil> (raw)

I'm implementing a data communications protocol that has some data
structural features that don't look possible to implement in Ada.
Perhaps someone more experienced can suggest a way to accomplish
what I'm trying to do (changing the protocol is not an option).

A Transmission Unit looks like:

+---------+----------+-----------+------+
| Packet  |  Packet1 |  Packet2  | etc  |
| Length  |          |           |  ... |
+---------+----------+-----------+------+
    |     |<-------->|<--------->|
    |          ^          ^
    |          |          |
    |__________|__________+


Each Packet looks like:

+---------+----------+--------------+
| Data    |  Data    |  Padding     | 
| Length  |          |(i.e. nothing)| 
+---------+----------+--------------+
|   |     |<-------->               |
|   |          ^                    |
|   |          |                    |
|   |__________|                    |
|                                   |
|<--------------------------------->|
        Packet Length

For a given transmission, the Packet Length is fixed, but can be
different in the next transmission. The Data Length within each
Packet can be different for each Packet. I've tried to figure out how
to define Ada types for the Transmission Unit and Packet that
allow for the variability of the field sizes and haven't succeeded.
Any ideas? Thanks in advance.


-- 
----
Scot McIntosh
Internet: psm%helios.nosc.mil@nosc.mil
UUCP:     I have no idea

             reply	other threads:[~1992-12-31  1:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1992-12-31  1:47 Scot Mcintosh [this message]
  -- strict thread matches above, loose matches on Subject: below --
1992-12-31 23:22 Can this data be represented in Ada? agate!linus!linus.mitre.org!linus!sdl
1993-01-03  5:06 James Crigler
1993-01-04 18:49 Stephe Leake
1993-01-06 19:11 Robert I. Eachus
replies disabled

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