home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada
- Path: sparky!uunet!spool.mu.edu!agate!dog.ee.lbl.gov!news!manta!psm
- From: psm@nosc.mil (Scot Mcintosh)
- Subject: Can this data be represented in Ada?
- Message-ID: <1992Dec31.014719.22174@nosc.mil>
- Organization: Naval Ocean Systems Center, San Diego
- Date: Thu, 31 Dec 1992 01:47:19 GMT
- Lines: 44
-
- 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
-