
BETA903A USER MANUAL
- 67 -
4.3.3.
Example code
Bolymin provides a test application and its source code for example. The following
picture is the screen shot of the serial port test program:
Open/Close
selected serial port.
Received data
Data will be sent by
selected serial port
Clear received data
Clear received data
Clear sent data.
Send data
The major part of source codes of the test program is shown below:
File: SerialPortDlg.cpp
/////////////////////////////////////////////////////////////////////////////
// CSerialPortDlg dialog
/////////////////////////////////////////////////////////////////////////////
const UINT WM_CMD_OK = 1;
BEGIN_MESSAGE_MAP(CSerialPortDlg, CDialog)
//{{AFX_MSG_MAP(CSerialPortDlg)
ON_BN_CLICKED(IDC_OPEN_COM, OnOpenCom)
ON_BN_CLICKED(IDC_CLOSE_COM, OnCloseCom)
ON_BN_CLICKED(IDC_SEND, OnSend)
ON_BN_CLICKED(IDC_CLEAR_SEND, OnClearSend)
ON_BN_CLICKED(IDC_CLEAR_REC, OnClearRec)
ON_WM_DESTROY()
//}}AFX_MSG_MAP
ON_MESSAGE(WM_CMD_OK, OnCommRecv)
END_MESSAGE_MAP()
Map the receive message
processing function to user
defined message.
Define a receive message
/////////////////////////////////////////////////////////////////////////////
// CSerialPortDlg message handlers
/////////////////////////////////////////////////////////////////////////////
Содержание BETA903A
Страница 2: ...BETA903A USER MANUAL 2 History of Version Version Contents Date Note 01 New Version 2010 03 27 SPEC ...
Страница 18: ...BETA903A USER MANUAL 18 1 3 1 3 1 Mechanical specifications Mechanical specifications of module ...
Страница 19: ...BETA903A USER MANUAL 19 1 3 2 Mechanical specifications of Holder Mount ...
Страница 22: ...BETA903A USER MANUAL 22 2 2 Install a GSM antenna Please screw up the antenna into the position as highlighted ...
Страница 49: ...BETA903A USER MANUAL 49 STEP2 Select Windows folder STEP3 Run KeyPadTest program ...
Страница 55: ...BETA903A USER MANUAL 55 5 Select No and click Next button to cancel the synchronization ...
Страница 60: ...BETA903A USER MANUAL 60 STEP 5 Click Next button STEP 6 Click Next button ...
Страница 94: ...BETA903A USER MANUAL 94 STEP 3 Add process code into message processing function ...
Страница 95: ...BETA903A USER MANUAL 95 End of BETA903A User Manual ...