aboutsummaryrefslogtreecommitdiffstats
path: root/src/encoding.h
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2016-01-08 10:07:53 +0100
committerJacob Erlbeck <jerlbeck@sysmocom.de>2016-02-05 13:26:34 +0100
commitf0e403911d1f00d83b8080e2d70fd9fe02dd4ad1 (patch)
tree1ce1bebc27dbdfa96f8c2df3b29519745b50e588 /src/encoding.h
parent6e9f9c20e94e09fad5fa96ee233476b3ff16b045 (diff)
edge: Add encoder for downlink RLC data blocks
Currently the (GPRS) RLC block encoding is done by setting the header fields directly in gprs_rlcmac_dl_tbf::create_new_bsn. This is much more complex with EGPRS, since the data fields are not byte aligned, the header formats depend on the header type, and the mapping of bits to bytes is LSB first. This commit adds Encoding::rlc_write_dl_data_header which writes the header according to the given gprs_rlc_data_header structure. Encoding::rlc_copy_from_aligned_buffer is also added to copy byte sequences into the message. Note that the actual encoding of data units is not yet present. Sponsored-by: On-Waves ehf
Diffstat (limited to 'src/encoding.h')
-rw-r--r--src/encoding.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/encoding.h b/src/encoding.h
index ff62bc90..6764ce41 100644
--- a/src/encoding.h
+++ b/src/encoding.h
@@ -68,4 +68,12 @@ public:
uint8_t *identity, uint8_t chan_needed);
static unsigned write_packet_paging_request(bitvec * dest);
+
+ static int rlc_write_dl_data_header(
+ const struct gprs_rlc_data_info *rlc,
+ uint8_t *data);
+ static unsigned int rlc_copy_from_aligned_buffer(
+ const struct gprs_rlc_data_info *rlc,
+ unsigned int data_block_idx,
+ uint8_t *dst, const uint8_t *buffer);
};