Commit fbc5ed58 authored by Andreas Schmidt's avatar Andreas Schmidt

Timestamp appending to payload is now an option.

parent 70af6898
Pipeline #2207 failed with stages
in 17 seconds
......@@ -28,8 +28,10 @@ static inline prrtPacketLength_t deliver_packet(const PrrtSocket *s, void *buffe
len = (prrtPacketLength_t) (packet->payloadLength - PRRT_PACKET_DATA_HEADER_SIZE);
XlapTimeStampCycle(s, ts_data_packet, packet->sequenceNumber, CopyOutputStart);
PrrtPacket_copy_payload_to_buffer(buffer, packet, PRRT_PACKET_DATA_HEADER_SIZE);
memcpy(buffer + len, &packet->channelReceive, timespec_size);
len += timespec_size;
if(s->withTimestamp) {
memcpy(buffer + len, &packet->channelReceive, timespec_size);
len += timespec_size;
}
XlapTimeStampCycle(s, ts_data_packet, packet->sequenceNumber, CopyOutputEnd);
......
......@@ -31,6 +31,7 @@ typedef struct prrtSocket {
struct sockaddr_in *address;
bool isBound;
bool withTimestamp;
bool pacingEnabled;
......
......@@ -110,6 +110,7 @@ typedef PrrtSocket *socket_t;
static inline socket_t _open_sender(struct arguments *args) {
PrrtSocket *s = PrrtSocket_create(true, 300 * 1000);
s->withTimestamp = true;
assert(s != NULL && "Socket create failed.");
if (args->thread_pinning) {
......
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