Safe API Framework
Layered API framework for safety-related applications (ERTMS RBC reference targeting CENELEC EN 50128 SIL 4)
Toggle main menu visibility
Loading...
Searching...
No Matches
sapi_log_backend.h
Go to the documentation of this file.
1
15
#ifndef SAFEAPI_OS_LOG_BACKEND_H
16
#define SAFEAPI_OS_LOG_BACKEND_H
17
18
#include "
safeapi/oal/log/sapi_log.h
"
19
#include "
safeapi/utils/status/sapi_status.h
"
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
32
typedef
struct
sapi_log_backend_s
33
{
35
sapi_status_t
(*
init
)(void);
37
void (*
write
)(
sapi_log_level_t
level,
const
char
*tag,
const
char
*message);
38
}
sapi_log_backend_t
;
39
47
sapi_status_t
sapi_log_register_backend
(
const
sapi_log_backend_t
*backend);
48
49
#ifdef __cplusplus
50
}
51
#endif
52
53
#endif
/* SAFEAPI_OS_LOG_BACKEND_H */
54
/* LOG_BACKEND */
sapi_log_register_backend
sapi_status_t sapi_log_register_backend(const sapi_log_backend_t *backend)
Registers the backend implementation used by sapi_log_init()/ sapi_log_write() (ADR-005 section 2....
Definition
sapi_log.c:80
sapi_log_level_t
sapi_log_level_t
Log message severity, passed to sapi_log_write().
Definition
sapi_log.h:34
sapi_status_t
sapi_status_t
Common result/status codes.
Definition
sapi_status.h:27
sapi_log.h
OS Abstraction Layer - Logging/diagnostics service.
sapi_status.h
Common status/error codes returned by every Safe API Framework function. Shared across all OS Abstrac...
sapi_log_backend_t
Backend vtable: an integrator's implementation of the logging sink (ADR-005). Unlike every other OAL ...
Definition
sapi_log_backend.h:33
sapi_log_backend_t::init
sapi_status_t(*) init(void)
Backend implementation of sapi_log_init(). May be NULL.
Definition
sapi_log_backend.h:35
sapi_log_backend_t::write
void(*) write(sapi_log_level_t level, const char *tag, const char *message)
Backend implementation of sapi_log_write(). May be NULL.
Definition
sapi_log_backend.h:37
include
safeapi_backend
log
sapi_log_backend.h
Generated by
1.18.0