Skip to content

Commit

Permalink
Moved Structs out of Call Concluder
Browse files Browse the repository at this point in the history
  • Loading branch information
robotastic committed May 10, 2022
1 parent 3632dfc commit 6d0a0f1
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 47 deletions.
41 changes: 0 additions & 41 deletions trunk-recorder/call_concluder/call_concluder.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<unsigned long> 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<Call_Source> transmission_source_list;
std::vector<Call_Error> transmission_error_list;
std::vector<Transmission> 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 {
Expand Down
45 changes: 45 additions & 0 deletions trunk-recorder/global_structs.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef GLOBAL_STRUCTS_H
#define GLOBAL_STRUCTS_H
#include <string>
#include <vector>
#include <ctime>

struct Transmission {
long source;
Expand Down Expand Up @@ -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<unsigned long> 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<Call_Source> transmission_source_list;
std::vector<Call_Error> transmission_error_list;
std::vector<Transmission> transmission_list;

Call_Data_Status status;
time_t process_call_time;
int retry_attempt;
};


#endif
5 changes: 4 additions & 1 deletion trunk-recorder/plugin_manager/plugin_api.h
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
8 changes: 3 additions & 5 deletions trunk-recorder/systems/system.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@
#include <boost/log/trivial.hpp>
#include <boost/foreach.hpp>
#include <stdio.h>
//#include "../source.h"
#include "p25_trunking.h"
//#include "../source.h"ß
#include "parser.h"
#include "smartnet_trunking.h"


#ifdef __GNUC__
#pragma GCC diagnostic push
//#pragma GCC diagnostic ignored "-Wint-in-bool-context"
//#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
#endif

#include <lfsr/lfsr.h>

#ifdef __GNUC__
#pragma GCC diagnostic pop
Expand All @@ -39,7 +37,7 @@ enum TalkgroupDisplayFormat { talkGroupDisplayFormat_id = 0,
#else
typedef std::shared_ptr<analog_recorder> analog_recorder_sptr;
typedef std::shared_ptr<p25_recorder> p25_recorder_sptr;
typedef std::shared_ptr<dmr_recorder> dmr_recorder_sptr;
typedef std::shared_ptr<dmr_recorder> dmr_recorder_sptr;ß
#endif

class System {
Expand Down

0 comments on commit 6d0a0f1

Please sign in to comment.