Commit 2531530d authored by julien.delange's avatar julien.delange
Browse files

ASN1 files appear to be syntaxically correct



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@692 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 462a3d50
......@@ -135,7 +135,7 @@ package body Ocarina.Backends.ASN1.Deployment is
if Length (Thread_Enumeration) > 0 then
Append_Node_To_List
(Make_Type_Definition
(Get_String_Name ("THREAD-ID"),
(Get_String_Name ("Thread-id"),
Make_Enumerated (Thread_Enumeration)),
ASN1N.Definitions (Module_Node));
end if;
......@@ -143,7 +143,7 @@ package body Ocarina.Backends.ASN1.Deployment is
if Length (Thread_Enumeration) > 0 then
Append_Node_To_List
(Make_Type_Definition
(Get_String_Name ("PORT-ID"),
(Get_String_Name ("Port-id"),
Make_Enumerated (Port_Enumeration)),
ASN1N.Definitions (Module_Node));
end if;
......@@ -155,28 +155,28 @@ package body Ocarina.Backends.ASN1.Deployment is
(Make_Sequence_Member
(Get_String_Name ("sender-thread"),
Make_Defining_Identifier
(Get_String_Name ("THREAD-ID"))),
(Get_String_Name ("Thread-id"))),
Pkt_Contents);
Append_Node_To_List
(Make_Sequence_Member
(Get_String_Name ("sender-port"),
Make_Defining_Identifier
(Get_String_Name ("PORT-ID"))),
(Get_String_Name ("Port-id"))),
Pkt_Contents);
Append_Node_To_List
(Make_Sequence_Member
(Get_String_Name ("receiver-thread"),
Make_Defining_Identifier
(Get_String_Name ("THREAD-ID"))),
(Get_String_Name ("Thread-id"))),
Pkt_Contents);
Append_Node_To_List
(Make_Sequence_Member
(Get_String_Name ("receiver-port"),
Make_Defining_Identifier
(Get_String_Name ("PORT-ID"))),
(Get_String_Name ("Port-id"))),
Pkt_Contents);
Append_Node_To_List
......@@ -187,7 +187,7 @@ package body Ocarina.Backends.ASN1.Deployment is
Packet_Type :=
Make_Type_Definition
(Get_String_Name ("PKT"),
(Get_String_Name ("Pkt"),
Make_Sequence (Pkt_Contents));
Append_Node_To_List
(Packet_Type, ASN1N.Definitions (Module_Node));
......@@ -296,7 +296,7 @@ package body Ocarina.Backends.ASN1.Deployment is
(Parent_Subcomponent (E))));
Thread_Name := Name_Find;
Thread_Name := To_Upper (Thread_Name);
Thread_Name := To_Lower (Thread_Name);
Thread_Name := Replace_Char (Thread_Name, '_', '-');
-- We replace _ by - because ASN1 does not allow
......@@ -359,7 +359,7 @@ package body Ocarina.Backends.ASN1.Deployment is
Get_Name_String_And_Append
(Display_Name (Identifier (F)));
Port_Name := Name_Find;
Port_Name := To_Upper (Port_Name);
Port_Name := To_Lower (Port_Name);
Port_Name := Replace_Char (Port_Name, '_', '-');
-- We replace _ by - because ASN1 does not allow
......@@ -379,9 +379,7 @@ package body Ocarina.Backends.ASN1.Deployment is
Msg_Name := Port_Name;
Msg_Constraints := Make_Type_Constraints
(Size_Down => ASN1V.New_Int_Value
(To_Bytes
(Get_Data_Size
(Corresponding_Instance (F))), 1, 10),
(0, 1, 10),
Size_Up => ASN1V.New_Int_Value
(To_Bytes
(Get_Data_Size
......
......@@ -285,6 +285,7 @@ package body Ocarina.Backends.ASN1_Tree.Generator is
end if;
end loop;
end if;
Write_Eol;
Decrement_Indentation;
Write_Indentation;
Write_Line ("}");
......@@ -321,11 +322,11 @@ package body Ocarina.Backends.ASN1_Tree.Generator is
if Cons /= No_Node then
if Size_Down (Cons) /= No_Value and then
Size_Up (Cons) /= No_Value then
Write_Str (" (");
Write_Str (" (SIZE (");
Write_Str (Image (Size_Down (Cons)));
Write_Str (" .. ");
Write_Str (Image (Size_Up (Cons)));
Write_Str (" )");
Write_Str (" ))");
end if;
end if;
end Generate_Type_Designator;
......
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