Download Durra: A Task Description Language User`s Manual (Version 2)
Transcript
-- DESCRIPTION -Non-blocking version of Send_Port. If the queue associated with -the port is full, then no data is sent and Data_Sent is set to -FALSE; otherwise the Send proceeds as in the blocking version and -Data_Sent is set to TRUE. -- EXCEPTIONS RAISED -Uninitialized -Bad_Process_ID -Bad_Port_ID -Bad_Type_ID -************************************************************************ procedure Test_Input_Port (Process : in Process_ID; Port : in Input_Port_ID; Type_of_Next_Input : out Type_ID; Size_of_Next_Input : out NATURAL; Inputs_Available : out NATURAL); -- PARAMETERS -Process : the process identifier -Port : the identifier of the input port on which the -Test is to be performed -Type_of_Next_Input: the Durra type id of the next message in the -queue associated with this port (or -NULL_TYPE_ID, if Inputs_Available is zero) -Size_of_Next_Input: the size (in bytes) of the next message in the -buffer associated with this port (or zero, if -Inputs_Available is zero). -Inputs_Available : the number of message currently available at -this port. -- DESCRIPTION -Test for the availability of data at the port Port. If at -least one input is available, return the number of inputs -available and the Durra type and size of the next input; -otherwise, return zero or NULL in all three parameters. -- EXCEPTIONS RAISED -Uninitialized -Bad_Process_ID -Bad_Port_ID -************************************************************************ procedure Test_Output_Port (Process : in Process_ID; Port : in Output_Port_ID; Spaces_Available : out NATURAL); -- PARAMETERS -Process : the process identifier -Port : the identifier of the output port on which the -Test is to be performed -Spaces_Available : the number of empty spaces currently in the -buffer associated with this port. -- DESCRIPTION -Return the number of empty spaces in the buffer associated with -Port. -- EXCEPTIONS RAISED -Uninitialized 70 CMU/SEI-92-TR-36