|
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: 4096 (0x1000) Types: Ada Source Notes: 03_class, FILE, R1k_Segment, e3_tag, procedure Transmit, seg_002fe7
└─⟦8527c1e9b⟧ Bits:30000544 8mm tape, Rational 1000, Arrival backup of disks in PAM's R1000 └─⟦5a81ac88f⟧ »Space Info Vol 1« └─⟦this⟧
with Byte_Defs; with Byte_String_Io; with Calendar; with Log; with Profile; with Time_Utilities; with Transport; with Transport_Defs; -- procedure Transmit (Packets : Positive := 1; Pause : Duration := 0.0; -- between packets Data : Byte_Defs.Byte_String := (1, 2, 3, 4, 5, 6, 7, 8); To : Transport_Defs.Host_Id := (127, 0, 0, 0); Network : Transport_Defs.Network_Name := "UDP/IP"; Socket : Transport_Defs.Socket_Id := (0, 9)) is Connection : Transport.Connection_Id; Status : Transport_Defs.Status_Code; Start, Finish : Calendar.Time; Count : Natural; Transmitted : Natural := 0; Failed : exception; procedure Check (Status : Transport_Defs.Status_Code; From : String) is function "=" (Left, Right : Transport_Defs.Status_Code) return Boolean renames Transport_Defs."="; begin if Status /= Transport_Defs.Ok then Log.Put_Line ("Transport." & From & ".Status = " & Transport_Defs.Image (Status), Profile.Error_Msg); raise Failed; end if; end Check; begin Log.Put_Line ("Transmit" & Natural'Image (Packets), Profile.Auxiliary_Msg); Transport.Open (Connection, Status, Network); Check (Status, "Open"); Transport.Connect (Connection, Status, Remote_Host => To, Remote_Socket => Socket); Check (Status, "Connect(Active)"); Log.Put_Line ("Connected to " & Byte_String_Io.Image (Byte_Defs.Byte_String (Transport.Remote_Host (Connection)))); Start := Calendar.Clock; delay Pause; for P in 1 .. Packets loop Transport.Transmit (Connection, Status, Data, Count); Check (Status, "Transmit"); Transmitted := Transmitted + 1; if Count < Data'Length then Log.Put_Line ("only" & Natural'Image (Count) & " out of" & Natural'Image (Data'Length) & " bytes were transmitted.", Profile.Warning_Msg); end if; delay Pause; end loop; Transport.Disconnect (Connection); Finish := Calendar.Clock; Transport.Close (Connection); Log.Put_Line ("Transmitted" & Natural'Image (Transmitted) & Natural'Image (Data'Length) & "-byte packets in " & Time_Utilities.Image (Calendar."-" (Finish, Start)), Profile.Positive_Msg); exception when Failed => Transport.Close (Connection); Log.Put_Line ("Transmit failed", Profile.Negative_Msg); Log.Put_Line ("Transmitted" & Natural'Image (Transmitted) & Natural'Image (Data'Length) & "-byte packets", Profile.Exception_Msg); end Transmit;
nblk1=3 nid=0 hdr6=6 [0x00] rec0=1b rec1=00 rec2=01 rec3=044 [0x01] rec0=18 rec1=00 rec2=02 rec3=034 [0x02] rec0=16 rec1=00 rec2=03 rec3=000 tail 0x20f001440000806c18a85 0x42a00088462060003