BEGA220A USER MANUAL
- 55 -
3.3.2.2
Member function of class CSerialPort
CSerialPort Function:
Constructor function of calss 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 3.3.1.
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.
Return value
TRUE: Open serial port successfully
FALSE: .Open serial port fail.
Send Function:
Send specified 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 receive message to specified window.
User need to call this function to set the receive 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
Close Function:
Close current serial port.
Syntax
BOOL Close (
);
Parameters
None
Return value
TRUE: Close serial port successfully.
FALSE: Cloas serial port fail.
Содержание BEGA220A
Страница 12: ...BEGA220A USER MANUAL 12 1 3 Mechanical Specifications 1 3 1 Module Specifications ...
Страница 19: ...BEGA220A USER MANUAL 19 STEP7 Enter URL at the Address box ...
Страница 47: ...BEGA220A USER MANUAL 47 5 Select No and click Next button to cancel the synchronization ...
Страница 68: ...BEGA220A USER MANUAL 68 End of BEGA220A User Manual ...