Solaris Software
Toggle main menu visibility
Loading...
Searching...
No Matches
datalogger.h
Go to the documentation of this file.
1
/**
2
* @file datalogger.h
3
* @brief SD card packet logger service.
4
*/
5
6
#ifndef SPP_DATALOGGER_H
7
#define SPP_DATALOGGER_H
8
9
#include "
spp/core/returnTypes.h
"
10
#include "
spp/core/packet.h
"
11
#include "
spp/services/service.h
"
12
13
/* ----------------------------------------------------------------
14
* DEFINES
15
* ---------------------------------------------------------------- */
16
17
#define K_DATALOGGER_CONSUMER_PRIO (0)
18
#define K_DATALOGGER_TIMEOUT_MS (1000U)
19
#define K_DATALOGGER_SECTOR_SIZE (512U)
20
#define K_DATALOGGER_FIRST_SECTOR ((spp_uint32_t)16384U)
21
#define K_DATALOGGER_BUFFER_SIZE (2U * K_DATALOGGER_SECTOR_SIZE)
22
#define K_DATALOGGER_BUFFER_PACKETS (K_DATALOGGER_BUFFER_SIZE / K_SPP_TOTAL_PACKET_SIZE)
23
#define K_DATALOGGER_NO_PENDING (0xFFU)
24
25
/* ----------------------------------------------------------------
26
* PUBLIC FUNCTIONS
27
* ---------------------------------------------------------------- */
28
29
/**
30
* @brief Returns the datalogger consumer contract.
31
* @return Pointer to the statically allocated consumer contract.
32
*/
33
const
SPP_SERVICE_ConsumerContract_t
*
SPP_SERVICES_DATALOGGER_getConsumerContract
(
void
);
34
35
/**
36
* @brief Returns the stored SD card initialization status.
37
* @return K_SPP_ERROR_NOT_INITIALIZED before initialization,
38
* or the result returned by the storage HAL.
39
*/
40
SPP_RetVal_t
SPP_SERVICES_DATALOGGER_getInitStatus
(
void
);
41
42
#endif
/* SPP_DATALOGGER_H */
SPP_SERVICES_DATALOGGER_getConsumerContract
const SPP_SERVICE_ConsumerContract_t * SPP_SERVICES_DATALOGGER_getConsumerContract(void)
Returns the datalogger consumer contract.
Definition
datalogger.c:50
SPP_SERVICES_DATALOGGER_getInitStatus
SPP_RetVal_t SPP_SERVICES_DATALOGGER_getInitStatus(void)
Returns the stored SD card initialization status.
Definition
datalogger.c:55
packet.h
Solaris Packet Protocol (SPP) packet structure definitions.
returnTypes.h
Standard return-value type used across all SPP modules.
SPP_RetVal_t
SPP_RetVal_t
Unified return type for all SPP API functions.
Definition
returnTypes.h:24
service.h
SPP module descriptor and registry API.
SPP_SERVICE_ConsumerContract_t
Describes the contract of a consumer module. This module needs to have:
Definition
service.h:40
solaris-v2
spp
services
datalogger
datalogger.h
Generated by
1.18.0