Larus glider flight sensor system 3.9.2024
Software-In-The-Loop test and validation system
Loading...
Searching...
No Matches
CANpacket Class Reference

basic CAN packet type More...

#include <generic_CAN_driver.h>

Public Member Functions

 CANpacket (uint16_t _id=0, uint16_t _dlc=0, uint64_t _data=0)
 
bool operator== (const CANpacket &right)
 

Public Attributes

uint16_t id
 identifier
 
uint16_t dlc
 data length code
 
union { 
 
   uint8_t   data_b [8] 
 data seen as 8 times uint8_t More...
 
   int8_t   data_sb [8] 
 data seen as 8 times int8_t More...
 
   uint16_t   data_h [4] 
 data seen as 4 times uint16_t More...
 
   int16_t   data_sh [4] 
 data seen as 4 times int16_t More...
 
   uint32_t   data_w [2] 
 data seen as 2 times uint32_t More...
 
   int32_t   data_sw [2] 
 data seen as 2 times int32_t More...
 
   float   data_f [2] 
 data seen as 2 times 32-bit floats More...
 
   uint64_t   data_l 
 data seen as 64-bit integer More...
 
};  
 

Detailed Description

basic CAN packet type

Definition at line 31 of file generic_CAN_driver.h.

Constructor & Destructor Documentation

◆ CANpacket()

CANpacket::CANpacket ( uint16_t  _id = 0,
uint16_t  _dlc = 0,
uint64_t  _data = 0 
)
inline

Definition at line 34 of file generic_CAN_driver.h.

Member Function Documentation

◆ operator==()

bool CANpacket::operator== ( const CANpacket right)
inline

Definition at line 39 of file generic_CAN_driver.h.

References data_l, and dlc.

Member Data Documentation

◆ [union]

union { ... } CANpacket

◆ data_b

uint8_t CANpacket::data_b[8]

data seen as 8 times uint8_t

Definition at line 49 of file generic_CAN_driver.h.

Referenced by CAN_output().

◆ data_f

float CANpacket::data_f[2]

data seen as 2 times 32-bit floats

Definition at line 55 of file generic_CAN_driver.h.

Referenced by CAN_output().

◆ data_h

uint16_t CANpacket::data_h[4]

data seen as 4 times uint16_t

Definition at line 51 of file generic_CAN_driver.h.

◆ data_l

uint64_t CANpacket::data_l

data seen as 64-bit integer

Definition at line 56 of file generic_CAN_driver.h.

Referenced by CAN_gateway_packet::CAN_gateway_packet(), CAN_socket_send(), operator==(), and CAN_gateway_packet::to_CANpacket().

◆ data_sb

int8_t CANpacket::data_sb[8]

data seen as 8 times int8_t

Definition at line 50 of file generic_CAN_driver.h.

◆ data_sh

int16_t CANpacket::data_sh[4]

data seen as 4 times int16_t

Definition at line 52 of file generic_CAN_driver.h.

◆ data_sw

int32_t CANpacket::data_sw[2]

data seen as 2 times int32_t

Definition at line 54 of file generic_CAN_driver.h.

◆ data_w

uint32_t CANpacket::data_w[2]

data seen as 2 times uint32_t

Definition at line 53 of file generic_CAN_driver.h.

Referenced by CAN_output().

◆ dlc

uint16_t CANpacket::dlc

data length code

Definition at line 46 of file generic_CAN_driver.h.

Referenced by CAN_output(), CAN_socket_send(), operator==(), and CAN_gateway_packet::to_CANpacket().

◆ id


The documentation for this class was generated from the following file: