HardFOC Core
API reference
Loading...
Searching...
No Matches
Functions
HfUtilsCanOpenBridge.hpp File Reference

Convert CanOpen::CanFrame ↔ hf_can_message_t for BaseCan I/O. More...

#include "CanFrame.h"
#include "base/BaseCan.h"
#include <algorithm>
#include <cstring>

Go to the source code of this file.

Functions

void HfUtilsCanFrameToMessage (const CanOpen::CanFrame &c, hf_can_message_t &m) noexcept
 
void HfUtilsMessageToCanFrame (const hf_can_message_t &m, CanOpen::CanFrame &c) noexcept
 

Detailed Description

Convert CanOpen::CanFrame ↔ hf_can_message_t for BaseCan I/O.

Lives in hf-core (not hf-utils-canopen) so hf-utils-canopen stays free of BaseCan / hardware message types. Include when linking CANopen helpers to TWAI.

Function Documentation

◆ HfUtilsCanFrameToMessage()

void HfUtilsCanFrameToMessage ( const CanOpen::CanFrame &  c,
hf_can_message_t &  m 
)
inlinenoexcept

◆ HfUtilsMessageToCanFrame()

void HfUtilsMessageToCanFrame ( const hf_can_message_t &  m,
CanOpen::CanFrame &  c 
)
inlinenoexcept