The vmc_configuration object allows you to set various configuration flags. When using the Marshall SDK, these determine the behavior and capabilities of the vending machine controller (VMC).

Configuration Flags

You can initiate these flags in the main method, as in the following code:

public static void main(string[] args) {
    vmc_config.multi_vend_support = false;
    vmc_config.multi_session_support = false;
    vmc_config.price_not_final_support = true;
    vmc_config.reader_always_on = false;
    vmc_config.always_idle = false;
    vmc_config.vend_denied_policy = vmc_configuration.vend_denied_policy_cancel;

    vmc_config.mifare_approved_by_vmc_support = false;
    vmc_config.mag_card_approved_by_vmc_support = false;

    vmc_config.dump_packets_level = vmc_configuration.debug_level_dump_moderate;
    vmc_config.debug = true;
}
public class vend_machine
    vmc_config.multi_session_support = false;
    vmc_config.multi_vend_support = false;
    vmc_config.price_not_final_support = false;
    vmc_config.reader_always_on = false;
    vmc_config.always_idle = false;
    vmc_config.vend_denied_policy = vmc_configuration.vend_denied_policy_cancel;

    vmc_config.mag_card_approved_by_vmc_support = false;
    vmc_config.mifare_approved_by_vmc_support = false;

    vmc_config.debug = true;
    vmc_config.dump_packets_level = vmc_configuration.debug_level_dump_moderate;

vmc_config_t vmc_config;
  vmc_config.multi_session_support = __false;
  vmc_config.multi_vend_support = __false;
  vmc_config.price_not_final_support = __false;
  vmc_config.reader_always_on = __false;
  vmc_config.always_idle = __false;
  vmc_config.vend_denied_policy = vend_denied_policy_cancel_e;
  vmc_config.mag_card_approved_by_vmc_support = __false;
  vmc_config.mifare_approved_by_vmc_support = __false;
  vmc_config.qr_approved_by_vmc_support = __false;
  vmc_config.debug = __true;
  vmc_config.dump_packets_level = debug_level_dump_moderate;

Flag Descriptions

The table below provides a more detailed description of the flags.

ParameterTypeDescription
multi_vend_supportbooleanAllows the peripheral to support multiple vendors, enabling the sale of multiple products in a single transaction.
multi_session_supportbooleanEnables the device to handle multiple sessions simultaneously, which is useful for scenarios where various transactions may be open at the same time.
price_not_final_supportbooleanIndicates that the price received from the server is not final, similar to a pre-authorization process, ensuring the balance isn't captured for a few days.
reader_always_onbooleanIt keeps the device's reader always turned on and ready to accept card transactions.
always_idlebooleanThe transaction starts with the consumer selecting a product on the peripheral. The peripheral can send the "Vend request" command without waiting for a "Begin Session" trigger.
mifare_approved_by_vmc_supportbooleanAllows Mifare (prepaid) cards authorized by a third-party server.
mag_card_approved_by_vmc_supportbooleanAllows magnetic stripe credit cards authorized by a third-party server.
debugbooleanEnables or disables log generation.
dump_packets_levelvmc_configurationDetermines the level of detail required to log messages generated by the SDK. See Log generation for more details.