55 virtual uint32_t
GetNum() {
return _ttoi(m_port.Mid(3)); };
79 std::vector<SerialDevice>::iterator it;
80 for (it = m_serialDevices.begin(); it != m_serialDevices.end(); it++)
83 if (device.
GetNum() > it->GetNum())
88 else if (device.
GetNum() == it->GetNum())
90 return it - m_serialDevices.begin();
102 void ScanSerialDevices();
105 void SortSerialDevices();
108 std::vector<SerialDevice> m_serialDevices;
SerialList class contains all serial devices on host.
Definition: SerialList.h:63
SerialDevice class represent a COM port hardware on host.
Definition: SerialList.h:38
SerialList()
Generated standard constructor.
Definition: SerialList.h:67
size_t GetDeviceCount()
Get the number of devices in the list.
Definition: SerialList.h:75
virtual ~SerialList()
Generated standard destructor.
Definition: SerialList.h:70
SerialDevice GetDevice(int index)
Get SerialDevice variable at specified index.
Definition: SerialList.h:73
int FindSerialDevice(SerialDevice device)
Find whether the specified device is in the list.
Definition: SerialList.h:77
virtual ~SerialDevice()
Generated standard destructor.
Definition: SerialList.h:50
SerialDevice(LPCTSTR port)
Generated standard constructor with a parameter.
Definition: SerialList.h:46
SerialDevice()
Generated standard constructor.
Definition: SerialList.h:42
virtual CString GetString()
Get the string containing COM port.(COMxx)
Definition: SerialList.h:53
virtual uint32_t GetNum()
Get the port number only.
Definition: SerialList.h:55