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

Appendix A Code Examples

A.1 Request List of Devices

To request a list of devices:

  1. Create an MTSCRANET.MTSCRA object.

  2. Set the connection type with setConnectionType().

  3. Add a handler for OnDeviceList().

  4. Call requestDeviceList().

MTSCRANET.MTSCRA listMTSCRA = new MTSCRANET.MTSCRA(); 
listMTSCRA.setConnectionType(MTConnectionType.USB); 
listMTSCRA.OnDeviceList() += listMTSCRA_OnDeviceList; 
listMTSCRA.requestDeviceList(MTConnectionType.USB); 

listMTSCRA_OnDeviceList( 
object sender, 
MTConnectionType connectionType, 
List<MTDeviceInformation> deviceList) 
{ 
//Handle deviceList 
}

A.2 Open Device(s)

To open multiple devices:

  1. Create an MTSCRANET.MTSCRA object.

  2. Set the connection type with setConnectionType().

  3. Add a handler for OnDeviceList().

  4. Call requestDeviceList().

  5. Create an MTSCRANET.MTSCRA object for each reader.

  6. Set the connection type with setConnectionType() for each reader.

  7. Call openDevice() for each reader.

Close Device

Get Connection Status of Device

Receiving Card Data from Device

A.6 Send Command to Device

Last updated