Advanced programming

How to onboard a new venue

Use this workflow for production onboarding.

  1. Get the venue XML SBE template and protocol documentation.
  2. Parse schema and inspect model:
  3. Identify framing header format (often documented outside XML template):
  4. Identify message header layout and check for custom header fields:
  5. Check repeating-group headers for custom extensions.
  6. Find custom composites and choose handling mode:
  7. Build MessageSchema and ByteDecoder:
  8. Configure runtime safety switches:
  9. Validate decode/encode flow with real payload samples:

API map for integration

Use this quick mapping when implementing code:

Related documentation pages:

Value narrowing

Narrowing is conversion between integer types with different ranges. It appears when API method type does not match schema field type.

Examples:

  • int32 -> int16: valid range is [-32768..32767].
  • int16 -> uint32: valid range is [0..32767].
  • uint16 -> int16: valid range is [0..32767].
  • uint8 -> int16: always valid.

Narrowing can happen in two places:

  • Write narrowing: setter value type is wider than field type. Example: field is int8, code uses setInt(...).
  • Read narrowing: getter type is narrower than field type. Example: field is int32, code uses getShort(...).

By default, narrowing is disabled. Without narrowing, use matching getter/setter pairs for field type.

Configure narrowing in DecoderSettings:

Operation Narrowing enable Narrowing validation
Read setEnableNarrowingOnRead / enableNarrowingOnRead setValidateNarrowingOnRead / validateNarrowingOnRead
Write setEnableNarrowingOnWrite / enableNarrowingOnWrite setValidateNarrowingOnWrite / validateNarrowingOnWrite

Recommendation:

  • do not enable narrowing unless you need it;
  • if enabled, also enable validation flags.

DecoderSettings.createFullControlSettings() returns preset with all narrowing flags enabled and validated.