
BETA903A USER MANUAL
- 64 -
4.3.2.2.
Member functions of class CSerial
CSerialPort Function:
Constructor function of class CSerialPort.
Syntax
CSerialPort( )
Parameters
None
Return value
None
Open Function:
Open a serial port.
Syntax
BOOL Open(
LPCTSTR port,
int baud_rate,
int data_bit
int stop_bit
int parity
);
Parameters
port Name of serial port listed in the table of section
4.3
.
baud_rate Baud rate, ex: 9600.
data_bit Data_bit, 7 ~ 8
stop_bit Stop bit ,
ONESTOPBIT, ONE5STOPBITS or TWOSTOPBITS
.
parity Parity , NOPARITY, ODDPARITY, EVENPARITY,
MARKPARITY.
Return value
TRUE: Open serial port successfully
FALSE: .Open serial port fail.
Send Function:
Send specific data by this serial port.
Syntax
BOOL Send(
LPCVOID buf_ptr,
DWORD data_len
);
Parameters
buf_ptr Memory pointer of data will be sent.
data_ len Length of data will be sent. (UNIT: byte)
Return value
TRUE: Send data successful.
FALSE: Send data fail.
SetCommMsg Function:
CSerialPort object will send a receiving message to specified window.
User need to call this function to set the receiving message value and the window that will
receive message.
Syntax
void SetCommMsg(
HWND win_handle,
UINT receive_msg
);
Parameters
win_handle Handle of the window that will receive message.
receive_msg User defined message value.
Return value
None
Summary of Contents for BETA903A
Page 19: ...BETA903A USER MANUAL 19 1 3 2 Mechanical specifications of Holder Mount ...
Page 49: ...BETA903A USER MANUAL 49 STEP2 Select Windows folder STEP3 Run KeyPadTest program ...
Page 55: ...BETA903A USER MANUAL 55 5 Select No and click Next button to cancel the synchronization ...
Page 60: ...BETA903A USER MANUAL 60 STEP 5 Click Next button STEP 6 Click Next button ...
Page 94: ...BETA903A USER MANUAL 94 STEP 3 Add process code into message processing function ...
Page 95: ...BETA903A USER MANUAL 95 End of BETA903A User Manual ...