Revision 1fb06240
README.txt | ||
---|---|---|
2 | 2 |
applications. It was developed as part of the software habitat for the |
3 | 3 |
Autonomous Mini Robot [1] (AMiRo) but can be used for other purposes as well. |
4 | 4 |
|
5 |
Copyright (C) 2018..2019 Thomas Schöpping et al.
|
|
5 |
Copyright (C) 2018..2020 Thomas Schöpping et al.
|
|
6 | 6 |
(a complete list of all authors is given below) |
7 | 7 |
|
8 | 8 |
This program is free software: you can redistribute it and/or modify |
... | ... | |
25 | 25 |
Authors: |
26 | 26 |
- Thomas Schöpping <tschoepp[at]cit-ec.uni-bielefeld.de> |
27 | 27 |
- Marc Rothmann <mrothmann[at]techfak.uni-bielefeld.de> |
28 |
- Svenja Kenneweg <skenneweg[at]techfak.uni-bielefeld.de> |
|
28 | 29 |
|
29 | 30 |
References: |
30 | 31 |
[1] S. Herbrechtsmeier, T. Korthals, T. Schopping and U. Rückert, "AMiRo: A |
inc/urt_confcheck.h | ||
---|---|---|
3 | 3 |
applications. It was developed as part of the software habitat for the |
4 | 4 |
Autonomous Mini Robot [1] (AMiRo) but can be used for other purposes as well. |
5 | 5 |
|
6 |
Copyright (C) 2018..2019 Thomas Schöpping et al.
|
|
6 |
Copyright (C) 2018..2020 Thomas Schöpping et al.
|
|
7 | 7 |
|
8 | 8 |
This program is free software: you can redistribute it and/or modify |
9 | 9 |
it under the terms of the GNU General Public License as published by |
inc/urt_core.h | ||
---|---|---|
1 |
/* |
|
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 |
#ifndef URTWARE_CORE_H |
|
23 |
#define URTWARE_CORE_H |
|
24 |
|
|
25 |
/******************************************************************************/ |
|
26 |
/* CONSTANTS */ |
|
27 |
/******************************************************************************/ |
|
28 |
|
|
29 |
/******************************************************************************/ |
|
30 |
/* SETTINGS */ |
|
31 |
/******************************************************************************/ |
|
32 |
|
|
33 |
/******************************************************************************/ |
|
34 |
/* CHECKS */ |
|
35 |
/******************************************************************************/ |
|
36 |
|
|
37 |
/******************************************************************************/ |
|
38 |
/* DATA STRUCTURES AND TYPES */ |
|
39 |
/******************************************************************************/ |
|
40 |
|
|
41 |
/******************************************************************************/ |
|
42 |
/* MACROS */ |
|
43 |
/******************************************************************************/ |
|
44 |
|
|
45 |
/******************************************************************************/ |
|
46 |
/* EXTERN DECLARATIONS */ |
|
47 |
/******************************************************************************/ |
|
48 |
|
|
49 |
/******************************************************************************/ |
|
50 |
/* INLINE FUNCTIONS */ |
|
51 |
/******************************************************************************/ |
|
52 |
|
|
53 |
#endif /* URTWARE_CORE_H */ |
inc/urt_message.h | ||
---|---|---|
1 |
/* |
|
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 |
#ifndef URTWARE_MESSAGE_H |
|
23 |
#define URTWARE_MESSAGE_H |
|
24 |
|
|
25 |
/******************************************************************************/ |
|
26 |
/* CONSTANTS */ |
|
27 |
/******************************************************************************/ |
|
28 |
|
|
29 |
/******************************************************************************/ |
|
30 |
/* SETTINGS */ |
|
31 |
/******************************************************************************/ |
|
32 |
|
|
33 |
/******************************************************************************/ |
|
34 |
/* CHECKS */ |
|
35 |
/******************************************************************************/ |
|
36 |
|
|
37 |
/******************************************************************************/ |
|
38 |
/* DATA STRUCTURES AND TYPES */ |
|
39 |
/******************************************************************************/ |
|
40 |
|
|
41 |
/******************************************************************************/ |
|
42 |
/* MACROS */ |
|
43 |
/******************************************************************************/ |
|
44 |
|
|
45 |
/******************************************************************************/ |
|
46 |
/* EXTERN DECLARATIONS */ |
|
47 |
/******************************************************************************/ |
|
48 |
|
|
49 |
/******************************************************************************/ |
|
50 |
/* INLINE FUNCTIONS */ |
|
51 |
/******************************************************************************/ |
|
52 |
|
|
53 |
#endif /* URTWARE_MESSAGE_H */ |
inc/urt_node.h | ||
---|---|---|
1 |
/* |
|
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 |
#ifndef URTWARE_NODE_H |
|
23 |
#define URTWARE_NODE_H |
|
24 |
|
|
25 |
/******************************************************************************/ |
|
26 |
/* CONSTANTS */ |
|
27 |
/******************************************************************************/ |
|
28 |
|
|
29 |
/******************************************************************************/ |
|
30 |
/* SETTINGS */ |
|
31 |
/******************************************************************************/ |
|
32 |
|
|
33 |
/******************************************************************************/ |
|
34 |
/* CHECKS */ |
|
35 |
/******************************************************************************/ |
|
36 |
|
|
37 |
/******************************************************************************/ |
|
38 |
/* DATA STRUCTURES AND TYPES */ |
|
39 |
/******************************************************************************/ |
|
40 |
|
|
41 |
/******************************************************************************/ |
|
42 |
/* MACROS */ |
|
43 |
/******************************************************************************/ |
|
44 |
|
|
45 |
/******************************************************************************/ |
|
46 |
/* EXTERN DECLARATIONS */ |
|
47 |
/******************************************************************************/ |
|
48 |
|
|
49 |
/******************************************************************************/ |
|
50 |
/* INLINE FUNCTIONS */ |
|
51 |
/******************************************************************************/ |
|
52 |
|
|
53 |
#endif /* URTWARE_NODE_H */ |
inc/urt_publisher.h | ||
---|---|---|
1 |
/* |
|
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 |
#ifndef URTWARE_PUBLISHER_H |
|
23 |
#define URTWARE_PUBLISHER_H |
|
24 |
|
|
25 |
/******************************************************************************/ |
|
26 |
/* CONSTANTS */ |
|
27 |
/******************************************************************************/ |
|
28 |
|
|
29 |
/******************************************************************************/ |
|
30 |
/* SETTINGS */ |
|
31 |
/******************************************************************************/ |
|
32 |
|
|
33 |
/******************************************************************************/ |
|
34 |
/* CHECKS */ |
|
35 |
/******************************************************************************/ |
|
36 |
|
|
37 |
/******************************************************************************/ |
|
38 |
/* DATA STRUCTURES AND TYPES */ |
|
39 |
/******************************************************************************/ |
|
40 |
|
|
41 |
/******************************************************************************/ |
|
42 |
/* MACROS */ |
|
43 |
/******************************************************************************/ |
|
44 |
|
|
45 |
/******************************************************************************/ |
|
46 |
/* EXTERN DECLARATIONS */ |
|
47 |
/******************************************************************************/ |
|
48 |
|
|
49 |
/******************************************************************************/ |
|
50 |
/* INLINE FUNCTIONS */ |
|
51 |
/******************************************************************************/ |
|
52 |
|
|
53 |
#endif /* URTWARE_PUBLISHER_H */ |
inc/urt_service.h | ||
---|---|---|
1 |
/* |
|
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 |
#ifndef URTWARE_SERVICE_H |
|
23 |
#define URTWARE_SERVICE_H |
|
24 |
|
|
25 |
/******************************************************************************/ |
|
26 |
/* CONSTANTS */ |
|
27 |
/******************************************************************************/ |
|
28 |
|
|
29 |
/******************************************************************************/ |
|
30 |
/* SETTINGS */ |
|
31 |
/******************************************************************************/ |
|
32 |
|
|
33 |
/******************************************************************************/ |
|
34 |
/* CHECKS */ |
|
35 |
/******************************************************************************/ |
|
36 |
|
|
37 |
/******************************************************************************/ |
|
38 |
/* DATA STRUCTURES AND TYPES */ |
|
39 |
/******************************************************************************/ |
|
40 |
|
|
41 |
/******************************************************************************/ |
|
42 |
/* MACROS */ |
|
43 |
/******************************************************************************/ |
|
44 |
|
|
45 |
/******************************************************************************/ |
|
46 |
/* EXTERN DECLARATIONS */ |
|
47 |
/******************************************************************************/ |
|
48 |
|
|
49 |
/******************************************************************************/ |
|
50 |
/* INLINE FUNCTIONS */ |
|
51 |
/******************************************************************************/ |
|
52 |
|
|
53 |
#endif /* URTWARE_SERVICE_H */ |
inc/urt_subscriber.h | ||
---|---|---|
1 |
/* |
|
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 |
#ifndef URTWARE_SUBSCRIBER_H |
|
23 |
#define URTWARE_SUBSCRIBER_H |
|
24 |
|
|
25 |
#include <urt_types.h> |
|
26 |
|
|
27 |
/******************************************************************************/ |
|
28 |
/* CONSTANTS */ |
|
29 |
/******************************************************************************/ |
|
30 |
|
|
31 |
/******************************************************************************/ |
|
32 |
/* SETTINGS */ |
|
33 |
/******************************************************************************/ |
|
34 |
|
|
35 |
/******************************************************************************/ |
|
36 |
/* CHECKS */ |
|
37 |
/******************************************************************************/ |
|
38 |
|
|
39 |
/******************************************************************************/ |
|
40 |
/* DATA STRUCTURES AND TYPES */ |
|
41 |
/******************************************************************************/ |
|
42 |
|
|
43 |
/** |
|
44 |
* @brief Base subscriber |
|
45 |
* @details The base subscriber is included in each specialized subscriber |
|
46 |
*/ |
|
47 |
typedef struct urt_basesubscriber |
|
48 |
{ |
|
49 |
urt_topic_t* topic; |
|
50 |
urt_osEventListener_t evtListener; |
|
51 |
urt_message_t* lastMessage; |
|
52 |
urt_osTime_t lastMessageTime; |
|
53 |
#if (URT_CFG_PUBSUB_PROFILING) |
|
54 |
uint64_t sumLatencies; |
|
55 |
uint64_t numMessagesReceived; |
|
56 |
#endif /* URT_CFG_PUBSUB_PROFILING */ |
|
57 |
}urt_basesubscriber_t; |
|
58 |
|
|
59 |
/** |
|
60 |
* @brief nrt subscriber |
|
61 |
*/ |
|
62 |
typedef struct urt_nrtsubscriber |
|
63 |
{ |
|
64 |
urt_basesubscriber_t base; |
|
65 |
#if (URT_CFG_PUBSUB_PROFILING) |
|
66 |
urt_delay_t minLatency; |
|
67 |
urt_delay_t maxLatency; |
|
68 |
#endif /* URT_CFG_PUBSUB_PROFILING */ |
|
69 |
}urt_nrtsubscriber_t; |
|
70 |
|
|
71 |
/** |
|
72 |
* @brief nrt subscriber |
|
73 |
*/ |
|
74 |
typedef struct urt_srtsubscriber |
|
75 |
{ |
|
76 |
urt_basesubscriber_t base; |
|
77 |
urt_srtusefulnessfunc_t* usefulnesscb; |
|
78 |
#if (URT_CFG_PUBSUB_PROFILING) |
|
79 |
urt_delay_t minLatency; |
|
80 |
urt_delay_t maxLatency; |
|
81 |
#endif /* URT_CFG_PUBSUB_PROFILING */ |
|
82 |
}urt_srtsubscriber_t; |
|
83 |
|
|
84 |
/** |
|
85 |
* @brief nrt subscriber |
|
86 |
*/ |
|
87 |
typedef struct urt_frtsubscriber |
|
88 |
{ |
|
89 |
urt_basesubscriber_t base; |
|
90 |
#if (URT_CFG_PUBSUB_QOS_DEADLINECHECKS) |
|
91 |
urt_delay_t deadlineOffset; |
|
92 |
#endif /* URT_CFG_PUBSUB_QOS_DEADLINECHECKS */ |
|
93 |
#if (URT_CFG_PUBSUB_QOS_JITTERCHECKS) |
|
94 |
urt_delay_t maxJitter; |
|
95 |
#endif /* URT_CFG_PUBSUB_QOS_JITTERCHECKS */ |
|
96 |
#if (URT_CFG_PUBSUB_QOS_JITTERCHECKS || URT_CFG_PUBSUB_PROFILING) |
|
97 |
urt_delay_t minLatency; |
|
98 |
urt_delay_t maxLatency; |
|
99 |
#endif /* URT_CFG_PUBSUB_QOS_JITTERCHECKS || URT_CFG_PUBSUB_PROFILING */ |
|
100 |
}urt_frtsubscriber_t; |
|
101 |
|
|
102 |
/** |
|
103 |
* @brief nrt subscriber |
|
104 |
*/ |
|
105 |
typedef struct urt_hrtsubscriber |
|
106 |
{ |
|
107 |
urt_basesubscriber_t base; |
|
108 |
urt_hrtsubscriber_t* next; |
|
109 |
#if (URT_CFG_PUBSUB_QOS_DEADLINECHECKS) |
|
110 |
urt_delay_t deadlineOffset; |
|
111 |
urt_osTimer_t qosDeadlineTimer; |
|
112 |
#endif /* URT_CFG_PUBSUB_QOS_DEADLINECHECKS */ |
|
113 |
#if (URT_CFG_PUBSUB_QOS_JITTERCHECKS) |
|
114 |
urt_delay_t maxJitter; |
|
115 |
#endif /* URT_CFG_PUBSUB_QOS_JITTERCHECKS */ |
|
116 |
#if (URT_CFG_PUBSUB_QOS_JITTERCHECKS || URT_CFG_PUBSUB_PROFILING) |
|
117 |
urt_delay_t minLatency; |
|
118 |
urt_delay_t maxLatency; |
|
119 |
#endif /* URT_CFG_PUBSUB_QOS_JITTERCHECKS || URT_CFG_PUBSUB_PROFILING */ |
|
120 |
#if (URT_CFG_PUBSUB_QOS_RATECHECKS) |
|
121 |
urt_delay_t expectedRate; |
|
122 |
#endif /* URT_CFG_PUBSUB_QOS_RATECHECKS */ |
|
123 |
}urt_hrtsubscriber_t; |
|
124 |
|
|
125 |
/******************************************************************************/ |
|
126 |
/* MACROS */ |
|
127 |
/******************************************************************************/ |
|
128 |
|
|
129 |
/******************************************************************************/ |
|
130 |
/* EXTERN DECLARATIONS */ |
|
131 |
/******************************************************************************/ |
|
132 |
|
|
133 |
#if defined(__cplusplus) |
|
134 |
extern "C" { |
|
135 |
#endif /* defined(__cplusplus) */ |
|
136 |
|
|
137 |
void urtNrtSubscriberInit(); |
|
138 |
urt_status_t urtNrtSubscriberSubscribe(); |
|
139 |
urt_status_t urtNrtSubscriberFetchNextMessage(); |
|
140 |
urt_status_t urtNrtSubscriberFetchLatestMessage(); |
|
141 |
urt_status_t urtNrtSubscriberUnsubscribe(); |
|
142 |
|
|
143 |
void urtSrtSubscriberInit(); |
|
144 |
urt_status_t urtSrtSubscriberSubscribe(); |
|
145 |
urt_status_t urtSrtSubscriberFetchNextMessage(); |
|
146 |
urt_status_t urtSrtSubscriberFe |