8 std::map<uint32_t, EthernetOdEntry> od_entry_map_;
13 explicit EthernetSlave(
const std::string &ipAddress, uint16_t position);
29 uint16_t
index, uint8_t subindex)
override;
31 [[nodiscard]] std::variant<MotionMasterError, std::list<std::string>>
34 [[nodiscard]] std::variant<MotionMasterError, std::vector<uint8_t>>
read_file(
35 const std::string &file_name)
override;
38 const std::string &file_name,
const std::vector<uint8_t> &content,
39 std::function<
void(uint8_t)> progress_callback)
override;
49 [[nodiscard]]
bool has_pdos()
override;
Definition: ethercat_slave.h:11
State
Definition: ethercat_slave.h:19
Definition: ethernet_slave.h:5
uint16_t get_device_id() const override
Get the ID (absolute position) of the EtherCAT slave in the EtherCAT chain.
Definition: ethernet_slave.cc:72
bool is_supported()
Definition: ethernet_slave.cc:157
VirtualParameter * get_virtual_parameter(uint16_t index, uint8_t subindex) override
Get a configuration parameter by its index/subindex.
Definition: ethernet_slave.cc:86
bool has_firmware() override
Check if the slave has a firmware installed.
Definition: ethernet_slave.cc:150
bool has_pdos() override
Check if PDO mapping is available.
Definition: ethernet_slave.cc:159
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:108
std::variant< MotionMasterError, std::list< std::string > > get_file_list() override
Get the list of available files on the device.
Definition: ethernet_slave.cc:98
State get_state(bool force_refresh) const override
Get the slave EtherCAT state.
Definition: ethernet_slave.cc:161
uint16_t get_hardware_id() const override
Get the hardware ID.
Definition: ethernet_slave.cc:74
bool set_state(State state, uint32_t timeout_ms=5000) override
Change the EtherCAT state of the slave.
Definition: ethernet_slave.cc:166
~EthernetSlave() override
Definition: ethernet_slave.cc:64
bool is_operational() const override
Request the current slave state.
Definition: ethernet_slave.cc:152
std::list< VirtualParameter * > get_all_virtual_parameters() override
Get all configuration parameters from a slave.
Definition: ethernet_slave.cc:78
mm::comm::spoe::Device & getDevice()
Definition: ethernet_slave.cc:70
Type get_device_type() const override
Get the device type.
Definition: ethernet_slave.cc:76
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:120
MotionMasterError remove_file(const std::string &file_name) override
Remove a file from the flash memory.
Definition: ethernet_slave.cc:140
Definition: motion_master_error.h:6
Type
Definition: virtual_device.h:24
Definition: virtual_parameter.h:9
Handles TCP communication with SOMANET devices over SPoE.
Definition: spoe.h:298
uint16_t index
Definition: co_dictionary.h:0