For the complete documentation index, see llms.txt. This page is also available as Markdown.
Page cover

MTDevice Events

OnDeviceList

This event occurs when device information is available.

public event DeviceListHandler OnDeviceList
public delegate void DeviceListHandler(object sender,
MTConnectionType connectionType, List<MTDeviceInformation> deviceList)

Parameter

Description

Sender

Object representing the publisher of the event.

connectionType

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

deviceList

A list of MTDeviceInformation objects

OnDeviceConnectionStateChanged

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

 public event DeviceListHandler OnDeviceList

public delegate void DeviceListHandler(object sender,
MTConnectionType connectionType, List<MTDeviceInformation> deviceList)

Parameter

Description

sender

Object representing the publisher of the event.

state

MTDeviceState value indicating the state of the device:

Disconnected Connecting Error Connected Disconneting

OnDeviceDataString

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

Parameter

Description

sender

Object representing the publisher of the event.

dataString

Hexadecimal string representing data received.

OnDeviceDataBytes

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

Parameter

Description

sender

Object representing the publisher of the event.

dataBytes

Byte array representing data received.

OnDeviceResponseMessage

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

Parameter

Description

sender

Object representing the publisher of the event.

response

MTCMSResponseMessage representing data received.

OnDeviceNotificationMessage

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

Parameter

Description

sender

Object representing the publisher of the event.

notification

MTCMSNotificationMessage representing data received.

Last updated