Commit d8ad1570 authored by Andreas Schmidt's avatar Andreas Schmidt

X-Lap submodule is now optional.

parent 88040709
Pipeline #2316 passed with stages
in 1 minute and 37 seconds
add_library(PRRT ../defines.h
set (PRRT_SOURCES ../defines.h
block.c block.h
channelStateInformation.c channelStateInformation.h
clock.c clock.h
codingParams.c codingParams.h
receiver.c receiver.h
socket.c socket.h
../xlap/xlap.c ../xlap/xlap.h
applicationConstraints.c applicationConstraints.h
processes/dataReceiver.c processes/dataReceiver.h
processes/dataTransmitter.c processes/dataTransmitter.h
......@@ -21,4 +20,10 @@ add_library(PRRT ../defines.h
types/packet.c types/packet.h
vdmcode/block_code.c vdmcode/block_code.h)
if (XLAP)
set(PRRT_SOURCES ${PRRT_SOURCES} ../xlap/xlap.c ../xlap/xlap.h)
endif()
add_library(PRRT ${PRRT_SOURCES})
target_link_libraries(PRRT rt)
This diff is collapsed.
#include <malloc.h>
#include <math.h>
#include "../xlap/xlap.h"
#include "xlap.h"
#include "../util/common.h"
#include "../util/dbg.h"
#include "stores/inFlightPacketStore.h"
......
......@@ -17,7 +17,7 @@
#include "types/lossStatistics.h"
#include "types/packet.h"
#include "clock.h"
#include "../xlap/xlap.h"
#include "xlap.h"
#include "receiver.h"
#ifndef SIOCSHWTSTAMP
......
#ifndef PRRT_XLAP_H
#define PRRT_XLAP_H
#include "pp.h"
#ifdef XLAP
#include "../xlap/xlap.h"
#else
#define TIMESTAMP_ID_LIST \
PrrtSendStart, \
PrrtSendEnd, \
PrrtSubmitPackage, \
PrrtEncodeStart, \
PrrtEncodeEnd, \
PrrtTransmitStart, \
PrrtTransmitEnd, \
LinkTransmitStart, \
LinkTransmitEnd, \
ChannelTransmit, \
ChannelReceive, \
LinkReceive, \
DecodeStart, \
DecodeEnd, \
HandlePacketStart, \
HandlePacketEnd, \
CopyOutputStart, \
CopyOutputEnd, \
SendFeedbackStart, \
SendFeedbackEnd, \
PrrtReturnPackage, \
PrrtReceivePackage, \
PrrtDeliver \
#define TIMESSTAMP_ID_TO_NAME(id) ts_##id
typedef enum XlapTimestampId {
PP_foreach(PP_join_comma, TIMESSTAMP_ID_TO_NAME, TIMESTAMP_ID_LIST),
ts_count
} XlapTimestampId;
typedef char XlapTimestampTable;
typedef char XlapTimestampPlaceholder;
typedef enum XlapTimestampPacketKind {
ts_data_packet = 0,
ts_any_packet = 0,
ts_redundancy_packet = 1,
ts_feedback_packet = 2
} XlapTimestampPacketKind;
#define XlapTimeStampValue(sck, kind, seqno, id, value) do { \
(void) (sck); \
(void) (kind); \
(void) (seqno); \
(void) (ts_##id); \
(void) (value); \
} while (0)
#define XlapCycleStampValue(sck, kind, seqno, id, value) do { \
(void) (sck); \
(void) (kind); \
(void) (seqno); \
(void) (ts_##id); \
(void) (value); \
} while (0)
#define XlapTimeStampClock(sck, kind, seqno, id) do { \
(void) (sck); \
(void) (kind); \
(void) (seqno); \
(void) (ts_##id); \
} while (0)
#define XlapTimeStampCycle(sck, kind, seqno, id) do { \
(void) (sck); \
(void) (kind); \
(void) (seqno); \
(void) (ts_##id); \
} while (0)
#define XlapTimestampPlaceholderUse(sck, kind, seqno, ph) do { \
(void) (sck); \
(void) (kind); \
(void) (seqno); \
(void) (ph); \
} while (0)
#define XlapTimestampTableDump(f, k, t) do { \
(void) (f); \
(void) (k); \
(void) (t); \
} while (0)
#define XlapTimestampTableInstall(sck, kind, tstp) do { \
(void) (sck); \
(void) (kind); \
(void) (tstp); \
} while (0)
#define XlapTimestampTableDumpHeader(f) do { \
(void) (f); \
} while (0)
#define XlapTimestampPlaceholderInitialize(ph) do { \
(void) (ph); \
} while (0)
#endif
#endif
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