Commit 1f767581 authored by jdelange's avatar jdelange

* ocarina/src/backends/ocarina-backends-po_hi_c-deployment.adb

   - Define __PO_HI_USE_PROTOCOL_<PROTOCOL_NAME> macro
     for each used protocol.
   - Define a global array that detail each protocol
     used to handle the communication between two ports.



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@2975 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent cb2d6ab7
......@@ -337,6 +337,7 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
S : Node_Id;
Impl : Node_Id;
Found : Boolean;
PName : Name_Id;
Bus_Conf : constant Node_Id := Make_Array_Values;
begin
-- A virtual bus describe a user-defined protocol.
......@@ -365,6 +366,20 @@ package body Ocarina.Backends.PO_HI_C.Deployment is
Add_Include (RH (RH_Subprograms));
Set_Deployment_Header;
-- Add a maccro __PO_HI_USE_PROTOCOL_<NAME> so that we can
-- make conditional compilation depending on the protocol
-- that are used within the distributed system.
Set_Str_To_Name_Buffer ("__PO_HI_USE_PROTOCOL_");
Get_Name_String_And_Append (Name (Identifier (E)));
PName := Name_Find;
PName := To_Upper (To_C_Name (PName));
Add_Define_Deployment
(Make_Defining_Identifier
(PName,
C_Conversion => False));
-- If there is a backend node and a naming node associated
-- with it, it means that we already processed this protocol
-- and correctly mapped it in the generated code.
......
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