#!/bin/bash
#
# Configuration file for modbus
#
# Usage: ./t2plconf
#
# Enter configurations items as follows:
#
#   "NAME" "TYPE" "DEPENDENCIES" "DESCRIPTION"
#
#   - TYPE can be:
#       - check (boolean),
#       - radio (set of values),
#       - range (min <= val <= max)
#       - text
#
#   - DEPENDENCIES MUST be numeric, e.g., "A == 1 && (B < 4 || C >= 1)"
#
#   - DESCRIPTION for type 'check' MUST NOT contain tabs ('\t')
#   - DESCRIPTION for TYPE 'range' MUST NOT contain '\t' or ':'
#   - DESCRIPTION for TYPE 'radio' MUST NOT contain '\t', ':' or ';'
#   - DESCRIPTION for TYPE 'text'  MUST NOT contain '\t'
#
#   - DESCRIPTION MUST be formatted according to the type (see examples below):
#       - check: description
#       - radio: description ';' val1 ':' description1 ';' valN ':' descriptionN
#       - range: description ':' min ' ' max
#       - text : description

ITEMS=(
    MB_DEBUG check "" "Print debug messages"

    MB_FE_FRMT radio ""
        "Function/Exception codes representation;
            0: hex; \
            1: int"

    MB_NUM_FUNC range ""
        "Number of function codes to store: 0 65535"

    MB_UNIQ_FUNC check "MB_NUM_FUNC > 0"
        "Aggregate multiply defined function codes"

    MB_NUM_FEX range ""
        "Number of function codes which caused exceptions to store: 0 65535"

    MB_UNIQ_FEX check "MB_NUM_FEX > 0"
        "Aggregate multiply defined function codes which caused exceptions"

    MB_NUM_EX range ""
        "Number of exception codes to store: 0 65535"

    MB_UNIQ_EX check "MB_NUM_EX > 0"
        "Aggregate multiply defined exception codes"
)

# Source the main config file
source ../scripts/t2conf/t2plconf
