EasyManuals Logo

Siemens M20 Terminal User Manual

Siemens M20 Terminal
234 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #190 background imageLoading...
Page #190 background image
Application notes
Version 8 dated 15.03.00 190
Siemens Information and Communication Products
A
8.4.2.15 int TransmitCommChar(idComDev, chTransmit)
int idComDev; /* communications device */
char chTransmit; /* character to transmit */
The TransmitCommChar function places the specified character at the head of the transmission queue for the specified
device.
8.4.2.16 int UngetCommChar(idComDev, chUnget)
int idComDev; /* communications device */
char chUnget; /* character to place in queue */
The UngetCommChar function places the specified character back in the receiving queue. The next read operation will
return this character first.
int TransmitCommChar(idComDev, chTransmit
Parameter Description
idComDev Specifies the communications device to transmit the character. The OpenComm function returns
this value.
chTransmit Specifies the character to be transmitted.
Return value 0 if the function is successful.
< 0 if the character cannot be transmitted.
Example The following example uses the TransmitCommChar function to send characters from the key-
board to the communications port:
case WM_CHAR:
ch = (char)wParam;
TransmitCommChar(idComDev, ch);
/* Add a linefeed for every carriage return. */
if (ch == 0x0d)
TransmitCommChar(idComDev, 0x0a);
break;
Comments The TransmitCommChar function cannot be called repeatedly if the device is not transmitting.
Once TransmitCommChar places a character in the transmission queue, the character must be
transmitted before the function can be called again. TransmitCommChar returns an error if the pre-
vious character has not yet been sent.
See also OpenComm, WriteComm
int UngetCommChar(idComDev, chUnget
Parameter Description
idComDev Specifies the communications device that will receive the character. The OpenComm function re-
turns this value.
chUnget Specifies the character to be placed in the receiving queue.
Return value 0 if the function is successful.
Otherwise < 0
Example None
Comments Consecutive calls to the UngetCommChar function are not permitted. The character placed in the
queue must be read before this function can be called again.
See also

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Siemens M20 Terminal and is the answer not in the manual?

Siemens M20 Terminal Specifications

General IconGeneral
BrandSiemens
ModelM20 Terminal
CategoryEngine
LanguageEnglish

Related product manuals