Go to the documentation of this file.
30 #ifndef PHIDGETS_API_ENCODER_H
31 #define PHIDGETS_API_ENCODER_H
35 #include <libphidget22/phidget22.h>
47 int32_t serial_number,
int hub_port,
bool is_hub_port_device,
49 std::function<
void(
int,
int,
double,
int)> position_change_handler);
80 void setIOMode(Phidget_EncoderIOMode io_mode)
const;
94 int position_change,
double time_change,
100 #endif // PHIDGETS_API_ENCODER_H
uint32_t getDataInterval() const
void setEnabled(bool enabled) const
Set the powered state of an encoder. If an encoder is not enabled, it will not be given power,...
PhidgetEncoderHandle encoder_handle_
int64_t getPosition() const
Reads the current position of an encoder.
void setIOMode(Phidget_EncoderIOMode io_mode) const
bool getEnabled() const
Checks if an encoder is powered on and receiving events.
static void PositionChangeHandler(PhidgetEncoderHandle phid, void *ctx, int position_change, double time_change, int index_triggered)
void setPosition(int64_t position) const
Sets the offset of an encoder such that current position is the specified value.
void setDataInterval(uint32_t data_interval_ms) const
std::function< void(int, int, double, int)> position_change_handler_
Encoder(int32_t serial_number, int hub_port, bool is_hub_port_device, int channel, std::function< void(int, int, double, int)> position_change_handler)
int64_t getIndexPosition() const
Gets the position of an encoder the last time an index pulse occured. An index pulse in this context ...
#define PHIDGET22_NO_COPY_NO_MOVE_NO_ASSIGN(Classname)
void positionChangeHandler(int position_change, double time, int index_triggered)
Phidget_EncoderIOMode getIOMode() const
phidgets_api
Author(s): Tully Foote, Ivan Dryanovski
autogenerated on Sun May 11 2025 02:20:27