8 std::map<uint32_t, EthernetOdEntry> od_entry_map_;
13 explicit EthernetSlave(
const std::string& ipAddress, uint16_t position);
31 uint16_t
index, uint8_t subindex)
override;
33 [[nodiscard]] std::variant<MotionMasterError, std::list<std::string>>
36 [[nodiscard]] std::variant<MotionMasterError, std::vector<uint8_t>>
read_file(
37 const std::string& file_name)
override;
40 const std::string& file_name,
const std::vector<uint8_t>& content,
41 std::function<
void(uint8_t)> progress_callback)
override;
51 [[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:85
bool is_supported()
Definition ethernet_slave.cc:172
VirtualParameter * get_virtual_parameter(uint16_t index, uint8_t subindex) override
Get a configuration parameter by its index/subindex.
Definition ethernet_slave.cc:101
bool has_firmware() override
Check if the slave has a firmware installed.
Definition ethernet_slave.cc:165
bool has_pdos() override
Check if PDO mapping is available.
Definition ethernet_slave.cc:174
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:123
std::variant< MotionMasterError, std::list< std::string > > get_file_list() override
Get the list of available files on the device.
Definition ethernet_slave.cc:113
State get_state(bool force_refresh) const override
Get the slave EtherCAT state.
Definition ethernet_slave.cc:176
uint16_t get_hardware_id() const override
Get the hardware ID.
Definition ethernet_slave.cc:87
bool set_state(State state, uint32_t timeout_ms=5000) override
Change the EtherCAT state of the slave.
Definition ethernet_slave.cc:181
~EthernetSlave() override
Definition ethernet_slave.cc:77
bool is_operational() const override
Request the current slave state.
Definition ethernet_slave.cc:167
std::list< VirtualParameter * > get_all_virtual_parameters() override
Get all configuration parameters from a slave.
Definition ethernet_slave.cc:91
mm::comm::spoe::Device & getDevice()
Definition ethernet_slave.cc:83
Type get_device_type() const override
Get the device type.
Definition ethernet_slave.cc:89
EthernetSlave(const std::string &ipAddress, uint16_t position)
Definition ethernet_slave.cc:7
bool has_virtual_parameters() override
Definition ethernet_slave.cc:99
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:135
MotionMasterError remove_file(const std::string &file_name) override
Remove a file from the flash memory.
Definition ethernet_slave.cc:155
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