|
| SoemSlave (const uint16_t position) |
| ~SoemSlave () override |
uint16_t | get_device_id () const override |
| Get the ID (absolute position) of the EtherCAT slave in the EtherCAT chain.
|
uint16_t | get_hardware_id () const override |
| Get the hardware ID.
|
Type | get_device_type () const override |
| Get the device type.
|
std::list< VirtualParameter * > | get_all_virtual_parameters () override |
| Get all configuration parameters from a slave.
|
VirtualParameter * | get_virtual_parameter (uint16_t index, uint8_t subindex) override |
| Get a configuration parameter by its index/subindex.
|
std::variant< MotionMasterError, std::list< std::string > > | get_file_list () override |
| Get the list of available files on the device.
|
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.
|
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.
|
MotionMasterError | remove_file (const std::string &file_name) override |
| Remove a file from the flash memory.
|
bool | has_firmware () override |
| Check if the slave has a firmware installed.
|
bool | is_operational () const override |
| Request the current slave state.
|
bool | is_supported () |
bool | has_pdos () override |
| Check if PDO mapping is available.
|
State | get_state (bool force_refresh) const override |
| Get the slave EtherCAT state.
|
bool | set_state (State state, uint32_t timeout_ms=10000) override |
| Change the EtherCAT state of the slave.
|
bool | request_state_switch (State state) override |
MotionMasterError | write_sii (const std::vector< uint8_t > &content) override |
void | receive_pdos (const uint8_t *process_data) override |
void | update_outputs () |
void | send_pdos (const uint8_t *process_data) override |
void | update_inputs () |
std::variant< MotionMasterError, std::vector< uint8_t > > | get_file_content (const std::string &file_name) |
int32_t | set_file_content (const std::string &file_name, const std::vector< uint8_t > &content) |
bool | write_file_as_parts (const std::string &file_name, const std::vector< uint8_t > &content, std::function< void(uint8_t)> progress_callback) |
MotionMasterError | do_remove_file (const std::string &file_name) |
| EthercatSlave () |
| EthercatSlave (EthercatSlave const &) |
| ~EthercatSlave () |
Protocol | get_protocol () const override |
| Get the protocol the device uses.
|
virtual | ~VirtualDevice ()=default |
|
enum class | State : uint8_t {
kUnspecified = 0
, kInit = 1
, kPreOp = 2
, kBoot = 3
,
kSafeOp = 4
, kOp = 8
} |
enum class | FoeError {
kNotFound = 0x00008001
, kAccessDenied = 0x00008002
, kDiskFull = 0x00008003
, kIllegal = 0x00008004
,
kPacketNumberWrong = 0x00008005
, kAlreadyExists = 0x00008006
, kNoUser = 0x00008007
, kBootstrapOnly = 0x00008008
,
kNotBootstrap = 0x00008009
, kNoRights = 0x0000800a
, kProgramError = 0x0000800b
} |
enum class | Protocol { kUnspecified = 0
, kMock
, kEcat
, kSerial
} |
enum class | Type { kUnspecified = 0
, kCia402Drive
, kDigitalIo
} |
uint16_t | obytes = 0 |
uint16_t | ibytes = 0 |
static const std::map< State, std::map< State, State > > | ecat_state_machine_table_ |
static const std::map< FoeError, std::string > | foe_error_messages_ |
static const std::map< std::pair< uint32_t, uint32_t >, Type > | device_type_map_ |
Remove a file from the flash memory.
- Parameters
-
- Returns
- error if any
- Attention
- Clear the files_to_delete list
The files_to_delete list should be empty at this point, but clear it anyway just because of possible future changes to the code which could result in some files still being in the list.
Try removing files outside of the file list - SAFETY SWEEP
- Attention
- There are no error codes for removing files, so there is no way to know if the file ever existed in the first place before it was removed, or if there was an error during file removal. To work around this, all of the files are being read first and then deleted (the reading provides the information whether the file is present).
If no additional (hidden) files are found, check if any non-hidden files were removed in the first removal phase and return the result of that.
Reimplemented from EthercatSlave.