Commit c8e456d6 authored by Andreas Schmidt's avatar Andreas Schmidt

Add RTprop measurement for redundancy packets.

parent efe6da33
Pipeline #2159 failed with stages
in 51 seconds
......@@ -171,6 +171,10 @@ handle_data_packet(PrrtSocket *sock_ptr, PrrtPacket *packet) {
}
static void handle_redundancy_packet(PrrtSocket *socket, PrrtPacket *packet) {
PrrtPacketRedundancyPayload *payload = packet->payload;
prrtTimestamp_t sentTimestamp = payload->timestamp;
socket->lastSentTimestamp = sentTimestamp;
PrrtPacketRedundancyPayload *redundancyPayload = packet->payload;
PrrtReceptionTable_mark_received(socket->redundancyReceptionTable, packet->sequenceNumber);
......
......@@ -117,6 +117,8 @@ static bool send_packet(PrrtSocket *sock_ptr, PrrtPacket *packet) {
// Update timestamp
if(PrrtPacket_type(packet) == PACKET_TYPE_DATA) {
((PrrtPacketDataPayload*) (packet->payload))->timestamp = PrrtClock_get_current_time_us();
} else if(PrrtPacket_type(packet) == PACKET_TYPE_REDUNDANCY) {
((PrrtPacketRedundancyPayload*) (packet->payload))->timestamp = PrrtClock_get_current_time_us();
}
check(PrrtPacket_encode(buf, MAX_PAYLOAD_LENGTH, packet), "Buffer too small.");
......
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