Commit 0cd1b435 authored by Maxime Perrotin's avatar Maxime Perrotin

Update Ada code to fit with ASN1SCC V4 changes

parent a03252fc
......@@ -27,48 +27,44 @@ use Interfaces;
package body displayer is
type A_String is access String;
person : asn1Scctm_t;
Person : asn1Scctm_t;
S : A_String;
bTmHasArrived : boolean;
number : asn1SccHK_T_value_to_plot := 0;
hk : aliased asn1SccHK_T;
Number : asn1SccHK_T_value_to_plot := 0;
HK : aliased asn1SccHK_T;
procedure displayer_put_tc(tc: access asn1SccTC_T) is
procedure Displayer_Put_TC (TC: access asn1SccTC_T) is
begin
case asn1SccAction_T_kind(tc.action) is
when display_PRESENT =>
for J in 1 .. asn1SccAction_T_display_get(tc.action).length
loop
person.data(J) :=
asn1SccAction_T_display_get(tc.action).data(J);
case TC.Action.Kind is
when Display_PRESENT =>
for J in 1 .. TC.Action.Display.Length loop
person.data(J) := TC.Action.Display.Data(J);
end loop;
person.length :=
asn1SccAction_T_display_get(tc.action).length;
if (person.length>0) then
Person.Length := TC.Action.Display.Length;
if (person.length > 0) then
bTmHasArrived := True;
end if;
when housekeeping_PRESENT =>
hk := (value_to_plot => number,
destination => asn1SccAction_T_housekeeping_get
(tc.action));
HousekeepingTM(hk'access);
HK := (Value_To_Plot => Number,
Destination => TC.Action.Housekeeping);
HousekeepingTM(HK'access);
when others => null;
end case;
end displayer_put_tc;
procedure cyclicdisplayer is
my_tm : aliased asn1Scctm_t;
i : Integer;
My_TM : aliased asn1Scctm_t;
I : Integer;
begin
system.io.put_line ("cyclicdisplayer");
System.IO.Put_Line ("cyclicdisplayer");
if bTmHasArrived then
for i in 1..person.length loop
my_tm.data(i) := person.data(i);
for i in 1..Person.Length loop
My_TM.Data(i) := Person.Data(i);
end loop;
my_tm.length := person.length;
router_send_tm(my_tm'access);
My_TM.Length := Person.Length;
Router_Send_TM(My_TM'access);
end if;
number := (number + 1) mod 16535;
Number := (Number + 1) mod 16535;
end cyclicdisplayer;
begin
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment