package body NETWORK_PROTOCOLS is generic type BYTE is (<>) ; with procedure F_READ ( C : out BYTE ; EOFILE : out BOOLEAN ) ; with procedure F_WRITE ( C : BYTE ) ; with procedure RS_READ ( C : out BYTE ; GOT_ONE : out BOOLEAN ; RETURN_AFTER : DURATION := 0.0 ) ; with procedure RS_WRITE ( C : BYTE ) ; with procedure RS_WRITE_FLUSH ; with procedure SERVICE ( ABORT_TRANSFER : out BOOLEAN ) ; package PROTOCOL_INDEPENDENT_UTILITIES is type BYTE_STRING is array (INTEGER range <>) of BYTE ; READ_ERROR : exception ; FILE_TRANSFER_ERROR : exception ; function LOW_BYTE_OF_SUM ( BLOCK : BYTE_STRING ) return BYTE ; -- checksum algorithm used by various protocols procedure RS_READ_WITH_TIMEOUT ( C : out BYTE ; GOT_ONE : out BOOLEAN ; RETURN_AFTER : DURATION := 0.0 ) ; -- uses RS_READ to read the next byte from the RS-232 port but -- doesn't give up (i.e., return with GOT_ONE = TRUE) until -- at least RETURN_AFTER has elapsed procedure RS_READ_BLOCK_WITH_TIMEOUT ( Data : in out Byte_String ; Limit : in Duration ; Complete : out Boolean ; Last : out Integer ) ; procedure F_WRITE_BLOCK ( Data : in Byte_String ) ; procedure F_READ_BLOCK ( Data : in out Byte_String ; End_of_File : out Boolean ; Last : out Integer ) ; procedure RS_WRITE_BLOCK ( Data : in out Byte_String ) ; procedure Long_Read ( Error_Cnt : in out Integer ; Hold : out Byte ; Errlim : in Integer ; Limit : in Duration ) ; procedure Write_Read_With_Expected_Response ( Error_Cnt : in out Integer ; Errlim : in Integer ; Hold : out Byte ; Write : in Byte ; Limit : in Duration ; Response : in Byte ) ; procedure Get_Byte ( Hold : out Byte ; Limit : in Duration ) ; end PROTOCOL_INDEPENDENT_UTILITIES ; package body KERMIT_PROTOCOL is separate ; package body XMODEM_PROTOCOL is separate ; package body GENERIC_TEXT_FILE_IO is separate ; package body PROTOCOL_INDEPENDENT_UTILITIES is separate ; end NETWORK_PROTOCOLS ;