diff --git a/src/core/system_parameters/osnma_data.h b/src/core/system_parameters/osnma_data.h index aa4eaf21f..9c97c1186 100644 --- a/src/core/system_parameters/osnma_data.h +++ b/src/core/system_parameters/osnma_data.h @@ -28,73 +28,91 @@ /** \addtogroup System_Parameters * \{ */ -struct nma_header +class DSM_nma_header { +public: + DSM_nma_header() = default; uint8_t nmas; uint8_t cid; uint8_t cpks; bool reserved; }; -struct dsm_header +class DSM_dsm_header { +public: + DSM_dsm_header() = default; uint8_t dsm_id; uint8_t dsm_block_id; }; -struct mack_header +class MACK_header { +public: + MACK_header() = default; std::vector tag0; - uint16_t macsec; - uint8_t cop; + uint16_t macsec{}; + uint8_t cop{}; }; -struct tag +class MACK_tag { +public: + MACK_tag() = default; std::vector tag; uint16_t tag_info; }; -struct tag_and_info +class MACK_tag_and_info { - std::vector tags; +public: + MACK_tag_and_info() = default; + std::vector tags; }; -struct DSM_PKR_message +class DSM_PKR_message { - uint8_t nb_dp; - uint8_t mid; +public: + DSM_PKR_message() = default; + std::array itn; // bitset<1024> - uint8_t npkt; - uint8_t npktid; std::vector npk; std::vector p_dp; + uint8_t nb_dp; + uint8_t mid; + uint8_t npkt; + uint8_t npktid; }; -struct DSM_KROOT_message +class DSM_KROOT_message { - uint8_t nb_dk; - uint8_t pkid; - uint8_t cidkr; - uint8_t reserved1; - uint8_t hf; - uint8_t mf; - uint8_t ks; - uint8_t ts; - uint8_t maclt; - uint8_t reserved; - uint16_t wn_k; - uint8_t towh_k; - uint64_t alpha; +public: + DSM_KROOT_message() = default; + std::vector kroot; std::vector ds; std::vector p_dk; + uint64_t alpha{}; + uint16_t wn_k{}; + uint8_t nb_dk{}; + uint8_t pkid{}; + uint8_t cidkr{}; + uint8_t reserved1{}; + uint8_t hf{}; + uint8_t mf{}; + uint8_t ks{}; + uint8_t ts{}; + uint8_t maclt{}; + uint8_t reserved{}; + uint8_t towh_k{}; }; -struct MACK_message +class MACK_message { - mack_header header; - tag_and_info tag_info; +public: + MACK_message() = default; + MACK_header header; + MACK_tag_and_info tag_info; std::vector key; std::vector padding; }; @@ -107,8 +125,8 @@ class OSNMA_data { public: OSNMA_data() = default; - nma_header d_nma_header; - dsm_header d_dsm_header; + DSM_nma_header d_nma_header; + DSM_dsm_header d_dsm_header; DSM_PKR_message d_dsm_pkr_message; DSM_KROOT_message d_dsm_kroot_message; };