Rockwell Automation Allen-Bradley ControlLogix 1756-MVI Programming Reference Manual page 119

Multi-vendor interface module
Hide thumbs Also See for Allen-Bradley ControlLogix 1756-MVI:
Table of Contents

Advertisement

MVIsp_GetCountUnsent
Syntax:
int
MVIsp_GetCountUnsent(int comport, int *count);
Parameters:
comport
desired communications port
count
pointer to int to receive unsent character count
Description:
MVIsp_GetCountUnsent returns the number of characters in the
transmit queue that are waiting to be sent. Since data sent to a port is
queued before transmission across a serial port, the application may
need to determine if all characters have been transmitted or how
many characters remain to be transmitted.
comport is the desired serial port and must be previously opened with
MVIsp_Open.
count points to an int that will receive the number of characters that
have been sent to the serial port but not transmitted. If the returned
count is 0, all data has been transmitted. If it is non-zero, t contains the
number of characters put into the queue with MVIsp_Putch,
MVIsp_Puts, or MVIsp_PutData but that have not been transmitted.
Return Value:
MVI_SUCCESS
MVI_ERR_NOACCESS
MVI_ERR_BADPARAM
Example:
int
count;
if (MVIsp_GetCountUnsent(COM2,&count) = = MVI_SUCCESS)
{
if (count = = 0)
printf("All chars sent\n");
else
printf("%d characters remaining\n",count);
}
See Also:
MVIsp_Putch
MVIsp_Puts
MVIsp_PutData
count retrieved successfully
comport has not been opened
invalid pointer
Publication 1756-RM004B-EN-P - October 2000
Serial Port API
5-31

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents