![Magtek Universal SDK Скачать руководство пользователя страница 12](http://html1.mh-extra.com/html/magtek/universal-sdk/universal-sdk_programmers-manual_3704653012.webp)
3 - CoreAPI
MagTek Universal SDK| For MMS Devices | Programmer’s Manual ( Java )
Page 12
3
CoreAPI
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.
3.1
getAPIVersion
This function returns the version of the MagTek Universal SDK.
int CoreAPI.getAPIVersion();
Return Value:
Returns integer.
3.2
getDevice
This function returns an instance of a device.
IDevice CoreAPI.getDevice(
DeviceType deviceType,
ConnectionType connectionType,
String deviceAddress);
Parameter
Description
deviceType
Enumerated device type.
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
Return Value:
Returns an
IDevice
.
3.3
getDeviceList
This function returns a list of
List<IDevice> CoreAPI.getDeviceList(DeviceType deviceType);
List<IDevice> CoreAPI.getDeviceList(DeviceType deviceType,
ConnectionType connectionType);
Parameter
Description
deviceType
Enumerated device type.
connectionType
Enumerated connection type.