MBX_$GET_REC_CHAN Domain/OS MBX_$GET_REC_CHAN
NAME
mbx_$get_rec_chan - read a mailbox channel
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/mbx.h>
void mbx_$get_rec_chan(
void *&mbx_handle,
short &mbx_channel,
void *&buffer_pointer,
long &buffer_length,
void **return_pointer,
long *return_length,
status_$t *status)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/mbx.ins.pas';
procedure mbx_$get_rec_chan(
in mbx_handle: univ_ptr;
in mbx_channel: integer;
in buffer_pointer: univ_ptr;
in buffer_length: integer32;
out return_pointer: univ_ptr;
out return_length: integer32;
out status: status_$t);
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/mbx.ins.ftn'
integer*4 mbx_handle, buffer_length, return_length, status
integer*2 mbx_channel
integer*4 buffer_pointer, return_pointer
character buffer*32766, return_buffer*32766
pointer /buffer_pointer/ buffer
pointer /return_pointer/ return_buffer
call mbx_$get_rec_chan(mbx_handle, mbx_channel,
& buffer_pointer, buffer_length,
& return_pointer, return_length, status)
DESCRIPTION
Mbx_$get_rec_chan gets a client message from channel mbx_channel of the
mailbox on mbx_handle. If there is no message available,
mbx_$get_rec_chan waits for one.
mbx_handle
The mailbox handle.
mbx_channel
The channel to read from.
buffer_pointer
A pointer to the data buffer allocated to receive the message.
Mbx_$get_rec_chan does not always use the buffer at buffer_pointer,
but the caller must provide one.
buffer_length
The number of bytes available in the buffer that buffer_pointer
points to. Mbx_$get_rec_chan will not write more than buffer_length
bytes at buffer_pointer, and cannot write more than
mbx_$rec_data_max.
return_pointer
A pointer to the requested message. Use this pointer to reference
the message. It is not necessarily equivalent to buffer_pointer.
return_length
If return_length is positive, it is the number of bytes in the mes-
sage supplied at return_pointer, and no part of the message remains
in the channel. If return_length is negative, its absolute value is
the number of bytes from the supplied message remaining in the chan-
nel, and return_pointer points to only buffer_length bytes of the
requested message.
Mbx_$get_rec_chan supplies the 6-byte server header each time it
gets a portion of a message, so a server can always look at the cnt
field to find out the total length of a message.
status
The completion status.
NOTES
Only a server can use mbx_$get_rec_chan. Clients must use mbx_$get_rec
to wait for server messages.