srsue/rrctl: make codec::enc_hdr() return proto::msg_hdr
This commit is contained in:
parent
796a6df0df
commit
27344af7f0
|
@ -228,7 +228,7 @@ public:
|
|||
explicit error(const std::string& msg) : std::runtime_error(msg) {};
|
||||
};
|
||||
|
||||
void enc_hdr(srslte::byte_buffer_t& buf,
|
||||
struct proto::msg_hdr* enc_hdr(srslte::byte_buffer_t& buf,
|
||||
proto::msg_type type,
|
||||
proto::msg_disc disc,
|
||||
uint16_t len = 0);
|
||||
|
|
|
@ -102,7 +102,7 @@ std::string msg_hdr_desc(proto::msg_type type, proto::msg_disc disc, uint16_t le
|
|||
|
||||
namespace codec {
|
||||
|
||||
void enc_hdr(srslte::byte_buffer_t& buf,
|
||||
struct proto::msg_hdr* enc_hdr(srslte::byte_buffer_t& buf,
|
||||
proto::msg_type type,
|
||||
proto::msg_disc disc,
|
||||
uint16_t len)
|
||||
|
@ -121,6 +121,8 @@ void enc_hdr(srslte::byte_buffer_t& buf,
|
|||
};
|
||||
|
||||
buf.append_bytes((const uint8_t*) &hdr, sizeof(hdr));
|
||||
|
||||
return reinterpret_cast<struct proto::msg_hdr*> (&buf.msg[0]);
|
||||
}
|
||||
|
||||
const uint8_t* dec_hdr(const srslte::byte_buffer_t& buf,
|
||||
|
|
Loading…
Reference in New Issue