All pages
Powered by GitBook
1 of 1

Loading...

MTDevice Events

OnDeviceList

The library will call this function when device information is available.

typedef void ( stdcall * OnDeviceListEvent)( 
void* sender,
MTConnectionType connectionType, 
int deviceCount, 
MTDeviceInformation* deviceList);

Parameter

Description

sender

Object representing the publisher of the event.

connectionType

Return Value: None

This event occurs when the connection state of the device is changed.

This event occurs when a response is received from the device.

Return Value: None

This event occurs when a response is received from the device.

This event occurs when a response is received from the device.

MTConnectionType value: MTConnectionType.USB, MTConnectionType.IP, MTConnectionType.Serial

deviceCount

Number of devices in deviceList.

deviceList

A list of MTDeviceInformation objects.

Parameter

Description

sender

Object representing the publisher of the event.

state

MTConnectionState value indicating the state of the device: MTConnectionState.Disconnected MTConnectionState.Connecting MTConnectionState.Error MTConnectionState.Connected MTConnectionState.Disconnecting

Parameter

Description

sender

Object representing the publisher of the event.

dataString

String representing data received.

Parameter

Description

sender

Object representing the publisher of the event.

response

MTCMSMessage representing data received.

Parameter

Description

sender

Object representing the publisher of the event.

notification

MTCMSMessage representing data received.

OnDeviceConnectionStateChanged

OnDeviceDataString

OnDeviceResponseMessage

OnDeviceNotificationMessage

typedef void ( stdcall * OnDeviceConnectionStateChangedEvent)( 
void* sender,
MTConnectionState state);
typedef void ( stdcall * OnDeviceDataStringEvent)( 
void* sender, 
const char* dataString);
typedef void ( stdcall * OnDeviceResponseMessageEvent)( void* sender,
const MTCMSMessage* response);
typedef void ( stdcall * OnDeviceNotificationMessageEvent)( 
void* sender,
const MTCMSMessage* notification);