commit 5c6cb22fe2e8eb5c38dfd3df441febfd4c35a223
Author: skenneweg <skenneweg@techfak.uni-bielefeld.de>
Date:   Fri Jul 10 18:11:42 2020 +0200

    Enabled pubsub system
    Wrote Initialization functions for all subscriber types

diff --git a/src/urt_subscriber.c b/src/urt_subscriber.c
index 1fdd4ee..a885295 100644
--- a/src/urt_subscriber.c
+++ b/src/urt_subscriber.c
@@ -50,7 +50,18 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  * @param[in] subscriber  The NRT subscriber to initialize. Must not be NULL.
  */
-void urtNrtSubscriberInit (urt_nrtsubscriber_t* subscriber) {return;}
+void urtNrtSubscriberInit (urt_nrtsubscriber_t* subscriber)
+{
+  subscriber->base.topic = NULL;
+  urtEventListenerInit(subscriber->base.evtListener);
+  subscriber->base.lastMessage = NULL;
+  subscriber->base.lastMessageTime = 0;
+  #if (URT_CFG_PUBSUB_PROFILING)
+    subscriber->minLatency = URT_DELAY_INFINITE;
+    subscriber->maxLatency = URT_DELAY_IMMEDIATE;
+  #endif /* URT_CFG_PUBSUB_PROFILING */
+  return;
+}
 
 /**
  * @brief  Subscribes the subscriber to a topic.
@@ -119,7 +130,22 @@ urt_status_t urtNrtSubscriberUnsubscribe (urt_nrtsubscriber_t* subscriber) {
  *
  * @param[in] subscriber  The SRT subscriber to initialize. Must not be NULL.
  */
-void urtSrtSubscriberInit(urt_srtsubscriber_t* subscriber) {return;}
+void urtSrtSubscriberInit(urt_srtsubscriber_t* subscriber)
+{
+  subscriber->base.topic = NULL;
+  urtEventListenerInit(subscriber->base.evtListener);
+  subscriber->base.lastMessage = NULL;
+  subscriber->base.lastMessageTime = 0;
+  #if (URT_CFG_PUBSUB_PROFILING)
+    subscriber->base.sumLatencies = 0;
+    subscriber->base.numMessagesReceived = 0;
+    subscriber->usefulnesscb = NULL;
+    subscriber->cbparams = NULL;
+    subscriber->minLatency = URT_DELAY_INFINITE;
+    subscriber->maxLatency = URT_DELAY_IMMEDIATE;
+  #endif /* URT_CFG_PUBSUB_PROFILING */
+  return;
+}
 
 /**
  * @brief  Subscribes the subscriber to a topic.
@@ -196,7 +222,33 @@ urt_status_t urtSrtSubscriberUnsubscribe(urt_srtsubscriber_t* subscriber){return
  *
  * @param[in] subscriber  The SRT subscriber to initialize. Must not be NULL.
  */
-void urtFrtSubscriberInit(urt_frtsubscriber_t* subscriber){return URT_STATUS_OK;}
+void urtFrtSubscriberInit(urt_frtsubscriber_t* subscriber)
+{
+  subscriber->base.topic = NULL;
+  urtEventListenerInit(subscriber->base.evtListener);
+  subscriber->base.lastMessage = NULL;
+  subscriber->base.lastMessageTime = 0;
+
+  #if (URT_CFG_PUBSUB_PROFILING)
+    subscriber->base.sumLatencies = 0;
+    subscriber->base.numMessagesReceived = 0;
+  #endif /* URT_CFG_PUBSUB_PROFILING */
+
+  #if (URT_CFG_PUBSUB_QOS_DEADLINECHECKS)
+    subscriber->deadlineOffset = 0;
+  #endif /* URT_CFG_PUBSUB_QOS_DEADLINECHECKS */
+
+  #if (URT_CFG_PUBSUB_QOS_JITTERCHECKS)
+    subscriber->maxJitter = 0;
+  #endif /* URT_CFG_PUBSUB_QOS_JITTERCHECKS */
+
+  #if (URT_CFG_PUBSUB_QOS_JITTERCHECKS || URT_CFG_PUBSUB_PROFILING)
+    subscriber->minLatency = URT_DELAY_INFINITE;
+    subscriber->maxLatency = URT_DELAY_IMMEDIATE;
+  #endif /* URT_CFG_PUBSUB_QOS_JITTERCHECKS || URT_CFG_PUBSUB_PROFILING */
+  return;
+}
+
 
 /**
  * @brief  Subscribes the subscriber to a topic.
@@ -260,7 +312,7 @@ bool urtFrtSubscriberCalculateValidity(urt_frtsubscriber_t* subscriber, urt_dela
 /**
  * @brief  Unsubscribes from a subscriber.
  *
- * @param[in] subscriber  The NRT subscriber to be unsubscribed. Must not be NULL.
+ * @param[in] subscriber  The FRT subscriber to be unsubscribed. Must not be NULL.
  *
  * @return  Returns URT_STATUS_OK on sucess.
  *          Returns URT_STATUS_UNSUBSCRIBE_NOTOPIC if the subscriber is not associated to a topic.
@@ -273,12 +325,45 @@ urt_status_t urtFrtSubscriberUnsubscribe(urt_frtsubscriber_t* subscriber){return
  *
  * @param[in] subscriber  The HRT subscriber to initialize. Must not be NULL.
  */
-void urtHrtSubscriberInit(urt_hrtsubscriber_t* subscriber){return;}
+void urtHrtSubscriberInit(urt_hrtsubscriber_t* subscriber)
+{
+  subscriber->base.topic = NULL;
+  urtEventListenerInit(subscriber->base.evtListener);
+  subscriber->base.lastMessage = NULL;
+  subscriber->base.lastMessageTime = 0;
+
+  #if (URT_CFG_PUBSUB_PROFILING)
+    subscriber->base.sumLatencies = 0;
+    subscriber->base.numMessagesReceived = 0;
+  #endif /* URT_CFG_PUBSUB_PROFILING */
+
+  subscriber->next = NULL;
+
+  #if (URT_CFG_PUBSUB_QOS_DEADLINECHECKS)
+    subscriber->deadlineOffset = 0;
+    urtTimerInit(subscriber->qodDeadlineTimer);
+  #endif /* URT_CFG_PUBSUB_QOS_DEADLINECHECKS */
+
+  #if (URT_CFG_PUBSUB_QOS_RATECHECKS)
+    subscriber->expectedRate = 0;
+  #endif /* URT_CFG_PUBSUB_QOS_RATECHECKS */
+
+  #if (URT_CFG_PUBSUB_QOS_JITTERCHECKS)
+    subscriber->maxJitter = 0;
+  #endif /* URT_CFG_PUBSUB_QOS_JITTERCHECKS */
+
+  #if (URT_CFG_PUBSUB_QOS_JITTERCHECKS || URT_CFG_PUBSUB_PROFILING)
+    subscriber->minLatency = URT_DELAY_INFINITE;
+    subscriber->maxLatency = URT_DELAY_IMMEDIATE;
+  #endif /* URT_CFG_PUBSUB_QOS_JITTERCHECKS || URT_CFG_PUBSUB_PROFILING */
+  return;
+}
+
 
 /**
  * @brief  Subscribes the subscriber to a topic.
  *
- * @param[in] subscriber  The NRT subscriber which shall subscribe to a topic. Must not be NULL.
+ * @param[in] subscriber  The HRT subscriber which shall subscribe to a topic. Must not be NULL.
  * @param[in] topic  The topic to subscribe to. Must not be NULL.
  * @param[in] messages  NULL terminated list of messages to contribute to the topic.
  *                      Messages must not be associated to another topic.
