Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends
icl_hardware::canopen_schunk::DS301Group Class Reference

The DS301Group class is the base Class for all canOpen device groups, providing basic interfaces to the DS301 functionality. More...

#include <DS301Group.h>

Inheritance diagram for icl_hardware::canopen_schunk::DS301Group:
Inheritance graph
[legend]

List of all members.

Public Types

typedef boost::shared_ptr
< const DS301Group
ConstPtr
 Shared pointer to a const DS301Group.
typedef boost::shared_ptr
< DS301Group
Ptr
 Shared pointer to a DS301Group.

Public Member Functions

virtual void appendPDOMappingSingle (const PDO::MappingConfigurationList &config, const uint16_t pdo_nr, const PDO::eTransmissionType &transmission_type, const DS301Node::ePDO_TYPE &pdo_type, const bool dummy_mapping=false, const uint8_t cyclic_timeout_cycles=0, const int16_t node_id=-1)
 Appends one or more mapping parameters to the existing mapping. Note that the PDO will be disabled while appending another mapping.
virtual bool deleteNodeFromId (const uint8_t node_id)
 Deletes a node with a given node id from the node list, if it is present. If the node can't be found in this group, this function will return false;.
virtual void deleteNodes (std::vector< uint8_t > &deleted_ids)
 Deletes all nodes assigned to the group.
void downloadPDOs ()
 DS301Group (const std::string &name="")
std::string getName () const
 Returns the group's identifier string.
virtual std::vector
< DS301Node::Ptr
getNodes () const
 Returns the group's node vector.
virtual void initPDOMappingSingle (const PDO::MappingConfigurationList &config, const uint16_t pdo_nr, const PDO::eTransmissionType &transmission_type, const DS301Node::ePDO_TYPE &pdo_type, const bool dummy_mapping=false, const uint8_t cyclic_timeout_cycles=0, const int16_t node_id=-1)
 Init PDO mapping with a given mapping configuration for a given pdo nr.
void printPDOMapping (const uint8_t node_id=-1)
 Will query the PDO mapping from the device and print that to the output.
void registerWSBroadcaster (boost::shared_ptr< icl_comm::websocket::WsBroadcaster > broadcaster)
 registerWSBroadcaster Adds a debug interface
void uploadPDOs ()

Protected Member Functions

template<typename NodeT >
DS301Node::Ptr addNode (const uint8_t node_id, const CanDevPtr can_device, HeartBeatMonitor::Ptr heartbeat_monitor)
 Creates a new DS301Node and adds it to the group-.

Protected Attributes

std::string m_name
std::vector< DS301Node::Ptrm_nodes
boost::shared_ptr
< icl_comm::websocket::WsBroadcaster > 
m_ws_broadcaster
 Interface to send out diagnostics data. Only available if compiled with _IC_BUILDER_ICL_COMM_WEBSOCKET_.

Friends

class CanOpenController

Detailed Description

The DS301Group class is the base Class for all canOpen device groups, providing basic interfaces to the DS301 functionality.

The DS301 Group provides the interface to access devices using the DS301 protocol (canOpen). It implements the interfaces needs to set up devices of a group and to access the relevant functions, such as NMT to bring the nodes into the correct state. While the DS301Group implements the basic calls that can be used for canOpen device management, it is intended to be used as a Base class that is derived from by the profile specific groups that offer a hardware related interface

Definition at line 41 of file DS301Group.h.


Member Typedef Documentation

Shared pointer to a const DS301Group.

Reimplemented in icl_hardware::canopen_schunk::DS402Group.

Definition at line 47 of file DS301Group.h.

Shared pointer to a DS301Group.

Reimplemented in icl_hardware::canopen_schunk::DS402Group.

Definition at line 45 of file DS301Group.h.


Constructor & Destructor Documentation

icl_hardware::canopen_schunk::DS301Group::DS301Group ( const std::string &  name = "")

Definition at line 30 of file DS301Group.cpp.


Member Function Documentation

template<typename NodeT >
DS301Node::Ptr icl_hardware::canopen_schunk::DS301Group::addNode ( const uint8_t  node_id,
const CanDevPtr  can_device,
HeartBeatMonitor::Ptr  heartbeat_monitor 
) [protected]

Creates a new DS301Node and adds it to the group-.

Note:
This method is protected, as new nodes should be added through the controller only (Which is why the controller is a friend class)
Parameters:
node_idID of the new node
can_deviceShared pointer to the can device
Returns:
shared pointer to the new DS301Node

Reimplemented in icl_hardware::canopen_schunk::DS402Group.

Definition at line 31 of file DS301Group.hpp.

void icl_hardware::canopen_schunk::DS301Group::appendPDOMappingSingle ( const PDO::MappingConfigurationList config,
const uint16_t  pdo_nr,
const PDO::eTransmissionType transmission_type,
const DS301Node::ePDO_TYPE pdo_type,
const bool  dummy_mapping = false,
const uint8_t  cyclic_timeout_cycles = 0,
const int16_t  node_id = -1 
) [virtual]

Appends one or more mapping parameters to the existing mapping. Note that the PDO will be disabled while appending another mapping.

Parameters:
configList of MappingConfigurations that should be appended.
pdo_nrIndex of the PDO this mapping should be done.
transmission_typeTransmission type of this PDO
pdo_typeIs it a receive PDO or a transmit PDO?
dummy_mappingif set to True, no download to the device will be performed, but the mapping will be done on host side. This is especially useful if a device has preconfigured PDOs which you like to use.
cyclic_timeout_cyclesIn case of transmission type SYNCHRONOUS_CYCLIC this parameter defines the PDO's frequency by defining the number of cycles between two send attempts. For example, a parameter value of 4 means, that the PDO is sent every 5th cycle.
node_idIf left out or given a negative value, the mapping will be applied to all nodes in the group, otherwise it will only be used for the given node-id.

Definition at line 80 of file DS301Group.cpp.

Deletes a node with a given node id from the node list, if it is present. If the node can't be found in this group, this function will return false;.

Parameters:
node_idCANOPEN-Id of node that should be deleted.
Returns:
bool True if node was found and deleted, false if node was not found.

Definition at line 45 of file DS301Group.cpp.

Deletes all nodes assigned to the group.

Parameters:
[out]deleted_idsVector of CANOPEN IDs of deleted objects

Definition at line 35 of file DS301Group.cpp.

Definition at line 110 of file DS301Group.cpp.

std::string icl_hardware::canopen_schunk::DS301Group::getName ( ) const [inline]

Returns the group's identifier string.

Definition at line 130 of file DS301Group.h.

Returns the group's node vector.

Definition at line 54 of file DS301Group.h.

void icl_hardware::canopen_schunk::DS301Group::initPDOMappingSingle ( const PDO::MappingConfigurationList config,
const uint16_t  pdo_nr,
const PDO::eTransmissionType transmission_type,
const DS301Node::ePDO_TYPE pdo_type,
const bool  dummy_mapping = false,
const uint8_t  cyclic_timeout_cycles = 0,
const int16_t  node_id = -1 
) [virtual]

Init PDO mapping with a given mapping configuration for a given pdo nr.

Parameters:
configList of MappingConfigurations that should be mapped
pdo_nrIndex of the PDO this mapping should be done.
transmission_typeTransmission type of this PDO
pdo_typeIs it a receive PDO or a transmit PDO?
dummy_mappingif set to True, no download to the device will be performed, but the mapping will be done on host side. This is especially useful if a device has preconfigured PDOs which you like to use.
cyclic_timeout_cyclesIf the transmission type SYNCHRONOUS_CYCLIC is used, this parameter defines the PDO's frequency by defining the number of cycles between two send attempts. For example, a parameter value of 4 means, that the PDO is sent every 5th cycle.
node_idIf left out or given a negative value, the mapping will be applied to all nodes in the group, otherwise it will only be used for the given node-id.
Exceptions:
PDOExceptionwhen something goes wrong.

Definition at line 58 of file DS301Group.cpp.

Will query the PDO mapping from the device and print that to the output.

Parameters:
node_idIf no or negative id given, the function will be called on every node within this group. If a positive node_id is given, only the specified node will be affected.

Definition at line 118 of file DS301Group.cpp.

void icl_hardware::canopen_schunk::DS301Group::registerWSBroadcaster ( boost::shared_ptr< icl_comm::websocket::WsBroadcaster >  broadcaster)

registerWSBroadcaster Adds a debug interface

Definition at line 129 of file DS301Group.cpp.

Definition at line 102 of file DS301Group.cpp.


Friends And Related Function Documentation

friend class CanOpenController [friend]

Reimplemented in icl_hardware::canopen_schunk::DS402Group.

Definition at line 165 of file DS301Group.h.


Member Data Documentation

Definition at line 162 of file DS301Group.h.

Definition at line 161 of file DS301Group.h.

boost::shared_ptr<icl_comm::websocket::WsBroadcaster> icl_hardware::canopen_schunk::DS301Group::m_ws_broadcaster [protected]

Interface to send out diagnostics data. Only available if compiled with _IC_BUILDER_ICL_COMM_WEBSOCKET_.

Definition at line 168 of file DS301Group.h.


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


schunk_canopen_driver
Author(s): Felix Mauch , Georg Heppner
autogenerated on Sun May 22 2016 03:30:56