encoding: Use defines to set PAYLOAD_TYPE

Change-Id: I3d663cb91672fb383aeb72b223490fa615bdcdf0
This commit is contained in:
Pau Espin Pedrol
2025-03-12 14:42:01 +01:00
parent 56993345f2
commit 325104b5ac
3 changed files with 10 additions and 10 deletions

View File

@@ -602,7 +602,7 @@ void write_packet_uplink_assignment(RlcMacDownlink_t *block, uint8_t old_tfi,
Dynamic_Allocation_t *da;
/* RLC/MAC control block without the optional RLC/MAC control header */
block->PAYLOAD_TYPE = 0x01; // Payload Type
block->PAYLOAD_TYPE = PAYLOAD_TYPE_CTRL_NO_OPT_OCTET; // Payload Type
block->RRBP = rrbp; // RRBP (e.g. N+13)
block->SP = poll; // RRBP field is valid
block->USF = 0x00; // Uplink state flag
@@ -720,7 +720,7 @@ void write_packet_downlink_assignment(RlcMacDownlink_t * block,
uint8_t tn;
block->PAYLOAD_TYPE = 0x1; // RLC/MAC control block that does not include the optional octets of the RLC/MAC control header
block->PAYLOAD_TYPE = PAYLOAD_TYPE_CTRL_NO_OPT_OCTET; // RLC/MAC control block that does not include the optional octets of the RLC/MAC control header
block->RRBP = rrbp; // 0: N+13
block->SP = poll; // RRBP field is valid
block->USF = 0x0; // Uplink state flag
@@ -1759,7 +1759,7 @@ void write_packet_neighbour_cell_data(RlcMacDownlink_t *block,
uint8_t container_idx, PNCDContainer_t *container)
{
block->PAYLOAD_TYPE = 0x1; // RLC/MAC control block that does not include the optional octets of the RLC/MAC control header
block->PAYLOAD_TYPE = PAYLOAD_TYPE_CTRL_NO_OPT_OCTET; // RLC/MAC control block that does not include the optional octets of the RLC/MAC control header
block->RRBP = 0; // 0: N+13
block->SP = 0; // RRBP field is not valid
block->USF = 0x0; // Uplink state flag
@@ -1784,7 +1784,7 @@ void write_packet_cell_change_continue(RlcMacDownlink_t *block, uint8_t poll, ui
uint16_t arfcn, uint8_t bsic, uint8_t container_id)
{
block->PAYLOAD_TYPE = 0x1; // RLC/MAC control block that does not include the optional octets of the RLC/MAC control header
block->PAYLOAD_TYPE = PAYLOAD_TYPE_CTRL_NO_OPT_OCTET; // RLC/MAC control block that does not include the optional octets of the RLC/MAC control header
block->RRBP = rrbp; // RRBP (e.g. N+13)
block->SP = poll; // RRBP field is valid?
block->USF = 0x0; // Uplink state flag

View File

@@ -36,12 +36,6 @@
#include <arpa/inet.h>
#include <gprs_debug.h>
/* Payload type as defined in TS 44.060 / 10.4.7 */
#define PAYLOAD_TYPE_DATA 0
#define PAYLOAD_TYPE_CTRL_NO_OPT_OCTET 1
#define PAYLOAD_TYPE_CTRL_OPT_OCTET 2
#define PAYLOAD_TYPE_RESERVED 3
/* CSN1 structures */
/*(not all parts of CSN_DESCR structure are always initialized.)*/
static const

View File

@@ -48,6 +48,12 @@ typedef guint8 N32_t;
typedef guint8 N51_t;
typedef guint8 N26_t;
/* Payload type as defined in TS 44.060 / 10.4.7 */
#define PAYLOAD_TYPE_DATA 0
#define PAYLOAD_TYPE_CTRL_NO_OPT_OCTET 1
#define PAYLOAD_TYPE_CTRL_OPT_OCTET 2
#define PAYLOAD_TYPE_RESERVED 3
/* Starting Time IE as specified in 04.08 */
typedef struct
{