|
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 - download
Length: 6144 (0x1800) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, package body Message, seg_057ece, seg_05825e
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─ ⟦cfc2e13cd⟧ »Space Info Vol 2« └─⟦this⟧
with Text_Io; package body Message is Sep : constant Character := '#'; function Create (Class : in Class_Message; Source : in Agent_Nb.T_Agent_Nb; Destination : in Agent_Nb.T_Agent_Nb; Donnees : in Var_String.V_String) return Object is begin return Object'(Class => Class, Source => Source, Destination => Destination, Donnees => Donnees); end Create; function Image (Message : in Object) return Var_String.V_String is begin return Var_String.Value (Sep & Class_Message'Image (Message.Class) & Sep & Var_String.Image (Agent_Nb.Image (Message.Source)) & Sep & Var_String.Image (Agent_Nb.Image (Message.Destination)) & Sep & Var_String.Image (Message.Donnees) & Sep); end Image; function Value (Message : in Var_String.V_String) return Object is Message_S : String (1 .. Var_String.Length (Message)) := Var_String.Image (Message); Index : Positive := Message_S'First + 1; Class : Positive; Source : Positive; Destination : Positive; Donnees : Positive; begin loop exit when Message_S (Index) = Sep; Index := Index + 1; end loop; Source := Index + 1; Index := Index + 1; loop exit when Message_S (Index) = Sep; Index := Index + 1; end loop; Destination := Index + 1; Index := Index + 1; loop exit when Message_S (Index) = Sep; Index := Index + 1; end loop; Donnees := Index + 1; return Object' (Class => Class_Message'Value (Message_S (Message_S'First + 1 .. Source - 2)), Source => Agent_Nb.Value (Var_String.Value (Message_S (Source .. Destination - 2))), Destination => Agent_Nb.Value (Var_String.Value (Message_S (Destination .. Donnees - 2))), Donnees => Var_String.Value (Message_S (Donnees .. Message_S'Last - 1))); end Value; function Get_Class (Message : in Object) return Class_Message is begin return Message.Class; end Get_Class; function Get_Source (Message : in Object) return Agent_Nb.T_Agent_Nb is begin return Message.Source; end Get_Source; function Get_Destination (Message : in Object) return Agent_Nb.T_Agent_Nb is begin return Message.Destination; end Get_Destination; function Get_Donnees (Message : in Object) return Var_String.V_String is begin return Message.Donnees; end Get_Donnees; procedure Set_Class (Message : in out Object; Class : in Class_Message) is begin Message.Class := Class; end Set_Class; procedure Set_Source (Message : in out Object; Source : in Agent_Nb.T_Agent_Nb) is begin Message.Source := Source; end Set_Source; procedure Set_Destination (Message : in out Object; Destination : in Agent_Nb.T_Agent_Nb) is begin Message.Destination := Destination; end Set_Destination; procedure Set_Donnees (Message : in out Object; Donnees : in Var_String.V_String) is begin Message.Donnees := Donnees; end Set_Donnees; end Message;
nblk1=5 nid=3 hdr6=8 [0x00] rec0=1c rec1=00 rec2=01 rec3=03a [0x01] rec0=1f rec1=00 rec2=05 rec3=09e [0x02] rec0=1b rec1=00 rec2=02 rec3=05a [0x03] rec0=1c rec1=00 rec2=04 rec3=000 [0x04] rec0=17 rec1=00 rec2=03 rec3=000 tail 0x21764066a87c6888a1c3f 0x42a00088462060003 Free Block Chain: 0x3: 0000 00 00 02 dd 80 27 75 74 20 4f 62 6a 65 63 74 3b ┆ 'ut Object;┆