Skip to main content
The vmc_configuration object allows you to set various configuration flags. When using the Marshall SDK, these determine the behavior and capabilities of the peripheral (originally intended for 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 = 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.explicit_vend_success = false;
        vmc_config.long_price = false;

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

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

Flag Descriptions

The table below provides a more detailed description of the flags.
ParameterTypeDescription
multi_vend_supportbooleanEnabling the sale and differentiation 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_supportbooleanRelevant for multi-session (pre-selection) flow only. Indicates that the authorization price received from the server is not final, meaning using it alongside Multi-session would have it behave similarly to a pre-authorization process, ensuring the balance isn’t captured for a few days. You can read more on that in the Multi-Session for more details.
reader_always_onbooleanIt keeps the device’s reader always turned on and ready to start transactions from the device’s end instead of the peripheral. When used, a trigger for the product selection would be a card presentation or touching a button on the device instead of selecting a product on the peripheral’s end.
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.
vend_denied_policybooleanirrelevant, N/A.
explicit_vend_successbooleanIf you have a long vend operation you can set this flag to true, and then after you get the onVendApproved(), you can perform the slow vend operation and then on your time, call vend_status(true/false) for vend success/failure, in order to conclude the transaction.(the onVendApproved would return a dummy “true”, meaning it would release the thread but the SDK would still wait for your actual response regarding the vending result, which is what you’d do in the “vend_status” command)
long_pricebooleanRelevant only for VPOSM- allows for the price field to be 4 bytes long instead of 2 bytes.
Not yet supported
mifare_approved_by_vmc_supportbooleanAllows Mifare (prepaid) cards to be authorized by a third-party server. The card’s data is being forwarded to the peripheral and it is up for it to approve/decline the card.
mag_card_approved_by_vmc_supportbooleanAllows magnetic stripe proprietary cards authorized by a third-party server. The card’s data is being forwarded to the peripheral and it is up for it to approve/decline the card.
qr_approved_by_vmc_supportbooleanAllows QR codes to be authorized by a third-party server. The card’s data is being forwarded to the peripheral and it is up for it to approve/decline the card.
debugbooleanEnables or disables log generation.
dump_packets_levelvmc_configurationDetermines the level of detail required to log messages generated by the SDK. You can read more on that in the Log generation for more details.