Skip to main content
This page outlines the general facilities provided by the Marshall SDK. It includes event handling through the GeneralEvents interface and APIs for registering callbacks, sending alerts, and requesting time updates.

Events Interface

The GeneralEvents interface defines various events related to the general operations of the Marshall SDK. Implementing this interface allows your application to respond to specific events triggered during the SDK’s operation. The following code block presents all available event methods:

Events Methods

The table below outlines all the methods available through the interface.
ParameterDescription
onDCSParamChange(int dcs_param, byte[] data)When a Nayax Core parameter changes, the parameter identifier and the new data are provided.
onDisplayEventButtonPressed(byte button_id)Triggered when a button on the display is pressed, providing the button identifier.
onDisplayEventTextInput(string input)Called when text input is received from the display, providing the input text.
onTransferData(byte[] data)This function is invoked when data is transferred between the Device and the Peripheral. The transferred data is provided as a byte array: (byte[] data), which contains information structured in TLV (Tag-Length-Value) format.See onTransferData for more details.
onTimeUpdate(byte year, byte month, byte day, byte hours, byte minutes, byte seconds)It is called when a time update occurs, providing the updated time value.

General Methods

The following methods are available to interact with the general facilities of the Marshall SDK:

Send an Alert

Alerts sent with the alert method appear in Nayax Core under Last Alerts, provided the machine carries the alert configuration described in Set Up Nayax Core for Marshall Integration. The alert ID must already exist in the Nayax database. You cannot invent one. Alert IDs 200 and 810 do nothing. Use ID 2, a Door event, which is the recommended choice, and set the event data to whatever you need.

Status Command

Once pairing completes, the device sends a Status command whenever network communication is lost, so your machine finds out. The Java SDK log below shows what that looks like, and the C# and C logs match it.
Java SDK's log
The status is 21 (0x15), which means the device is unavailable. The bytes that follow indicate why. Once communication resumes and the device returns to idle, it sends a Status command with a value of 20.
Java SDK's log
In short, the device loses contact with the outside world, whether from a dead SIM, a faulty Ethernet connection, or something else. Your peripheral keeps sending keep-alives, the device keeps responding, and the device sends a Status command with a value of 21 (0x15). When the device regains contact, it sends a Status command with a value of 20 (0x14).

Card Presentation Statuses

The Status command also reports what is happening while the consumer presents a card. A consumer who has trouble with card reading is prompted to insert the card or use another one. A card without enough credit produces no on-screen message, for the reason described in Vending Events.