4 with Interfaces
; use Interfaces
;
5 with Unchecked_Conversion
;
9 type Unsigned_24
is new Unsigned_32
range 0 .. 2**24 - 1;
10 subtype Time_T
is Unsigned_24
range 0 .. 24 * 60 * 60 * 128 - 1;
12 type Messages_T
is array (Positive range <>) of Unsigned_8
;
13 subtype T_3Bytes
is Messages_T
(1 .. 3);
24 I1
,I2
,I3
,I4
: Integer;
28 function Conv
is new Unchecked_Conversion
(T_3Bytes
, Rec1
);
30 procedure Decode
(M
: Messages_T
) is
33 My_Rec2
.R1
:= Conv
(M
(1 .. 3));
34 if not My_Rec2
.R1
.F
'Valid then
39 Message
: Messages_T
(1 .. 4) := (16#
18#
, 16#
0C#
, 16#
0C#
, 16#
18#
);