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;
State
Definition ethercat_slave.h:19
EthercatSlave()
Definition ethercat_slave.h:13
uint16_t get_device_id() const override
Get the ID (absolute position) of the EtherCAT slave in the EtherCAT chain.
Definition ethernet_slave.cc:81
bool is_supported()
Definition ethernet_slave.cc:166
VirtualParameter * get_virtual_parameter(uint16_t index, uint8_t subindex) override
Get a configuration parameter by its index/subindex.
Definition ethernet_slave.cc:95
bool has_firmware() override
Check if the slave has a firmware installed.
Definition ethernet_slave.cc:159
bool has_pdos() override
Check if PDO mapping is available.
Definition ethernet_slave.cc:168
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:117
std::variant< MotionMasterError, std::list< std::string > > get_file_list() override
Get the list of available files on the device.
Definition ethernet_slave.cc:107
State get_state(bool force_refresh) const override
Get the slave EtherCAT state.
Definition ethernet_slave.cc:170
uint16_t get_hardware_id() const override
Get the hardware ID.
Definition ethernet_slave.cc:83
bool set_state(State state, uint32_t timeout_ms=5000) override
Change the EtherCAT state of the slave.
Definition ethernet_slave.cc:175
~EthernetSlave() override
Definition ethernet_slave.cc:73
bool is_operational() const override
Request the current slave state.
Definition ethernet_slave.cc:161
std::list< VirtualParameter * > get_all_virtual_parameters() override
Get all configuration parameters from a slave.
Definition ethernet_slave.cc:87
mm::comm::spoe::Device & getDevice()
Definition ethernet_slave.cc:79
Type get_device_type() const override
Get the device type.
Definition ethernet_slave.cc:85
EthernetSlave(const std::string &ipAddress, uint16_t position)
Definition ethernet_slave.cc:7
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:129
MotionMasterError remove_file(const std::string &file_name) override
Remove a file from the flash memory.
Definition ethernet_slave.cc:149
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:302
uint16_t index
Definition co_dictionary.h:0