urtware / inc / urt_message.h @ 03ed5026
History | View | Annotate | Download (3.11 KB)
| 1 | 1fb06240 | skenneweg | /*
|
|---|---|---|---|
| 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 | 7d9678db | skenneweg | #include <urtware.h> |
| 26 | |||
| 27 | 1fb06240 | skenneweg | /******************************************************************************/
|
| 28 | /* CONSTANTS */
|
||
| 29 | /******************************************************************************/
|
||
| 30 | |||
| 31 | /******************************************************************************/
|
||
| 32 | /* SETTINGS */
|
||
| 33 | /******************************************************************************/
|
||
| 34 | |||
| 35 | /******************************************************************************/
|
||
| 36 | /* CHECKS */
|
||
| 37 | /******************************************************************************/
|
||
| 38 | |||
| 39 | /******************************************************************************/
|
||
| 40 | /* DATA STRUCTURES AND TYPES */
|
||
| 41 | /******************************************************************************/
|
||
| 42 | |||
| 43 | 7d9678db | skenneweg | /**
|
| 44 | * @brief message
|
||
| 45 | */
|
||
| 46 | typedef struct urt_message |
||
| 47 | {
|
||
| 48 | cd21e832 | skenneweg | urt_message_t* next; |
| 49 | void* payload;
|
||
| 50 | urt_osTime_t originTime; |
||
| 51 | unsigned int numHrtConsumersLeft; |
||
| 52 | #if (URT_CFG_PUBSUB_PROFILING)
|
||
| 53 | unsigned int numConsumersLeft; |
||
| 54 | #endif /* URT_CFG_PUBSUB_PROFILING */ |
||
| 55 | 7d9678db | skenneweg | }urt_message_t; |
| 56 | |||
| 57 | 1fb06240 | skenneweg | /******************************************************************************/
|
| 58 | /* MACROS */
|
||
| 59 | /******************************************************************************/
|
||
| 60 | |||
| 61 | /******************************************************************************/
|
||
| 62 | /* EXTERN DECLARATIONS */
|
||
| 63 | /******************************************************************************/
|
||
| 64 | |||
| 65 | 7d9678db | skenneweg | #if defined(__cplusplus)
|
| 66 | extern "C" { |
||
| 67 | #endif /* defined(__cplusplus) */ |
||
| 68 | |||
| 69 | cd21e832 | skenneweg | void urtMessageInit(urt_message_t* message, void* payload); |
| 70 | 7d9678db | skenneweg | #if defined(__cplusplus)
|
| 71 | } |
||
| 72 | #endif /* defined(__cplusplus) */ |
||
| 73 | |||
| 74 | 1fb06240 | skenneweg | /******************************************************************************/
|
| 75 | /* INLINE FUNCTIONS */
|
||
| 76 | /******************************************************************************/
|
||
| 77 | |||
| 78 | #endif /* URTWARE_MESSAGE_H */ |