1 /*------------------------------------------------------------------------------------------------*/
2 /* UNICENS V2.1.0-3491 */
3 /* Copyright (c) 2017 Microchip Technology Germany II GmbH & Co. KG. */
5 /* This program is free software: you can redistribute it and/or modify */
6 /* it under the terms of the GNU General Public License as published by */
7 /* the Free Software Foundation, either version 2 of the License, or */
8 /* (at your option) any later version. */
10 /* This program is distributed in the hope that it will be useful, */
11 /* but WITHOUT ANY WARRANTY; without even the implied warranty of */
12 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
13 /* GNU General Public License for more details. */
15 /* You should have received a copy of the GNU General Public License */
16 /* along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 /* You may also obtain this software under a propriety license from Microchip. */
19 /* Please contact Microchip for further information. */
20 /*------------------------------------------------------------------------------------------------*/
24 * \brief Internal header file of the CNodeObserver class
26 * \cond UCS_INTERNAL_DOC
27 * \addtogroup G_NODEOBSERVER
31 #ifndef UCS_NODEOBSERVER_H
32 #define UCS_NODEOBSERVER_H
34 /*------------------------------------------------------------------------------------------------*/
36 /*------------------------------------------------------------------------------------------------*/
38 #include "ucs_nodedis.h"
40 #include "ucs_nodeobserver_pb.h"
47 /*------------------------------------------------------------------------------------------------*/
48 /* Internal constants */
49 /*------------------------------------------------------------------------------------------------*/
51 /*------------------------------------------------------------------------------------------------*/
53 /*------------------------------------------------------------------------------------------------*/
56 /*------------------------------------------------------------------------------------------------*/
58 /*------------------------------------------------------------------------------------------------*/
60 /*! \brief CNodeObserver Class
61 * \details Implements the NodeObserver
63 typedef struct CNodeObserver_
65 CBase *base_ptr; /*!< \brief Reference to base services */
66 CNodeDiscovery *nd_ptr; /*!< \brief Reference to node discovery */
67 CRouteManagement *rtm_ptr; /*!< \brief Reference to route management */
68 Ucs_Mgr_InitData_t init_data; /*!< \brief Initialization data describing nodes and routes*/
69 CMaskedObserver event_observer; /*!< \brief Observes init complete event */
71 Ucs_Signature_t eval_signature;
72 Ucs_Nd_CheckResult_t eval_action;
73 Ucs_Rm_Node_t *eval_node_ptr;
74 CTimer wakeup_timer; /*!< \brief Timer wakes up processing, sets current
75 * node available and restarts NodeDiscovery
80 /*------------------------------------------------------------------------------------------------*/
82 /*------------------------------------------------------------------------------------------------*/
83 extern void Nobs_Ctor(CNodeObserver *self, CBase *base_ptr, CNodeDiscovery *nd_ptr, CRouteManagement *rtm_ptr, Ucs_Mgr_InitData_t *init_ptr);
84 extern Ucs_Nd_CheckResult_t Nobs_OnNdEvaluate(void *self, Ucs_Signature_t *signature_ptr);
85 extern void Nobs_OnNdReport(void *self, Ucs_Nd_ResCode_t code, Ucs_Signature_t *signature_ptr);
91 #endif /* UCS_NODEOBSERVER_H */
98 /*------------------------------------------------------------------------------------------------*/
100 /*------------------------------------------------------------------------------------------------*/