Added macros for adding and retrieving paramlib entries in order to make

the code less cluttered. Also built in a mechanism which makes sure that
forced fast polls are not ignored anymore when adaptive polling is
enabled.
This commit is contained in:
2025-05-08 17:04:23 +02:00
parent 5689402375
commit b89fe41c6e
4 changed files with 456 additions and 303 deletions

View File

@@ -219,7 +219,23 @@ class epicsShareClass sinqController : public asynMotorController {
* message repetitions. See the documentation of `printRepetitionWatchdog`
* in msgPrintControl.h for details.
*/
msgPrintControl &getMsgPrintControl();
msgPrintControl &getMsgPrintControl() { return msgPrintControl_; }
/**
* @brief Get the axis object
*
* @param pasynUser Specify the axis via the asynUser
* @return sinqAxis* If no axis could be found, this is a nullptr
*/
sinqAxis *getSinqAxis(asynUser *pasynUser);
/**
* @brief Get the axis object
*
* @param axisNo Specify the axis via its index
* @return sinqAxis* If no axis could be found, this is a nullptr
*/
sinqAxis *getSinqAxis(int axisNo);
// =========================================================================
// Public getters for protected members
@@ -314,9 +330,53 @@ class epicsShareClass sinqController : public asynMotorController {
*/
asynUser *pasynOctetSyncIOipPort() { return pasynOctetSyncIOipPort_; }
/**
* @brief Overloaded version of `asynController::poll` which decreases
* `outstandingForcedFastPolls` and then defers to the base method
*/
asynStatus poll();
/**
* @brief Overloaded version of `asynController::wakeupPoller` which
* initializes the `outstandingForcedFastPolls` variable and then defers to
* the base class method.
*
* @return asynStatus
*/
asynStatus wakeupPoller();
/**
* @brief Set the number of forced fast polls which should be performed when
* `wakeupPoller` is called.
*
* @param forcedFastPolls
*/
void setForcedFastPolls(int forcedFastPolls) {
forcedFastPolls_ = forcedFastPolls;
}
/**
* @brief Read the number of forced fast polls currently specified
*
*/
int forcedFastPolls() { return forcedFastPolls_; }
/**
* @brief Read the number of outstanding forced fast polls currently
* specified
*
*/
int outstandingForcedFastPolls() { return outstandingForcedFastPolls_; }
// =========================================================================
protected:
// Number of fast polls which still need to be performed before adaptive
// polling is active again.
int outstandingForcedFastPolls_;
// Number of polls forced by wakeupPoller which are still
// Pointer to the port user which is specified by the char array
// `ipPortConfigName` in the constructor
asynUser *pasynOctetSyncIOipPort_;