General Marshall Events
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
The GeneralEvents
interface defines various events related to 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:
public interface GeneralEvents
void onDCSParamChange(int dcs_param, byte[] data);
void onDisplayEventButtonPressed(byte button_id);
void onDisplayEventTextInput(string input);
void onTransferData(byte[] data);
void onTimeUpdate(
byte year,
byte month,
byte day,
byte hours,
byte minutes,
byte seconds);
public interface GeneralEvents
void onDCSParamChange(int dcs_param, byte[] data);
void onTransferData(byte[] data);
void onTimeUpdate(
byte year,
byte month,
byte day,
byte hours,
byte minutes,
byte seconds);
Where:
-
void onDCSParamChange(int dcs_param, byte[] data)
: When a Nayax Core parameter changes, the parameter identifier and the new data are provided. -
void onDisplayEventButtonPressed(byte button_id)
: Triggered when a button on the display is pressed, providing the button identifier. -
void onDisplayEventTextInput(string input)
: Called when text input is received from the display, providing the input text. -
void 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 on the function's usage. -
void 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 values.
API
The following API methods are available to interact with the general facilities of the Marshall SDK:
public void register_callbacks(GeneralEvents events)
: Registers the callback events for the peripheral general module. This method allows your application to handle the events defined in the GeneralEvents interface.public void alert(short id, String msg)
: Sends an alert to Nayax Core, shown under Last Alerts.public void requestTime()
: Makes a time request from the VPOS. The response will arrive as an event (onTimeUpdate
)
Updated 3 months ago