Classes | Namespaces | Macros | Enumerations | Functions | Variables
wg_mailbox.cpp File Reference
#include "ethercat_hardware/wg_mailbox.h"
#include "ethercat_hardware/wg_util.h"
#include "dll/ethercat_device_addressed_telegram.h"
#include "ethercat_hardware/ethercat_device.h"
Include dependency graph for wg_mailbox.cpp:

Go to the source code of this file.

Classes

struct  ethercat_hardware::WG0XMbxCmd
 
struct  ethercat_hardware::WG0XMbxHdr
 

Namespaces

 ethercat_hardware
 

Macros

#define ERR_MODE   "\033[41m"
 
#define ERROR_HDR   "\033[41mERROR\033[0m"
 
#define GOOD_MODE   "\033[42m"
 
#define INFO_MODE   "\033[44m"
 
#define STD_MODE   "\033[0m"
 
#define WARN_HDR   "\033[43mERROR\033[0m"
 
#define WARN_MODE   "\033[43m"
 

Enumerations

enum  ethercat_hardware::MbxCmdType { ethercat_hardware::LOCAL_BUS_READ =1, ethercat_hardware::LOCAL_BUS_WRITE =2 }
 

Functions

struct ethercat_hardware::MotorHeatingModelParameters ethercat_hardware::__attribute__ ((__packed__))
 
bool build (unsigned address, unsigned length, MbxCmdType type, unsigned seqnum)
 
bool build (unsigned address, unsigned length, MbxCmdType type, unsigned seqnum, void const *data)
 
int ethercat_hardware::safe_clock_gettime (clockid_t clk_id, timespec *time)
 error checking wrapper around clock_gettime More...
 
void ethercat_hardware::safe_usleep (uint32_t usec)
 safe version of usleep. More...
 
int ethercat_hardware::timediff_ms (const timespec &current, const timespec &start)
 Find difference between two timespec values. More...
 
void ethercat_hardware::updateIndexAndWkc (EC_Telegram *tg, EC_Logic *logic)
 
bool verifyChecksum (void) const
 

Variables

union {
   uint16_t   command_
 
__attribute__
 
uint16_t address_
 
uint8_t checksum_
 
uint8_t data_ [MBX_DATA_SIZE]
 
WG0XMbxHdr hdr_
 
uint16_t length_
 
static const unsigned ethercat_hardware::MBX_DATA_SIZE = (MBX_SIZE - sizeof(WG0XMbxHdr) - 1)
 
static const unsigned ethercat_hardware::MBX_SIZE = 512
 
uint16_t seqnum_
 
uint16_t write_nread_
 

Macro Definition Documentation

◆ ERR_MODE

#define ERR_MODE   "\033[41m"

Definition at line 76 of file wg_mailbox.cpp.

◆ ERROR_HDR

#define ERROR_HDR   "\033[41mERROR\033[0m"

Definition at line 82 of file wg_mailbox.cpp.

◆ GOOD_MODE

#define GOOD_MODE   "\033[42m"

Definition at line 79 of file wg_mailbox.cpp.

◆ INFO_MODE

#define INFO_MODE   "\033[44m"

Definition at line 80 of file wg_mailbox.cpp.

◆ STD_MODE

#define STD_MODE   "\033[0m"

Definition at line 77 of file wg_mailbox.cpp.

◆ WARN_HDR

#define WARN_HDR   "\033[43mERROR\033[0m"

Definition at line 83 of file wg_mailbox.cpp.

◆ WARN_MODE

#define WARN_MODE   "\033[43m"

Definition at line 78 of file wg_mailbox.cpp.

Function Documentation

◆ build() [1/2]

bool __attribute__::build ( unsigned  address,
unsigned  length,
MbxCmdType  type,
unsigned  seqnum 
)

◆ build() [2/2]

bool __attribute__::build ( unsigned  address,
unsigned  length,
MbxCmdType  type,
unsigned  seqnum,
void const *  data 
)

◆ verifyChecksum()

bool __attribute__::verifyChecksum ( void  ) const

Variable Documentation

◆ __attribute__

union { ... } __attribute__

◆ address_

uint16_t address_

Definition at line 2 of file wg_mailbox.cpp.

◆ checksum_

uint8_t checksum_

Definition at line 13 of file wg_mailbox.cpp.

◆ command_

uint16_t command_

Definition at line 5 of file wg_mailbox.cpp.

◆ data_

uint8_t data_[MBX_DATA_SIZE]

Definition at line 111 of file wg_mailbox.cpp.

◆ hdr_

WG0XMbxHdr hdr_

Definition at line 110 of file wg_mailbox.cpp.

◆ length_

uint16_t length_

Definition at line 95 of file wg_mailbox.cpp.

◆ seqnum_

uint16_t seqnum_

Definition at line 96 of file wg_mailbox.cpp.

◆ write_nread_

uint16_t write_nread_

Definition at line 97 of file wg_mailbox.cpp.



ethercat_hardware
Author(s): Rob Wheeler , Derek King
autogenerated on Sun Apr 2 2023 02:44:04