Specification of package Corba.Group_Ios.Miop_Ios
========================================================================= --
=== === --
=== Top Graph'X CORBA Implementation === --
=== === --
=== Copyright (c) 2002, Top Graph'X. === --
=== === --
=== --- Copyright Notice --- === --
=== === --
=== This software is protected as an unpublished work under the === --
=== Copyright Act of 1976. All rights reserved. Top Graph'X. === --
=== === --
========================================================================= --
(JM) 22/01/02 : Creation
(JM) 25/02/02 : modif_{1} : tracking VMCID_Miop_Bad_Data_Size exception,
test of size and last 4 bytes of the message
added to the test of hashcode to avoid collision risk
with Ada.Unchecked_Deallocation ;
with Ada.Calendar ;
pragma Elaborate_All (Ada.Calendar) ;
with Tgx.System_Ios ;
use Tgx.System_Ios ;
with Tgx.Ios ;
with Corba.Iop ;
with Corba_Ios ;
package Corba.Group_ios.Miop_Ios is
Miop_Emission_Open_Error : exception ;
{ Emission class for Miop:
---------------------------
type Miop_Emission is new Group_Emission with
record
Multicast : Tgx.Ios.String_Pointer ;
Port : Tgx.System_Ios.Port ;
Mtu : Natural ; must be multiple of 8
Unique_Id : Corba.Iop.T_Tgx_Unique_Id ;
end record ;
type Miop_Emission_Access is access all Miop_Emission'class ;
procedure Open (This : access Miop_Emission) ;
procedure Close (This : access Miop_Emission) ;
read a stream : inherited from Group_Emission
write a stream
procedure Write ( This : access Miop_Emission ;
Buffer : in System.Address ;
Number : in Natural ) ;
Returns the URL indicating the sending client
function Url (Client : access Miop_Emission)
return Standard.String ;
} Emission class for Miop
{ Reception class for Miop:
---------------------------
type T_Packet (Mtu : Corba_Ios.Stream_Element_Count ) ;
type T_Packet_Ptr is access T_Packet ;
type T_Packet (Mtu : Corba_Ios.Stream_Element_Count ) is
record
Packet_Num : Natural := 0 ;
Next : T_Packet_Ptr ;
Buffer : Corba_Ios.Stream_Element_Array (1 .. Mtu) ;
Number of bytes actually read into buffer:
Number : Natural ;
end record ;
subtype T_List is T_Packet_Ptr ;
modif_{1} : tracking VMCID_Miop_Bad_Data_Size exception
type T_Msg_Signature is
record
Size : Corba.Unsigned_Long := 0 ;
Hash_Code : Corba.Unsigned_Long := 0 ;
Last_4_Bytes : Corba.Unsigned_Long := 0 ;
end record ;
Null_Msg_Signature : T_Msg_Signature ;
type T_Message is
record
Time_Out : Ada.Calendar.Time ;
Request_Id : T_Msg_Signature ;
Completed : Boolean := False ;
Read_Bytes_Nb : Natural := 0 ;
Data_Bytes_Nb : Natural := 0 ; Actual data size
Nb_Packets : Natural := 0 ;
Header_Size : Natural := 0 ;
Ordered list according to Packet_Num field of an element:
List : T_List ;
end record ;
Null_Message : constant T_Message :=
( Time_Out => Ada.Calendar.Clock,
Request_Id => Null_Msg_Signature ,
Completed => False,
Read_Bytes_Nb => 0,
Data_Bytes_Nb => 0,
Nb_Packets => 0,
Header_Size => 0,
List => null ) ;
end_{1}
Variable length table
type Message_Array is array (Positive range <>) of T_Message ;
type Message_Table is access all Message_Array ;
procedure Free is new Ada.Unchecked_Deallocation
(Object => Message_Array, Name => Message_Table) ;
type Miop_Reception is new Group_Reception with
record
Multicast : Tgx.Ios.String_Pointer ;
Port : Tgx.System_Ios.Port ;
Mtu : Natural ; must be multiple of 8
Msg_Table : Message_Table ; table of received packets
Msg_Used : Natural := 0 ;
Free_List : T_List ;
end record ;
type Miop_Reception_access is access all Miop_Reception'class ;
procedure Open (This : access Miop_Reception) ;
procedure Close (This : access Miop_Reception) ;
function Bytes_Per_Io_Unit (This : access Miop_Reception)
return Natural ;
function Amount_Readable (This : access Miop_Reception)
return Natural ;
read a stream
procedure Read ( This : access Miop_Reception ;
Buffer : in System.Address ;
Number : in out Natural ) ;
write a stream : inherited from Group_Reception
Returns the URL indicating the sending client
function Url (Client : access Miop_Reception)
return Standard.String ;
} Reception class for Miop
subtype T_Byte is Tgx.System_Ios.Byte ;
procedure Set_Multicast_Ttl (Ttl : in T_Byte) ;
procedure Set_Recv_Buf_Size (P_Size : in Unsigned_Long) ;
procedure Set_Mtu (P_Mtu : in Natural) ;
procedure Set_Peremption_Delay (P_Delay : in Duration) ;
end Corba.Group_ios.Miop_Ios ;
List of definition uses
This page was generated by PrismTech's ada2html on Friday Mai 12 2006 16:18