80d7d70627ecb9c4cb1b9d84e2011b37a21b3f81
[apps/agl-service-unicens.git] / ucs2-lib / inc / ucs_rm_pb.h
1 /*------------------------------------------------------------------------------------------------*/
2 /* UNICENS V2.1.0-3491                                                                            */
3 /* Copyright (c) 2017 Microchip Technology Germany II GmbH & Co. KG.                              */
4 /*                                                                                                */
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.                                                            */
9 /*                                                                                                */
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.                                                   */
14 /*                                                                                                */
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/>.                          */
17 /*                                                                                                */
18 /* You may also obtain this software under a propriety license from Microchip.                    */
19 /* Please contact Microchip for further information.                                              */
20 /*------------------------------------------------------------------------------------------------*/
21
22 /*!
23  * \file
24  * \brief Public header file of the Routing Management.
25  * \addtogroup G_UCS_ROUTING_TYPES
26  * @{
27  */
28
29 #ifndef UCS_RM_PB_H
30 #define UCS_RM_PB_H
31
32 /*------------------------------------------------------------------------------------------------*/
33 /* Includes                                                                                       */
34 /*------------------------------------------------------------------------------------------------*/
35 #include "ucs_rm_pv.h"
36 #include "ucs_nsm_pb.h"
37
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #endif
42
43 /*------------------------------------------------------------------------------------------------*/
44 /* Definitions                                                                                    */
45 /*------------------------------------------------------------------------------------------------*/
46
47 /*------------------------------------------------------------------------------------------------*/
48 /* Enumerators                                                                                    */
49 /*------------------------------------------------------------------------------------------------*/
50 /*! \brief This enumerator specifies the type of an EndPoint object. */
51 typedef enum Ucs_Rm_EndPointType_
52 {
53     UCS_RM_EP_SOURCE = 0x00U,    /*!< \brief Specifies the source endpoint. */
54     UCS_RM_EP_SINK   = 0x01U     /*!< \brief Specifies the sink endpoint. */
55
56 } Ucs_Rm_EndPointType_t;
57
58 /*! \brief This enumerator specifies the possible route information returned via User callback function of \ref Ucs_Rm_Start(). */
59 typedef enum Ucs_Rm_RouteInfos_
60 {
61     UCS_RM_ROUTE_INFOS_BUILT          = 0x00U,     /*!< \brief Specifies that the route has been built. */
62     UCS_RM_ROUTE_INFOS_DESTROYED      = 0x01U,     /*!< \brief Specifies that the route has been destroyed. */
63     UCS_RM_ROUTE_INFOS_SUSPENDED      = 0x02U,     /*!< \brief Specifies that the route has been suspended. */
64     UCS_RM_ROUTE_INFOS_PROCESS_STOP   = 0x03U      /*!< \brief Specifies that the route cannot be processed anymore because of UNICENS Termination. */
65
66 } Ucs_Rm_RouteInfos_t;
67
68 /*------------------------------------------------------------------------------------------------*/
69 /* Structures                                                                                     */
70 /*------------------------------------------------------------------------------------------------*/
71 /*! \brief Configuration structure of a Connection EndPoint. */
72 typedef struct Ucs_Rm_EndPoint_
73 {
74     /*! \brief Type of the endpoint object. */
75     Ucs_Rm_EndPointType_t endpoint_type;
76     /*! \brief Reference to a job list. */
77     Ucs_Xrm_ResObject_t ** jobs_list_ptr;
78     /*! \brief Reference to a node object. */
79     Ucs_Rm_Node_t * node_obj_ptr;
80     /*! \brief Internal information of this endpoint object. */
81     Ucs_Rm_EndPointInt_t internal_infos;
82
83 } Ucs_Rm_EndPoint_t;
84
85 /*! \brief Configuration structure of a Route. */
86 typedef struct Ucs_Rm_Route_
87 {
88     /*! \brief Reference to a Source Endpoint object. */
89     Ucs_Rm_EndPoint_t * source_endpoint_ptr;
90     /*! \brief Reference to a Sink Endpoint object. */
91     Ucs_Rm_EndPoint_t * sink_endpoint_ptr;
92     /*! \brief Route activity. Specifies whether the route is active yet or not. */
93     uint8_t active;
94     /*! \brief User-defined route identifier. */
95     uint16_t route_id;
96     /*! \brief Internal information of the route object. */
97     Ucs_Rm_RouteInt_t internal_infos; 
98
99 } Ucs_Rm_Route_t;
100
101 #ifdef __cplusplus
102 }   /* extern "C" */
103 #endif
104
105 #endif  /* #ifndef UCS_RM_PB_H */
106
107 /*! @} */
108
109 /*------------------------------------------------------------------------------------------------*/
110 /* End of file                                                                                    */
111 /*------------------------------------------------------------------------------------------------*/
112