Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Documentation

Please see the main ASL documentation

Description

The Amadis Configuration Module provides an integrator with easy access to Nexo TMS related functionalities.

...

This refers to a different module - a more complete documentation can be found at https://teamamadis.atlassian.net/wiki/spaces/AF/pages/1127448766/Unified+Connection+Provider

For all usages of the Configuration Module, a Connection Provider must be available. A default implementation with Nexo required capabilities is provided.

...

Code Block
breakoutModewide
// Load or initialise an empty configuration - see the [Minimal Configuration Required] section for more information

// Ex: TerminalConfiguration(0xFF01) containing POIID(0xDF9F32)

// Hard mode:
byte[] configuration = { (byte) 0xFF, 0x01, 0xC0, 0xDF, 0x9F, 0x32, 0x08, 0x50, 0x4f, 0x49, 0x49, 0x44, 0x30, 0x30, 0x31 };

// If using the AmadisTLV helpers, the same can be achieved with:
TlvTree configTree = TlvTree.Empty();
TlvTree terminalConfig = configTree.AddChild(ConfigurationTags.TerminalConfiguration);
terminalConfig.AddAscii(ConfigurationTags. }POIID, "POIID001");
arkosConfiguration = configTree.AsBytes();

// Execute the configuration action
ConfigurationResult result = AmadisTMSModule.DoConfiguration(connectionProvider, configuration, "hostname:port");

// Inspect and use the result Object
if (result.isSuccess()) {
    Log.d("config", "Configuration attempt was successful");
    
    // Configuration attempt was successful - this is the new valid configuration and should replace the old one.
    configuration = result.getConfiguration();

    // It is important to always keep the Connection Provider up to date with the current configuration
    connectionProvider.setConfiguration(configuration);
}
else {
    // The textual reason for a failure is provided
    Log.d("config", "Configuration attempt failed: " + result.getError());
}

...

Code Block
breakoutModewide
// [configuration] must be a previously received valid configuration from the TMS system
ConfigurationResult result = AmadisTMSModule.DoConfiguration(connectionProvider, configuration);

// Inspect and use the result Object
if (result.isSuccess()) {
    Log.d("config", "Configuration attempt was successful");
    
    // Configuration attempt was successful - this is the new valid configuration and should replace the old one.
    configuration = result.getConfiguration();

    // It is important to always keep the Connection Provider up to date with the current configuration
    connectionProvider.setConfiguration(configuration);
}
else {
    // The textual reason for a failure is provided
    Log.d("config", "Configuration attempt failed: " + result.getError());
}

Trigger a Configuration Module managed cyclic call

This is not supported in the current version.

Details TBD