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

Appendix A - API Walk Through

CoreAPI Walk Trough

The following walks through how to create instances of a device.

  • CoreAPI.getDeviceList à IDevice

These examples demonstrate methods for creating an IDevice to be used in the MagTek Universal SDK.

Here, a list of IDevice is established. The first device is accessed at index 0.

#include "MTUSDK.h" 
using namespace MTUSDK;

// Acess MMS with Universal SDK using getDeviceList()

vector<IDevice*> devices = 
CoreAPI::getDeviceList(MTU_DEVICE_TYPE::MMS);

IDevice* mtmms = devices.at(0); 
mtmms->requestSignature(0xff);

IDevice Walk Through

The following walks through how to make use of IDevice.

  • 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 IEventSubscriber, or events can be interfaced by a separate class. This example shows how to parse for 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

Example

DeviceCapability Walk Through

The following walks through how to make use of DeviceCapability

  • IDevice --> DeviceCapability.

  • DeviceCapability --> BatteryBackedClock() to check if date/time should be set.

  • DeviceCapability --> PaymentMethods() to check card types supported.

  • DeviceCapability --> other functions.

IDeviceConfiguration Walk Through

The following walks through how to make use of IDeviceConfiguration.

  • IDevice --> getConfiguration().

  • 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