From: Joseph P Vlietstra <joevl@concentric.net>
Subject: Array of bytes type
Date: 2000/05/19
Date: 2000-05-19T00:00:00+00:00 [thread overview]
Message-ID: <3924E094.6B03B5BD@concentric.net> (raw)
Hi all,
I'm on a project which reuses/modifies code from several sources
and previous projects. While integrating these packages together
we found 5 different declarations for an "array of bytes" type.
The declarations are similar enough that UC will copy slices from
one type to another but different enough to prevent any "clever"
conversions (e.g., overlays will fail due to different sizes in
index type).
We will probably standardize on one array of bytes type, play with
renames, etc. But this effort has raises a question: what is the
plainest, simplest to reuse, declaration of an array of bytes?
(I would hope that some future project will steal/reuse my code
without the headaches I'm facing.)
Alternatives:
1. Roll my own. For example:
type Byte_Array is array(Integer range <>) of Interfaces.Unsigned_8;
This seems like a universally useful array of bytes type;
but I already have 5 different opinions of what a useful array
of bytes type should look like. So I'm thinking about hijacking
something that is already defined in the LRM.
2. Use Stream_Element_Array.
We do a lot of UC between our byte arrays and other data types.
(Commmands come in and telemetry goes out in byte arrays.)
This approach allows the possibility of using 'Read and 'Write
to perform conversions on the byte array (using memory stream).
The problem, of course, is that Stream_Element is implementation
defined and need not match Storage_Element.
BTW: Does anyone know of an implementation where Stream_Element
doesn't match Storage_Element?
3. Use Storage_Element_Array.
Again, this is implementation defined.
(We're using a 32-bit processor, but a lot of spacecraft still
use 1750A processors where the storage element is 16 bits.)
4. FLAME PROTECTION ON
Use String
FLAME PROTECTION OFF
5. Any other ideas?
next reply other threads:[~2000-05-19 0:00 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-19 0:00 Joseph P Vlietstra [this message]
2000-05-19 0:00 ` Array of bytes type Marin D. Condic
2000-05-19 0:00 ` DuckE
2000-05-19 0:00 ` Ken Garlington
2000-05-21 0:00 ` Robert Dewar
[not found] ` <8gae49$tr5$1@slb7.atl.mindspring.net>
2000-05-22 0:00 ` Marin D. Condic
2000-05-22 0:00 ` Ken Garlington
2000-05-22 0:00 ` Marin D. Condic
2000-05-22 0:00 ` David Kristola
2000-05-23 0:00 ` Paul Warren
2000-05-22 0:00 ` Jean-Pierre Rosen
2000-05-19 0:00 ` Jeff Carter
2000-05-20 0:00 ` Ken Garlington
2000-05-19 0:00 ` James S. Rogers
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox