e7d1694b0f96d27f8eb2cc96702ce79a13768b90
[apps/agl-service-unicens.git] / ucs2-lib / inc / ucs_cmd.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 Internal header file of the Command Interpreter Add-On.
25  *
26  * \cond UCS_INTERNAL_DOC
27  * \addtogroup  G_UCS_CMD_INT
28  * @{
29  */
30
31  
32
33 #ifndef UCS_CMD_H
34 #define UCS_CMD_H
35
36 /*------------------------------------------------------------------------------------------------*/
37 /* Includes                                                                                       */
38 /*------------------------------------------------------------------------------------------------*/
39 #include "ucs_cmd_pb.h"
40 #include "ucs_base.h"
41
42
43 #ifdef __cplusplus
44 extern "C"
45 {
46 #endif
47
48
49
50
51 /*------------------------------------------------------------------------------------------------*/
52 /* Structures                                                                                     */
53 /*------------------------------------------------------------------------------------------------*/
54
55 /*! \brief   Class structure of the Command Interpreter
56  */
57 typedef struct CCmd_
58 {
59     Ucs_Cmd_MsgId_t *msg_id_tab_ptr;    /*!< \brief Pointer to table of MessageIds */ 
60
61     void *ucs_user_ptr;                 /*!< \brief User reference for API callback functions */
62
63
64 } CCmd; 
65
66
67
68
69 /*------------------------------------------------------------------------------------------------*/
70 /* Prototypes                                                                                     */
71 /*------------------------------------------------------------------------------------------------*/
72 void Cmd_Ctor(CCmd *self, CBase *base_ptr);
73 Ucs_Cmd_Return_t Cmd_AddMsgIdTable(CCmd *self, Ucs_Cmd_MsgId_t *msg_id_tab_ptr);
74 Ucs_Cmd_Return_t Cmd_RemoveMsgIdTable(CCmd *self);
75 Ucs_Cmd_Return_t Cmd_DecodeMsg(CCmd *self, Ucs_AmsRx_Msg_t *msg_rx_ptr);
76
77
78
79 #ifdef __cplusplus
80 }   /* extern "C" */
81 #endif
82
83 /*!
84  * @}
85  * \endcond
86  */
87
88 #endif  /* #ifndef UCS_CMD_H */
89
90 /*------------------------------------------------------------------------------------------------*/
91 /* End of file                                                                                    */
92 /*------------------------------------------------------------------------------------------------*/
93