Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This should be used for the first configuration retrieval, or to force a specific host different from what was specified in the configuration

Expand
titleMinimal Configuration Required

In the case where no configuration is previously available, a basic configuration must be created prior to any configuration attempt. It must contain the following TLV DO:

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

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

Code Block
breakoutModewide
// Load or initialise an empty configuration - see the [Minimal Configuration Required] section for more information
byte[] configuration = { ... };

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());
}

...