15 #define MAX_FILE_SIZE_FIRMWARE (0x100000) bool setAccelerationRange(const unsigned int range)
Sets an acceleration range to the device.
bool setAngularRateRange(const unsigned int range)
Sets an angular rate range to the device.
bool firmwareUpdate(const std::string &filePath, const std::string &fileName, const uint32_t &password)
Updates the firmware of the device.
void updateRead() override
This method is called by the EthercatBusManager. Each device attached to this bus reads its data from...
bool getForceTorqueSamplingRate(int &samplingRate)
Gets the force torque sampling rate of the device.
bool getSerialNumber(unsigned int &serialNumber)
Accessor for device serial number.
RokubiminiEthercatSlave()=delete
Default constructor is deleted.
void getReading(rokubimini::Reading &reading) const
Gets the internal reading variable.
std::atomic< PdoTypeEnum > currentPdoTypeEnum_
Current PDO type.
Base class for generic ethercat slaves using soem.
int fileSize_
The size of the file.
void updateWrite() override
This method is called by the EthercatBusManager. Each device attached to the bus writes its data to t...
void shutdown() override
Shuts down the device.
bool setSensorConfiguration(const configuration::SensorConfiguration &sensorConfiguration)
Sets a sensor configuration to the device.
bool configurePdo(const PdoTypeEnum pdoTypeEnum)
Configures a PDO in the Ethercat device.
bool setAccelerationFilter(const unsigned int filter)
Sets an acceleration filter to the device.
The Rokubimini Ethercat Implementation (Slave) class.
bool readFileToBuffer(const std::string &filePath)
Reads the contents of a file to an internal buffer.
bool setAngularRateFilter(const unsigned int filter)
Sets an angular rate filter to the device.
bool isRunning()
Returns if the instance is running.
PdoInfos pdoInfos_
Map between PDO types and their infos.
bool setRunMode()
Sets the device in run mode.
PdoTypeEnum getCurrentPdoTypeEnum() const
Accessor for the current PDO type.
bool saveConfigParameter()
Saves the current configuration to the device.
char * fileBuffer_
The buffer to save the contents of the file.
void setState(const uint16_t state)
Sets the desired EtherCAT state machine state of the device in the bus.
std::shared_ptr< RokubiminiEthercatSlave > RokubiminiEthercatSlavePtr
bool waitForState(const uint16_t state)
Wait for an EtherCAT state machine state to be reached.
std::atomic< PdoTypeEnum > pdoTypeEnum_
bool setForceTorqueOffset(const Eigen::Matrix< double, 6, 1 > &forceTorqueOffset)
Sets a force torque offset to the device.
bool sendCalibrationMatrixEntry(const uint8_t subId, const double entry)
Sends a calibration matrix entry to device.
PdoInfo getCurrentPdoInfo() const override
Accessor for the current PDO info.
bool setConfigMode()
Sets the device in config mode.
Struct defining the Pdo characteristic.
Class for managing an ethercat bus containing one or multiple slaves.
std::string getName() const override
Accessor for device name.
std::map< PdoTypeEnum, PdoInfo > PdoInfos
bool setForceTorqueFilter(const configuration::ForceTorqueFilter &filter)
Sets a force torque filter to the device.
const std::string name_
Name of the sensor.
bool startup() override
This method starts up and initializes the device.
~RokubiminiEthercatSlave() override=default
bool setSensorCalibration(const calibration::SensorCalibration &sensorCalibration)
Sets a sensor calibration to the device.
Reading reading_
The internal reading variable. It's used for providing to client code the sensor readings, through the getReading () function.
std::atomic< bool > isRunning_
Internal flag to indicate if the instance is running.