RKH
Loading...
Searching...
No Matches
rkhfwk_pubsub.h
Go to the documentation of this file.
1/*
2 * --------------------------------------------------------------------------
3 *
4 * Framework RKH
5 * -------------
6 *
7 * State-machine framework for reactive embedded systems
8 *
9 * Copyright (C) 2010 Leandro Francucci.
10 * All rights reserved. Protected by international copyright laws.
11 *
12 *
13 * RKH is free software: you can redistribute it and/or modify it under the
14 * terms of the GNU General Public License as published by the Free Software
15 * Foundation, either version 3 of the License, or (at your option) any
16 * later version.
17 *
18 * RKH is distributed in the hope that it will be useful, but WITHOUT ANY
19 * WARRANTY; without even the implied warranty of MERCHANTABILITY or
20 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
21 * more details.
22 *
23 * You should have received a copy of the GNU General Public License along
24 * with RKH, see copying.txt file.
25 *
26 * Contact information:
27 * RKH site: http://vortexmakes.com/que-es/
28 * RKH GitHub: https://github.com/vortexmakes/RKH
29 * RKH Sourceforge: https://sourceforge.net/projects/rkh-reactivesys/
30 * e-mail: lf@vortexmakes.com
31 * ---------------------------------------------------------------------------
32 */
33
58/* -------------------------- Development history -------------------------- */
59/*
60 * 2018.08.06 LeFr v3.1.00 Initial version
61 */
62
63/* -------------------------------- Authors -------------------------------- */
64/*
65 * LeFr Leandro Francucci lf@vortexmakes.com
66 */
67
68/* --------------------------------- Notes --------------------------------- */
69/* --------------------------------- Module -------------------------------- */
70#ifndef __RKHFWK_PUBSUB_H__
71#define __RKHFWK_PUBSUB_H__
72
73/* ----------------------------- Include files ----------------------------- */
74#include "rkhitl.h"
75
76/* ---------------------- External C language linkage ---------------------- */
77#ifdef __cplusplus
78extern "C" {
79#endif
80
81/* --------------------------------- Macros -------------------------------- */
82/* -------------------------------- Constants ------------------------------ */
83/* ------------------------------- Data types ------------------------------ */
84/* -------------------------- External variables --------------------------- */
85/* -------------------------- Function prototypes -------------------------- */
93void rkh_pubsub_init(void);
94
108void rkh_pubsub_subscribe(rui8_t channel, const RKH_SMA_T *ao);
109
119void rkh_pubsub_unsubscribe(rui8_t channel, const RKH_SMA_T *ao);
120
129
145rui8_t rkh_pubsub_publish(rui8_t channel, RKH_EVT_T *event,
146 const void *const sender);
147
148/* -------------------- External C language linkage end -------------------- */
149#ifdef __cplusplus
150}
151#endif
152
153/* ------------------------------ Module end ------------------------------- */
154#endif
155
156/* ------------------------------ End of file ------------------------------ */
rui8_t rkh_pubsub_publish(rui8_t channel, RKH_EVT_T *event, const void *const sender)
void rkh_pubsub_subscribe(rui8_t channel, const RKH_SMA_T *ao)
Adds an active object to the notification list of an event channel. Each subscription registers a cli...
void rkh_pubsub_unsubscribeAll(const RKH_SMA_T *ao)
Unsubscribes an active object from all topics.
void rkh_pubsub_unsubscribe(rui8_t channel, const RKH_SMA_T *ao)
Unsubscribes an active object from topic.
void rkh_pubsub_init(void)
Encapsulates the initialization of publish-subscribe module.
RKH engine interface.This header file is directly included in RKH interface file, rkh....
Represents events without parameters.
Definition rkhevt.h:170
Describes the SMA (active object in UML).
Definition rkhsma.h:772