Fix building in ancient environments

This commit is contained in:
Carles Fernandez
2026-05-13 20:36:15 +02:00
parent e13730276b
commit 5b25d4b251
5 changed files with 44 additions and 18 deletions
@@ -203,7 +203,16 @@ void HybridObservablesTest_tlm_msg_rx_Fpga::msg_handler_channel_events(const pmt
HybridObservablesTest_tlm_msg_rx_Fpga::HybridObservablesTest_tlm_msg_rx_Fpga() : gr::block("HybridObservablesTest_tlm_msg_rx_Fpga", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0))
{
this->message_port_register_in(pmt::mp("events"));
this->set_msg_handler(pmt::mp("events"), boost::bind(&HybridObservablesTest_tlm_msg_rx_Fpga::msg_handler_channel_events, this, boost::placeholders::_1));
this->set_msg_handler(pmt::mp("events"),
#if HAS_GENERIC_LAMBDA
[this](auto&& PH1) { msg_handler_channel_events(std::forward<decltype(PH1)>(PH1)); });
#else
#if USE_BOOST_BIND_PLACEHOLDERS
boost::bind(&HybridObservablesTest_tlm_msg_rx_Fpga::msg_handler_channel_events, this, boost::placeholders::_1));
#else
boost::bind(&HybridObservablesTest_tlm_msg_rx_Fpga::msg_handler_channel_events, this, _1));
#endif
#endif
rx_message = 0;
}
@@ -2170,7 +2170,7 @@ TEST_F(OsnmaMsgReceiverTest, KrootWithMismatchedActivePkidIsRejected)
osnma->d_osnma_data.d_dsm_kroot_message.pkid = 2;
osnma->d_osnma_data.d_dsm_kroot_message.verified = true;
osnma->d_tesla_key_verified = true;
osnma->d_tesla_keys.emplace(helper.compute_gst(1258, 1030), std::vector<uint8_t>{0x11, 0x22});
osnma->d_tesla_keys[helper.compute_gst(1258, 1030)] = {0x11, 0x22};
osnma->d_osnma_data.d_dsm_header.dsm_id = 4;
osnma->d_crypto->set_public_key_type("ECDSA P-256");
osnma->d_count_failed_Kroot = 0;
@@ -2227,7 +2227,7 @@ TEST_F(OsnmaMsgReceiverTest, FailedKrootWithMatchingPkidKeepsActivePublicKey)
osnma->d_kroot_verified = true;
osnma->d_last_verified_kroot_GST = helper.compute_gst(1258, 1000);
osnma->d_tesla_key_verified = true;
osnma->d_tesla_keys.emplace(helper.compute_gst(1258, 1030), std::vector<uint8_t>{0x11, 0x22});
osnma->d_tesla_keys[helper.compute_gst(1258, 1030)] = {0x11, 0x22};
osnma->d_osnma_data.d_dsm_header.dsm_id = 4;
osnma->d_crypto->set_public_key_type("ECDSA P-256");
osnma->d_count_failed_Kroot = 0;
@@ -2270,7 +2270,7 @@ TEST_F(OsnmaMsgReceiverTest, DsmKrootPdkUsesSha256WhenHfSha3)
osnma->d_kroot_verified = true;
osnma->d_last_verified_kroot_GST = helper.compute_gst(1258, 1000);
osnma->d_tesla_key_verified = true;
osnma->d_tesla_keys.emplace(helper.compute_gst(1258, 1030), std::vector<uint8_t>{0x11, 0x22});
osnma->d_tesla_keys[helper.compute_gst(1258, 1030)] = {0x11, 0x22};
osnma->d_osnma_data.d_dsm_header.dsm_id = 4;
osnma->d_crypto->set_public_key_type("ECDSA P-256");
osnma->d_count_failed_Kroot = 0;
@@ -3024,7 +3024,8 @@ TEST_F(OsnmaMsgReceiverTest, TeslaKeyVerification)
osnma->d_GST_0 = ((1248 & 0x00000FFF) << 20 | (345600 & 0x000FFFFF)); // applicable time (GST_Kroot + 30)
osnma->d_GST_Sf = osnma->d_GST_0 + 30 * std::floor((osnma->d_GST_SIS - osnma->d_GST_0) / 30); // Eq. 3 R.G.
osnma->d_tesla_keys.insert((std::pair<uint32_t, std::vector<uint8_t>>(helper.compute_gst(1248, 345600), {0xEF, 0xF9, 0x99, 0x04, 0x0E, 0x19, 0xB5, 0x70, 0x83, 0x50, 0x60, 0xBE, 0xBD, 0x23, 0xED, 0x92}))); // K1, not needed, just for reference.
osnma->d_tesla_keys[helper.compute_gst(1248, 345600)] =
{0xEF, 0xF9, 0x99, 0x04, 0x0E, 0x19, 0xB5, 0x70, 0x83, 0x50, 0x60, 0xBE, 0xBD, 0x23, 0xED, 0x92}; // K1, not needed, just for reference.
std::vector<uint8_t> key = {0x2D, 0xC3, 0xA3, 0xCD, 0xB1, 0x17, 0xFA, 0xAD, 0xB8, 0x3B, 0x5F, 0x0B, 0x6F, 0xEA, 0x88, 0xEB}; // K2
uint32_t TOW = 345630;
@@ -168,7 +168,11 @@ TelemetryDecoderAdapterGpsL1CaTest_tlm_msg_rx::TelemetryDecoderAdapterGpsL1CaTes
#if HAS_GENERIC_LAMBDA
[this](auto&& PH1) { msg_handler_channel_events(std::forward<decltype(PH1)>(PH1)); });
#else
#if USE_BOOST_BIND_PLACEHOLDERS
boost::bind(&TelemetryDecoderAdapterGpsL1CaTest_tlm_msg_rx::msg_handler_channel_events, this, boost::placeholders::_1));
#else
boost::bind(&TelemetryDecoderAdapterGpsL1CaTest_tlm_msg_rx::msg_handler_channel_events, this, _1));
#endif
#endif
rx_message = 0;
}