From 6d0a0f1fbce30a7c0b523d2009e121312210e93f Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Mon, 9 May 2022 21:58:13 -0400 Subject: [PATCH] Moved Structs out of Call Concluder --- .../call_concluder/call_concluder.h | 41 ----------------- trunk-recorder/global_structs.h | 45 +++++++++++++++++++ trunk-recorder/plugin_manager/plugin_api.h | 5 ++- trunk-recorder/systems/system.h | 8 ++-- 4 files changed, 52 insertions(+), 47 deletions(-) diff --git a/trunk-recorder/call_concluder/call_concluder.h b/trunk-recorder/call_concluder/call_concluder.h index 19cf5a01c..9e4fdb4a3 100644 --- a/trunk-recorder/call_concluder/call_concluder.h +++ b/trunk-recorder/call_concluder/call_concluder.h @@ -21,49 +21,8 @@ class Uploader; #include "../uploaders/openmhz_uploader.h"*/ -enum Call_Data_Status { INITIAL, SUCCESS, RETRY, FAILED }; -struct Call_Data_t { - long talkgroup; - std::vector patched_talkgroups; - std::string talkgroup_tag; - std::string talkgroup_alpha_tag; - std::string talkgroup_description; - std::string talkgroup_group; - long call_num; - double freq; - long start_time; - long stop_time; - long error_count; - long spike_count; - bool encrypted; - bool emergency; - bool audio_archive; - bool transmission_archive; - bool call_log; - bool compress_wav; - char filename[300]; - char status_filename[300]; - char converted[300]; - - std::string short_name; - std::string upload_script; - std::string audio_type; - - int tdma_slot; - double length; - bool phase2_tdma; - - std::vector transmission_source_list; - std::vector transmission_error_list; - std::vector transmission_list; - - Call_Data_Status status; - time_t process_call_time; - int retry_attempt; -}; - Call_Data_t upload_call_worker(Call_Data_t call_info); class Call_Concluder { diff --git a/trunk-recorder/global_structs.h b/trunk-recorder/global_structs.h index 33b73ebd4..fd23ef5a7 100644 --- a/trunk-recorder/global_structs.h +++ b/trunk-recorder/global_structs.h @@ -1,6 +1,8 @@ #ifndef GLOBAL_STRUCTS_H #define GLOBAL_STRUCTS_H #include +#include +#include struct Transmission { long source; @@ -65,4 +67,47 @@ struct Call_Error { double spike_count; }; + +enum Call_Data_Status { INITIAL, SUCCESS, RETRY, FAILED }; +struct Call_Data_t { + long talkgroup; + std::vector patched_talkgroups; + std::string talkgroup_tag; + std::string talkgroup_alpha_tag; + std::string talkgroup_description; + std::string talkgroup_group; + long call_num; + double freq; + long start_time; + long stop_time; + long error_count; + long spike_count; + bool encrypted; + bool emergency; + bool audio_archive; + bool transmission_archive; + bool call_log; + bool compress_wav; + char filename[300]; + char status_filename[300]; + char converted[300]; + + std::string short_name; + std::string upload_script; + std::string audio_type; + + int tdma_slot; + double length; + bool phase2_tdma; + + std::vector transmission_source_list; + std::vector transmission_error_list; + std::vector transmission_list; + + Call_Data_Status status; + time_t process_call_time; + int retry_attempt; +}; + + #endif diff --git a/trunk-recorder/plugin_manager/plugin_api.h b/trunk-recorder/plugin_manager/plugin_api.h index 55aba3713..f86fbdaec 100644 --- a/trunk-recorder/plugin_manager/plugin_api.h +++ b/trunk-recorder/plugin_manager/plugin_api.h @@ -1,8 +1,11 @@ #ifndef PLUGIN_API_H #define PLUGIN_API_H -#include "../call_concluder/call_concluder.h" +#include "../global_structs.h" #include "../gr_blocks/decoder_wrapper.h" +#include "../systems/system.h" +#include "../call.h" + #include "../formatter.h" typedef enum { PLUGIN_UNKNOWN, diff --git a/trunk-recorder/systems/system.h b/trunk-recorder/systems/system.h index 1ef917f02..c5e89d97c 100644 --- a/trunk-recorder/systems/system.h +++ b/trunk-recorder/systems/system.h @@ -5,10 +5,9 @@ #include #include #include -//#include "../source.h" -#include "p25_trunking.h" +//#include "../source.h"ß #include "parser.h" -#include "smartnet_trunking.h" + #ifdef __GNUC__ #pragma GCC diagnostic push @@ -16,7 +15,6 @@ //#pragma GCC diagnostic ignored "-Wunused-local-typedefs" #endif -#include #ifdef __GNUC__ #pragma GCC diagnostic pop @@ -39,7 +37,7 @@ enum TalkgroupDisplayFormat { talkGroupDisplayFormat_id = 0, #else typedef std::shared_ptr analog_recorder_sptr; typedef std::shared_ptr p25_recorder_sptr; - typedef std::shared_ptr dmr_recorder_sptr; + typedef std::shared_ptr dmr_recorder_sptr;ß #endif class System {