Public Member Functions | Protected Member Functions | Private Attributes | Static Private Attributes | Friends
EtherCAT_PD_Buffer Class Reference

EtherCAT Process Data buffer. More...

#include <ethercat_process_data.h>

List of all members.

Public Member Functions

 EtherCAT_PD_Buffer (EC_Logic *_m_logic_instance, EtherCAT_DataLinkLayer *_m_dll_instance)
bool txandrx (size_t datalen, unsigned char *data)
 Send some process data.
virtual ~EtherCAT_PD_Buffer ()

Protected Member Functions

void start ()
 Start transmitting process data.
void stop ()
 Stop transmitting process data.

Private Attributes

EtherCAT_DataLinkLayerm_dll_instance
 Pointer to DLL instance.
bool m_is_running
 See note in class definition.
EC_Logicm_logic_instance
 Pointer to EC_Logic.
EC_Ethernet_Framem_lrw_frame [MAX_CHUNKS]
 EtherCAT frame(s) to be sent.
LRW_Telegramm_lrw_telegram [MAX_CHUNKS]
 Telegram(s) to be sent.

Static Private Attributes

static const unsigned CHUNK_SIZE = 1486
static const unsigned MAX_CHUNKS = 4

Friends

class EC_ESM_Ops

Detailed Description

EtherCAT Process Data buffer.

Note:
The current implementation starts passing PD as soon as *one* of the slaves indicated it arrived in its safe-operational state by using the EtherCAT_PD_Buffer::start() method. The advantage is that an application could remain running. If a slave follows the spec, it won't process PD unless it is in its SafeOp or Op state, so this should harm... Nevertheless, changing this behavior into full spec compliance only requires changing 2 lines of code. See the .cxx file.

Definition at line 54 of file ethercat_process_data.h.


Constructor & Destructor Documentation

EtherCAT_PD_Buffer::EtherCAT_PD_Buffer ( EC_Logic _m_logic_instance,
EtherCAT_DataLinkLayer _m_dll_instance 
)

Member Function Documentation

void EtherCAT_PD_Buffer::start ( ) [protected]

Start transmitting process data.

void EtherCAT_PD_Buffer::stop ( ) [protected]

Stop transmitting process data.

bool EtherCAT_PD_Buffer::txandrx ( size_t  datalen,
unsigned char *  data 
)

Send some process data.

Parameters:
datalennumber of bytes that should be set
datapointer to data array. Data is read, transmitted, and (if the operation succeeded) the received data is put in the data array
Returns:
true if msg got true

Friends And Related Function Documentation

friend class EC_ESM_Ops [friend]

Definition at line 56 of file ethercat_process_data.h.


Member Data Documentation

const unsigned EtherCAT_PD_Buffer::CHUNK_SIZE = 1486 [static, private]

Definition at line 89 of file ethercat_process_data.h.

Pointer to DLL instance.

Definition at line 81 of file ethercat_process_data.h.

See note in class definition.

Definition at line 84 of file ethercat_process_data.h.

Pointer to EC_Logic.

Definition at line 79 of file ethercat_process_data.h.

EtherCAT frame(s) to be sent.

Definition at line 94 of file ethercat_process_data.h.

Telegram(s) to be sent.

Definition at line 92 of file ethercat_process_data.h.

const unsigned EtherCAT_PD_Buffer::MAX_CHUNKS = 4 [static, private]

Process data can be divided over MAX_CHUCKS packets of upto CHUNK_SIZE bytes

Definition at line 88 of file ethercat_process_data.h.


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


ros_ethercat_eml
Author(s): Tom Panis, Klaas Gadeyne, Bob Koninckx, Austin Hendrix, Manos Nikolaidis
autogenerated on Thu Jul 4 2019 20:01:50