diff --git a/CMakeLists.txt b/CMakeLists.txt index 63d3a44c..7bcef6c0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -353,6 +353,8 @@ if (NOT TARGET tarball) COMMAND cp ../tools/*.sh ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm COMMAND chmod +x ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/*.sh 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 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 @@ -384,6 +386,8 @@ if (NOT TARGET tarball) COMMAND cp ../tools/*.sh ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm COMMAND chmod +x ${CMAKE_INSTALL_PREFIX_TARBALL}/dvm/*.sh 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 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 @@ -417,6 +421,7 @@ add_custom_target(old_install COMMAND mkdir -p ${CMAKE_LEGACY_INSTALL_PREFIX} COMMAND mkdir -p ${CMAKE_LEGACY_INSTALL_PREFIX}/bin 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 dvmcmd ${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/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/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/stop-dvm.sh ${CMAKE_LEGACY_INSTALL_PREFIX} COMMAND install -m 755 ../tools/dvm-watchdog.sh ${CMAKE_LEGACY_INSTALL_PREFIX} diff --git a/configs/bridge-config.example.yml b/configs/bridge-config.example.yml index dd503575..55217ff7 100644 --- a/configs/bridge-config.example.yml +++ b/configs/bridge-config.example.yml @@ -1,8 +1,6 @@ # # Digital Voice Modem - Bridge # -# @package DVM / Bridge -# # Flag indicating whether the host will run as a background or foreground task. daemon: true diff --git a/configs/config.example.yml b/configs/config.example.yml index 0876faa6..4355e1e2 100644 --- a/configs/config.example.yml +++ b/configs/config.example.yml @@ -1,8 +1,6 @@ # # Digital Voice Modem - Host Software Configuration # -# @package DVM / Host Software -# # Flag indicating whether the host will run as a background or foreground task. daemon: true diff --git a/configs/fne-config.example.yml b/configs/fne-config.example.yml index e053cf7f..49a98120 100644 --- a/configs/fne-config.example.yml +++ b/configs/fne-config.example.yml @@ -1,8 +1,6 @@ # # 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. daemon: true diff --git a/configs/monitor-config.example.yml b/configs/monitor-config.example.yml index 3dbe63fd..dd977254 100644 --- a/configs/monitor-config.example.yml +++ b/configs/monitor-config.example.yml @@ -1,8 +1,6 @@ # # Digital Voice Modem - Monitor Configuration # -# @package DVM / Monitor -# # # Channel Identity Table Configuration diff --git a/configs/schema/talkgroup_rules.yaml_schema.json b/configs/schema/talkgroup_rules.yaml_schema.json new file mode 100644 index 00000000..968c8ba1 --- /dev/null +++ b/configs/schema/talkgroup_rules.yaml_schema.json @@ -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" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/configs/talkgroup_rules.example.yml b/configs/talkgroup_rules.example.yml index 9cc38c1b..d6867b94 100644 --- a/configs/talkgroup_rules.example.yml +++ b/configs/talkgroup_rules.example.yml @@ -1,8 +1,7 @@ +# yaml-language-server: $schema=schema/talkgroup_rules.yaml_schema.json # # Digital Voice Modem - Talkgroup Rules # -# @package DVM / Host Software -# # # Talkgroup Rules