add schema document for YAML file (this is useful for the VSCode RedHat YAML plugin);

pull/72/head
Bryan Biedenkapp 1 year ago
parent a015c547d7
commit a677f444d4

@ -353,6 +353,8 @@ if (NOT TARGET tarball)
COMMAND cp ../tools/*.sh ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm COMMAND cp ../tools/*.sh ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm
COMMAND chmod +x ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/*.sh COMMAND chmod +x ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/*.sh
COMMAND cp -v ../configs/*.yml ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm COMMAND cp -v ../configs/*.yml ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm
COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/schema
COMMAND cp -v ../configs/schema/*.json ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/schema
COMMAND cp -v ../configs/*.dat ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm COMMAND cp -v ../configs/*.dat ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm
COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/fw COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/fw
COMMAND if [ -e dvm-firmware_f4.elf ]\; then cp -v dvm-firmware_f4.elf ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/fw\; fi COMMAND if [ -e dvm-firmware_f4.elf ]\; then cp -v dvm-firmware_f4.elf ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/fw\; fi
@ -384,6 +386,8 @@ if (NOT TARGET tarball)
COMMAND cp ../tools/*.sh ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm COMMAND cp ../tools/*.sh ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm
COMMAND chmod +x ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/*.sh COMMAND chmod +x ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/*.sh
COMMAND cp -v ../configs/*.yml ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm COMMAND cp -v ../configs/*.yml ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm
COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/schema
COMMAND cp -v ../configs/schema/*.json ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/schema
COMMAND cp -v ../configs/*.dat ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm COMMAND cp -v ../configs/*.dat ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm
COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/fw COMMAND mkdir -p ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/fw
COMMAND if [ -e dvm-firmware_f4.elf ]\; then cp -v dvm-firmware_f4.elf ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/fw\; fi COMMAND if [ -e dvm-firmware_f4.elf ]\; then cp -v dvm-firmware_f4.elf ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/fw\; fi
@ -417,6 +421,7 @@ add_custom_target(old_install
COMMAND mkdir -p ${CMAKE_LEGACY_INSTALL_PREFIX} COMMAND mkdir -p ${CMAKE_LEGACY_INSTALL_PREFIX}
COMMAND mkdir -p ${CMAKE_LEGACY_INSTALL_PREFIX}/bin COMMAND mkdir -p ${CMAKE_LEGACY_INSTALL_PREFIX}/bin
COMMAND mkdir -p ${CMAKE_LEGACY_INSTALL_PREFIX}/log COMMAND mkdir -p ${CMAKE_LEGACY_INSTALL_PREFIX}/log
COMMAND mkdir -p ${CMAKE_LEGACY_INSTALL_PREFIX}/schema
COMMAND install -m 755 dvmhost ${CMAKE_LEGACY_INSTALL_PREFIX}/bin COMMAND install -m 755 dvmhost ${CMAKE_LEGACY_INSTALL_PREFIX}/bin
COMMAND install -m 755 dvmcmd ${CMAKE_LEGACY_INSTALL_PREFIX}/bin COMMAND install -m 755 dvmcmd ${CMAKE_LEGACY_INSTALL_PREFIX}/bin
COMMAND install -m 755 dvmmon ${CMAKE_LEGACY_INSTALL_PREFIX}/bin COMMAND install -m 755 dvmmon ${CMAKE_LEGACY_INSTALL_PREFIX}/bin
@ -430,6 +435,7 @@ add_custom_target(old_install
COMMAND install -m 644 ../configs/rid_acl.example.dat ${CMAKE_LEGACY_INSTALL_PREFIX}/rid_acl.dat COMMAND install -m 644 ../configs/rid_acl.example.dat ${CMAKE_LEGACY_INSTALL_PREFIX}/rid_acl.dat
COMMAND install -m 644 ../configs/talkgroup_rules.example.yml ${CMAKE_LEGACY_INSTALL_PREFIX}/talkgroup_rules.example.yml COMMAND install -m 644 ../configs/talkgroup_rules.example.yml ${CMAKE_LEGACY_INSTALL_PREFIX}/talkgroup_rules.example.yml
COMMAND install -m 644 ../configs/bridge-config.example.yml ${CMAKE_LEGACY_INSTALL_PREFIX}/bridge-config.example.yml COMMAND install -m 644 ../configs/bridge-config.example.yml ${CMAKE_LEGACY_INSTALL_PREFIX}/bridge-config.example.yml
COMMAND install -m 644 ../configs/talkgroup_rules.yaml_schema.json ${CMAKE_LEGACY_INSTALL_PREFIX}/schema/talkgroup_rules.yaml_schema.json
COMMAND install -m 755 ../tools/start-dvm.sh ${CMAKE_LEGACY_INSTALL_PREFIX} COMMAND install -m 755 ../tools/start-dvm.sh ${CMAKE_LEGACY_INSTALL_PREFIX}
COMMAND install -m 755 ../tools/stop-dvm.sh ${CMAKE_LEGACY_INSTALL_PREFIX} COMMAND install -m 755 ../tools/stop-dvm.sh ${CMAKE_LEGACY_INSTALL_PREFIX}
COMMAND install -m 755 ../tools/dvm-watchdog.sh ${CMAKE_LEGACY_INSTALL_PREFIX} COMMAND install -m 755 ../tools/dvm-watchdog.sh ${CMAKE_LEGACY_INSTALL_PREFIX}

@ -1,8 +1,6 @@
# #
# Digital Voice Modem - Bridge # Digital Voice Modem - Bridge
# #
# @package DVM / Bridge
#
# Flag indicating whether the host will run as a background or foreground task. # Flag indicating whether the host will run as a background or foreground task.
daemon: true daemon: true

@ -1,8 +1,6 @@
# #
# Digital Voice Modem - Host Software Configuration # Digital Voice Modem - Host Software Configuration
# #
# @package DVM / Host Software
#
# Flag indicating whether the host will run as a background or foreground task. # Flag indicating whether the host will run as a background or foreground task.
daemon: true daemon: true

@ -1,8 +1,6 @@
# #
# Digital Voice Modem - Conference FNE Software Configuration # Digital Voice Modem - Conference FNE Software Configuration
# #
# @package DVM / Conference FNE Software
#
# Flag indicating whether the host will run as a background or foreground task. # Flag indicating whether the host will run as a background or foreground task.
daemon: true daemon: true

@ -1,8 +1,6 @@
# #
# Digital Voice Modem - Monitor Configuration # Digital Voice Modem - Monitor Configuration
# #
# @package DVM / Monitor
#
# #
# Channel Identity Table Configuration # Channel Identity Table Configuration

@ -0,0 +1,107 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Digital Voice Modem - Talkgroup Rules",
"properties": {
"groupVoice": {
"description": "List of talkgroups defined by this rules file.",
"type": "array",
"items": {
"type": "object",
"required": [ "name", "config", "source" ],
"properties": {
"name": {
"description": "Textual name of the talkgroup.",
"type": "string"
},
"config": {
"description": "Talkgroup Configuration",
"type": "object",
"required": [ "active" ],
"properties": {
"active": {
"description": "Flag indicating whether this talkgroup is active or not.",
"type": "boolean"
},
"affiliated": {
"description": "Flag indicating whether this talkgroup will only repeat with affiliations.",
"type": "boolean"
},
"inclusion": {
"description": "List of peer IDs included for this talkgroup (peers listed here will be selected for traffic).",
"type": "array",
"items": {
"description": "Network Peer ID.",
"type": "number",
"uniqueItems": true
}
},
"exclusion": {
"description": "List of peer IDs excluded for this talkgroup (peers listed here will be ignored for traffic).",
"type": "array",
"items": {
"description": "Network Peer ID.",
"type": "number",
"uniqueItems": true
}
},
"rewrite": {
"description": "List of peer talkgroup rewrites.",
"type": "array",
"items": {
"type": "object",
"properties": {
"peerid": {
"description": "Network Peer ID to rewrite this TGID for.",
"type": "number"
},
"tgid": {
"description": "Numerical talkgroup ID number to rewrite to.",
"type": "number"
},
"slot": {
"description": "DMR slot number.",
"type": "number"
}
}
}
},
"always": {
"description": "List of peer IDs that always receive traffic for this talkgroup regardless of affiliation rules.",
"type": "array",
"items": {
"description": "Network Peer ID.",
"type": "number",
"uniqueItems": true
}
},
"preferred": {
"description": "List of site CC peer IDs defining talkgroup access preference (peers listed here will be preferred for access, sites not listed here will be non-preferred and will cause a AFF_GRP_RSP DENY, typically triggering roaming). If this list is empty *all* peers are preferred. (Trunking Only)",
"type": "array",
"items": {
"description": "Network Peer ID.",
"type": "number",
"uniqueItems": true
}
}
}
},
"source": {
"description": "Source Configuration",
"type": "object",
"required": [ "tgid", "slot" ],
"properties": {
"tgid": {
"description": "Numerical talkgroup ID number.",
"type": "number"
},
"slot": {
"description": "DMR slot number.",
"type": "number"
}
}
}
}
}
}
}
}

@ -1,8 +1,7 @@
# yaml-language-server: $schema=schema/talkgroup_rules.yaml_schema.json
# #
# Digital Voice Modem - Talkgroup Rules # Digital Voice Modem - Talkgroup Rules
# #
# @package DVM / Host Software
#
# #
# Talkgroup Rules # Talkgroup Rules

Loading…
Cancel
Save

Powered by TurnKey Linux.