Appendix C Sample Code; Query Devices, Opendevice And Closedevice; Sendcommand To Device And Get Response - Magtek Dynamag Programmer's Reference Manual

Wcf, secure card reader authenticator
Hide thumbs Also See for Dynamag:
Table of Contents

Advertisement

Appendix C - Sample Code
Appendix C
C.1

Query devices, openDevice and closeDevice.

This example shows how to use the getDeviceList function to get devices and open the first device
connected to the host.
MTSCRAWCF.MTSCRAWCF wcf = new MTSCRAWCF.MTSCRAWCF();
var devList = wcf.getDeviceList();
Console.WriteLine(devList);
var devs = devList.Split(',');
foreach (var dev in devs)
var open = wcf.openDevice(devs[0]);
Console.WriteLine("open " +
if (open == 0)
/*
Output in Console :
USB://MagTek SCRA 1,BLEEMV://eDynamo-B306F96
USB://MagTek SCRA 1
BLEEMV://eDynamo-B306F96
open USB://MagTek SCRA 1 -> 1
*/
C.2

SendCommand to device and get response.

This example shows how to use the SendCommand function to send command to device and get device
response.
var response = wcf.sendCommand("0001");
Console.WriteLine(response);
/*
Output in Console :
*/
Dynamag, DynaMAX, and eDynamo| Secure Card Reader Authenticator | Programmer's Reference (WCF)
Page 29
Sample Code
Console.WriteLine(dev);
wcf.closeDevice();
devs[0] + " -> " + open);

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Dynamag and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

DynamaxEdynamo

Table of Contents