|
|
DataMuseum.dkPresents historical artifacts from the history of: Rational R1000/400 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Rational R1000/400 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 8192 (0x2000)
Types: Ada Source
Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Message, seg_057277
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000
└─⟦5a81ac88f⟧ »Space Info Vol 1«
└─⟦this⟧
with Bounded_String;
with Text_Io;
package body Message is
type Conversion is array (Command_Type'First .. Command_Type'Last) of
Orb_Tools.Command_String;
To_String : constant Conversion :=
(Registration => Command_Type'Image (Registration)
(1 .. Orb_Tools.Length_Command_String),
Unregistration => Command_Type'Image (Unregistration)
(1 .. Orb_Tools.Length_Command_String),
Queries => Command_Type'Image (Queries)
(1 .. Orb_Tools.Length_Command_String),
Request => Command_Type'Image (Request)
(1 .. Orb_Tools.Length_Command_String),
Notification => Command_Type'Image (Notification)
(1 .. Orb_Tools.Length_Command_String),
Forward => Command_Type'Image (Forward)
(1 .. Orb_Tools.Length_Command_String),
Publication => Command_Type'Image (Publication)
(1 .. Orb_Tools.Length_Command_String),
Unpublication => Command_Type'Image (Unpublication)
(1 .. Orb_Tools.Length_Command_String),
Subscription => Command_Type'Image (Subscription)
(1 .. Orb_Tools.Length_Command_String),
Unsubscription => Command_Type'Image (Unsubscription)
(1 .. Orb_Tools.Length_Command_String),
Filtration => Command_Type'Image (Filtration)
(1 .. Orb_Tools.Length_Command_String),
Unfiltration => Command_Type'Image (Unfiltration)
(1 .. Orb_Tools.Length_Command_String),
Identify => Command_Type'Image (Identify)
(1 .. Orb_Tools.Length_Command_String),
Ifailed => Command_Type'Image (Ifailed)
(1 .. Orb_Tools.Length_Command_String),
Rfailed => Command_Type'Image (Rfailed)
(1 .. Orb_Tools.Length_Command_String));
procedure Fill (Data : in out Orb_Tools.Data_String; Mess : in Tmessage) is
begin
Orb_Tools.Copy (Identification.Tclient_Id'Image (Mess.Origin), Data);
Orb_Tools.Append (":", Data);
Orb_Tools.Append (To_String (Mess.Command), Data);
Orb_Tools.Append (":", Data);
Orb_Tools.Append (Mess.Content, Data);
end Fill;
procedure Unfill (Data : in Orb_Tools.Data_String;
Mess : in out Tmessage) is
Intermediaire : Orb_Tools.Command_String;
I, J : Natural := 1;
Char : String (1 .. 1);
begin
loop
Char := Orb_Tools.Extract
(Source => Data, Start_Pos => J, End_Pos => J);
exit when Char = ":";
J := J + 1;
end loop;
Mess.Origin := Identification.Tclient_Id'Value
(Orb_Tools.Extract (Data, I, J - 1));
I := J + 1;
J := Orb_Tools.Length_Command_String + I - 1;
Intermediaire := Orb_Tools.Extract
(Source => Data, Start_Pos => I, End_Pos => J);
for Index in Command_Type'First .. Command_Type'Last loop
if Intermediaire = To_String (Index) then Mess.Command := Index;
end if;
end loop;
I := J + 2;
J := Bounded_String.Length (Data);
Orb_Tools.Copy (Target => Mess.Content,
Source => Orb_Tools.Extract (Source => Data,
Start_Pos => I,
End_Pos => J));
end Unfill;
procedure Fill_Command (Mess : out Tmessage; Comm : in Command_Type) is
begin
Mess.Command := Comm;
end Fill_Command;
procedure Unfill_Command (Mess : in Tmessage; Comm : out Command_Type) is
begin
Comm := Mess.Command;
end Unfill_Command;
procedure Fill_Origin (Mess : out Tmessage;
Orig : in Identification.Tclient_Id) is
begin
Mess.Origin := Orig;
end Fill_Origin;
procedure Unfill_Origin (Mess : in Tmessage;
Orig : out Identification.Tclient_Id) is
begin
Orig := Mess.Origin;
end Unfill_Origin;
procedure Fill_Content (Mess : out Tmessage;
Cont : in Orb_Tools.Content_String) is
begin
Mess.Content := Cont;
end Fill_Content;
procedure Unfill_Content (Mess : in Tmessage;
Cont : out Orb_Tools.Content_String) is
begin
Cont := Mess.Content;
end Unfill_Content;
end Message;
nblk1=7
nid=3
hdr6=c
[0x00] rec0=16 rec1=00 rec2=01 rec3=04a
[0x01] rec0=10 rec1=00 rec2=07 rec3=05e
[0x02] rec0=08 rec1=00 rec2=06 rec3=072
[0x03] rec0=1c rec1=00 rec2=04 rec3=002
[0x04] rec0=1d rec1=00 rec2=02 rec3=04c
[0x05] rec0=12 rec1=00 rec2=05 rec3=000
[0x06] rec0=a3 rec1=5c rec2=00 rec3=03d
tail 0x2154df32887c6740de3dd 0x42a00088462060003
Free Block Chain:
0x3: 0000 00 00 00 12 00 0c 65 6e 64 20 4d 65 73 73 61 67 ┆ end Messag┆