/' µRtWare is a lightweight publish/subscribe middleware for real-time 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..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 the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . '/ /'### INTRO ##################################################################'/ @startuml title **µRtWare**\nPrimitives !include ./functions.iuml /'### ENTITIES ###############################################################'/ !startsub ENTITIES /' Node synchronization type. '/ $type("urt_nodestage_t") { .. URT_CFG_NODESTAGE_WIDTH == 8 .. uin8_t .. URT_CFG_NODESTAGE_WIDTH == 16 .. uint16_t .. URT_CFG_NODESTAGE_WIDTH == 32 .. uint32_t .. URT_CFG_NODESTAGE_WIDTH == 64 .. uint64_t } /' Topic ID type. '/ $type("urt_topicid_t") { .. URT_CFG_PUBSUB_TOPICID_WIDTH == 8 .. uin8_t .. URT_CFG_PUBSUB_TOPICID_WIDTH == 16 .. uint16_t .. URT_CFG_PUBSUB_TOPICID_WIDTH == 32 .. uint32_t .. URT_CFG_PUBSUB_TOPICID_WIDTH == 64 .. uint64_t } /' Service ID type. '/ $type("urt_serviceid_t") { .. URT_CFG_RPC_SERVICEID_WIDTH == 8 .. uin8_t .. URT_CFG_RPC_SERVICEID_WIDTH == 16 .. uint16_t .. URT_CFG_RPC_SERVICEID_WIDTH == 32 .. uint32_t .. URT_CFG_RPC_SERVICEID_WIDTH == 64 .. uint64_t } /' Well defined error codes. '/ $enumeration("urt_status_t") { 'Staus indicating success. URT_STATUS_OK = 0 'Error status indicating a violated HRT deadline. URT_STATUS_DEADLINEVIOLATION 'Error status indicating violated HRT jitter. URT_STATUS_JITTERVIOLATION 'Error status indicating a violated HRT rate. URT_STATUS_RATEVIOLATION 'Synchronization status indicating that further nodes need to synchronize. URT_STATUS_SYNC_PENDING 'Synchronization status indicating a synchronization error. URT_STATUS_SYNC_ERROR 'Status indicating that a node's ""_main"" thread encountered an invalid event mask. URT_STATUS_NODE_INVALEVTMASK .. URT_CFG_PUBSUB_ENABLED == true .. 'Status indicating that another topic with identical ID has been found. URT_STATUS_TOPIC_DUPLICATE 'Status indicating a timeout during a urtPublisherPublish() call. URT_STATUS_PUBLISH_TIMEOUT 'Status indicating that the topic was already set. URT_STATUS_SUBSCRIBE_TOPICSET 'Status indicating that there is no associated topic. URT_STATUS_FETCH_NOTOPIC 'Status indicating that there is no (new) message. URT_STATUS_FETCH_NOMESSAGE 'Status indicating that there is no topic to unsubscribe from. URT_STATUS_UNSUBSCRIBE_NOTOPIC .. URT_CFG_RPC_ENABLED == true .. 'Status indicating that another service with identical ID has been found. URT_STATUS_SERVICE_DUPLICATE 'Status indicating that a request is not owned by the calling service. URT_STATUS_REQUEST_BADOWNER 'Status indicatting an aloready locked request. URT_STATUS_REQUEST_LOCKED } /' Temporal delay in microseconds. '/ $type("urt_delay_t") { .. URT_CFG_DELAY_WIDTH == 32 .. uint32_t .. URT_CFG_DELAY_WIDTH == 64 .. uint64_t __ 'Special value constant for no delay at all. URT_DELAY_IMMEDIATE = 0 'Special value constant for infinite delays. URT_DELAY_INFINITE = 0xF..F } /' Function type to be called when calculating the usefulness of a message or request response. '/ $function("urt_usefulness_f") { 'Takes a delay and optional parameters as arguments and returns a float in [0, 1]. urt_usefulness_f (dt : urt_delay_t, params : void*) : float } !endsub /'### DEPENDENCIES & LAYOUT ##################################################'/ !startsub DEPENDENCIES urt_usefulness_f ..> urt_delay_t !endsub /'### OUTRO ##################################################################'/ @enduml