Commit dceb2b5a authored by Maxime Perrotin's avatar Maxime Perrotin

Complete vm_if support in code and templates

parent 241f85f2
......@@ -483,12 +483,17 @@ package body TASTE.Backend.Code_Generators is
when Cyclic_Operation | Sporadic_Operation =>
List_Of_ASync_RIs := List_Of_ASync_RIs & Each.Name;
-- Find remote function name (only one remote per RI)
Async_RIs_Parent := Async_RIs_Parent
& Each.Remote_Interfaces.First_Element.Function_Name;
if not Each.Remote_Interfaces.Is_Empty then
-- We can spot non-connected RIs..
Async_RIs_Parent := Async_RIs_Parent
& Each.Remote_Interfaces.First_Element.Function_Name;
end if;
when others =>
List_Of_Sync_RIs := List_Of_Sync_RIs & Each.Name;
Sync_RIs_Parent := Sync_RIs_Parent
& Each.Remote_Interfaces.First_Element.Function_Name;
if not Each.Remote_Interfaces.Is_Empty then
Sync_RIs_Parent := Sync_RIs_Parent
& Each.Remote_Interfaces.First_Element.Function_Name;
end if;
end case;
end loop;
......
......@@ -13,7 +13,7 @@ package TASTE.Backend is
when Language_ASN1 => "ASN1",
when Language_C => "C",
when Language_Esterel => "Esterel", -- Not supported
when Language_Device => "C",
when Language_Device => "Blackbox_C",
when Language_Gui => "GUI",
when Language_Lua => "Lua", -- Not supported
when Language_Lustre => "SCADE", -- Not supported
......
......@@ -47,15 +47,19 @@ void init_@_LOWER:Name_@()
// Call user code startup function
@_LOWER:Name_@_startup();
@@END_IF@@
@@IF@@ @_EXIST:Sync_RIs_Parent_@
// Iterate over all synchronous RIs, and call their parent's
// init function. Multiple calls are prevented by the "init" guard.
@@END_IF@@
@@TABLE@@
init_@_LOWER:Sync_RIs_Parent_@();
@@END_TABLE@@
}
}
@@-- For blackbox devices, don't generate the PI functions, they will be
@@-- generated as skeleton functions. The init function only must be there.
@@IF@@ @_Language_@ /= "Blackbox_C"
@@TABLE@@
@_Provided_Interfaces_@
@@END_TABLE@@
@@END_IF@@
......@@ -21,7 +21,5 @@ void *OUT_@_LOWER:Param_Names_@, size_t *OUT_@_LOWER:Param_Names_@_len
@@END_INLINE@@
@@ELSE@@
void @_LOWER:Parent_Function_@_@_LOWER:Name_@();
@@ELSE@@
// Check invoke_ri for required interface @_Name_@
@@END_IF@@
@@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