Statistics
| Branch: | Revision:

urtware / doc / classdiagrams / primitives.uml @ 17d978fe

History | View | Annotate | Download (4.267 KB)

1 4d55cea4 Thomas Schöpping
/'
2
µRtWare is a lightweight publish/subscribe middleware for real-time
3
applications. It was developed as part of the software habitat for the
4
Autonomous Mini Robot [1] (AMiRo) but can be used for other purposes as well.
5
6
Copyright (C) 2018..2020  Thomas Schöpping et al.
7
8
This program is free software: you can redistribute it and/or modify
9
it under the terms of the GNU General Public License as published by
10
the Free Software Foundation, either version 3 of the License, or
11
(at your option) any later version.
12
13
This program is distributed in the hope that it will be useful,
14
but WITHOUT ANY WARRANTY; without even the implied warranty of
15
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
GNU General Public License for more details.
17
18
You should have received a copy of the GNU General Public License
19
along with this program.  If not, see <http://www.gnu.org/licenses/>.
20
'/
21
22
/'### INTRO ##################################################################'/
23
24
@startuml
25
26
title **µRtWare**\nPrimitives
27
28 dd31cb03 Thomas Schöpping
!include ./functions.iuml
29 4d55cea4 Thomas Schöpping
30
/'### ENTITIES ###############################################################'/
31
32
!startsub ENTITIES
33
34
/' Node synchronization type. '/
35
$type("urt_nodestage_t") {
36
  .. URT_CFG_NODESTAGE_WIDTH == 8 ..
37
  uin8_t
38
  .. URT_CFG_NODESTAGE_WIDTH == 16 ..
39
  uint16_t
40
  .. URT_CFG_NODESTAGE_WIDTH == 32 ..
41
  uint32_t
42
  .. URT_CFG_NODESTAGE_WIDTH == 64 ..
43
  uint64_t
44
}
45
46
/' Topic ID type. '/
47
$type("urt_topicid_t") {
48 2d315870 Thomas Schöpping
  .. URT_CFG_PUBSUB_TOPICID_WIDTH == 8 ..
49 4d55cea4 Thomas Schöpping
  uin8_t
50 2d315870 Thomas Schöpping
  .. URT_CFG_PUBSUB_TOPICID_WIDTH == 16 ..
51 4d55cea4 Thomas Schöpping
  uint16_t
52 2d315870 Thomas Schöpping
  .. URT_CFG_PUBSUB_TOPICID_WIDTH == 32 ..
53 4d55cea4 Thomas Schöpping
  uint32_t
54 2d315870 Thomas Schöpping
  .. URT_CFG_PUBSUB_TOPICID_WIDTH == 64 ..
55 4d55cea4 Thomas Schöpping
  uint64_t
56
}
57
58
/' Service ID type. '/
59
$type("urt_serviceid_t") {
60 2d315870 Thomas Schöpping
  .. URT_CFG_RPC_SERVICEID_WIDTH == 8 ..
61 4d55cea4 Thomas Schöpping
  uin8_t
62 2d315870 Thomas Schöpping
  .. URT_CFG_RPC_SERVICEID_WIDTH == 16 ..
63 4d55cea4 Thomas Schöpping
  uint16_t
64 2d315870 Thomas Schöpping
  .. URT_CFG_RPC_SERVICEID_WIDTH == 32 ..
65 4d55cea4 Thomas Schöpping
  uint32_t
66 2d315870 Thomas Schöpping
  .. URT_CFG_RPC_SERVICEID_WIDTH == 64 ..
67 4d55cea4 Thomas Schöpping
  uint64_t
68
}
69
70
/' Well defined error codes. '/
71 dd31cb03 Thomas Schöpping
$enumeration("urt_status_t") {
72
    'Staus indicating success.
73
  URT_STATUS_OK = 0
74
    'Error status indicating a violated HRT deadline.
75
  URT_STATUS_DEADLINEVIOLATION
76
    'Error status indicating violated HRT jitter.
77
  URT_STATUS_JITTERVIOLATION
78
    'Error status indicating a violated HRT rate.
79
  URT_STATUS_RATEVIOLATION
80
    'Synchronization status indicating that further nodes need to synchronize.
81
  URT_STATUS_SYNC_PENDING
82
    'Synchronization status indicating a synchronization error.
83
  URT_STATUS_SYNC_ERROR
84
    'Status indicating that a node's ""_main"" thread encountered an invalid event mask.
85
  URT_STATUS_NODE_INVALEVTMASK
86
  .. URT_CFG_PUBSUB_ENABLED == true ..
87
    'Status indicating that another topic with identical ID has been found.
88
  URT_STATUS_TOPIC_DUPLICATE
89
    'Status indicating a timeout during a urtPublisherPublish() call.
90
  URT_STATUS_PUBLISH_TIMEOUT
91
    'Status indicating that the topic was already set.
92
  URT_STATUS_SUBSCRIBE_TOPICSET
93
    'Status indicating that there is no associated topic.
94
  URT_STATUS_FETCH_NOTOPIC
95
    'Status indicating that there is no (new) message.
96
  URT_STATUS_FETCH_NOMESSAGE
97
    'Status indicating that there is no topic to unsubscribe from.
98
  URT_STATUS_UNSUBSCRIBE_NOTOPIC
99
  .. URT_CFG_RPC_ENABLED == true ..
100
    'Status indicating that another service with identical ID has been found.
101
  URT_STATUS_SERVICE_DUPLICATE
102 2d315870 Thomas Schöpping
    'Status indicating that a request is not owned by the calling service.
103
  URT_STATUS_REQUEST_BADOWNER
104
    'Status indicatting an aloready locked request.
105
  URT_STATUS_REQUEST_LOCKED
106 4d55cea4 Thomas Schöpping
}
107
108
/' Temporal delay in microseconds. '/
109
$type("urt_delay_t") {
110
  .. URT_CFG_DELAY_WIDTH == 32 ..
111
  uint32_t
112
  .. URT_CFG_DELAY_WIDTH == 64 ..
113
  uint64_t
114 2d315870 Thomas Schöpping
  __
115
    'Special value constant for no delay at all.
116
  URT_DELAY_IMMEDIATE = 0
117
    'Special value constant for infinite delays.
118
  URT_DELAY_INFINITE = 0xF..F
119 4d55cea4 Thomas Schöpping
}
120
121 2d315870 Thomas Schöpping
/' Function type to be called when calculating the usefulness of a message or request response. '/
122
$function("urt_usefulness_f") {
123
    'Takes a delay and optional parameters as arguments and returns a float in [0, 1].
124
  urt_usefulness_f (dt : urt_delay_t, params : void*) : float
125 4d55cea4 Thomas Schöpping
}
126
127
!endsub
128
129
/'### DEPENDENCIES & LAYOUT ##################################################'/
130
131
!startsub DEPENDENCIES
132 2d315870 Thomas Schöpping
133
urt_usefulness_f ..> urt_delay_t
134
135 4d55cea4 Thomas Schöpping
!endsub
136
137
/'### OUTRO ##################################################################'/
138
139
@enduml