Finalizing #9

- Added service handler for system services
- Control OP25 from service handler
- Generate and save OP25 config file
- Handlers for OP25
This commit is contained in:
Logan Cusano
2024-03-03 17:25:07 -05:00
parent d253d0aef1
commit 54a6d544e4
3 changed files with 132 additions and 9 deletions

View File

@@ -17,18 +17,19 @@ class OP25ConfigObject {
export class P25ConfigGenerator extends OP25ConfigObject {
constructor({ systemName, controlChannels, tagsFile, whitelistFile = undefined }) {
super();
console.log("Generating P25 Config for:", systemName);
const controlChannelsString = controlChannels.join(',');
this.channels = new channelConfig({
this.channels = [new channelConfig({
"channelName": systemName,
"systemName": systemName,
"enableAnalog": "off",
"demodType": "cqpsk",
"cqpskTracking": true,
"filterType": "rc"
});
this.devices = new deviceConfig({
})];
this.devices = [new deviceConfig({
"gain": "LNA:36"
});
})];
this.trunking = new trunkingConfig({
"module": "tk_p25.py",
"systemName": systemName,
@@ -149,7 +150,7 @@ class trunkingConfig {
}
class audioConfig {
constructor({ module = "sockaudio.py", port = 23456, deviceName = "default" }) {
constructor({ module = "sockaudio.py", port = 23457, deviceName = "default" }) {
this.module = module;
this.instances = [{
"instance_name": "audio0",
@@ -169,7 +170,7 @@ class metadataStreamConfig {
}
class terminalConfig {
constructor({ module = "terminal.py", terminalType = "http:0.0.0.0:8080" }) {
constructor({ module = "terminal.py", terminalType = "http:0.0.0.0:8081" }) {
this.module = module;
this.terminal_type = terminalType;
this.curses_plot_interval = 0.1;