commit ee83a495436186dbc15d6e0bc3e360e19ae5ff02
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Tue Feb 25 15:14:38 2020 +0100

    Again another huge update to the documentation.
    Still incomplete, though.

diff --git a/doc/classdiagrams/pubsub.uml b/doc/classdiagrams/pubsub.uml
index 91447df..ee75846 100644
--- a/doc/classdiagrams/pubsub.uml
+++ b/doc/classdiagrams/pubsub.uml
@@ -50,107 +50,12 @@ $structure("urt_message_t") {
 }
 
 $group("subscriber") {
-  $group("real-time constraint data") {
-    /' The top level RT constraints structure. '/
-    $structure("urt_rtdata_t") {
-        'The actual RT constraint class.
-      + {field} class : urt_rtconstraintclass_t
-        'Parameters of the RT constraints.
-      + {field} params : urt_rtconstraintsparams_t
-    }
-
-    /' Descriptor to distinguish the four RT classes. '/
-    $enumeration("urt_rtclass_t") {
-        'Hard real-time.
-      URT_RTCLASS_HARD = 0
-        'Firm real-time.
-      URT_RTCLASS_FIRM = 1
-        'Soft real-time.
-      URT_RTCLASS_SOFT = 2
-        'No real-time at all.
-      URT_RTCLASS_NONE = 3
-    }
-
-    /' Union structure, holding RT constraints parameters. '/
-    $union("urt_rtclassdata_t") {
-        'Parameters for hard real-time.
-      + {field} hrt : urt_hrtparams_t
-        'Parameters for firm real-time.
-      + {field} frt : urt_frtparams_t
-        'Parameters for soft real-time.
-      + {field} srt : urt_srtparans_t
-        'Parameters for non-real-time.
-      + {field} nrt : urt_nrtparams_t
-    }
-
-    /' Parameters for hard real-time. '/
-    $structure("urt_hrtdata_t") {
-        'Pointer to the next HRT subscriber in a list.
-      + {field} next : urt_subscriber_t*
-      .. URT_CFG_PUBSUB_QOS_DEADLINECHECKS == true ..
-        'QoS Timer to detect missed deadlines.
-      + {field} qosDeadlineTimer : urt_osTimer_t
-        'Maximum temporal offset between creation and consumption of messages.
-      + {field} deadlineOffset : urt_delay_t
-      .. URT_CFG_PUBSUB_QOS_RATECHECKS == true ..
-        'Expected rate at which data is published.
-      + {field} expectedRate : urt_delay_t
-      .. URT_CFG_PUBSUB_PROFILING == true || URT_CFG_PUBSUB_QOS_JITTERCHECKS == true ..
-        'Maximum expected jitter.
-      + {field} maxJitter : urt_delay_t
-        'Minimum latency ever detected (to calculate jitter).
-      + {field} minLatency : urt_delay_t
-        'Maximum latency ever detected (to calculate jitter).
-      + {field} maxLatency : urt_delay_t
-    }
-
-    /' Parameters for firm real-time. '/
-    $structure("urt_frtdata_t") {
-      .. URT_CFG_PUBSUB_QOS_DEADLINECHECKS == true ..
-        'Maximum temporal offset between creation and consumption of messages.
-      + {field} deadlineOffset : urt_delay_t
-      .. URT_CFG_PUBSUB_QOS_RATECHECKS == true ..
-        'Expected rate at which data is published.
-      + {field} expectedRate : urt_delay_t
-      .. URT_CFG_PUBSUB_PROFILING == true || URT_CFG_PUBSUB_QOS_JITTERCHECKS == true ..
-        'Maximum expected jitter.
-      + {field} maxJitter : urt_delay_t
-        'Minimum latency ever detected (to calculate jitter).
-      + {field} minLatency : urt_delay_t
-        'Maximum latency ever detected (to calculate jitter).
-      + {field} maxLatency : urt_delay_t
-    }
-
-    $group("SRT data") {
-      /' Function type to be called when calculating the usefulness of a message. '/
-      $function("urt_srtusefulnessfunc_t") {
-          'Takes a delay and optionally parameters as arguments and returns a float in [0, 1].
-        urt_srtusefulnessfunc_t (dt : urt_delay_t, params : void*) : float
-      }
-
-      /' Parameters for soft real-time. '/
-      $structure("urt_srtdata_t") {
-          'Callback to calculate usefulness of a message
-        + {field} usefullnesscb : urt_srtusefulnessfunc_t*
-          'Optional parameters for the callback function.
-        + {field} cbparams : void*
-      }
-    } /'SRT data'/
-
-    /' Parameters for non-real-time. '/
-    $structure("urt_nrtdata_t") {
-      'There are nor parameters in this case.
-    }
-  } /'real-time constraint data'/
-
-  /' Subscriber type. '/
-  $structure("urt_subscriber_t") {
+  /' Base subscriber type. '/
+  $structure("urt_basesubscriber_t") {
       'Pointer to the topic, this subscriber subscribed to.
     + {field} topic : urt_topic_t*
       'Event listener to notify the node about new messages.
     + {field} evtListener : urt_osEventListener_t
-      'Real-time class descriptor.
-    + {field} rtdata : urt_rtdata_t
       'Pointer to the message consumed most recently.
     + {field} lastMessage : urt_message_t*
       'Copy of the origin time of the message consumed most recently.
@@ -160,30 +65,119 @@ $group("subscriber") {
     + {field} sumLatencies : uint64_t
       'Number of messages received.
     + {field} numMessagesReceived : uint64_t
+  }
+
+  /' Function type to be called when calculating the usefulness of a message. '/
+  $function("urt_srtusefulnessfunc_t") {
+    'Takes a delay and optionally parameters as arguments and returns a float in [0, 1].
+    urt_srtusefulnessfunc_t (dt : urt_delay_t, params : void*) : float
+  }
+
+  /' NRT subscriber type. '/
+  $structure("urt_nrtsubscriber_t") {
+    .. URT_CFG_PUBSUB_PROFILING == true ..
+      'Minimum latency ever detected.
+    + {field} minLatency : urt_delay_t
+      'Maximum latency ever detected.
+    + {field} maxLatency : urt_delay_t
+    __
+      'Initializes a urt_nrtsubscriber_t object.
+    + {method} urtNrtSubscriberInit (subscriber : urt_nrtsubscriber_t*) : urt_status_t
+      'Tries to subscribe to a topic and optionally contributes a list of messages to the topic.
+    + {method} urtNrtSubscriberSubscribe (subscriber : urt_nrtsubscriber_t*, topic : urt_topic_t*, messages : urt_message_t*) : urt_status_t
+      'Fetches the next message in the buffer, optionally copies the payload and optionally returns the latency.
+    + {method} urtNrtSubscriberFetchNextMessage (subscriber : urt_nrtsubscriber_t*, payload : void*, bytes : size_t, latency : urt_delay_t*) : urt_status_t
+      'Fetches the latest message, optionally copies the payload and optionally returns the latency.
+    + {method} urtNrtSubscriberFetchLatestMessage (subscriber : urt_nrtsubscriber_t*, payload : void*, bytes : size_t, latency : urt_delay_t*) : urt_status_t
+      'Unsubscribes from a topic.
+    + {method} urtNrtSubscriberUnsubscribe (subscriber : urt_nrtsubscriber_t*) : urt_status_t
+  }
+
+  /' SRT subscriber type. '/
+  $structure("urt_srtsubscriber_t") {
+      'Callback to calculate usefulness of a message
+    + {field} usefulnesscb : urt_srtusefulnessfunc_t*
+      'Optional parameters for the usefulness callback function.
+    + {field} cbparams : void*
     .. URT_CFG_PUBSUB_PROFILING == true ..
+      'Minimum latency ever detected.
+    + {field} minLatency : urt_delay_t
+      'Maximum latency ever detected.
+    + {field} maxLatency : urt_delay_t
+    __
+      'Initializes a urt_srtsubscriber_t object.
+    + {method} urtSrtSubscriberInit (subscriber : urt_srtsubscriber_t*) : urt_status_t
+      'Tries to subscribe to a topic, sets all parameters and optionally contributes a list of messages to the topic.
+    + {method} urtSrtSubscriberSubscribe (subscriber : urt_srtsubscriber_t*, topic : urt_topic_t*, messages : urt_message_t*, usefulnesscb : urt_srtusefulnessfunc_t*, cbparams : void*) : urt_status_t
+      'Fetches the next message in the buffer, optionally copies the payload and optionally returns the latency.
+    + {method} urtSrtSubscriberFetchNextMessage (subscriber : urt_srtsubscriber_t*, payload : void*, bytes : size_t, latency : urt_delay_t*) : urt_status_t
+      'Fetches the latest message, optionally copies the payload and optionally returns the latency.
+    + {method} urtSrtSubscriberFetchLatestMessage (subscriber : urt_srtsubscriber_t*, payload : void*, bytes : size_t, latency : urt_delay_t*) : urt_status_t
+      'Calculates the usefulness of a message after the specified delay.
+    + {method} urtSrtSubscriberCalculateUsefulness (subscriber : urt_srtsubscriber_t*, latency : urt_delay_t) : float
+      'Unsubscribes from a topic.
+    + {method} urtSrtSubscriberUnsubscribe (subscriber : urt_srtsubscriber_t*) : urt_status_t
+  }
+
+  /' FRT subscriber type. '/
+  $structure("urt_frtsubscriber_t") {
+    .. URT_CFG_PUBSUB_QOS_DEADLINECHECKS == true ..
+      'Maximum temporal offset between creation and consumption of messages.
+    + {field} deadlineOffset : urt_delay_t
+    .. URT_CFG_PUBSUB_QOS_JITTERCHECKS == true ..
+      'Maximum expected jitter.
+    + {field} maxJitter : urt_delay_t
+    .. URT_CFG_PUBSUB_QOS_JITTERCHECKS == true ||  URT_CFG_PUBSUB_PROFILING == true ..
       'Minimum latency ever detected (to calculate jitter).
     + {field} minLatency : urt_delay_t
       'Maximum latency ever detected (to calculate jitter).
     + {field} maxLatency : urt_delay_t
     __
-      'Initializes a urt_subscriber_t object.
-    + {method} urtSubscriberInit (subscriber : urt_subscriber_t*) : urt_status_t
-      'Tries to subscribe to a topic as HRT subscriber, sets all according parameters and optionally contributes a list of messages to the topic.
-    + {method} urtSubscriberSubscribeHrt (subscriber : urt_subscriber_t*, topic : urt_topic_t*, messages : urt_message_t*, deadline : urt_delay_t, rate : urt_delay_t, jitter : urt_delay_t) : urt_status_t
-      'Tries to subscribe to a topic as FRT subscriber, sets all according parameters and optionally contributes a list of messages to the topic.
-    + {method} urtSubscriberSubscribeFrt (subscriber : urt_subscriber_t*, topic : urt_topic_t*, messages : urt_message_t*, deadline : urt_delay_t, rate : urt_delay_t, jitter : urt_delay_t) : urt_status_t
-      'Tries to subscribe to a topic as SRT subscriber, sets all according parameters and optionally contributes a list of messages to the topic.
-    + {method} urtSubscriberSubscribeSrt (subscriber : urt_subscriber_t*, topic : urt_topic_t*, messages : urt_message_t*, usefulnesscb : urt_srtusefulnessfunc_t*, cbparams : void*) : urt_status_t
-      'Tries to subscribe to a topic as NRT subscriber and optionally contributes a list of messages to the topic.
-    + {method} urtSubscriberSubscribeNrt (subscriber : urt_subscriber_t*, topic : urt_topic_t*, messages : urt_message_t*) : urt_status_t
+      'Initializes a urt_frtsubscriber_t object.
+    + {method} urtFrtSubscriberInit (subscriber : urt_frtsubscriber_t*) : urt_status_t
+      'Tries to subscribe to a topic, sets all parameters and optionally contributes a list of messages to the topic.
+    + {method} urtFrtSubscriberSubscribe (subscriber : urt_frtsubscriber_t*, topic : urt_topic_t*, messages : urt_message_t*, deadline : urt_delay_t, jitter : urt_delay_t) : urt_status_t
+      'Fetches the next message in the buffer, optionally copies the payload and optionally returns the latency.
+    + {method} urtFrtSubscriberFetchNextMessage (subscriber : urt_frtsubscriber_t*, payload : void*, bytes : size_t, latency : urt_delay_t*) : urt_status_t
+      'Fetches the latest message, optionally copies the payload and optionally returns the latency.
+    + {method} urtFrtSubscriberFetchLatestMessage (subscriber : urt_frtsubscriber_t*, payload : void*, bytes : size_t, latency : urt_delay_t*) : urt_status_t
+      'Checks whether a message is valid after the specified delay.
+    + {method} urtFrtSubscriberCalculateValidity (subscriber : urt_frtsubscriber_t*, latency : urt_delay_t) : bool
       'Unsubscribes from a topic.
-    + {method} urtSubscriberUnsubscribe (subscriber : urt_subscriber_t*) : urt_status_t
+    + {method} urtFrtSubscriberUnsubscribe (subscriber : urt_frtsubscriber_t*) : urt_status_t
+  }
+
+  /' HRT subscriber type. '/
+  $structure("urt_hrtsubscriber_t") {
+      'Pointer to the next HRT subscriber in a list.
+    + {field} next : urt_hrtsubscriber_t*
+    .. URT_CFG_PUBSUB_QOS_DEADLINECHECKS == true ..
+      'Maximum temporal offset between creation and consumption of messages.
+    + {field} deadlineOffset : urt_delay_t
+      'QoS Timer to detect missed deadlines.
+    + {field} qosDeadlineTimer : urt_osTimer_t
+    .. URT_CFG_PUBSUB_QOS_JITTERCHECKS == true ..
+      'Maximum expected jitter.
+    + {field} maxJitter : urt_delay_t
+    .. URT_CFG_PUBSUB_QOS_JITTERCHECKS == true || URT_CFG_PUBSUB_PROFILING == true..
+      'Minimum latency ever detected (to calculate jitter).
+    + {field} minLatency : urt_delay_t
+      'Maximum latency ever detected (to calculate jitter).
+    + {field} maxLatency : urt_delay_t
+    .. URT_CFG_PUBSUB_QOS_RATECHECKS == true ..
+      'Expected rate at which data is published.
+    + {field} expectedRate : urt_delay_t
+    __
+      'Initializes a urt_hrtsubscriber_t object.
+    + {method} urtHrtSubscriberInit (subscriber : urt_hrtsubscriber_t*) : urt_status_t
+      'Tries to subscribe to a topic, sets all parameters and optionally contributes a list of messages to the topic.
+    + {method} urtHrtSubscriberSubscribe (subscriber : urt_hrtsubscriber_t*, topic : urt_topic_t*, messages : urt_message_t*, deadline : urt_delay_t, rate : urt_delay_t, jitter : urt_delay_t) : urt_status_t
       'Fetches the next message in the buffer, optionally copies the payload and optionally returns the latency.
-    + {method} urtSubscriberFetchNextMessage (subscriber : urt_subscriber_t*, payload : void*, bytes : size_t, latency : urt_delay_t*) : urt_status_t
+    + {method} urtHrtSubscriberFetchNextMessage (subscriber : urt_hrtsubscriber_t*, payload : void*, bytes : size_t, latency : urt_delay_t*) : urt_status_t
       'Fetches the latest message, optionally copies the payload and optionally returns the latency.
-    + {method} urtSubscriberFetchLatestMessage (subscriber : urt_subscriber_t*, payload : void*, bytes : size_t, latency : urt_delay_t*) : urt_status_t
-      'Calculates the usefulness of a message after the specified delay depending on the SRT or FRT (or HRT) parameters.
-    + {method} urtSubscriberCalculateUsefulness (subscriber : urt_subscriber_t*, latency : urt_delay_t) : float
+    + {method} urtHrtSubscriberFetchLatestMessage (subscriber : urt_hrtsubscriber_t*, payload : void*, bytes : size_t, latency : urt_delay_t*) : urt_status_t
+      'Unsubscribes from a topic.
+    + {method} urtHrtSubscriberUnsubscribe (subscriber : urt_hrtsubscriber_t*) : urt_status_t
   }
 } /'subscriber'/
 
@@ -191,7 +185,7 @@ $group("subscriber") {
 $structure("urt_publisher_t") {
     'Pointer to the topic for publishing.
   + {field} topic : urt_topic_t*
-  .. URT_CFG_PROFILING == true ..
+  .. URT_CFG_PUBSUB_PROFILING == true ..
     'Counter of attempts to publish a message.
   + {field} publishAttempts : uint64_t
     'Counter of failed attempts to publish a message.
@@ -216,7 +210,7 @@ $structure("urt_topic_t") {
     'Number of HRT subscribers.
   + {field} numHrtSubscribers : unsigned int
     'List of HRT subscribers, orderd by their expected rate (most critical first).
-  + {field} hrtSubscribers : urt_subscriber_t*
+  + {field} hrtSubscribers : urt_hrtsubscriber_t*
     'Condition variable to inform waiting publishers when a blocked message becomes available.
   + {field} hrtReleased : urt_osCondvar_t
     'Mandatory message, each Topic holds.
@@ -242,30 +236,27 @@ $structure("urt_topic_t") {
 
 !startsub DEPENDENCIES
 
-urt_srtdata_t "1" o-- "0..1" urt_srtusefulnessfunc_t
-
-urt_rtclassdata_t "1" *-- "0..1" urt_hrtdata_t
-urt_rtclassdata_t "1" *-- "0..1" urt_frtdata_t
-urt_rtclassdata_t "1" *-- "0..1" urt_srtdata_t
-urt_rtclassdata_t "1" *-- "0..1" urt_nrtdata_t
+urt_message_t "1" o-- "0..1" urt_message_t
 
-urt_rtdata_t "1" *-- "1" urt_rtclass_t
-urt_rtdata_t "1" *-- "1" urt_rtclassdata_t
+urt_nrtsubscriber_t --|> urt_basesubscriber_t
+urt_nrtsubscriber_t ..> urt_message_t
 
-urt_hrtdata_t "1" o-up- "0..1" urt_subscriber_t
+urt_srtsubscriber_t --|> urt_basesubscriber_t
+urt_srtsubscriber_t "1" o-- "0..1" urt_srtusefulnessfunc_t
+urt_srtsubscriber_t ..> urt_message_t
 
-urt_message_t "1" o-- "0..1" urt_message_t
+urt_frtsubscriber_t --|> urt_basesubscriber_t
+urt_frtsubscriber_t ..> urt_message_t
 
-urt_subscriber_t "1" *-- "1" urt_rtdata_t
-urt_subscriber_t "1" o- "0..1" urt_topic_t
-urt_subscriber_t "1" o-- "0..1" urt_message_t
+urt_hrtsubscriber_t --|> urt_basesubscriber_t
+urt_hrtsubscriber_t "1" o-- "0..1" urt_hrtsubscriber_t
+urt_hrtsubscriber_t ..> urt_message_t
 
 urt_publisher_t "1" o- "1" urt_topic_t
 urt_publisher_t ..> urt_message_t
 
 urt_topic_t "1" o-- "0..1" urt_topic_t
-urt_topic_t "1" o- "0..1" urt_subscriber_t
-urt_topic_t "1" o-- "1..1" urt_message_t
+urt_topic_t "1" o- "0..1" urt_hrtsubscriber_t
 urt_topic_t "1" *-- "1" urt_message_t
 
 !endsub
