From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 31 Dec 92 01:47:19 GMT From: agate!dog.ee.lbl.gov!news!manta!psm@ucbvax.Berkeley.EDU (Scot Mcintosh) Subject: Can this data be represented in Ada? Message-ID: <1992Dec31.014719.22174@nosc.mil> List-Id: 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