SlaveRegisters.h File Reference
#include <map>
#include <string>
#include <unordered_map>
#include "EtherCATDataTypes.h"
+ Include dependency graph for SlaveRegisters.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  RegisterInfo
 The RegisterInfo struct holds additional information on one register. More...
 
struct  RegisterDataList
 Brief description of struct RegisterDataList. More...
 

Namespaces

 armarx
 This file offers overloads of toIce() and fromIce() functions for STL container types.
 
 armarx::control
 
 armarx::control::ethercat
 
 armarx::control::ethercat::datatypes
 

Typedefs

using RegisterEnumTypeContainer = std::variant< EtherCATDataType::INTEGER8, EtherCATDataType::INTEGER16, EtherCATDataType::INTEGER32, EtherCATDataType::INTEGER64, EtherCATDataType::UNSIGNED8, EtherCATDataType::UNSIGNED16, EtherCATDataType::UNSIGNED32, EtherCATDataType::UNSIGNED64 >
 

Enumerations

enum  RegisterEnum {
  TYPE = 0x0, REVISION = 0x1, BUILD = 0x2, RAM_SIZE = 0x6,
  PORT0_DESCRIPTOR = 0x00007, PORT1_DESCRIPTOR = 0x20007, PORT2_DESCRIPTOR = 0x40007, PORT3_DESCRIPTOR = 0x60007,
  FMMU_BIT_NOT_SUPPORTED = 0x00008, NO_SUPPORT_RESERVED_REGISTER = 0x10008, DC_SUPPORTED = 0x20008, DC_RANGE = 0x30008,
  LOW_JITTER_EBUS = 0x40008, ENHANCED_LINK_DETECTION_EBUS = 0x50008, ENHANCED_LINK_DETECTION_MII = 0x60008, SEPARATE_FCS_ERROR_HANDLING = 0x70008,
  CONFIGURED_STATION_ADDRESS = 0x10, CONFIGURED_STATION_ALIAS = 0x12, DLS_USER_OPERATIONAL = 0x00110, LINK_STATUS_PORT_0 = 0x40110,
  LINK_STATUS_PORT_1 = 0x50110, LINK_STATUS_PORT_2 = 0x60110, LINK_STATUS_PORT_3 = 0x70110, LOOP_STATUS_PORT_0 = 0x00111,
  SIGNAL_DETECTION_PORT_0 = 0x10111, LOOP_STATUS_PORT_1 = 0x20111, SIGNAL_DETECTION_PORT_1 = 0x30111, LOOP_STATUS_PORT_2 = 0x40111,
  SIGNAL_DETECTION_PORT_2 = 0x50111, LOOP_STATUS_PORT_3 = 0x60111, SIGNAL_DETECTION_PORT_3 = 0x70111, STATUS_CONTROL = 0x120,
  DLS_USER_R2 = 0x121, STATUS = 0x130, DLS_USER_R4 = 0x131, DLS_USER_R5 = 0x132,
  DLS_USER_R6 = 0x134, DLS_USER_R7 = 0x140, DLS_USER_R8 = 0x150, DLS_USER_R9 = 0x141,
  FRAME_ERROR_COUNTER_PORT_0 = 0x300, PHYSICAL_ERROR_COUNTER_PORT_0 = 0x301, FRAME_ERROR_COUNTER_PORT_1 = 0x302, PHYSICAL_ERROR_COUNTER_PORT_1 = 0x303,
  FRAME_ERROR_COUNTER_PORT_2 = 0x304, PHYSICAL_ERROR_COUNTER_PORT_2 = 0x305, FRAME_ERROR_COUNTER_PORT_3 = 0x306, PHYSICAL_ERROR_COUNTER_PORT_3 = 0x307,
  PREVIOUS_ERROR_COUNTER_PORT_0 = 0x308, PREVIOUS_ERROR_COUNTER_PORT_1 = 0x309, PREVIOUS_ERROR_COUNTER_PORT_2 = 0x30A, PREVIOUS_ERROR_COUNTER_PORT_3 = 0x30B,
  MALFORMAT_FRAME_COUNTER = 0x30C, LOCAL_PROBLEM_COUNTER = 0x30D, LOST_LINK_COUNTER_PORT_0 = 0x310, LOST_LINK_COUNTER_PORT_1 = 0x311,
  LOST_LINK_COUNTER_PORT_2 = 0x312, LOST_LINK_COUNTER_PORT_3 = 0x313, SII_READ_OPERATION = 0x00503, SII_WRITE_OPERATION = 0x10503,
  SII_RELOAD_OPERATION = 0x20503, SII_CHECKSUM_ERROR = 0x30503, SII_DEVICE_INFO_ERROR = 0x40503, SII_COMMAND_ERROR = 0x50503,
  SII_WRITE_ERROR = 0x60503, SII_BUSY = 0x70503, SYSTEM_TIME = 0x910
}
 The RegisterEnum enum encodes the slave registers that every slave offers. More...
 

Functions

std::uint32_t getRegisterAddress (RegisterEnum e)
 
std::size_t getRegisterByteLength (datatypes::RegisterEnum reg)
 Get the length of a register in bytes, rounded up. More...
 
std::uint8_t getRegisterSubAddress (RegisterEnum e)
 
template<EtherCATDataTypeEnum E>
RegisterInfo makeInfo (const std::string &name)
 
bool operator< (RegisterEnum a, RegisterEnum b)
 

Variables

const std::unordered_map< RegisterEnum, RegisterInfo > registerMap
 Holds additional information on all defined registers. More...