Commit fbc5ed58 authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Timestamp appending to payload is now an option.

parent 70af6898
Loading
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);
        if(s->withTimestamp) {
            memcpy(buffer + len, &packet->channelReceive, timespec_size);
            len += timespec_size;
        }

        XlapTimeStampCycle(s, ts_data_packet, packet->sequenceNumber, CopyOutputEnd);

+1 −0
Original line number Diff line number Diff line
@@ -31,6 +31,7 @@ typedef struct prrtSocket {

    struct sockaddr_in *address;
    bool isBound;
    bool withTimestamp;

    bool pacingEnabled;

+1 −0
Original line number Diff line number Diff line
@@ -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) {