Commit 1efde028 authored by yoogx's avatar yoogx

* Generate MaxMessageSize from data Source_Data_Size

        For openaadl/ocarina#233
parent e19e0d99
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2018 ESA & ISAE. --
-- Copyright (C) 2018-2019 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -299,16 +299,21 @@ package body Ocarina.Backends.AIR_Conf.Partitions is
-- MaxMessageSize
if Get_Data_Size (Corresponding_Instance (F)) /= Null_Size then
Q := Make_Literal (XV.New_Numeric_Value (1024, 1, 10));
-- Q :=
-- Make_Literal
-- (XV.New_Numeric_Value
-- (To_Bytes
-- (Get_Data_Size (Corresponding_Instance (F))),
-- 1,
-- 10));
Q :=
Make_Literal
(XV.New_Numeric_Value
(40 + To_Bytes
(Get_Data_Size (Corresponding_Instance (F))),
1,
10));
else
Display_Located_Error
(Loc (F),
"No data size given for data size, " &
"assume a value of 1 byte",
Fatal => False,
Warning => True);
Q := Make_Literal (XV.New_Numeric_Value (1, 1, 10));
end if;
......
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