All pages
Powered by GitBook
1 of 1

Loading...

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

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

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

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

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

deviceList

A list of MTDeviceInformation objects

Parameter

Description

sender

Object representing the publisher of the event.

state

MTDeviceState value indicating the state of the device:

Disconnected Connecting Error Connected Disconneting

Parameter

Description

sender

Object representing the publisher of the event.

dataString

Hexadecimal string representing data received.

Parameter

Description

sender

Object representing the publisher of the event.

dataBytes

Byte array representing data received.

Parameter

Description

sender

Object representing the publisher of the event.

response

MTCMSResponseMessage representing data received.

Parameter

Description

sender

Object representing the publisher of the event.

notification

MTCMSNotificationMessage representing data received.

OnDeviceConnectionStateChanged

OnDeviceDataString

OnDeviceDataBytes

OnDeviceResponseMessage

OnDeviceNotificationMessage

 public event DeviceListHandler OnDeviceList

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

public delegate void DeviceDataStringHandler(object sender, string dataString)
public event DeviceDataBytesHandler OnDeviceDataBytes 
public delegate void DeviceDataBytesHandler(object sender, byte[] dataBytes)
public event DeviceResponseMessageHandler OnDeviceResponseMessage 
public delegate void DeviceResponseMessageHandler(object sender, 
MTCMSResponseMessage response)
public event DeviceNotificationMessageHandler OnDeviceNotificationMessage 

public delegate void DeviceNotificationMessageHandler(object sender, 
MTCMSNotificationMessage notification)