This class represents a mapping from one or more dictionary entries to one transmit PDO, which will be sent by an instance of this class repeatedly. More...
#include <transmit_pdo_mapping.h>
Public Member Functions | |
TransmitPDOMapping (Core &core, const std::unordered_map< Address, Entry > &dictionary, const std::unordered_map< std::string, Address > &name_to_address, uint16_t cob_id_, TransmissionType transmission_type_, std::chrono::milliseconds repeat_time_, const std::vector< Mapping > &mappings_) | |
Constructor. More... | |
TransmitPDOMapping (const TransmitPDOMapping &)=delete | |
Copy constructor deleted. | |
TransmitPDOMapping (TransmitPDOMapping &&)=delete | |
Move constructor deleted. | |
~TransmitPDOMapping () | |
Stops the transmitter thread if there is one. | |
void | send () const |
Sends the PDO. | |
Public Attributes | |
uint16_t | cob_id |
COB-ID of the PDO. | |
TransmissionType | transmission_type |
Transmission type. | |
std::chrono::milliseconds | repeat_time |
Send repeat time. | |
std::vector< Mapping > | mappings |
Mapped entries with offset (see Mapping class) | |
std::unique_ptr< std::thread > | transmitter |
The transmitter thread. More... | |
This class represents a mapping from one or more dictionary entries to one transmit PDO, which will be sent by an instance of this class repeatedly.
Definition at line 54 of file transmit_pdo_mapping.h.
kaco::TransmitPDOMapping::TransmitPDOMapping | ( | Core & | core, |
const std::unordered_map< Address, Entry > & | dictionary, | ||
const std::unordered_map< std::string, Address > & | name_to_address, | ||
uint16_t | cob_id_, | ||
TransmissionType | transmission_type_, | ||
std::chrono::milliseconds | repeat_time_, | ||
const std::vector< Mapping > & | mappings_ | ||
) |
Constructor.
core | Reference to the Core instance (needed to send the PDO). |
dictionary | Reference to the object dictionary. |
name_to_address | Reference to name-address mapping. |
cob_id_ | COB-ID of the PDO |
transmission_type_ | Transmission type |
repeat_time_ | Send repeat time , in case transmission_type_==TransmissionType::PERIODIC |
mappings_ | Mapped entries with offset (see Mapping class) |
dictionary_error | if entry does not exist or mappings overlap (among others) |
Definition at line 42 of file transmit_pdo_mapping.cpp.
std::unique_ptr<std::thread> kaco::TransmitPDOMapping::transmitter |
The transmitter thread.
Definition at line 93 of file transmit_pdo_mapping.h.