BEGA220A USER MANUAL
- 59 -
m_strR= tmp;
}
pRecvStrEdit->SetWindowText(m_strRecDisp); /* Show */
return 0;
}
// Initial user interface
const CString PorTbl[4] = {_T("COM1:"),_T("COM3:"),_T("COM4:"),_T("COM6:")};
const DWORD BaudTbl[6] = {4800, 9600, 19200, 38400, 57600,115200};
const DWORD DataBitTbl[2] = {7, 8};
const BYTE StopBitTbl[3] = {ONESTOPBIT, ONE5STOPBITS, TWOSTOPBITS};
const BYTE ParityTbl[4] = {NOPARITY, ODDPARITY, EVENPARITY, MARKPARITY};
/*******************************************************************************************
Function for “OPEN” button used to open selected serial port.
********************************************************************************************/
void CSerialPortDlg::OnOpenCom()
{
UpdateData(TRUE);
CString strPort = PorTbl[m_ComboPort.GetCurSel()];
DWORD baud = BaudTbl[m_ComboBaud.GetCurSel()];
DWORD databit = DataBitTbl[m_ComboData.GetCurSel()];
BYTE stopbit = StopBitTbl[m_ComboStop.GetCurSel()];
BYTE parity
= ParityTbl[m_ComboParity.GetCurSel()];
BOOL ret = m_pSerialPort->Open(strPort, baud, databit, stopbit, parity);
if (ret == FALSE)
{
MessageBox(_T("Open ") + s _T(" Fail!"));
return;
}
m_ButOpen.EnableWindow(FALSE);
/* Disable "open" button */
m_ButClose.EnableWindow(TRUE);
/* Enable "close" button */
MessageBox(_T("Open ") + s _T(" is OK!"));
}
Open selected serial port by
specified parameter values.
Summary of Contents for BEGA220A
Page 12: ...BEGA220A USER MANUAL 12 1 3 Mechanical Specifications 1 3 1 Module Specifications ...
Page 19: ...BEGA220A USER MANUAL 19 STEP7 Enter URL at the Address box ...
Page 47: ...BEGA220A USER MANUAL 47 5 Select No and click Next button to cancel the synchronization ...
Page 68: ...BEGA220A USER MANUAL 68 End of BEGA220A User Manual ...