EtherCAT telegram for all _device addressing_ modes. More...
#include <ethercat_device_addressed_telegram.h>
Public Member Functions | |
Device_Addressing_Telegram (uint8_t a_idx=0x00, uint16_t a_adp=0x0000, uint16_t a_ado=0x0000, uint16_t a_wkc=0x0000, uint16_t a_datalen=0x0000, const unsigned char *a_data=NULL) | |
Constructor. | |
uint16_t | get_ado () const |
Get address offset. | |
uint16_t | get_adp () const |
Get address pointer. | |
void | set_ado (uint16_t a_ado) |
Set address offset. | |
void | set_adp (uint16_t a_adp) |
Set address pointer. | |
virtual | ~Device_Addressing_Telegram () |
Protected Member Functions | |
virtual const unsigned char * | build_command_field (const unsigned char *a_buffer)=0 |
virtual const unsigned char * | build_header_head (const unsigned char *a_buffer) |
virtual unsigned char * | dump_command_field (unsigned char *a_buffer) const =0 |
virtual unsigned char * | dump_header_head (unsigned char *a_buffer) const |
Dump first 6 bytes of the header (varying across different telegrams) | |
Private Attributes | |
uint16_t | m_ado |
uint16_t | m_adp |
EtherCAT telegram for all _device addressing_ modes.
EtherCAT telegram for all _device addressing_ modes, including Position Addressing Modes (e.g.~Auto Increment Physical Read--APRD), Node Addressing modes (e.g.~Node addressed Physical Read--NPRD) and Broadcast Adressing modes (e.g.~Broadcast read)
Definition at line 46 of file ethercat_device_addressed_telegram.h.
Device_Addressing_Telegram::Device_Addressing_Telegram | ( | uint8_t | a_idx = 0x00 , |
uint16_t | a_adp = 0x0000 , |
||
uint16_t | a_ado = 0x0000 , |
||
uint16_t | a_wkc = 0x0000 , |
||
uint16_t | a_datalen = 0x0000 , |
||
const unsigned char * | a_data = NULL |
||
) |
Constructor.
a_idx | index |
a_adp | device address |
a_ado | address offset withing device |
a_wkc | working counter |
a_datalen | data_length |
a_data | data |
virtual Device_Addressing_Telegram::~Device_Addressing_Telegram | ( | ) | [inline, virtual] |
Definition at line 63 of file ethercat_device_addressed_telegram.h.
virtual const unsigned char* Device_Addressing_Telegram::build_command_field | ( | const unsigned char * | a_buffer | ) | [protected, pure virtual] |
Implemented in ARMW_Telegram, NPRD_Telegram, NPRW_Telegram, NPWR_Telegram, BRD_Telegram, BWR_Telegram, APRW_Telegram, APWR_Telegram, and APRD_Telegram.
virtual const unsigned char* Device_Addressing_Telegram::build_header_head | ( | const unsigned char * | a_buffer | ) | [protected, virtual] |
Build and check first 6 bytes of the header (varying across different telegrams)
a_buffer | Adress to start writing |
Implements EC_Telegram.
virtual unsigned char* Device_Addressing_Telegram::dump_command_field | ( | unsigned char * | a_buffer | ) | const [protected, pure virtual] |
Implemented in ARMW_Telegram, NPRD_Telegram, NPRW_Telegram, NPWR_Telegram, BRD_Telegram, BWR_Telegram, APRW_Telegram, APWR_Telegram, and APRD_Telegram.
virtual unsigned char* Device_Addressing_Telegram::dump_header_head | ( | unsigned char * | a_buffer | ) | const [protected, virtual] |
Dump first 6 bytes of the header (varying across different telegrams)
a_buffer | Adress to start writing |
Implements EC_Telegram.
uint16_t Device_Addressing_Telegram::get_ado | ( | ) | const [inline] |
Get address offset.
Definition at line 83 of file ethercat_device_addressed_telegram.h.
uint16_t Device_Addressing_Telegram::get_adp | ( | ) | const [inline] |
Get address pointer.
Definition at line 78 of file ethercat_device_addressed_telegram.h.
void Device_Addressing_Telegram::set_ado | ( | uint16_t | a_ado | ) | [inline] |
Set address offset.
Definition at line 73 of file ethercat_device_addressed_telegram.h.
void Device_Addressing_Telegram::set_adp | ( | uint16_t | a_adp | ) | [inline] |
Set address pointer.
Definition at line 68 of file ethercat_device_addressed_telegram.h.
uint16_t Device_Addressing_Telegram::m_ado [private] |
Definition at line 97 of file ethercat_device_addressed_telegram.h.
uint16_t Device_Addressing_Telegram::m_adp [private] |
Definition at line 96 of file ethercat_device_addressed_telegram.h.