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.

If accessing a device specific API outside of MagTek Universal SDK, use the various functions in this section to create an instance of that device’s API. Once a device specific API is referenced, the associated library will need to be added into the application’s development project.

getAPIVersion

This function returns the version of the MagTek Universal SDK.

int CoreAPI.getAPIVersion();

Return Value:

Returns integer.

getDevice

This function returns an instance of a device.

IDevice CoreAPI.getDevice( 
    DeviceType deviceType, 
    ConnectionType connectionType, 
    String deviceAddress);

Parameter

Description

deviceType

Enumerated device type.

Return Value:

Returns an IDevice.

This function returns a list of IDevice.

Return Value:

Returns List<IDevice>.

This function returns a list of ConnectionType supported for a particular device type.

Return Value:

Returns a list of List<ConnectionType>.

This function returns a string for a connection type.

Return Value:

Returns a string for a connection type.

This function returns an enumerated connection type from a string.

Return Value:

Returns a ConnectionType.

connectionType

Enumerated connection type.

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

Parameter

Description

deviceType

Enumerated device type.

connectionType

Enumerated connection type.

Parameter

Description

deviceType

Enumerated device type.

Parameter

Description

connectionType

Enumerated connections type.

Parameter

Description

connectionType

Enumerated connections type.

getDeviceList

getConnectionTypes

GetConnectionTypeString

GetConnectionTypeFromString

List<IDevice> CoreAPI.getDeviceList(DeviceType deviceType); 

List<IDevice> CoreAPI.getDeviceList(DeviceType deviceType, ConnectionType connectionType);
List<ConnectionType> CoreAPI.getConnectionTypes(DeviceType deviceType);
String CoreAPI.GetConnectionTypeString(ConnectionType connectionType);
ConnectionType CoreAPI.GetConnectionTypeFromString(String connectionType);