summaryrefslogtreecommitdiff
path: root/sensors-service/api/sns-init.h
blob: f4091667ef827aa6f4442b800b66cce4c57eea0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**************************************************************************
 * Component Name: SensorsService
 * Compliance Level: Abstract Component
 * Copyright (C) 2012, BMW Car IT GmbH, Continental Automotive GmbH, PCA Peugeot Citroën, XS Embedded GmbH
 * License:
 * This Source Code Form is subject to the terms of the
 * Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with
 * this file, You can obtain one at http://mozilla.org/MPL/2.0/.
 **************************************************************************/

#ifndef INCLUDE_GENIVI_SNS
#define INCLUDE_GENIVI_SNS

// API Version
#define GENIVI_SNS_API_MAJOR 3
#define GENIVI_SNS_API_MINOR 0
#define GENIVI_SNS_API_MICRO 0

#include <stdint.h>
#include <stdbool.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 * Initialization of the sensor service system infrastructure.
 * Must be called before using any of the sensor services to set up general structures and connections
 * to the sensors or signal providers.
 * If not called before a sensor init the system behaviour is not defined.
 * @return True if initialization has been successful.
 */
bool snsInit();

/**
 * Destroy the sensor services.
 * Must be called after using the sensor services for shut down.
 * After this call no sensor will be able to receive sensor data.
 * The individual sensors must be shut down before this call. Otherwise system behaviour is not defined.
 * @return True if shutdown has been successful.
 */
bool snsDestroy();

/**
 * Sensor services version information.
 * This information is for the sensor services system structure.
 * The version information for each sensor can be obtained via the metadata.
 * @param major Major version number. Changes in this number are used for incompatible API change.
 * @param minor Minor version number. Changes in this number are used for compatible API change.
 * @param micro Micro version number. Changes in this number are used for minor changes.
 */
void snsGetVersion(int *major, int *minor, int *micro);

#ifdef __cplusplus
}
#endif

#endif /* INCLUDE_GENIVI_SNS */