CANopenNode
CANopen protocol stack
Data Structures | Enumerations | Functions
CO_HBconsumer.h File Reference

CANopen Heartbeat consumer protocol. More...

#include "301/CO_driver.h"
#include "301/CO_ODinterface.h"
#include "301/CO_NMT_Heartbeat.h"
#include "301/CO_Emergency.h"
+ Include dependency graph for CO_HBconsumer.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CO_HBconsNode_t
 One monitored node inside CO_HBconsumer_t. More...
 
struct  CO_HBconsumer_t
 Heartbeat consumer object. More...
 

Enumerations

enum  CO_HBconsumer_state_t { CO_HBconsumer_UNCONFIGURED = 0x00U , CO_HBconsumer_UNKNOWN = 0x01U , CO_HBconsumer_ACTIVE = 0x02U , CO_HBconsumer_TIMEOUT = 0x03U }
 Heartbeat state of a node. More...
 

Functions

CO_ReturnError_t CO_HBconsumer_init (CO_HBconsumer_t *HBcons, CO_EM_t *em, CO_HBconsNode_t *monitoredNodes, uint8_t monitoredNodesCount, OD_entry_t *OD_1016_HBcons, CO_CANmodule_t *CANdevRx, uint16_t CANdevRxIdxStart, uint32_t *errInfo)
 Initialize Heartbeat consumer object. More...
 
void CO_HBconsumer_initCallbackPre (CO_HBconsumer_t *HBcons, void *object, void(*pFunctSignal)(void *object))
 Initialize Heartbeat consumer callback function. More...
 
void CO_HBconsumer_initCallbackNmtChanged (CO_HBconsumer_t *HBcons, uint8_t idx, void *object, void(*pFunctSignal)(uint8_t nodeId, uint8_t idx, CO_NMT_internalState_t NMTstate, void *object))
 Initialize Heartbeat consumer NMT changed callback function. More...
 
void CO_HBconsumer_initCallbackHeartbeatStarted (CO_HBconsumer_t *HBcons, uint8_t idx, void *object, void(*pFunctSignal)(uint8_t nodeId, uint8_t idx, void *object))
 Initialize Heartbeat consumer started callback function. More...
 
void CO_HBconsumer_initCallbackTimeout (CO_HBconsumer_t *HBcons, uint8_t idx, void *object, void(*pFunctSignal)(uint8_t nodeId, uint8_t idx, void *object))
 Initialize Heartbeat consumer timeout callback function. More...
 
void CO_HBconsumer_initCallbackRemoteReset (CO_HBconsumer_t *HBcons, uint8_t idx, void *object, void(*pFunctSignal)(uint8_t nodeId, uint8_t idx, void *object))
 Initialize Heartbeat consumer remote reset detected callback function. More...
 
void CO_HBconsumer_process (CO_HBconsumer_t *HBcons, bool_t NMTisPreOrOperational, uint32_t timeDifference_us, uint32_t *timerNext_us)
 Process Heartbeat consumer object. More...
 
int8_t CO_HBconsumer_getIdxByNodeId (CO_HBconsumer_t *HBcons, uint8_t nodeId)
 Get the heartbeat producer object index by node ID. More...
 
CO_HBconsumer_state_t CO_HBconsumer_getState (CO_HBconsumer_t *HBcons, uint8_t idx)
 Get the current state of a heartbeat producer by the index in OD 0x1016. More...
 
int8_t CO_HBconsumer_getNmtState (CO_HBconsumer_t *HBcons, uint8_t idx, CO_NMT_internalState_t *nmtState)
 Get the current NMT state of a heartbeat producer by the index in OD 0x1016. More...
 

Detailed Description

CANopen Heartbeat consumer protocol.

Author
Janez Paternoster

This file is part of CANopenNode, an opensource CANopen Stack. Project home page is https://github.com/CANopenNode/CANopenNode. For more information on CANopen see http://www.can-cia.org/.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.