Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.
Path: blob/master/libraries/AP_CANManager/LogStructure.h
Views: 1798
#pragma once1/*2log structures for AP_CANManager3*/45#include <AP_Logger/LogStructure.h>6#include "AP_CANManager_config.h"78#define LOG_IDS_FROM_CANMANAGER \9LOG_CANF_MSG, \10LOG_CAFD_MSG1112// @LoggerMessage: CANF13// @Description: CAN Frame14// @Field: TimeUS: Time since system startup15// @Field: Bus: bus number16// @Field: Id: frame identifier17// @Field: DLC: data length code18// @Field: B0: byte 019// @Field: B1: byte 120// @Field: B2: byte 221// @Field: B3: byte 322// @Field: B4: byte 423// @Field: B5: byte 524// @Field: B6: byte 625// @Field: B7: byte 726struct PACKED log_CANF {27LOG_PACKET_HEADER;28uint64_t time_us;29uint8_t bus;30uint32_t id;31uint8_t dlc;32uint8_t data[8];33};3435// @LoggerMessage: CAFD36// @Description: CANFD Frame37// @Field: TimeUS: Time since system startup38// @Field: Bus: bus number39// @Field: Id: frame identifier40// @Field: DLC: data length code41// @Field: D0: data 042// @Field: D1: data 143// @Field: D2: data 244// @Field: D3: data 345// @Field: D4: data 446// @Field: D5: data 547// @Field: D6: data 648// @Field: D7: data 749struct PACKED log_CAFD {50LOG_PACKET_HEADER;51uint64_t time_us;52uint8_t bus;53uint32_t id;54uint8_t dlc;55uint64_t data[8];56};5758#if AP_CAN_LOGGING_ENABLED59#define LOG_STRUCTURE_FROM_CANMANAGER \60{ LOG_CANF_MSG, sizeof(log_CANF), \61"CANF", \62"Q" "B" "I" "B" "B" "B" "B" "B" "B" "B" "B" "B", \63"TimeUS," "Bus," "Id," "DLC," "B0," "B1," "B2," "B3," "B4," "B5," "B6," "B7", \64"s" "#" "-" "-" "-" "-" "-" "-" "-" "-" "-" "-", \65"F" "-" "-" "-" "-" "-" "-" "-" "-" "-" "-" "-", \66false \67}, \68{ LOG_CAFD_MSG, sizeof(log_CAFD), \69"CAFD", \70"Q" "B" "I" "B" "Q" "Q" "Q" "Q" "Q" "Q" "Q" "Q", \71"TimeUS," "Bus," "Id," "DLC," "D0," "D1," "D2," "D3," "D4," "D5," "D6," "D7", \72"s" "#" "-" "-" "-" "-" "-" "-" "-" "-" "-" "-", \73"F" "-" "-" "-" "-" "-" "-" "-" "-" "-" "-" "-", \74false \75},76#else77#define LOG_STRUCTURE_FROM_CANMANAGER78#endif // AP_CAN_LOGGING_ENABLED798081