Commit f05c2ccf authored by yoogx's avatar yoogx

* Rely on generated protocols to avoid elaboration circularity

        For issue #4
parent 20a3bf44
......@@ -28,24 +28,23 @@
-- (taste-users@lists.tuxfamily.org) --
-- --
------------------------------------------------------------------------------
pragma SPARK_Mode (Off);
with Ada.Unchecked_Conversion;
with PolyORB_HI.Output;
with PolyORB_HI.Protocols;
with PolyORB_HI.Port_Type_Marshallers;
with PolyORB_HI.Streams;
with PolyORB_HI.Time_Marshallers;
with POlyORB_HI.Utils;
with PolyORB_HI.Unprotected_Queue;
with POlyORB_HI.Utils;
package body PolyORB_HI.Thread_Interrogators is
use type PolyORB_HI.Streams.Stream_Element_Offset;
use PolyORB_HI.Port_Kinds;
use Ada.Real_Time;
use PolyORB_HI_Generated.Deployment;
use type PolyORB_HI.Streams.Stream_Element_Offset;
use PolyORB_HI.Output;
use PolyORB_HI.Port_Kinds;
use PolyORB_HI.Utils;
--------
......@@ -141,10 +140,7 @@ package body PolyORB_HI.Thread_Interrogators is
+ " of "
+ Entity_Image (Port_Table (Dst (To)))));
Error := Protocols.Send (Current_Entity,
Port_Table (Dst (To)),
Message);
Error := Send (Current_Entity, Port_Table (Dst (To)), Message);
PolyORB_HI.Messages.Reallocate (Message);
if Error /= Error_None then
......
......@@ -32,13 +32,14 @@
-- This package contains a generic definition of the interrogation
-- functions that the AADL standard requires for thread ports.
pragma SPARK_Mode (Off);
with Ada.Real_Time;
with System;
with PolyORB_HI_Generated.Deployment;
with PolyORB_HI.Errors;
with PolyORB_HI.Messages;
with PolyORB_HI_Generated.Deployment; use PolyORB_HI_Generated.Deployment;
with PolyORB_HI.Errors; use PolyORB_HI.Errors;
with PolyORB_HI.Messages; use PolyORB_HI.Messages;
with PolyORB_HI.Port_Kinds;
generic
......@@ -130,14 +131,19 @@ generic
M : in out PolyORB_Hi.Messages.Message_Type);
-- A procedure that marshalls a Thread port content into a message.
with function Send
(From : Entity_Type;
Entity : Entity_Type;
Message : Message_Type) return Error_Kind;
-- Send Message to the application node corresponding to the given
-- entity.
with function Next_Deadline return Ada.Real_Time.Time;
-- To indicate when does the next deadline of the thread occur (in
-- absolute time).
package PolyORB_HI.Thread_Interrogators is
use PolyORB_HI.Errors;
function Send_Output (Port : Port_Type) return Error_Kind;
-- Explicitly cause events, event data, or data to be transmitted
-- through outgoing ports to receiver ports.
......
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