MIRA
Classes | Friends | List of all members
CANOpenNMTMaster Class Reference

An implementation of a basic CANopen NMT master. More...

#include <can/CANOpenNMTMaster.h>

Public Member Functions

Constructors and destructor
 CANOpenNMTMaster (CANInterfacePtr iIfc)
 The constructor. More...
 
virtual ~CANOpenNMTMaster ()
 The destructor. More...
 
NMT callbacks
uint32 addHeartbeatCallback (CANOpenHeartbeat iCallback)
 A add new callback for CANopen heartbeats. More...
 
void removeHeartbeatCallback (uint32 pFuncID)
 Unregister a heartbeat listener. More...
 
CANOpen NMT commands
void startNode (uint8 iNodeID)
 Execute a 'Start node' command. More...
 
void stopNode (uint8 iNodeID)
 Execute a 'Stop node' command. More...
 
void preOperationalNode (uint8 iNodeID)
 Execute a 'Goto pre-operational' command. More...
 
void resetNode (uint8 iNodeID)
 Execute a 'Reset_node' command. More...
 
void resetCommunication (uint8 iNodeID)
 Execute a 'Reset_communication' command. More...
 
CANOpenNodeStatusFuture getNodeStatus (uint8 iNodeID)
 Request the status of a CANopen node. More...
 

Protected Member Functions

Internal methods
void onDestructFuture (uint64 requestID)
 

Friends

class CANOpenNodeStatusFuture
 

Detailed Description

An implementation of a basic CANopen NMT master.

Constructor & Destructor Documentation

◆ CANOpenNMTMaster()

The constructor.

Parameters
[in]iIfcThe interface to the CAN bus

◆ ~CANOpenNMTMaster()

virtual ~CANOpenNMTMaster ( )
virtual

The destructor.

Member Function Documentation

◆ addHeartbeatCallback()

uint32 addHeartbeatCallback ( CANOpenHeartbeat  iCallback)

A add new callback for CANopen heartbeats.

Parameters
[in]iCallbackThe callback function.
Returns
An unique ID for the registered function.

◆ removeHeartbeatCallback()

void removeHeartbeatCallback ( uint32  pFuncID)

Unregister a heartbeat listener.

Parameters
[in]pFuncIDThe ID of the listener function, which should be removed.

◆ startNode()

void startNode ( uint8  iNodeID)

Execute a 'Start node' command.

Parameters
[in]iNodeIDThe node ID. If the iNodeID = 0, the whole network will be started.

◆ stopNode()

void stopNode ( uint8  iNodeID)

Execute a 'Stop node' command.

Parameters
[in]iNodeIDThe node ID. If the iNodeID = 0, the whole network will be stopped.

◆ preOperationalNode()

void preOperationalNode ( uint8  iNodeID)

Execute a 'Goto pre-operational' command.

Parameters
[in]iNodeIDThe node ID. If the iNodeID = 0, the whole network will go into the pre-operational mode.

◆ resetNode()

void resetNode ( uint8  iNodeID)

Execute a 'Reset_node' command.

Parameters
[in]iNodeIDThe node ID. If the iNodeID = 0, the whole network will be reset.

◆ resetCommunication()

void resetCommunication ( uint8  iNodeID)

Execute a 'Reset_communication' command.

Parameters
[in]iNodeIDThe node ID. If the iNodeID = 0, the whole network will be reset.

◆ getNodeStatus()

CANOpenNodeStatusFuture getNodeStatus ( uint8  iNodeID)

Request the status of a CANopen node.

Parameters
[in]iNodeIdThe node ID.
Returns
A future object for the CANOpen status.

◆ onDestructFuture()

void onDestructFuture ( uint64  requestID)
protected

Friends And Related Function Documentation

◆ CANOpenNodeStatusFuture

friend class CANOpenNodeStatusFuture
friend

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