4 * Copyright (C) 2017 Microchip Technology Germany II GmbH & Co. KG
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 * You may also obtain this software under a propriety license from Microchip.
20 * Please contact Microchip for further information.
34 /** Structure holding informations to startup Unicens (UCS).
35 * Pass all these variables to the UCS manager structure, but not pInternal.
39 /** The amount of bytes assigned to the async channel*/
41 /** Array of routes */
42 Ucs_Rm_Route_t *pRoutes;
43 /** Route array size */
47 /** Node array size */
49 /** Internal data, to be ignored */
53 /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
55 /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
58 * \brief Initializes Unicens XML parser module, parses the given string and
59 * generate the data needed to run Unicens (UCS) library.
61 * \note In case of errors the callback UcsXml_CB_OnError will be raised.
62 * \param xmlString - Zero terminated XML string. The string will not be used
63 * after this function call.
64 * \return Structure holding the needed data for UCS. NULL, if there was an error.
65 * The structure will be created dynamically, to free the data call UcsXml_FreeVal.
67 UcsXmlVal_t *UcsXml_Parse(const char *xmlString);
70 * \brief Frees the given structure, generated by UcsXml_Parse.
72 * \note In case of errors the callback UcsXml_CB_OnError will be raised.
73 * \param val - The structure to be freed.
75 void UcsXml_FreeVal(UcsXmlVal_t *val);
77 /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
78 /* CALLBACK SECTION */
79 /*>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
82 * \brief Callback whenever a parser error occurs. The message is human readable.
83 * \note This function must be implemented by the integrator.
85 * \param format - Zero terminated format string (following printf rules)
86 * \param vargsCnt - Amount of parameters stored in "..."
88 extern void UcsXml_CB_OnError(const char format[], uint16_t vargsCnt, ...);
94 #endif /* UCSXML_H_ */