Skip to content

Commit

Permalink
Merge pull request #643 from aaknitt/macom-patch-follow
Browse files Browse the repository at this point in the history
M/A-COM patch following enhancement
  • Loading branch information
robotastic authored Feb 28, 2022
2 parents 0d07a42 + 02f7c2e commit 03f1dfd
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions trunk-recorder/systems/p25_parser.cc
Original file line number Diff line number Diff line change
Expand Up @@ -640,23 +640,40 @@ std::vector<TrunkMessage> P25Parser::decode_tsbk(boost::dynamic_bitset<> &tsbk,
harris_patch_data.ga2 = ga;
harris_patch_data.ga3 = ga;
message.patch_data = harris_patch_data;
BOOST_LOG_TRIVIAL(debug) << "tsbk30 M/A-COM PATCH sg TGID is "<<sg<<" patched with TGID "<<ga;
BOOST_LOG_TRIVIAL(debug) << "tsbk30 M/A-COM GROUP REQUEST PATCH sg TGID is "<<sg<<" patched with TGID "<<ga;
}
else{
message.message_type = PATCH_ADD;
PatchData harris_patch_data;
harris_patch_data.sg = sg;
harris_patch_data.ga1 = ga;
harris_patch_data.ga2 = ga;
harris_patch_data.ga3 = ga;
message.patch_data = harris_patch_data;
BOOST_LOG_TRIVIAL(debug) << "tsbk30 M/A-COM UNIT REQUEST PATCH sg TGID is "<<sg<<" patched with TGID "<<ga;
}
else{} // Unit request (currently unhandled)
}
else{ // Deactivate
if (grg_g == 1){ // Group request
//self.del_patch(sg, [sg])
message.message_type = PATCH_DELETE;
PatchData harris_patch_data;
harris_patch_data.sg = sg;
harris_patch_data.ga1 = ga;
harris_patch_data.ga2 = ga;
harris_patch_data.ga3 = ga;
message.patch_data = harris_patch_data;
BOOST_LOG_TRIVIAL(debug) << "tsbk30 M/A-COM PATCH DELETE for sg "<<sg<<" with TGID "<<ga;
BOOST_LOG_TRIVIAL(debug) << "tsbk30 M/A-COM GROUP REQUEST PATCH DELETE for sg "<<sg<<" with TGID "<<ga;
}
else{
message.message_type = PATCH_DELETE;
PatchData harris_patch_data;
harris_patch_data.sg = sg;
harris_patch_data.ga1 = ga;
harris_patch_data.ga2 = ga;
harris_patch_data.ga3 = ga;
message.patch_data = harris_patch_data;
BOOST_LOG_TRIVIAL(debug) << "tsbk30 M/A-COM UNIT REQUEST PATCH DELETE for sg "<<sg<<" with TGID "<<ga;
}
else{} // Unit request (currently unhandled)
}
}
else{
Expand Down

0 comments on commit 03f1dfd

Please sign in to comment.