Skip to content

Class CanCommunication

ClassList > CanCommunication

Public Functions

Type Name
void enableCan ()
Enable can.

Public Static Functions

Type Name
uint16_t getBroadcastPeriod ()
Get the broadcast period.
uint16_t getCanNodeAddr ()
Get the CAN node address.
uint16_t getControlPeriod ()
Get the control period.
bool getCtrlEnable ()
Get the control enable status.
float32_t getCtrlReference ()
Get the control reference value.
void setBroadcastPeriod (uint16_t time_100_ms)
Set the broadcast period.
void setCanNodeAddr (uint16_t addr)
Set the CAN node address.
void setControlPeriod (uint16_t time_100_ms)
Set the control period.
void setCtrlEnable (bool enable)
Set the control enable status.
void setCtrlReference (float32_t reference)
Set the control reference value.

Public Functions Documentation

function enableCan

Enable can.

void CanCommunication::enableCan () 


Public Static Functions Documentation

function getBroadcastPeriod

Get the broadcast period.

static uint16_t CanCommunication::getBroadcastPeriod () 

Returns:

The broadcast period in 100 ms units.


function getCanNodeAddr

Get the CAN node address.

static uint16_t CanCommunication::getCanNodeAddr () 

Returns:

The CAN node address.


function getControlPeriod

Get the control period.

static uint16_t CanCommunication::getControlPeriod () 

Returns:

The control period in 100 ms units.


function getCtrlEnable

Get the control enable status.

static bool CanCommunication::getCtrlEnable () 

Returns:

True if control is enabled, false otherwise.


function getCtrlReference

Get the control reference value.

static float32_t CanCommunication::getCtrlReference () 

Returns:

The control reference value.


function setBroadcastPeriod

Set the broadcast period.

static void CanCommunication::setBroadcastPeriod (
    uint16_t time_100_ms
) 

Parameters:

  • time_100_ms The broadcast period (in multiple of 100 ms) to set.

function setCanNodeAddr

Set the CAN node address.

static void CanCommunication::setCanNodeAddr (
    uint16_t addr
) 

Parameters:

  • addr The CAN node address to set.

function setControlPeriod

Set the control period.

static void CanCommunication::setControlPeriod (
    uint16_t time_100_ms
) 

Parameters:

  • time_100_ms The control period (in multiple of 100 ms) to set.

function setCtrlEnable

Set the control enable status.

static void CanCommunication::setCtrlEnable (
    bool enable
) 

Parameters:

  • enable True to enable control, false to disable it.

function setCtrlReference

Set the control reference value.

static void CanCommunication::setCtrlReference (
    float32_t reference
) 

Parameters:

  • reference The control reference value to set.


The documentation for this class was generated from the following file docs/core/zephyr/modules/owntech_communication/zephyr/src/CanCommunication.h