All pages
Powered by GitBook
1 of 1

Loading...

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.

Return Value: IDevice*.

This function retrieves a list of connected devices.

Return Value: vector<IDevice*>

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

Return Value: vector<MTU_DEVICE_CONNECTION_TYPE>.

This function returns a string for the connection type.

Return Value: A string for the connection type.

This function retrieves the connection type from a string.

Return Value: MTU_DEVICE_CONNECTION_TYPE.

This function returns the API version.

int CoreAPI::getAPIVersion();

Return Value: An integer representing the API version.

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

Return Value: True if enumerable. Otherwise is false.

This function releases a device.

Return Value: None

This function releases a list of devices.

Return Value: None

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

Parameter

Description

deviceType

Enumeration of MagTek readers device type.

deviceTypes

Enumeration of MagTek readers different device types.

connectionType

Enumerated connection type.

Parameter

Description

deviceType

Enumerated device type.

Parameter

Description

connectionType

Enumerated connection type.

Parameter

Description

connectionTypeString

String value for a connection type.

Parameter

Description

deviceType

Enumerated device type.

connectionType

Enumerated connection type.

Parameter

Description

Device

An IDevice.

Parameter

Description

devices

List of IDevice.

getDeviceList

getConnectionTypes

getConnectionTypeString

getConnectionTypeFromString

1.6 getAPIVersion

1.7 isEnumerable

releaseDevice

releaseDeviceList

vector<IDevice*> CoreAPI::getDeviceList();

vector<IDevice*> CoreAPI::getDeviceList( 
    vector<MTU_DEVICE_TYPE> deviceTypes);

vector<IDevice*> CoreAPI::getDeviceList( 
    MTU_DEVICE_TYPE deviceType);
    
vector<IDevice*> CoreAPI::getDeviceList( 
    MTU_DEVICE_TYPE deviceType, 
    MTU_DEVICE_CONNECTION_TYPE connectionType);
vector<MTU_DEVICE_CONNECTION_TYPE> CoreAPI::getConnectionTypes( 
        MTU_DEVICE_TYPE deviceType);
string CoreAPI::getConnectionTypeString( 
    MTU_DEVICE_CONNECTION_TYPE connectionType);
MTU_DEVICE_CONNECTION_TYPE CoreAPI::getConnectionTypeFromString( 
    string connectionTypeString);
bool CoreAPI::isEnumable( 
        MTU_DEVICE_TYPE deviceType,
        MTU_DEVICE_CONNECTION_TYPE connectionType);
void CoreAPI::releaseDevice(IDevice* Device);
void CoreAPI::releaseDeviceList(vector<IDevice*>& devices);