diff --git a/src/sinqAxis.cpp b/src/sinqAxis.cpp index c379ad3..83ab0d3 100644 --- a/src/sinqAxis.cpp +++ b/src/sinqAxis.cpp @@ -821,6 +821,16 @@ asynStatus sinqAxis::setScaleMovTimeout(time_t scaleMovTimeout) { return asynSuccess; } +bool sinqAxis::wasMoving() { return pSinqA_->wasMoving; } + +void sinqAxis::setWasMoving(bool wasMoving) { pSinqA_->wasMoving = wasMoving; } + +double sinqAxis::targetPosition() { return pSinqA_->targetPosition; } + +void sinqAxis::setTargetPosition(double targetPosition) { + pSinqA_->targetPosition = targetPosition; +} + // ============================================================================= // IOC shell functions extern "C" { diff --git a/src/sinqAxis.h b/src/sinqAxis.h index 7d254c8..1f741f4 100644 --- a/src/sinqAxis.h +++ b/src/sinqAxis.h @@ -369,6 +369,36 @@ class epicsShareClass sinqAxis : public asynMotorAxis { */ sinqController *pController() { return pC_; }; + /** + * @brief Returns true, if the axis was moving in the last poll cycle, and + * false otherwise. + * + * @return true + * @return false + */ + bool wasMoving(); + + /** + * @brief Override the wasMoving flag (normally, it is automatically updated + * during each poll). + * + */ + void setWasMoving(bool wasMoving); + + /** + * @brief Read out the last received target position in engineering units. + * + * @return double + */ + double targetPosition(); + + /** + * @brief Override the targetPosition value (normally, it is automatically + * updated at every call of the move() method). + * + */ + void setTargetPosition(double targetPosition); + private: std::unique_ptr pSinqA_; sinqController *pC_;