Public | [types] [fields] [subprograms] |
type YAMI_Integer is new Interfaces.C.int; type YAMI_Long_Long_Integer is new Interfaces.Integer_64; type YAMI_Long_Float is new Interfaces.C.double;
YAMI-specific types.
These types are most likely identical to standard Integer, Long_Long_Integer and Long_Float, but are defined distinctly to avoid interfacing problems with other compilers.
type Parameter_Type is (Boolean_Type, Integer_Type, Long_Long_Integer_Type, Long_Float_Type, String_Type, Binary_Type, Boolean_Array_Type, Integer_Array_Type, Long_Long_Integer_Array_Type, Long_Float_Array_Type, String_Array_Type, Binary_Array_Type, Nested_Parameters_Type, Nested_Parameters_Array_Type);
Type of parameter entry.
type Parameters_Collection (<>) is limited new Serializables.Serializable with private; type Parameters_Collection_Access is access all Parameters_Collection;
The collection of message parameters, which are typed {name, value} pairs.
Each entry in this collection has a unique name and can have one of the following types:
This type is not copyable and not task-safe, although distinct instances of this type can be used by different tasks without synchronization.
Note:
The entries are ordered - the order in which they are created
influences the final serialized form of the message payload.
Newly created entries are appended to the end of the collection unless
there is an existing empty slot that can be reused - the appropriate
slot is searched for from the beginning to the end of the collection
and if no free slot is found the collection is extended at the end.
The above guarantee concerns the user code that relies on
predictable serialization.
subtype Count_Type is YAMI_Integer range 0 .. YAMI_Integer'Last;
Type for representing length of internal arrays.
subtype Index_Type is YAMI_Integer range 1 .. YAMI_Integer'Last;
Index type for addressing individual components of internal arrays.
type Parameter_Cursor is private;
Iterator for inspecting entries in the collection.
type Parameter_Entry is private;
Read-only view on the parameters entry.
This view is a lightweight proxy that itself is copyable, but the copying of this type does not create new copies of the underlying entry.
No_Parameter : constant Parameter_Cursor;
Special iterator value representing end of iteration.
function Make_Parameters (Working_Area : in System.Address := System.Null_Address; Area_Size : in System.Storage_Elements.Storage_Count := 0) return Parameters_Collection; function New_Parameters (Working_Area : in System.Address := System.Null_Address; Area_Size : in System.Storage_Elements.Storage_Count := 0) return Parameters_Collection_Access;
Creates an empty parameters collection object.
The second version allocates the object dynamically, this object can still have its working area given explicitly.
Notes:
Working_Area = Null_Address and Area_Size = 0
(the default) then all dependent objects are separately allocated
on the global store.Working_Area /= Null_Address and Area_Size /= 0
then
the given block is used as a private area.Note: Do not attempt to create objects sharing the same working area.
procedure Free (Params : in out Parameters_Collection_Access);
Deallocates the parameters collection object.
procedure Set_Boolean (Params : in out Parameters_Collection; Name : in String; Value : in Boolean);
Inserts a new entry of type Boolean to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
function Get_Boolean (Params : in Parameters_Collection; Name : in String) return Boolean;
Extracts the Boolean value from the entry given by its name.
procedure Set_Integer (Params : in out Parameters_Collection; Name : in String; Value : in YAMI_Integer);
Inserts a new entry of type YAMI_Integer to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
function Get_Integer (Params : in Parameters_Collection; Name : in String) return YAMI_Integer;
Extracts the YAMI_Integer value from the entry given by its name.
procedure Set_Long_Long (Params : in out Parameters_Collection; Name : in String; Value : in YAMI_Long_Long_Integer);
Inserts a new entry of type YAMI_Long_Long_Integer to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
function Get_Long_Long (Params : in Parameters_Collection; Name : in String) return YAMI_Long_Long_Integer;
Extracts the YAMI_Long_Long_Integer value from the entry given by its name.
procedure Set_Long_Float (Params : in out Parameters_Collection; Name : in String; Value : in YAMI_Long_Float);
Inserts a new entry of type YAMI_Long_Float to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
function Get_Long_Float (Params : in Parameters_Collection; Name : in String) return YAMI_Long_Float;
Extracts the YAMI_Long_Float value from the entry given by its name.
procedure Set_String (Params : in out Parameters_Collection; Name : in String; Value : in String);
Inserts a new entry of type String to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
function Get_String (Params : in Parameters_Collection; Name : in String) return String;
Extracts the String value from the entry given by its name.
procedure Set_Binary (Params : in out Parameters_Collection; Name : in String; Value : in Ada.Streams.Stream_Element_Array);
Inserts a new entry of type binary to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
function Get_Binary (Params : in Parameters_Collection; Name : in String) return Ada.Streams.Stream_Element_Array;
Extracts the binary value from the entry given by its name.
generic type Index_Type is (<>); type Boolean_Array_Type is array (Index_Type range <>) of Boolean; procedure Set_Boolean_Array (Params : in out Parameters_Collection; Name : in String; Values : in Boolean_Array_Type);
Inserts a new entry of type Boolean array to the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries.
function Get_Boolean_Array_Length (Params : in Parameters_Collection; Name : in String) return Count_Type;
Extracts the length of Boolean array from the entry given by its name.
generic type Index_Type is (<>); type Boolean_Array_Type is array (Index_Type range <>) of Boolean; procedure Get_Boolean_Array (Params : in Parameters_Collection; Name : in String; Values : out Boolean_Array_Type);
Extracts the array of Boolean values from the entry given by its name.
generic type Integer_Type is range <>; type Index_Type is (<>); type Integer_Array_Type is array (Index_Type range <>) of Integer_Type; procedure Set_Integer_Array (Params : in out Parameters_Collection; Name : in String; Values : in Integer_Array_Type);
Inserts a new entry of type Integer array to the first available slot. Values from the user-provided array are converted to the YAMI_Integer type. If the entry with the given name already exists it is replaced without changing the order of entries.
function Get_Integer_Array_Length (Params : in Parameters_Collection; Name : in String) return Count_Type;
Extracts the length of Integer array from the entry given by its name.
generic type Integer_Type is range <>; type Index_Type is (<>); type Integer_Array_Type is array (Index_Type range <>) of Integer_Type; procedure Get_Integer_Array (Params : in Parameters_Collection; Name : in String; Values : out Integer_Array_Type);
Extracts the array of Integer values from the entry given by its name. Values from internally managed buffers are converted to the user-defined integer type.
generic type Long_Long_Integer_Type is range <>; type Index_Type is (<>); type Long_Long_Integer_Array_Type is array (Index_Type range <>) of Long_Long_Integer_Type; procedure Set_Long_Long_Array (Params : in out Parameters_Collection; Name : in String; Values : in Long_Long_Integer_Array_Type);
Inserts a new entry of type Long_Long_Integer array to the first available slot. Values from the user-provided array are converted to the YAMI_Long_Long_Integer type. If the entry with the given name already exists it is replaced without changing the order of entries.
function Get_Long_Long_Array_Length (Params : in Parameters_Collection; Name : in String) return Count_Type;
Extracts the length of Long_Long_Integer array from the entry given by its name.
generic type Long_Long_Integer_Type is range <>; type Index_Type is (<>); type Long_Long_Integer_Array_Type is array (Index_Type range <>) of Long_Long_Integer_Type; procedure Get_Long_Long_Array (Params : in Parameters_Collection; Name : in String; Values : out Long_Long_Integer_Array_Type);
Extracts the array of Long_Long_Integer values from the entry given by its name. Values from internally managed buffers are converted to the user-defined long long integer type.
generic type Long_Float_Type is digits <>; type Index_Type is (<>); type Long_Float_Array_Type is array (Index_Type range <>) of Long_Float_Type; procedure Set_Long_Float_Array (Params : in out Parameters_Collection; Name : in String; Values : in Long_Float_Array_Type);
Inserts a new entry of type Long_Float array to the first available slot. Values from the user-provided array are converted to the YAMI_Long_Float type. If the entry with the given name already exists it is replaced without changing the order of entries.
function Get_Long_Float_Array_Length (Params : in Parameters_Collection; Name : in String) return Count_Type;
Extracts the length of Long_Float array from the entry given by its name.
generic type Long_Float_Type is digits <>; type Index_Type is (<>); type Long_Float_Array_Type is array (Index_Type range <>) of Long_Float_Type; procedure Get_Long_Float_Array (Params : in Parameters_Collection; Name : in String; Values : out Long_Float_Array_Type);
Extracts the array of Long_Float values from the entry given by its name. Values from internally managed buffers are converted to the user-defined long float type.
procedure Create_String_Array (Params : in Parameters_Collection; Name : in String; Length : in Count_Type);
Creates a new empty entry of type String array. If the entry with the given name already exists it is replaced without changing the order of entries.
function Get_String_Array_Length (Params : in Parameters_Collection; Name : in String) return Count_Type;
Extracts the length of String array from the entry given by its name.
procedure Set_String_In_Array (Params : in Parameters_Collection; Name : in String; Index : in Index_Type; Value : in String);
Inserts a new String value (possibly replacing the old one) to already existing String array at the given index.
function Get_String_In_Array (Params : in Parameters_Collection; Name : in String; Index : in Index_Type) return String;
Extracts the String value from the given index of String array.
procedure Create_Binary_Array (Params : in Parameters_Collection; Name : in String; Length : in Count_Type);
Creates a new empty entry of type binary array. If the entry with the given name already exists it is replaced without changing the order of entries.
function Get_Binary_Array_Length (Params : in Parameters_Collection; Name : in String) return Count_Type;
Extracts the length of binary array from the entry given by its name.
procedure Set_Binary_In_Array (Params : in Parameters_Collection; Name : in String; Index : in Index_Type; Value : in Ada.Streams.Stream_Element_Array);
Inserts a new binary value (possibly replacing the old one) to already existing binary array at the given index.
function Get_Binary_In_Array (Params : in Parameters_Collection; Name : in String; Index : in Index_Type) return Ada.Streams.Stream_Element_Array;
Extracts the binary value from the given index of binary array.
function Create_Nested_Parameters (Params : in Parameters_Collection; Name : in String) return Parameters_Collection;
Creates a new nested parameters collection entry in the first available slot. If the entry with the given name already exists it is replaced without changing the order of entries. The returned value is a proxy that refers to the internally managed nested object.
function Get_Nested_Parameters (Params : in Parameters_Collection; Name : in String) return Parameters_Collection;
Extracts nested parameters from the entry given by its name. The returned value is a proxy that refers to the internally managed nested object.
procedure Create_Nested_Array (Params : in Parameters_Collection; Name : in String; Length : in Count_Type);
Creates a new empty entry of type nested parameters array. If the entry with the given name already exists it is replaced without changing the order of entries. After the array is created, all its elements are empty parameters objects.
function Get_Nested_Array_Length (Params : in Parameters_Collection; Name : in String) return Count_Type;
Extracts the length of binary array from the entry given by its name.
function Get_Nested_In_Array (Parent_Params : in Parameters_Collection; Name : in String; Index : in Index_Type) return Parameters_Collection;
Extracts nested parameters from the given array. The returned value is a proxy that refers to the internally managed nested object.
procedure Remove (Params : in out Parameters_Collection; Name : in String);
Removes the entry given by its name.
procedure Clear (Params : in out Parameters_Collection);
Clears the content of the parameters collection.
function Length (Params : in Parameters_Collection) return Count_Type;
Returns the size of the collection - that is, the number of all non-empty slots.
function Entry_Type (Params : in Parameters_Collection; Name : in String) return Parameter_Type;
Extracts the type of the entry given by its name.
function First (Params : in Parameters_Collection) return Parameter_Cursor;
Returns the iterator pointing to the beginning of the collection, which means the first used slot.
procedure Find (Params : in Parameters_Collection; Name : in String; E : out Parameter_Entry; Found : out Boolean);
Returns the view on the entry specified by its name.
overriding function Serialize_Buffer_Size (Params : in Parameters_Collection) return Ada.Streams.Stream_Element_Count;
Computes the total size of serialization buffer(s) for the current content of this object.
overriding procedure Serialize (Params : in Parameters_Collection; Buffers : in Serializables.Serialization_Buffer_List);
Serializes the current content of this object into the given buffer(s).
The serialization buffer does not have to be contiguous and any number
of buffer segments is allowed, provided that the size of each buffer
segment is a multiple of 4 (32 bits).
The function scatters the serialized data into subsequent buffers
as they become filled.
procedure Deserialize (Params : in out Parameters_Collection; Buffers : in Serializables.Serialization_Buffer_List);
Deserializes content from the given buffer(s).
The data buffer does not have to be contiguous and any number
of buffer segments is allowed, provided that the size of each buffer
segment is a multiple of 4 (32 bits).
The function gathers the serialized data from subsequent buffers
as they are consumed.
Note: The current content of this object is not cleared
before attempting deserialization and each retrieved data element
is merged into the current content as if done by individual
calls to appropriate Set_XYZ
procedures.
In most cases deserialization will be performed to the empty
parameters object (to reconstruct it to the form that was used
for serialization), but deserialization onto non-empty object
might be occasionally useful as a way of merging two collections.
procedure Deserialize (Params : in out Parameters_Collection; Buffers : in Core.Serialization_Buffers_Descriptor);
Deserializes content from the given buffers (used for buffers that are already prepared by Core).
overriding function Core_Object (Params : in Parameters_Collection) return Details.Void_Ptr;
Helper function for data transfer between Ada and Core.
function Has_Element (Position : in Parameter_Cursor) return Boolean;
Returns true if the current position is associated with existing entry.
function Next (Position : in Parameter_Cursor) return Parameter_Cursor; procedure Next (Position : in out Parameter_Cursor);
Advances to the next used entry (skips unused slots in the collection).
function Get_Entry (Position : in Parameter_Cursor) return Parameter_Entry;
Returns the read-only view on the parameters entry.
function Entry_Type (E : in Parameter_Entry) return Parameter_Type;
Returns the type of the underlying entry in the associated parameters object.
function Entry_Name (E : in Parameter_Entry) return String;
Returns the name of the underlying entry in the associated parameters object.
function Get_Boolean (E : in Parameter_Entry) return Boolean;
Extracts the Boolean value from the current entry.
function Get_Integer (E : in Parameter_Entry) return YAMI_Integer;
Extracts the YAMI_Integer value from the current entry.
function Get_Long_Long (E : in Parameter_Entry) return YAMI_Long_Long_Integer;
Extracts the YAMI_Long_Long_Integer value from the current entry.
function Get_Long_Float (E : in Parameter_Entry) return YAMI_Long_Float;
Extracts the YAMI_Long_Float value from the current entry.
function Get_String (E : in Parameter_Entry) return String;
Extracts the String value from the current entry.
function Get_Binary (E : in Parameter_Entry) return Ada.Streams.Stream_Element_Array;
Extracts the binary value from the current entry.
function Get_Boolean_Array_Length (E : in Parameter_Entry) return Count_Type;
Extracts the length of Boolean array from the current entry.
generic type Index_Type is (<>); type Boolean_Array_Type is array (Index_Type range <>) of Boolean; procedure Entry_Get_Boolean_Array (E : in Parameter_Entry; Values : out Boolean_Array_Type);
Extracts the Boolean array from the current entry.
function Get_Integer_Array_Length (E : in Parameter_Entry) return Count_Type;
Extracts the length of integer array from the current entry.
generic type Integer_Type is range <>; type Index_Type is (<>); type Integer_Array_Type is array (Index_Type range <>) of Integer_Type; procedure Entry_Get_Integer_Array (E : in Parameter_Entry; Values : out Integer_Array_Type);
Extracts the integer array from the current entry. Values from internally managed array are converted to the user-defined Integer_Type.
function Get_Long_Long_Array_Length (E : in Parameter_Entry) return Count_Type;
Extracts the length of long integer array from the current entry.
generic type Long_Long_Integer_Type is range <>; type Index_Type is (<>); type Long_Long_Integer_Array_Type is array (Index_Type range <>) of Long_Long_Integer_Type; procedure Entry_Get_Long_Long_Array (E : in Parameter_Entry; Values : out Long_Long_Integer_Array_Type);
Extracts the long integer array from the current entry. Values from internally managed array are converted to the user-defined Long_Long_Integer_Type.
function Get_Long_Float_Array_Length (E : in Parameter_Entry) return Count_Type;
Extracts the length of long float array from the current entry.
generic type Long_Float_Type is digits <>; type Index_Type is (<>); type Long_Float_Array_Type is array (Index_Type range <>) of Long_Float_Type; procedure Entry_Get_Long_Float_Array (E : in Parameter_Entry; Values : out Long_Float_Array_Type);
Extracts the long float array from the current entry. Values from internally managed array are converted to the user-defined Long_Float_Type.
function Get_String_Array_Length (E : in Parameter_Entry) return Count_Type;
Extracts the length of String array from the current entry.
function Get_String_In_Array (E : in Parameter_Entry; Index : in Index_Type) return String;
Extracts the String value from the String array at the given index.
function Get_Binary_Array_Length (E : in Parameter_Entry) return Count_Type;
Extracts the length of binary array from the current entry.
function Get_Binary_In_Array (E : in Parameter_Entry; Index : in Index_Type) return Ada.Streams.Stream_Element_Array;
Extracts the binary value from the binary array at the given index.
function Get_Nested_Parameters (E : in Parameter_Entry) return Parameters_Collection;
Returns the view on the nested parameters object from the current entry.