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 Public header file of the Extended Resource Manager.
25 * \cond UCS_INTERNAL_DOC
33 /*------------------------------------------------------------------------------------------------*/
35 /*------------------------------------------------------------------------------------------------*/
36 #include "ucs_epm_pv.h"
44 /*------------------------------------------------------------------------------------------------*/
46 /*------------------------------------------------------------------------------------------------*/
47 /*! \brief This enumerator specifies the kind of result - Internal, Target or Transmission. */
48 typedef enum Ucs_Rm_RouteState_
50 UCS_RM_ROUTE_IDLE = 0x00U, /*!< \brief Specifies that the Route is in idle state, i.e. not handled yet. */
51 UCS_RM_ROUTE_CONSTRUCTION = 0x01U, /*!< \brief Specifies that the Route is under Construction. */
52 UCS_RM_ROUTE_BUILT = 0x02U, /*!< \brief Specifies that the Route is built. */
53 UCS_RM_ROUTE_DETERIORATED = 0x03U, /*!< \brief Specifies that the Route is Deteriorated. */
54 UCS_RM_ROUTE_DESTRUCTION = 0x04U, /*!< \brief Specifies that the Route is under Destruction. */
55 UCS_RM_ROUTE_SUSPENDED = 0x05U /*!< \brief Specifies that the Route is Suspended. */
57 } Ucs_Rm_RouteState_t;
59 /*! \brief This enumerator specifies the kind of result - Internal, Target or Transmission. */
60 typedef enum Ucs_Rm_RouteResult_
62 UCS_RM_ROUTE_NOERROR = 0x00U, /*!< \brief Specifies that the result is error free. */
63 UCS_RM_ROUTE_UNCRITICAL = 0x01U, /*!< \brief Specifies that the result is uncritical. A retry is necessary. */
64 UCS_RM_ROUTE_CRITICAL = 0x02U /*!< \brief Specifies that the result is critical. No retry necessary. */
66 } Ucs_Rm_RouteResult_t;
68 /*------------------------------------------------------------------------------------------------*/
70 /*------------------------------------------------------------------------------------------------*/
71 /* Rtm_Inst_t requires incomplete forward declaration, to hide internal data type.
72 * The Rtm_Inst_t object is allocated internally, the core library must access only the pointer to Rtm_Inst_t. */
75 /*!\brief RouteManagement instance */
76 typedef struct Rtm_Inst_ Rtm_Inst_t;
78 /*! \brief Internal configuration structure of a Route. */
79 typedef struct Ucs_Rm_RouteInt_
81 /*! \brief Specifies the RTM instance that manages this route. */
82 Rtm_Inst_t * rtm_inst;
83 /*! \brief Specifies the route state. */
84 Ucs_Rm_RouteState_t route_state;
85 /*! \brief Specifies the last route result. */
86 Ucs_Rm_RouteResult_t last_route_result;
87 /*! \brief Specifies the observer object for source endpoint. */
88 CObserver source_ep_observer;
89 /*! \brief Specifies whether the sink observer object is initialized or not. */
90 uint8_t sink_obsvr_initialized;
91 /*! \brief Specifies whether the source observer object is initialized or not. */
92 uint8_t src_obsvr_initialized;
93 /*! \brief Specifies whether or not the UCS termination has been notified for this route. */
94 uint8_t notify_termination;
95 /*! \brief Specifies the observer object for sink endpoint. */
96 CObserver sink_ep_observer;
104 #endif /* #ifndef UCS_RTM_PV_H */
113 /*------------------------------------------------------------------------------------------------*/
115 /*------------------------------------------------------------------------------------------------*/