commit 4d55cea43d23715fd1a519d4207e7bb49c4cccdf
Author: Thomas Schöpping <tschoepp@cit-ec.uni-bielefeld.de>
Date:   Tue Feb 11 10:55:29 2020 +0100

    classdiagrams overhauled:
    - various modules are split into several files
    - introduced a functions.iuml as consistent 'library'

diff --git a/doc/classdiagrams/overview.uml b/doc/classdiagrams/overview.uml
index 74c9992..6b270b8 100644
--- a/doc/classdiagrams/overview.uml
+++ b/doc/classdiagrams/overview.uml
@@ -3,7 +3,7 @@
 applications. It was developed as part of the software habitat for the
 Autonomous Mini Robot [1] (AMiRo) but can be used for other purposes as well.
 
-Copyright (C) 2018..2019  Thomas Schöpping et al.
+Copyright (C) 2018..2020  Thomas Schöpping et al.
 
 This program is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -19,639 +19,109 @@ You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 '/
 
+/'### INTRO ##################################################################'/
+
 @startuml
 
 title **µRtWare**\nOverview\n
 
+!include ../functions.iuml
 
+/'### ENTITIES ###############################################################'/
 
-/' Not a type but a set of configuration macros. '/
-class urt_config <<(C,grey)>> {
-    'Selection to en-/disable debug checks.
-  + URT_CFG_DEBUG : bool
-    'Selector to specify the width of urt_delay_t type.
-  + URT_CFG_DELAY_WIDTH
-    'Selector to specify the width of the urt_topicid_t type.
-  + URT_CFG_TOPICID_WIDTH
-    'Selector to specify the width of the urt_nodestage_t type.
-  + URT_CFG_NODESTAGE_WIDTH
-}
-
-package "primitives" {
-
-  /' Temporal delay in microseconds. '/
-  class urt_delay_t <<(T,lightblue)>> {
-    .. either ..
-    uint32_t
-    .. or ..
-    uint64_t
-  }
-  urt_delay_t ..> urt_config
-
-  /' Well defined error codes. '/
-  enum urt_status_t {
-    URT_STATUS_OK = 0
-    URT_STATUS_WARNING = 1
-    URT_STATUS_ERROR = -1
-  }
-  
-  /' Topic ID type. '/
-  class urt_topicid_t <<(T,lightblue)>> {
-    'configurable
-    uin8_t
-    .. or ..
-    uint16_t
-    .. or ..
-    uint32_t
-    .. or ..
-    uint64_t
-  }
-  urt_topicid_t ..> urt_config
-
-  /' Node synchronization type. '/
-  class urt_nodestage_t <<T,lightblue>> {
-    'configurable
-    uin8_t
-    .. or ..
-    uint16_t
-    .. or ..
-    uint32_t
-    .. or ..
-    uint64_t
-  }
-  urt_nodestage_t ..> urt_config
-
-} /' package "primitives" '/
-
-
-
-package "OSAL" {
-
-  /' OS time type with arbitrary resolution. '/
-  class urt_osTime_t <<(T,lightblue)>> {
-      'Converts an OS time to 64 bit microsecond precise value.
-    + urtTime2Us (t : urt_osTime_t*) : uint64_t
-      'Retrieves the current time.
-    + urtTimeNow (void) : urt_osTime_t
-  }
-
-  /' OS mutex lock interface. '/
-  class urt_osMutex_t <<(T,lightblue)>> {
-      'Initializes a urt_osMutex_t object.
-    + urtMutexInit (mutex : urt_osMutex_t*) : void
-      'Block the thread until the mutex could be locked.
-    + urtMutexLock (mutex : urt_osMutex_t*) : void
-      'Tries to lock the mutex, but does not block but immediately returns an indicator.
-    + urtMutexTryLock (mutex : urt_osMutex_t*) : bool
-      'Unlocks a previously locked mutex.
-    + urtMutexUnlock (mutex : urt_osMutex_t*) : void
-  }
-
-  package "condition variable" {
-
-    /' Return type for the wait function on condition variables. '/
-    enum urt_condvarStatus_t {
-        'The condition variable has been signaled.
-      + URT_CONDVAR_STATUS_SIGNAL = 0
-        'The condition variable has been broadcasted.
-      + URT_CONDVAR_STATUS_BROADCAST = 1
-        'The wait function timed out.
-      + URT_CONDVAR_STATUS_TIMEOUT = 2
-    }
-
-    /' Condition variable interface. '/
-    class urt_osCondvar_t <<(T,lightblue)>> {
-        'Initializes a urt_osCondvar_t object.
-      + urtCondvarInit (condvar : urt_osCondvar_t*) : void
-        'Signals one thread that is waiting for the condition variable.
-      + urtConvarSignal (condvar : urt_osCondvar_t*) : void
-        'Signals all threads that are waiting for the condition variable.
-      + urtCondvarBroadcast (condvar : urt_osCondvar_t*) : void
-        'Waits for the condition variable.
-      + urtCondvarWait (condvar : urt_osCondvar_t*, mutex : urt_osMutex_t*, timeout : urt_delay_t) : urt_condvarStatus_t
-    }
-    urt_osCondvar_t ..> urt_osMutex_t
-    urt_osCondvar_t ..> urt_delay_t
-    urt_osCondvar_t ..> urt_condvarStatus_t
-
-  } /' package "condition variable" '/
-
-  package "timer" {
-
-    /' Timer callback definition. '/
-    class urt_osTimerCallback_t <<(T,lightblue)>> {
-      urt_osTimerCallback_t (parameter : void*) : void
-    }
-  
-    /' OS timer interface. '/
-    class urt_osTimer_t <<(T,lightblue)>> {
-        'Initializes an urt_osTimer_t object.
-      + urtTimerInit (timer : urt_osTimer_t*) : void
-        'Sets the timer to a specified delay with specified callback and arguments.
-      + urtTimerSet (timer : urt_osTimer_t*, delay : urt_delay_t, callback : urt_osTimerCallback_t*, parameter : void*) : urt_status_t
-        'Resets the timer.
-      + urtTimerReset (timer : urt_osTimer_t*) : urt_status_t
-        'Check whether the timer is already armed.
-      + urtTimerIsArmed (timer : urt_osTimer_t*) : bool
-    }
-    urt_osTimer_t ..> urt_delay_t
-    urt_osTimer_t ..> urt_status_t
-    urt_osTimer_t ..> urt_osTimerCallback_t
-
-  } /' package "timer" '/
-
-  package "thread" {
-
-    /' Thread priority type. '/
-    class urt_osThreadPrio_t <<(T,lightblue)>> {
-      'Minimum priority for low priority threads.
-      + URT_THREAD_PRIO_LOW_MIN
-        'Maximum priority for low priority threads.
-      + URT_THREAD_PRIO_LOW_MAX
-        'Minimum priority for normal priority threads.
-      + URT_THREAD_PRIO_NORMAL_MIN
-        'Maximum priority for normal priority threads.
-      + URT_THREAD_PRIO_NORMAL_MAX
-        'Minimum priority for high priority threads.
-      + URT_THREAD_PRIO_HIGH_MIN
-        'Maximum priority for high priority threads.
-      + URT_THREAD_PRIO_HIGH_MAX
-        'Minimum priority for real-time threads.
-      + URT_THREAD_PRIO_RT_MIN
-        'Maximum priority for real-time threads.
-      + URT_THREAD_PRIO_RT_MAX
-    }
-
-    /' Thread main function type. '/
-    class urt_osThreadFunction_t <<(T,lightblue)>> {
-      urt_osThreadFunction_t (arg : void*) : void
-    }
-
-    /' Thread terminate signals. '/
-    enum urt_osThreadTerminateSignal_t {
-      'Signal to request termination asap.
-      URT_THREAD_TERMINATE_REQUEST = 15
-      'Signal to kill a thread immediately.
-      URT_THREAD_TERMINATE_KILL = 9
-    }
-
-    /' Thread execution states. '/
-    enum urt_osThreadState_t {
-      'Thread is currently being executed.
-      URT_THREAD_STATE_RUNNING = 0
-      'Thread is ready but waiting to be scheduled.
-      URT_THREAD_STATE_READY = 1
-      'Thread is actively sleeping.
-      URT_THREAD_STATE_SLEEPING = 2
-      'Thread has ben suspended explicitely.
-      URT_THREAD_STATE_SUSPENDED = 3
-      'Thread is waiting for something (e.g. Mutex, event, etc.).
-      URT_THREAD_STATE_WAITING = 4
-      'Thread has terminated.
-      URT_THREAD_STATE_TERMINATED = 5
-    }
-
-    /' OS thread interface. '/
-    class urt_osThread_t <<(T,lightblue)>> {
-        'Maximum sleep interval in seconds (as float).
-      + URT_THREAD_SLEEP_MAX : float
-        'Maximum sleep interval in seconds.
-      + URT_THREAD_SSLEP_MAX : unsigned int
-        'Maximum sleep interval in milliseconds.
-      + URT_THREAD_MSLEEP_MAX : unsigned int
-        'Maximum sleep interval in microseconds.
-      + URT_THREAD_USLEEP_MAX : unisgned int
-      __
-        'Macro to setup working area as static variable (handles alignment if required).
-      + URT_THREAD_MEMORY (varname, stacksize)
-      ..
-        'Initializes an urt_osThread_t object.
-      + urtThreadInit (memory : void*, size : size_t, func : urt_osThreadFunction_t*) : urt_osThread_t*
-        'Starts a thread.
-      + urtThreadStart (thread : urt_osThread_t*, prio : urt_osThreadPrio_t, arg : void*) : void
-        'The calling threads yields.
-      + urtThreadYield (void) : void
-        'Retrieves the priority of the calling thread.
-      + urtThreadGetPriority (void) : urt_osThreadPrio_t
-        'Sets the priority of the calling thread.
-      + urtThreadSetPriority (prio : urt_osThreadPrio_t) : void
-        'Suspends a thread so it will no longer be executed.
-      + urtThreadSuspend (thread : urt_osThread_t*) : void
-        'Wakes a suspended thread.
-      + urtThreadResume (thread : urt_osThread_t*) : urt_status_t
-        'Suspends the calling thread for the specified time.
-      + urtThreadSleep (seconds : float) : void
-        'Suspends the calling thread for the specified time.
-      + urtThreadSSleep (seconds : usnigned int) : void
-        'Suspends the calling thread for the specified time.
-      + urtThreadMSleep (milliseconds : unsigned int) : void
-        'Suspends the calling thread for the specified time.
-      + urtThreadUSleep (microseconds : unsigned int) : void
-        'Suspends the calling thread until the specified time.
-      + urtThreadSleepUntil (time : urt_osTime_t) : void
-        'The calling thread exits execution (terminates).
-      + urtThreadExit (void) : void
-        'Terminates a specified thread.
-      + urtThreadTerminate (thread : urt_osThread_t*, sig : urt_osThreadTerminateSignal_t) : void
-        'Waits until the specified thread terminates.
-      + urtThreadJoin (thread : urt_osThread_t*) : int
-        'Retrieves the execution state of the specified thread.
-      + urtThreadGetState (thread : urt_osThread_t*) : urt_osThreadState_t
-        'Retrieves the calling thread itself.
-      + urtThreadGetSelf (void) : urt_osThread_t*
-        'Retrieves the first child of a thread (or ""NULL"").
-      + urtThreadGetChildren (thread : urt_osThread_t*) : urt_osThread_t*
-        'Retrieves a sibling (next child in a list) of the thread or ""NULL"".
-      + urtThreadGetSibling (thread : urt_osThread_t*) : urt_osThread_t*
-        'Retrieves the parent thread.
-      + urtThreadGetParent (thread : urt_osThread_t) : urt_osThread_t*
-    }
-    urt_osThread_t ..> urt_osThreadPrio_t
-    urt_osThread_t ..> urt_osThreadFunction_t
-    urt_osThread_t ..> urt_osTime_t
-    urt_osThread_t ..> urt_osThreadTerminateSignal_t
-    urt_osThread_t ..> urt_osThreadState_t
-    urt_osThread_t ..> urt_status_t
-
-  } /' package "thread" '/
-
-  package "events" {
-
-    /' OS event mask type. '/
-    class urt_osEventMask_t <<(T,lightblue)>> {
-        'The event mask, which will be handled with maximum priority by the event system.
-      + URT_EVENTMASK_MAXPRIO : urt_osEventMask_t
-    }
-
-    /' OS event flag type. '/
-    class urt_osEventFlags_t <<(T,lightblue)>>
-
-    enum urt_osEventWaitType_t {
-      URT_EVENT_WAIT_ONE = 0
-      URT_EVENT_WAIT_ANY = 1
-      URT_EVENT_WAIT_ALL = 2
-    }
+!startsub ENTITIES
 
-    /' OS event listener interface. '/
-    class urt_osEventListener_t <<(T,lightblue)>> {
-        'Initializes an urt_osEventListener_t object.
-      + urtEventListenerInit (listener : urt_osEventListener_t*) : void
-        'Retrieves the flags of the event listener.
-      + urtEventListenerGetFlags (listener : urt_osEventListener_t*) : urt_osEventFlags_t
-        'Retrieves and clears the flags of the event listener.
-      + urtEventListenerClearFlags (listener : urt_osEventListener_t*) : urt_osEventFlags_t
-    }
-    urt_osEventListener_t ..> urt_osEventFlags_t
-
-    /' OS event source interface. '/
-    class urt_osEventSource_t <<(T,lightblue)>> {
-        'Initializes an urt_osEventSource_t object.
-      + urtEventSourceInit (source : urt_osEventSource_t*) : void
-        'Emits an event.
-      + urtEventSourceBroadcast (source : urt_osEventSource_t*, flags : urt_osEventFlags_t) : void
-    }
-    urt_osEventSource_t ..> urt_osEventFlags_t
-
-    /' Not a class/type but a set of static event-related functions. '/
-    class urt_events <<(F,white)>> {
-        'Registers a lister to a source.
-      + urtEventRegister (source : urt_osEventSource_t*, listener : urt_osEventListener_t*, mask : urt_osEventMask_t) : urt_status_t
-        'Unregisters a listener from a source.
-      + urtEventUnregister (source _ urt_osEventSource_t*, listener : urt_osEventListener_t*) : urt_status_t
-        'Blocks the thread until any event occurs or the timeout expires.
-      + urtEventWait (mask : urt_osEventMask_t, type : urt_osEventWaitType_t, timeout : urt_delay_t) : urt_osEventMask_t
-    }
-    urt_events ..> urt_osEventSource_t
-    urt_events ..> urt_osEventListener_t
-    urt_events ..> urt_osEventMask_t
-    urt_events ..> urt_status_t
-    urt_events ..> urt_osEventWaitType_t
-    urt_events ..> urt_delay_t
-
-  } /' package "events" '/
-
-  /' Not a class/type but a set of output-related functions. '/
-    class urt_streams <<(F,white)>> {
-        'Prints a formatted string to the standard output stream (stdout).
-      + urtPrintf(fmt : char*, ... ) : int
-        'Prints a formatted string to the standard error stream (stderr).
-      + urtErrPrintf(fmt : char*, ... ) : int
-    }
-
-} /' package "interfaces" '/
-
-package "middleware" {
-
-  /' Just a function for debugging. '/
-  class urt_debug <<(F,white)>> {
-      'Checks the condition in debug mode.
-    + urtDebugAssert(condition : bool) : void
-  }
-  urt_debug ..> urt_config
-
-  package "real-time class" {
-
-    /' The top level RT class structure. '/
-    class urt_rtclass_t <<(S,lightgrey)>> {
-        'The actual RT class.
-      + class : urt_rtclasstype_t
-        'Parameters of the RT class.
-      + params : urt_rtclassparams_t
-    }
-    urt_rtclass_t "1" *-- "1" urt_rtclasstype_t
-    urt_rtclass_t "1" *-- "1" urt_rtclassparams_t
-
-    /' Descriptor to distinguish the four RT classes. '/
-    enum urt_rtclasstype_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 class parameters. '/
-    class urt_rtclassparams_t <<(U,lightgreen)>> {
-        'Parameters for hard real-time.
-      + hrt : urt_hrtparams_t
-        'Parameters for firm real-time.
-      + frt : urt_frtparams_t
-        'Parameters for soft real-time.
-      + srt : urt_srtparans_t
-        'Parameters for non-real-time.
-      + nrt : urt_nrtparams_t
-    }
-    urt_rtclassparams_t "1" *-- "0..1" urt_hrtparams_t
-    urt_rtclassparams_t "1" *-- "0..1" urt_frtparams_t
-    urt_rtclassparams_t "1" *-- "0..1" urt_srtparams_t
-    urt_rtclassparams_t "1" *-- "0..1" urt_nrtparams_t
-
-    /' Parameters for hard real-time. '/
-    class urt_hrtparams_t <<(S,lightgrey)>> {
-        'Maximum temporal offset between creation and consumption of messages.
-      + deadlineOffset : urt_delay_t
-        'Expected rate at which data is published.
-      + expectedRate : urt_delay_t
-        'QoS timer to detected missed deadlines.
-      + qosTimer : urt_osTimer_t
-    }
-    urt_hrtparams_t ..> urt_delay_t
-    urt_hrtparams_t "1" *-- "1" urt_osTimer_t
-
-    /' Parameters for firm real-time. '/
-    class urt_frtparams_t <<(S,lightgrey)>> {
-        'Maximum temporal offset between creation and consumption of messages.
-      + deadlineOffset : urt_delay_t
-        'Expected rate at which data is published.
-      + expectedRate : urt_delay_t
-        'QoS Timer to detect missed deadlines.
-      + qosTimer : urt_osTimer_t
-        'Callback function for the QoS timer.
-      + callback : urt_osTimerCallback_t
-        'Parameters for the callback function.
-      + cbparams : void*
-    }
-    urt_frtparams_t ..> urt_delay_t
-    urt_frtparams_t "1" *-- "1" urt_osTimer_t
-    urt_frtparams_t "1" *-- "1" urt_osTimerCallback_t
-
-    /' Parameters for soft real-time. '/
-    class urt_srtparams_t <<(S,lightgrey)>> {
-        'Callback function to calculate usefulness given a dleay.
-      + *usefulness (dt : urt_delay_t, params : void*) : float
-        'Optional parameters for the callback function.
-      + params : void*
-    }
-    urt_srtparams_t ..> urt_delay_t
-
-    /' Parameters for non-real-time. '/
-    class urt_nrtparams_t <<(S,lightgrey)>> {
-      'There are nor parameters in this case.
-    }
-
-  } /' package "real-time class" '/
-
-
-
-  /' Message type. '/
-  class urt_message_t <<(S,lightgrey)>> {
-      'Pointer to the next message in a list.
-    + next : urt_message_t*
-      'Pointer to some arbitrary (reusable) payload object.
-    + payload : void*
-      'Origin time of the message.
-    + originTime : urt_osTime_t
-      'Mutex lock for exclusive access.
-    + lock : urt_osMutex_t
-      'Counter of HRT subscribers that did not consume the message yet.
-    + numHrtConsumersLeft : unsigned int
-      'Condition variable to inform waiting publishers when the message is available again.
-    + hrtConsumersLeft : urt_osCondvar_t
-    -- evaluation data --
-      'Counter of overall subscribers that did not consume the message yet.
-    + numConsumersLeft : unsigned int
-    __
-      'Initializes a urt_message_t object.
-    + urtMessageInit (message : urt_message_t*, payload : void*) : urt_status_t
-  }
-  urt_message_t "1" o-- "0..1" urt_message_t
-  urt_message_t "1" *-- "1" urt_osTime_t
-  urt_message_t "1" *-- "1" urt_osMutex_t
-  urt_message_t "1" *-- "1" urt_osCondvar_t
-
-  /' Subscriber type. '/
-  class urt_subscriber_t <<(S,lightgrey)>> {
-      'Pointer to the next subscriber in a list.
-    + next : urt_subscriber_t*
-      'Pointer to the topic, this subscriber subscribed to.
-    + topic : urt_topic_t*
-      'Event listener to notify the node about new messages.
-    + evtListener : urt_osEventListener_t
-      'Real-time class descriptor.
-    + rtclass : urt_rtclass_t
-      'Pointer to the message consumed most recently.
-    + lastMessage : urt_message_t*
-      'Copy of the origin time of the message consumed most recently.
-    + lastMessageTime : urt_osTime_t
-    -- evaluation data --
-      'Minimum latency ever detected.
-    + minLatency : urt_delay_t
-      'Maximum latency ever detected.
-    + maxLatency : urt_delay_t
-      'Sum of all latencies.
-    + sumLatencies : uint64_t
-      'Number of messages received.
-    + numMessagesReceived : unsigned int
-    __
-      'Initializes a urt_subscriber_t object.
-    + urtSubscriberInit (subscriber : urt_subscriber_t*) : urt_status_t
-      'Tries to subscribe to a topic and contributes an optional list of messages.
-    + urtSubscriberSubscribe (subscriber : urt_subscriber_t*, topic : urt_topic_t*, rtclass : urt_rtclass_t*, messages : urt_messages_t*) : urt_status_t
-      'Unsubscribes from a topic.
-    + urtSubscriberUnsubscribe (subscriber : urt_subscriber_t*) : urt_status_t
-      'Fetches either the next or the latest message and optionally copies the payload.
-    + urtSubscriberFetchMessage (subscriber : urt_subscriber_t*, payload : void*, bytes : size_t, latest : bool) : urt_status_t
-  }
-  urt_subscriber_t "1" o-- "0..1" urt_subscriber_t
-  urt_subscriber_t "1" o-- "0..1" urt_topic_t
-  urt_subscriber_t "1" *-- "1" urt_osEventListener_t
-  urt_subscriber_t "1" *-- "1" urt_rtclass_t
-  urt_subscriber_t "1" o-- "0..1" urt_message_t
-  urt_subscriber_t "1" *-- "1" urt_osTime_t
-  urt_subscriber_t "1" *-- "2" urt_delay_t
-  urt_subscriber_t ..> urt_status_t
-  urt_subscriber_t ..> urt_topicid_t
-
-  /' Publisher type. '/
-  class urt_publisher_t <<(S,lightgrey)>> {
-      'Pointer to the topic for publishing.
-    + topic : urt_topic_t*
-    -- evaluation data --
-      'Counter of attempts to publish a message.
-    + publishAttempts : unsigned int
-      'Counter of failed attempts to publish a message.
-    + publishFails : unsigned int
-    __
-      'Initializes a urt_publisher_t object and contributes an optional list of messages.
-    + urtPublisherInit (publisher : urt_publisher_t*, topic : urt_topic_t*, messages : urt_message_t*) : urt_status_t
-      'Publishes a message via the associated topic.
-    + urtPublisherPublish (publisher : urt_publisher_t*, payload : void*, n : size_t, t : urt_osTime_t, timeout : urt_delay_t) : urt_status_t
-  }
-  urt_publisher_t "1" o-- "1" urt_topic_t
-  urt_publisher_t ..> urt_message_t
-  urt_publisher_t ..> urt_osTime_t
-  urt_publisher_t ..> urt_delay_t
-  urt_publisher_t ..> urt_status_t
-
-  /' Topic type. '/
-  class urt_topic_t <<(S,lightgrey)>> {
-      'Pointer to the next topic in a list.
-    + next : urt_topic_t*
-      'Mutex lock for exclusive access.
-    + lock : urt_osMutex_t
-      'Event source to inform all subscribers when a new message is published.
-    + evtSource : urt_osEventSource_t
-      'Number of HRT subscribers.
-    + numHrtSubscribers : unsigned int
-      'List of HRT subscribers, orderd by their expected rate (most critical first).
-    + hrtSubscribers : urt_subscriber_t*
-      'Timer to check for missed rates.
-    + qosTimer : urt_osTimer_t
-      'Mandatory message, each Topic holds.
-    + mandatoryMessage : urt_message_t
-      'Pointer to the latest message.
-    + latestMessage : urt_message_t*
-      'Identifier of the topic.
-    + id : urt_topicid_t
-    -- evaluation data --
-      'Variable to count how many (non-hrt) subscribers did not fetch a message before it was reused.
-    + numDiscardedMessages : unsigned int
-      'Number of overall subscribers.
-    + numSubscribers : unsigned int
-    __
-      'Initializes an urt_topic_t object.
-    + urtTopicInit (topic : urt_topic_t*, id : urt_topicid_t) : urt_status_t
-  }
-  urt_topic_t "1" o-- "0..1" urt_topic_t
-  urt_topic_t "1" *-- "1" urt_osMutex_t
-  urt_topic_t "1" *-- "1" urt_osEventSource_t
-  urt_topic_t "1" o-- "0..*" urt_subscriber_t
-  urt_topic_t "1" *-- "1" urt_osTimer_t
-  urt_topic_t "1" o-- "1..*" urt_message_t
-  urt_topic_t "1" *-- "1" urt_message_t
-  urt_topic_t "1" *-- "1" urt_topicid_t
-  urt_topic_t ..> urt_osTime_t
-  urt_topic_t ..> urt_status_t
-
-  /' uRtWare core type. '/
-  class urt_core_t <<(S,lightgrey)>> {
-      'List of nodes ordered by their (initial) priority.
-    - {static} _nodes : urt_node_t*
-      'List of topics ordered by their identifiers.
-    - {static} _topics : urt_topic_t*
-      'Event source for control events.
-    - {static} _evtSource : urt_osEventSource_t
-      'Mutex used for synchronization.
-    - {static} _lock : urt_osMutex_t
-    __
-      'Initializes the urt_core_t object.
-    + urtCoreInit (void) : urt_status_t
-      'Starts all node threads (nodes will block before the loop).
-    + urtCoreStartNodes (void) : urt_status_t
-      'Nodes can use this function to synchronize globally.
-    + urtCoreSynchronizeNodes (node : urt_node_t*, stage : urt_nodestage_t) : urt_status_t
-      'Stops all nodes.
-    + urtCoreStopNodes (void) : urt_status_t
-      'Retrieves a topic given an identifier.
-    + urtCoreRetrieveTopic (id : urt_topicid_t) : urt_topic_t*
-  }
-  urt_core_t "1" o-- "0..*" urt_topic_t
-  urt_core_t "1" o-- "0..*" urt_node_t
-  urt_core_t "1" *-- "1" urt_osEventSource_t
-  urt_core_t "1" *-- "1" urt_osMutex_t
-  urt_core_t ..> urt_status_t
-  urt_core_t --> urt_nodestage_t
-  urt_core_t ..> urt_topicid_t
-
-  package "node" {
-
-    /' Function type to be called during setup phase of node threads. '/
-    class urt_nodeSetupCallback_t <<(T,lightblue)>> {
-      'Takes the node and optional parameters as arguments and returns a event mask for the next iteration.
-      urt_nodeSetupCallback_t (node : urt_node_t*, arg : void*) : urt_osEventMask_t
-    }
-    urt_nodeSetupCallback_t ..> urt_node_t
-    urt_nodeSetupCallback_t ..> urt_status_t
+$module("Configuration") {
+  !includesub config.uml!ENTITIES
+}
 
-    /' Function type to be called during loop phase of node threads. '/
-    class urt_nodeLoopCallback_t <<(T,lightblue)>> {
-      'Takes the node, a mask of occurred events and optional parameters as arguments and returns a event mask for the next iteration.
-      urt_nodeLoopCallback_t (node : urt_node_t*, events : urt_osEventMask_t, arg : void*) : urt_osEventMask_t
-    }
-    urt_nodeLoopCallback_t ..> urt_node_t
-    urt_nodeLoopCallback_t ..> urt_osEventMask_t
-    urt_nodeLoopCallback_t ..> urt_status_t
+$module("Primitives") {
+  !includesub primitives.uml!ENTITIES
+}
 
-    /' Node type. '/
-    class urt_node_t <<(S,lightgrey)>> {
-        'Pointer to the next node in a list.
-      + next : urt_node_t*
-        'Pointer to the nore thread.
-      + thread : urt_osThread_t*
-        'Callback function to be called during the setup phase.
-      + setupcallback : urt_nodeSetupCallback_t*
-        'Optional parameters for the setup callback function.
-      + setupparams : void*
-        'Callback function to be called in each loop iteration.
-      + loopcallback : urt_nodeLoopCallback_t*
-        'Optional parameters for the loop callback function.
-      + loopparams : void*
-        'Execution stage of the node.
-      + stage : urt_nodestage_t
-        'Event listener for middleware-wide control events.
-      + listener : urt_osEventListener_t
-      __
-      'The main() function of the node thread.
-      - {static} _main : urt_osThreadFunction_t
-        'Initializes an urt_node_t object.
-      + urtNodeInit (node : urt_node_t*, stacksize : size_t, setupcallback : urt_nodeSetupCallback_t*, setupparams : void*, loopcallback : urt_nodeLoopCallback_t*, loopparams : void*) : urt_status_t
-    }
-    urt_node_t "1" o-- "0..1" urt_node_t
-    urt_node_t "1" o-- "1" urt_osThread_t
-    urt_node_t "1" o-- "1" urt_nodeSetupCallback_t
-    urt_node_t "1" o-- "1" urt_nodeLoopCallback_t
-    urt_node_t "1" *-- "1" urt_nodestage_t
-    urt_node_t "1" *-- "1" urt_osEventMask_t
-    urt_node_t "1" *-- "1" urt_osEventWaitType_t
-    urt_node_t "1" *-- "1" urt_osEventListener_t
-    urt_node_t ..> urt_osThreadTerminateSignal_t
+$module("OSAL") {
+  !includesub osal.uml!ENTITIES
+}
 
-  } /' package "node" '/
+$module("Middleware") {
+  !includesub urtware.uml!ENTITIES
+}
 
-} /' package "middleware" '/
+!endsub
+
+/'### DEPENDENCIES & LAYOUT ##################################################'/
+
+!startsub DEPENDENCIES
+
+!includesub config.uml!DEPENDENCIES
+
+!includesub primitives.uml!DEPENDENCIES
+urt_nodestage_t ..> urt_config
+urt_topicid_t ..> urt_config
+urt_serviceid_t ..> urt_config
+urt_delay_t ..> urt_config
+
+!includesub osal.uml!DEPENDENCIES
+urt_osCondvar_t ..> urt_delay_t
+urt_osThread_t ..> urt_delay_t
+urt_osThread_t ..> urt_status_t
+urt_osTimer_t ..> urt_delay_t
+urt_osTimer_t ..> urt_status_t
+urt_events ..> urt_delay_t
+urt_events ..> urt_status_t
+
+!includesub urtware.uml!DEPENDENCIES
+urt_core_t "1" *-- "1" urt_osEventSource_t
+urt_core_t "1" *-- "1" urt_osMutex_t
+urt_core_t ..> urt_status_t
+urt_core_t ..> urt_nodestage_t
+urt_node_t "1" o-- "0..1" urt_osThread_t
+urt_node_t "1" *-- "1" urt_nodestage_t
+urt_node_t "1" *-- "1" urt_osEventListener_t
+urt_node_t "0..*" o-- "1" urt_osThreadFunction_t
+urt_node_t ..> urt_status_t
+urt_nodeSetupCallback_t ..> urt_osEventMask_t
+urt_nodeLoopCallback_t ..> urt_osEventMask_t
+urt_pubsub_t ..> urt_status_t
+urt_publisher_t ..> urt_config
+urt_publisher_t ..> urt_status_t
+urt_publisher_t ..> urt_delay_t
+urt_topic_t "1" *-- "1" urt_topicid_t
+urt_topic_t "1" *-- "1" urt_osMutex_t
+urt_topic_t "1" *-- "1" urt_osEventSource_t
+urt_topic_t ..> urt_config
+urt_topic_t "1" *-- "0..1" urt_osTimer_t
+urt_topic_t ..> urt_status_t
+urt_message_t "1" *-- "1" urt_osTime_t
+urt_message_t "1" *-- "1" urt_osMutex_t
+urt_message_t "1" *-- "1" urt_osCondvar_t
+urt_message_t ..> urt_config
+urt_message_t ..> urt_status_t
+urt_subscriber_t "1" *-- "1" urt_osEventListener_t
+urt_subscriber_t "1" *-- "1" urt_osTime_t
+urt_subscriber_t ..> urt_config
+urt_subscriber_t "1" *-- "0..2" urt_delay_t
+urt_subscriber_t ..> urt_status_t
+urt_hrtdata_t ..> urt_config
+urt_hrtdata_t "1" *-- "0..1" urt_osTimer_t
+urt_hrtdata_t "1" *-- "0..5" urt_delay_t
+urt_frtdata_t ..> urt_config
+urt_frtdata_t "1" *-- "0..1" urt_osTimer_t
+urt_frtdata_t "1" *-- "0..5" urt_delay_t
+urt_srtusefulnessfunc_t ..> urt_delay_t
+urt_rpc_t ..> urt_status_t
+urt_rpc_t ..> urt_serviceid_t
+urt_service_t "1" *-- "1" urt_serviceid_t
+urt_service_t "1" *-- "1" urt_osMutex_t
+urt_service_t ..> urt_config
+urt_service_t "1" *-- "0..2" urt_delay_t
+urt_service_t ..> urt_status_t
+urt_servicefunc_t ..> urt_delay_t
+urt_servicefunc_t ..> urt_status_t
+
+!endsub
+
+/'### OUTRO ##################################################################'/
 
 @enduml
 
