summaryrefslogtreecommitdiff
path: root/src/sensors-service/globals.h
blob: 7c2f9d076e34f3b8f01a47d99180ac19f03b31a3 (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
59
60
61
62
63
64
65
66
67
/**************************************************************************
* @licence app begin@
*
* SPDX-License-Identifier: MPL-2.0
*
* \ingroup SensorsService
* \author Marco Residori <marco.residori@xse.de>
*
* \copyright Copyright (C) 2013, 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/.
*
* @licence end@
**************************************************************************/

#ifndef GLOBALS_H
#define GLOBALS_H

#include <stdbool.h>
#include <pthread.h>
#include <time.h>

#include "sns-init.h"
#include "wheel.h"
#include "acceleration.h"
#include "gyroscope.h"
#include "vehicle-speed.h"
#include "sns-meta-data.h"

#ifdef __cplusplus
extern "C" {
#endif

extern const TSensorMetaData gSensorsMetaData[];

bool iAccelerationInit();
bool iAccelerationDestroy();
void updateAccelerationData(const TAccelerationData accelerationData[], uint16_t numElements);
void updateAccelerationStatus(const TSensorStatus* status);

bool iGyroscopeInit();
bool iGyroscopeDestroy();
void updateGyroscopeData(const TGyroscopeData gyroData[], uint16_t numElements);
void updateGyroscopeStatus(const TSensorStatus* status);


bool iWheelInit();
bool iWheelDestroy();
void updateWheelData(const TWheelData wheelData[], uint16_t numElements);
void updateWheelStatus(const TSensorStatus* status);

bool iVehicleSpeedInit();
bool iVehicleSpeedDestroy();
void updateVehicleSpeedData(const TVehicleSpeedData vehicleSpeedData[], uint16_t numElements);
void updateVehicleSpeedStatus(const TSensorStatus* status);

bool iVehicleDataInit();
bool iVehicleDataDestroy();

#ifdef __cplusplus
}
#endif

#endif /* GLOBALS_H */