Re: Using GNAT.Sockets with Streams and Byte Swapping
- From: Pascal Obry <pascal@xxxxxxxx>
- Date: 26 May 2005 20:51:31 +0200
"markp" <markwork66@xxxxxxxxx> writes:
> We found the answer to our problem. We have types such as
>
> type x is range 1..5;
>
> We then make records including these types. In the rep specs, we define
> them to be 32 bits. Apparently, GNAT ignores the rep spec when doing
> the 'Write, so we are not sending the correct number of bits. The fix
> is:
This can be solved with the new Ada 2006 Stream_Size attribute.
http://www.adaic.com/standards/rm-amend/html/RM-13-13-2.html
Pascal.
--
--|------------------------------------------------------
--| Pascal Obry Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--| http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595
.
- References:
- Using GNAT.Sockets with Streams and Byte Swapping
- From: markp
- Re: Using GNAT.Sockets with Streams and Byte Swapping
- From: Simon Wright
- Re: Using GNAT.Sockets with Streams and Byte Swapping
- From: markp
- Re: Using GNAT.Sockets with Streams and Byte Swapping
- From: Duncan Sands
- Re: Using GNAT.Sockets with Streams and Byte Swapping
- From: markp
- Using GNAT.Sockets with Streams and Byte Swapping
- Prev by Date: Re: memory management
- Next by Date: Re: Gnat STORAGE_ERROR
- Previous by thread: Re: Using GNAT.Sockets with Streams and Byte Swapping
- Next by thread: Re: Using GNAT.Sockets with Streams and Byte Swapping
- Index(es):
Relevant Pages
|