1 #ifndef NODESTATEMANAGER_H
2 #define NODESTATEMANAGER_H
4 /**********************************************************************************************************************
6 * Copyright (C) 2012 Continental Automotive Systems, Inc.
8 * Author: Jean-Pierre.Bogler@continental-corporation.com
10 * Interface between NodeStateManager and other components in the same process
12 * The file defines the interfaces and data types, which components in the same process or on the D-Bus
13 * can use to communicate to the NodeStateManager (NSM). Please note that there are further interfaces
14 * defined in XML to access the NSM via D-Bus.
16 * This Source Code Form is subject to the terms of the Mozilla Public
17 * License, v. 2.0. If a copy of the MPL was not distributed with this
18 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
21 * 2012.06.01 uidu5846 1.0.0.0 CSP_WZ#388: Initial version of the NodeStateManager interface
22 * 2012.09.27 uidu5846 1.1.0.0 CSP_WZ#1194: Changed file header structure and license to be released
23 * as open source package. Introduced 'NodeStateTypes.h' to
24 * avoid circle includes and encapsulate type definitions.
25 * 2012.10.24 uidu5846 1.2.0.0 CSP_WZ#1322: Changed types of interface parameters to native types.
26 * Since the same native types are used, no interface change.
28 **********************************************************************************************************************/
30 /** \ingroup SSW_LCS */
31 /** \defgroup SSW_NSM_TEMPLATE Node State Manager
34 /** \defgroup SSW_NSM_INTERFACE API document
43 /**********************************************************************************************************************
45 * HEADER FILE INCLUDES
47 **********************************************************************************************************************/
49 #include "NodeStateTypes.h"
51 /**********************************************************************************************************************
55 **********************************************************************************************************************/
58 * Module version, use SswVersion to interpret the value.
59 * The lower significant byte is equal 0 for released version only
62 #define NSM_INTERFACE_VERSION 0x01020000U
64 /**********************************************************************************************************************
68 **********************************************************************************************************************/
70 /* There are no types defined here */
72 /**********************************************************************************************************************
76 **********************************************************************************************************************/
78 /* There are no exported global variables */
81 /**********************************************************************************************************************
85 **********************************************************************************************************************/
87 /** \brief Set data (property) of the NodeStateManager.
88 \param[in] enData Type of the data to set (see ::NsmDataType_e).
89 \param[in] pData Pointer to the memory location containing the data.
90 \param[in] u32DataLen Length of the data that should be set (in byte).
91 \retval see ::NsmErrorStatus_e
93 This is a generic interface that can be used by the NSMc to write a specific data item that from the NSM. */
94 NsmErrorStatus_e NsmSetData(NsmDataType_e enData, unsigned char *pData, unsigned int u32DataLen);
97 /** \brief Get data (property) of the NodeStateManager.
98 \param[in] enData Type of the data to get (see ::NsmDataType_e).
99 \param[out] pData Pointer to the memory location where the data should be stored.
100 \param[in] u32DataLen Length of the data that should be stored (in byte).
101 \retval A positive value indicates the number of bytes that have been written to the out buffer pData.
102 A negative value indicates an error.
104 This is a generic interface that can be used by the NSMc to read a specific data item that from the NSM. */
105 int NsmGetData(NsmDataType_e enData, unsigned char *pData, unsigned int u32DataLen);
108 /** \brief Get version of the interface
109 \retval Version of the interface as defined in ::SswVersion_t
111 This function asks the lifecycle to perform a restart of the main controller. */
112 unsigned int NsmGetInterfaceVersion(void);
115 /**********************************************************************************************************************
119 **********************************************************************************************************************/
121 /* There are no macros defined */
127 /** \} */ /* End of SSW_NSM_INTERFACE */
128 /** \} */ /* End of SSW_NSM_TEMPLATE */
129 #endif /* NSM_NODESTATEMANAGER_H */