Commit 45693578 authored by Andreas Schmidt's avatar Andreas Schmidt

Merge branch 'develop' into feature/congestionControl

parents 67f15d71 d024340d
Pipeline #2566 passed with stages
in 1 minute and 8 seconds
This diff is collapsed.
......@@ -15,7 +15,7 @@ typedef enum {
PACKET_TYPE_FEEDBACK = 3,
PACKET_TYPE_PRESENT_REDUNDANCY = 4,
PACKET_TYPE_CHANNEL_FEEDBACK = 5
} prrtPacketType_t;
} prrtPacketTypeEnum_t;
typedef uint16_t prrtSequenceNumber_t;
typedef uint8_t prrtIndex_t;
......@@ -26,7 +26,7 @@ typedef uint32_t prrtPacketLength_t; // bytes
typedef float prrtPacketLossRate_t;
typedef uint32_t prrtDeliveryRate_t; // bits per second
typedef uint32_t prrtByteCount_t;
typedef uint8_t prrtPacketType_t;
typedef struct prrtIncompleteBlock {
prrtSequenceNumber_t sequenceNumberBase;
......@@ -62,7 +62,12 @@ typedef struct prrtPacketDataPayload {
prrtTimestamp_t packetTimeout_us;
prrtDeliveryRate_t btlbw;
} PrrtPacketDataPayload;
#define PRRT_PACKET_DATA_HEADER_SIZE sizeof(PrrtPacketDataPayload)
#define PRRT_PACKET_DATA_HEADER_SIZE (\
sizeof(prrtPacketLength_t) + \
sizeof(prrtTimestamp_t) + \
sizeof(prrtTimedelta_t) + \
sizeof(prrtTimestamp_t) )
typedef struct prrtPacketRedundancyPayload {
prrtSequenceNumber_t baseSequenceNumber;
......@@ -70,7 +75,12 @@ typedef struct prrtPacketRedundancyPayload {
uint8_t n;
uint8_t k;
} PrrtPacketRedundancyPayload;
#define PRRT_PACKET_REDUNDANCY_HEADER_SIZE sizeof(PrrtPacketRedundancyPayload)
#define PRRT_PACKET_REDUNDANCY_HEADER_SIZE (\
sizeof(prrtSequenceNumber_t) + \
sizeof(prrtTimestamp_t) + \
sizeof(uint8_t) + \
sizeof(uint8_t) )
typedef struct prrtPacketFeedbackPayload {
prrtTimedelta_t groupRTT_us;
......@@ -85,7 +95,18 @@ typedef struct prrtPacketFeedbackPayload {
prrtPacketType_t ackPacketType;
PrrtIncompleteBlock *incompleteBlocks;
} PrrtPacketFeedbackPayload;
#define PRRT_PACKET_FEEDBACK_HEADER_SIZE (sizeof(PrrtPacketFeedbackPayload) - sizeof(PrrtIncompleteBlock*))
#define PRRT_PACKET_FEEDBACK_HEADER_SIZE (\
sizeof(prrtTimedelta_t) + \
sizeof(prrtTimestamp_t) + \
sizeof(prrtSequenceNumber_t) + \
sizeof(prrtSequenceNumber_t) + \
sizeof(prrtSequenceNumber_t) + \
sizeof(prrtSequenceNumber_t) + \
sizeof(prrtSequenceNumber_t) + \
sizeof(prrtSequenceNumber_t) + \
sizeof(prrtSequenceNumber_t) + \
sizeof(prrtPacketType_t) )
prrtPacketType_t PrrtPacket_type(PrrtPacket *packet_ptr);
......
......@@ -129,7 +129,7 @@ class PrrtCodingConfiguration:
def __repr__(self):
return "PrrtCodingConfiguration(n={},k={},n_cycle={})".format(self.n, self.k, self.n_cycle)
def __repr__(self):
def __str__(self):
return "({},{},{})".format(self.n, self.k, self.n_cycle)
cdef class PrrtSocket:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment