10 uint16_t hardware_id_;
11 std::map<uint32_t, EthernetOdEntry> od_entry_map_;
16 EthernetSlave(
const std::pair<std::string, uint16_t>& endpoint,
22 explicit EthernetSlave(
const std::string& endpoint, uint16_t position);
40 uint16_t
index, uint8_t subindex)
override;
42 [[nodiscard]] std::variant<MotionMasterError, std::list<std::string>>
45 [[nodiscard]] std::variant<MotionMasterError, std::vector<uint8_t>>
read_file(
46 const std::string& file_name)
override;
49 const std::string& file_name,
const std::vector<uint8_t>& content,
50 std::function<
void(uint8_t)> progress_callback)
override;
60 [[nodiscard]]
bool has_pdos()
override;
State
Definition ethercat_slave.h:18
EthercatSlave()
Definition ethercat_slave.h:12
uint16_t get_device_id() const override
Get the ID (absolute position) of the EtherCAT slave in the EtherCAT chain.
Definition ethernet_slave.cc:89
bool is_supported()
Definition ethernet_slave.cc:176
VirtualParameter * get_virtual_parameter(uint16_t index, uint8_t subindex) override
Get a configuration parameter by its index/subindex.
Definition ethernet_slave.cc:105
bool has_firmware() override
Check if the slave has a firmware installed.
Definition ethernet_slave.cc:169
bool has_pdos() override
Check if PDO mapping is available.
Definition ethernet_slave.cc:178
std::variant< MotionMasterError, std::vector< uint8_t > > read_file(const std::string &file_name) override
Return the raw content (bytes) of the requested file from the flash memory.
Definition ethernet_slave.cc:127
std::variant< MotionMasterError, std::list< std::string > > get_file_list() override
Get the list of available files on the device.
Definition ethernet_slave.cc:117
State get_state(bool force_refresh) const override
Get the slave EtherCAT state.
Definition ethernet_slave.cc:180
uint16_t get_hardware_id() const override
Get the hardware ID.
Definition ethernet_slave.cc:91
bool set_state(State state, uint32_t timeout_ms=5000) override
Change the EtherCAT state of the slave.
Definition ethernet_slave.cc:185
~EthernetSlave() override
Definition ethernet_slave.cc:81
bool is_operational() const override
Request the current slave state.
Definition ethernet_slave.cc:171
std::list< VirtualParameter * > get_all_virtual_parameters() override
Get all configuration parameters from a slave.
Definition ethernet_slave.cc:95
mm::comm::spoe::Device & getDevice()
Definition ethernet_slave.cc:87
Type get_device_type() const override
Get the device type.
Definition ethernet_slave.cc:93
bool has_virtual_parameters() override
Definition ethernet_slave.cc:103
MotionMasterError write_file(const std::string &file_name, const std::vector< uint8_t > &content, std::function< void(uint8_t)> progress_callback) override
Write raw content (bytes) into a file in the flash memory.
Definition ethernet_slave.cc:139
MotionMasterError remove_file(const std::string &file_name) override
Remove a file from the flash memory.
Definition ethernet_slave.cc:159
Definition motion_master_error.h:6
Type
Definition virtual_device.h:26
Definition virtual_parameter.h:9
Handles TCP communication with SOMANET devices over SPoE.
Definition spoe.h:302
uint16_t index
Definition co_dictionary.h:0