mirror of
https://github.com/lwvmobile/dsd-fme.git
synced 2026-11-19 20:27:26 -05:00
EDACS: Show agency and fleet calls based on AFS
This commit is contained in:
@@ -763,14 +763,16 @@ typedef struct
|
|||||||
int edacs_s_mask; //Calculated Mask for S Bits
|
int edacs_s_mask; //Calculated Mask for S Bits
|
||||||
|
|
||||||
//flags for EDACS call type
|
//flags for EDACS call type
|
||||||
#define EDACS_IS_VOICE 0x01
|
#define EDACS_IS_VOICE 0x01
|
||||||
#define EDACS_IS_DIGITAL 0x02
|
#define EDACS_IS_DIGITAL 0x02
|
||||||
#define EDACS_IS_EMERGENCY 0x04
|
#define EDACS_IS_EMERGENCY 0x04
|
||||||
#define EDACS_IS_GROUP 0x08
|
#define EDACS_IS_GROUP 0x08
|
||||||
#define EDACS_IS_INDIVIDUAL 0x10
|
#define EDACS_IS_INDIVIDUAL 0x10
|
||||||
#define EDACS_IS_ALL_CALL 0x20
|
#define EDACS_IS_ALL_CALL 0x20
|
||||||
#define EDACS_IS_INTERCONNECT 0x40
|
#define EDACS_IS_INTERCONNECT 0x40
|
||||||
#define EDACS_IS_TEST_CALL 0x80
|
#define EDACS_IS_TEST_CALL 0x80
|
||||||
|
#define EDACS_IS_AGENCY_CALL 0x100
|
||||||
|
#define EDACS_IS_FLEET_CALL 0x200
|
||||||
|
|
||||||
//trunking group and lcn freq list
|
//trunking group and lcn freq list
|
||||||
long int trunk_lcn_freq[26]; //max number on an EDACS system, should be enough on DMR too hopefully
|
long int trunk_lcn_freq[26]; //max number on an EDACS system, should be enough on DMR too hopefully
|
||||||
|
|||||||
@@ -3665,6 +3665,8 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
|||||||
if ((call_matrix[i][4] & EDACS_IS_TEST_CALL) != 0) {}
|
if ((call_matrix[i][4] & EDACS_IS_TEST_CALL) != 0) {}
|
||||||
else if ((call_matrix[i][4] & EDACS_IS_DIGITAL) == 0) printw (" [Ana]");
|
else if ((call_matrix[i][4] & EDACS_IS_DIGITAL) == 0) printw (" [Ana]");
|
||||||
else printw (" [Dig]");
|
else printw (" [Dig]");
|
||||||
|
if ((call_matrix[i][4] & EDACS_IS_AGENCY_CALL) != 0) printw ("[A]");
|
||||||
|
if ((call_matrix[i][4] & EDACS_IS_FLEET_CALL) != 0) printw ("[F]");
|
||||||
if ((call_matrix[i][4] & EDACS_IS_EMERGENCY) != 0) printw ("[EM]");
|
if ((call_matrix[i][4] & EDACS_IS_EMERGENCY) != 0) printw ("[EM]");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -3860,9 +3862,11 @@ ncursesPrinter (dsd_opts * opts, dsd_state * state)
|
|||||||
printw ("Unknown call type");
|
printw ("Unknown call type");
|
||||||
|
|
||||||
// Call flags
|
// Call flags
|
||||||
if ((call_matrix[j][4] & EDACS_IS_TEST_CALL) != 0) {}
|
if ((call_matrix[j][4] & EDACS_IS_TEST_CALL) != 0) {}
|
||||||
else if ((call_matrix[j][4] & EDACS_IS_DIGITAL) == 0) printw (" [Ana]");
|
else if ((call_matrix[j][4] & EDACS_IS_DIGITAL) == 0) printw (" [Ana]");
|
||||||
else printw (" [Dig]");
|
else printw (" [Dig]");
|
||||||
|
if ((call_matrix[j][4] & EDACS_IS_AGENCY_CALL) != 0) printw ("[A]");
|
||||||
|
if ((call_matrix[j][4] & EDACS_IS_FLEET_CALL) != 0) printw ("[F]");
|
||||||
if ((call_matrix[j][4] & EDACS_IS_EMERGENCY) != 0) printw ("[EM]");
|
if ((call_matrix[j][4] & EDACS_IS_EMERGENCY) != 0) printw ("[EM]");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -69,6 +69,17 @@ char* get_lcn_status_string(int lcn)
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int is_agency_call_group(int afs)
|
||||||
|
{
|
||||||
|
int fs_mask = state->edacs_s_mask | (state->edacs_f_mask << state->edacs_f_shift);
|
||||||
|
return (afs & fs_mask) == 0
|
||||||
|
}
|
||||||
|
|
||||||
|
int is_fleet_call_group(int afs)
|
||||||
|
{
|
||||||
|
return (afs & state->edacs_s_mask) == 0
|
||||||
|
}
|
||||||
|
|
||||||
//Bitwise vote-compare the three copies of a message received. Note that fr_2 and fr_5 are transmitted inverted.
|
//Bitwise vote-compare the three copies of a message received. Note that fr_2 and fr_5 are transmitted inverted.
|
||||||
unsigned long long int edacs_vote_fr(unsigned long long int fr_1_4, unsigned long long int fr_2_5, unsigned long long int fr_3_6)
|
unsigned long long int edacs_vote_fr(unsigned long long int fr_1_4, unsigned long long int fr_2_5, unsigned long long int fr_3_6)
|
||||||
{
|
{
|
||||||
@@ -1305,9 +1316,11 @@ void edacs(dsd_opts * opts, dsd_state * state)
|
|||||||
state->lastsrc = lid;
|
state->lastsrc = lid;
|
||||||
|
|
||||||
//Call type for state
|
//Call type for state
|
||||||
state->edacs_vc_call_type = EDACS_IS_VOICE | EDACS_IS_GROUP;
|
state->edacs_vc_call_type = EDACS_IS_VOICE | EDACS_IS_GROUP;
|
||||||
if (is_digital == 1) state->edacs_vc_call_type |= EDACS_IS_DIGITAL;
|
if (is_digital == 1) state->edacs_vc_call_type |= EDACS_IS_DIGITAL;
|
||||||
if (is_emergency == 1) state->edacs_vc_call_type |= EDACS_IS_EMERGENCY;
|
if (is_emergency == 1) state->edacs_vc_call_type |= EDACS_IS_EMERGENCY;
|
||||||
|
if (is_agency_call_group(group)) state->edacs_vc_call_type |= EDACS_IS_AGENCY_CALL;
|
||||||
|
if (is_fleet_call_group(group)) state->edacs_vc_call_type |= EDACS_IS_FLEET_CALL;
|
||||||
|
|
||||||
char mode[8]; //allow, block, digital enc
|
char mode[8]; //allow, block, digital enc
|
||||||
sprintf (mode, "%s", "");
|
sprintf (mode, "%s", "");
|
||||||
|
|||||||
Reference in New Issue
Block a user