Go to the documentation of this file.
30 #ifndef PHIDGETS_API_ENCODERS_H
31 #define PHIDGETS_API_ENCODERS_H
48 int32_t serial_number,
int hub_port,
bool is_hub_port_device,
49 std::function<
void(
int,
int,
double,
int)> position_change_handler);
66 void setPosition(
int index, int64_t position)
const;
83 void setEnabled(
int index,
bool enabled)
const;
85 Phidget_EncoderIOMode
getIOMode(
int index)
const;
86 void setIOMode(
int index, Phidget_EncoderIOMode io_mode)
const;
93 std::vector<std::unique_ptr<Encoder>>
encs_;
98 #endif // PHIDGETS_API_ENCODERS_H
void setIOMode(int index, Phidget_EncoderIOMode io_mode) const
void setEnabled(int index, bool enabled) const
Set the powered state of an encoder. If an encoder is not enabled, it will not be given power,...
void setPosition(int index, int64_t position) const
Sets the offset of an encoder such that current position is the specified value.
Phidget_EncoderIOMode getIOMode(int index) const
uint32_t getDataInterval(int index) const
std::vector< std::unique_ptr< Encoder > > encs_
uint32_t getEncoderCount() const
Gets the number of encoder input channels supported by this board.
int64_t getIndexPosition(int index) const
Gets the position of an encoder the last time an index pulse occured. An index pulse in this context ...
Encoders(int32_t serial_number, int hub_port, bool is_hub_port_device, std::function< void(int, int, double, int)> position_change_handler)
#define PHIDGET22_NO_COPY_NO_MOVE_NO_ASSIGN(Classname)
bool getEnabled(int index) const
Checks if an encoder is powered on and receiving events.
void setDataInterval(int index, uint32_t data_interval_ms) const
int64_t getPosition(int index) const
Reads the current position of an encoder.
phidgets_api
Author(s): Tully Foote, Ivan Dryanovski
autogenerated on Sun May 11 2025 02:20:27