VMC Configuration Object

The vmc_configuration class is used to set up various parameters and flags that control the behavior of the peripheral. Proper configuration is crucial for ensuring smooth operation and compatibility with different peripherals.

Configuration Object

The code block below displays the vmc_configuration class for the available SDK languages.

public class vmc_configuration 
      public Object port_vpos;
      public int port_vpos_baud;

      public String serial;
      public String model;
      public String sw_ver;
      public int    machine_type;
      boolean explicit_vend_success;
      public boolean price_not_final_support;
      public boolean mag_card_approved_by_vmc_support;
      public boolean mifare_approved_by_vmc_support;

      public boolean debug;
      public int dump_packets_level;

      public boolean reader_always_on;
      public boolean multi_session_support;
      public boolean multi_vend_support;
      public boolean always_idle;
      public 
public class vmc_configuration 
      public string  port_vpos;
      public int port_vpos_baud;

      public string serial;
      public string model;
      public string sw_ver;
      public int    machine_type;

      public bool reader_always_on;
      public bool multi_session_support;
      public bool multi_vend_support;
      public bool always_idle;
      public bool explicit_vend_success;
      public bool price_not_final_support;
      public bool mag_card_approved_by_vmc_support;
      public bool mifare_approved_by_vmc_support;

      public bool debug;
      public int dump_packets_level;

Object Parameters

The table below describes the parameters of the class.

Parameter

Type

Description

port_vpos

String

The PC COM port to which the Nayax device is connected.

port_vpos_baud

int

The baud rate for the Nayax device communication port.

serial

String

The serial number of the machine. This enables precise tracking, effective inventory management, and streamlined maintenance scheduling.

model

String

Model name of the machine. It assists in troubleshooting by distinguishing different machine types in logs and reports.

sw_ver

String

The software version of the peripheral.

machine_type

int

The type of peripheral.

explicit_vend_success

bool

Flag to indicate explicit vending status (success/failure). Relevant only for long vending process.

price_not_final_support

bool

Indicates if the price is not final, meaning the settlement price can be different than the one authorized. Relevant for Multisession flow only.

mag_card_approved_by_vmc_support

bool

Support for magnetic card approval by the peripheral.

mifare_approved_by_vmc_support

bool

Support for MIFARE card approval by the peripheral.

debug

bool

Enables or disables debugging. Enabling it is mandatory in order to generate the SDK's logs.

dump_packets_level

int

Sets the level of packet logging for debugging purposes.

reader_always_on

bool

It keeps the Nayax device's reader always enabled and ready for transactions. Used in cases in which the peripheral would like a card's presentation to be a trigger for product selection.

multi_session_support

bool

Enables support for Multi-Session flow

multi_vend_support

bool

Enables support for Multi-vend flow.

always_idle

bool

Configures the device to start transactions by product selection and have the authorized amount appear on Nayax's device screen (instead of animations).

Mandatory Fields

When configuring a VMC (Vending Machine Controller), there are specific mandatory fields essential for the proper identification of the machine. Properly managing these fields leads to improved troubleshooting, enhanced system integration, and more efficient maintenance processes.

Refer to the code block below for an example of the configuration for these mandatory fields.

vmc_config = new vmc_configuration();

vmc_config.model = "marshall-java-sdk";
vmc_config.serial = "01234567";
vmc_config.hw_ver = "01234567";
vmc_config.manuf_code = "manuf";
vmc_init()
	__strcpy(config.model, "marshall-c-sdk-demo");
	__strcpy(config.serial, "01234567");
	__strcpy(config.sw_ver, "vmc app version");
	__strcpy(config.vmc_hw_ver, “01234567”);
  __strcpy(config. vmc_manuf_code, “manuf”);

The table below describes the parameters:

ParameterTypeDescription
modelStringModel name of the machine. It assists in troubleshooting by distinguishing different machine types in logs and reports.
serialStringThe serial number of the machine. This enables precise tracking, effective inventory management, and streamlined maintenance scheduling.
hw_verStringHardware version of the machine. It ensures that the correct firmware and software are used. Different hardware versions may require specific drivers or compatibility adjustments.
manuf_codeStringIdentifies the machine's manufacturer, enabling proper support and operation.

Nayax Core

These parameters will be saved in Nayax Core. You can find them in Operations > Machines. Find and select your machine and open the VMC tab, as shown in the following image.

See Also