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

CoreAPI

Use the CoreAPI to create an IDevice. IDevice is the bases for the MagTek Universal SDK.

getDevice

This function returns an instance of a device.

IDevice* getDevice( 
    MTU_DEVICE_TYPE DeviceType,
    MTU_DEVICE_CONNECTION_TYPE ConnectionType, 
    string DeviceAddress);
IDevice* getDevice( 
    MTU_DEVICE_TYPE DeviceType,
    MTU_DEVICE_CONNECTION_TYPE ConnectionType, 
    string DeviceAddress,
    CertificateInfo cert);

Parameter

Description

DeviceType

Enumerated device type.

ConnectionType

Enumerated connection type.

Parameter

Description

DeviceAddress

Address for the device.

For USB devices, address may be an empty string when only one device is attached. Otherwise address should be in the form:

USB://DEVICESERIALNUMBER

for example, USB://99261829170E0810

For Ethernet devices, address should be in the form:

IP://IP-Address:PORT

for example, IP://10.57.10.180:26

For Wireless DynaPro Go devices, address should be in the form: TLS12://TLSDEVICESERIALNUMBER TLS12TRUST://TLSDEVICESERIALNUMBER

for example, TLS12://TLS99261829170E0810 TLS12TRUST://TLS99261829170E0810

For Bluetooth LE devices, address should be in the form:

BLEEMV://DEVICENAME

for example, BLEEMV://DynaPro Go-EB66

For WebSocket or Secure WebSocket devices, address should be in the form:

ws://IP-Address or DEVICEADDRESS wss://IP-Address or DEVICEADDRESS

for example, ws://10.57.10.1 or ws://b512345.magtek.com wss://192.168.1.150 or wss://b512345.magtek.com

For Serial devices, address should be in the form: PORT=[PORT],

BAUDRATE=[BAUDRATE], DATABITS=[DATABITS], PARITY=[PARITY], STOPBITS=[STOPBITS], HANDSHAKE=[HANDSHAKE], STARTINGBYTE=[STARTINGBYTE], ENDINGBYTE=[ENDINGBYTE], CRCMODE=[CRCMODE]

cert

Certificate information for TLS Trust and WebSocket WSS connection. Optional. See the following for details on installing a certificate chain: DYNAFLEX TLS CERTIFICATE INSTALLATION MANUAL

Return Value: IDevice*.

getDeviceList

This function retrieves a list of connected devices.

Parameter

Description

deviceType

Enumeration of MagTek readers device type.

deviceTypes

Enumeration of MagTek readers different device types.

connectionType

Enumerated connection type.

Return Value: vector<IDevice*>

getConnectionTypes

This function returns a list of conection types supported from a device type.

Parameter

Description

deviceType

Enumerated device type.

Return Value: vector<MTU_DEVICE_CONNECTION_TYPE>.

getConnectionTypeString

This function returns a string for the connection type.

Parameter

Description

connectionType

Enumerated connection type.

Return Value: A string for the connection type.

getConnectionTypeFromString

This function retrieves the connection type from a string.

Parameter

Description

connectionTypeString

String value for a connection type.

Return Value: MTU_DEVICE_CONNECTION_TYPE.

1.6 getAPIVersion

This function returns the API version.

int CoreAPI::getAPIVersion();

Return Value: An integer representing the API version.

1.7 isEnumerable

This function checks whether the device and connection type is enumerable.

Parameter

Description

deviceType

Enumerated device type.

connectionType

Enumerated connection type.

Return Value: True if enumerable. Otherwise is false.

releaseDevice

This function releases a device.

Parameter

Description

Device

An IDevice.

Return Value: None

releaseDeviceList

This function releases a list of devices.

Parameter

Description

devices

List of IDevice.

Return Value: None

Last updated