mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-10-30 22:56:22 +00:00
Use classes instead of structs
This commit is contained in:
parent
1595c5f363
commit
f20f4ede0c
@ -28,73 +28,91 @@
|
|||||||
/** \addtogroup System_Parameters
|
/** \addtogroup System_Parameters
|
||||||
* \{ */
|
* \{ */
|
||||||
|
|
||||||
struct nma_header
|
class DSM_nma_header
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
DSM_nma_header() = default;
|
||||||
uint8_t nmas;
|
uint8_t nmas;
|
||||||
uint8_t cid;
|
uint8_t cid;
|
||||||
uint8_t cpks;
|
uint8_t cpks;
|
||||||
bool reserved;
|
bool reserved;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dsm_header
|
class DSM_dsm_header
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
DSM_dsm_header() = default;
|
||||||
uint8_t dsm_id;
|
uint8_t dsm_id;
|
||||||
uint8_t dsm_block_id;
|
uint8_t dsm_block_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct mack_header
|
class MACK_header
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
MACK_header() = default;
|
||||||
std::vector<uint8_t> tag0;
|
std::vector<uint8_t> tag0;
|
||||||
uint16_t macsec;
|
uint16_t macsec{};
|
||||||
uint8_t cop;
|
uint8_t cop{};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct tag
|
class MACK_tag
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
MACK_tag() = default;
|
||||||
std::vector<uint8_t> tag;
|
std::vector<uint8_t> tag;
|
||||||
uint16_t tag_info;
|
uint16_t tag_info;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct tag_and_info
|
class MACK_tag_and_info
|
||||||
{
|
{
|
||||||
std::vector<tag> tags;
|
public:
|
||||||
|
MACK_tag_and_info() = default;
|
||||||
|
std::vector<MACK_tag> tags;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DSM_PKR_message
|
class DSM_PKR_message
|
||||||
{
|
{
|
||||||
uint8_t nb_dp;
|
public:
|
||||||
uint8_t mid;
|
DSM_PKR_message() = default;
|
||||||
|
|
||||||
std::array<uint8_t, 128> itn; // bitset<1024>
|
std::array<uint8_t, 128> itn; // bitset<1024>
|
||||||
uint8_t npkt;
|
|
||||||
uint8_t npktid;
|
|
||||||
std::vector<uint8_t> npk;
|
std::vector<uint8_t> npk;
|
||||||
std::vector<uint8_t> p_dp;
|
std::vector<uint8_t> 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;
|
public:
|
||||||
uint8_t pkid;
|
DSM_KROOT_message() = default;
|
||||||
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;
|
|
||||||
std::vector<uint8_t> kroot;
|
std::vector<uint8_t> kroot;
|
||||||
std::vector<uint8_t> ds;
|
std::vector<uint8_t> ds;
|
||||||
std::vector<uint8_t> p_dk;
|
std::vector<uint8_t> 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;
|
public:
|
||||||
tag_and_info tag_info;
|
MACK_message() = default;
|
||||||
|
MACK_header header;
|
||||||
|
MACK_tag_and_info tag_info;
|
||||||
std::vector<uint8_t> key;
|
std::vector<uint8_t> key;
|
||||||
std::vector<uint8_t> padding;
|
std::vector<uint8_t> padding;
|
||||||
};
|
};
|
||||||
@ -107,8 +125,8 @@ class OSNMA_data
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
OSNMA_data() = default;
|
OSNMA_data() = default;
|
||||||
nma_header d_nma_header;
|
DSM_nma_header d_nma_header;
|
||||||
dsm_header d_dsm_header;
|
DSM_dsm_header d_dsm_header;
|
||||||
DSM_PKR_message d_dsm_pkr_message;
|
DSM_PKR_message d_dsm_pkr_message;
|
||||||
DSM_KROOT_message d_dsm_kroot_message;
|
DSM_KROOT_message d_dsm_kroot_message;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user