openDevice();const char* dataString = βC00101C10100C20114β;
sendDataString(dataString);unsigned char* dataBytes =
{0xC0,0x01,0x01,0xC1,0x01,0x00,0xC2,0x01,0x14};
sendDataBytes(dataBytes,9);MTCMSMessage* message = CreateMTCMSMessage(0x01,0x00,0x14, NULL,0,
false);
sendMTCMSMessage(message);
ReleaseMTCMSMessage(message);void _stdcall OnDeviceConnectionStateChanged(void* sender,
MTConnectionState state)
{
switch (state)
{
case MTConnectionState::Connected:
Log(_T("[Connected]"));
break;
case MTConnectionState::Connecting:
Log(_T("[Connecting...]"));
break;
case MTConnectionState::Disconnecting:
Log(_T("[Disconnecting...]"));
break;
case MTConnectionState::Disconnected:
Log(_T("[Disconnected]"));
break;
}
}void stdcall OnDeviceResponseMessage(void* sender, const
MTCMSMessage* response)
{
processResponseMessage(response);
}void stdcall OnDeviceNotificationMessage(void* sender, const
MTCMSMessage* notification)
{
processNotificationMessage(notification);
}closeDevice();