Appendix B - API Walk Through
CoreAPI Walk Trough
The following walks through how to create instances of a device.
CoreAPI.createDevice à IDevice
CoreAPI.getDeviceList à List<IDevice>
These examples demonstrate methods for creating an IDevice to be used in the MagTek Universal SDK. This also shows how to establish a device specific API, which is not used with the MagTek Universal SDK.
Here, a single IDevice is established.
// Access MMS with Universal SDK using createDevice()
IDevice mtmms = CoreAPI.getDevice(
DeviceType.MMS,
ConnectionType.USB,
"",);
mtmms.requestSignature();Here, a list of IDevice is established. The first device is accessed at index 0.
// Acess MMS with Universal SDK using getDeviceList()
List<IDevice> mtmms = CoreAPI.getDeviceList(DeviceType.MMS); mtmms.get(0).requestSignature();IDevice Walk Through
The following walks through how to make use of IDeviceError! Reference source not found..
Implement device events within the class to receive events.
CoreAPI --> IDevice.
IDevice --> subscribeAll().
IDevice --> other functions.
IDevice --> startTransaction().
Example
Handling Events
Application Main window may extent the Error! Reference source not found. or can be extended by a eparate class. This example uses a separate class and demonstrates how to parse for the various event types.
Example
Various events are separately shown below.
IDeviceControl Walk Through
The following walks through how to make use of IDeviceControl.
IDevice --> IDeviceControl.
IDeviceControl --> open().
IDeviceControl --> other functions.
IDeviceControl --> close().
Example
ConnectionInfo Walk Through
The following walks through how to make use of ConnectionInfo.
IDevice --> ConnectionInfo.
ConnectionInfo --> getAddress()
ConnectionInfo --> getConnectionType()
ConnectionInfo --> getDeviceType() Example
IDeviceCapabilities Walk Through
The following walks through how to make use of Error! Reference source not found..
IDevice --> IDeviceCapabilities.
IDeviceCapabilities --> BatteryBackedClock() to check if date/time should be set.
IDeviceCapabilities --> PaymentMethods() to check card types supported.
IDeviceCapabilities --> other functions.
IDeviceConfiguration Walk Through
The following walks through how to make use of IDeviceConfiguration.
IDevice --> getDeviceConfiguration().
IDeviceConfiguration --> updateFirmware().
IDeviceConfiguration --> getConfiguration().
IDeviceConfiguration --> setConfiguration().
IDeviceConfiguration --> other functions.
Example
Handling Events
Application Main window may extent the IConfigurationCallback Delegates or can be extended by a separate class. This example uses a separate class and demonstrates how to parse for the various events.
Example
Last updated

