- Table of contents
- DCOD Internal Interfaces
DCOD Internal Interfaces¶
All objects of the DCOD framework have to comply with this interface.
The interface defines mandatory key functionnalities of a DCOD object.
package DCOD.Interfaces is pragma Pure; type DCOD_Object_Interface is limited interface; -- This procedure is used to set the name of the DCOD object procedure Set_Name (Object : in out DCOD_Object_Interface; Name : String) is abstract; -- This procedure is used to retrieve the name of the DCOD object function Get_Name (Object : DCOD_Object_Interface) return String is abstract; -- This procedure is used to know if the process that host the object -- provides or not a embedded web server function Has_Http_Server (Object : DCOD_Object_Interface) return Boolean is abstract; -- This procedure returns the http URL needed to contact the embedded -- web server if Has_Http_Server returns True. function Server_Url (Object : DCOD_Object_Interface) return String is abstract; end DCOD.Interfaces;
This RCI is the central hook of the DCOD framework.
It allows to subscribe new elements (Posix Memory Handler, ...) through simple functions.
with DCOD.Interfaces.Pmh; package DCOD.Services is pragma Remote_Call_Interface; -- This procedure should be used to suscribe a Posix Memory Handler object. procedure Suscribe_Posix_Memory_Handler (Object : Interfaces.Pmh.Pmh_Access); end DCOD.Services;
DCOD provides interfaces to all functionnalities implemented.
If you need to interact with any of this functionnality, you can use the following specifications.
package DCOD.Interfaces.Pmh is pragma Remote_Types; type Remote_Buffer_Interface is synchronized interface; -- This function returns, as an XML string, the state of the buffer: level -- of free and full queues. function Get_State (Object : Remote_Buffer_Interface) return String is abstract; type Remote_Buffer_Access is access all Remote_Buffer_Interface'Class; type Remote_Buffers_Array is array (Positive range <>) of Remote_Buffer_Access; type Pmh_Interface is synchronized interface and DCOD_Object_Interface; -- This function returns the fat pointer (DSA concept) of a remote buffer. function Get_Buffer (Object : Pmh_Interface; Buffer_Name : String) return Remote_Buffer_Access is abstract; -- This function returns all the fat pointers the PMH object is handling as -- an array. function Get_Buffers (Object : Pmh_Interface) return Remote_Buffers_Array is abstract; type Pmh_Access is access all Pmh_Interface'Class; end DCOD.Interfaces.Pmh;