Source code for dlt_hv/types.h

// SPDX-License-Identifier: MIT
#pragma once

#include <stdint.h>

#define ELOS_EB_LOG_STRING_SIZE 128
[docs][docs]/*********************************** * The log level for a DLT entry ***********************************/ typedef enum elosDltLogLevelE {
ELOS_DLT_LOGLEVEL_OFF = 1,
ELOS_DLT_LOGLEVEL_FATAL,
ELOS_DLT_LOGLEVEL_ERROR,
ELOS_DLT_LOGLEVEL_WARN,
ELOS_DLT_LOGLEVEL_INFO,
ELOS_DLT_LOGLEVEL_DEBUG,
ELOS_DLT_LOGLEVEL_DEFAULT = ELOS_DLT_LOGLEVEL_INFO,
} elosDltLogLevelE_t;
[docs][docs]/*********************************** * Represents a DLT entry * * Members: * creationTime: The time of creation of this entry as UNIX timestamp * producerId: The id for the producer of this entry * logLevel: The log level of this entry * pad: 6 bytes of padding for memory alignment * logString: The payload of the entry ***********************************/ typedef struct elosEbLogEntry {
[docs][docs] uint64_t creationTime;
[docs][docs] uint8_t producerId;
[docs][docs] uint8_t logLevel;
[docs][docs] uint8_t pad[6];
[docs][docs] char logString[ELOS_EB_LOG_STRING_SIZE];
} elosEbLogEntry_t;
[docs][docs]/*********************************** * Represents the shared memory dlt ring buffer * * Members: * idxWrite: The write index where the next entry will be written * idxRead: The read index only used at first opening of the buffer * entryCount: The number of entries in the ring buffer * pad: Some padding for memory alignment * entries: The buffer that holds the dlt entries ***********************************/ typedef struct elosEbLogRingBuffer {
[docs][docs] uint16_t idxWrite;
[docs][docs] uint16_t idxRead;
[docs][docs] uint16_t entryCount;
[docs][docs] uint16_t pad;
[docs][docs] elosEbLogEntry_t entries[];
} elosEbLogRingBuffer_t;