91 lines
3.1 KiB
C++
91 lines
3.1 KiB
C++
/********************************************
|
|
* detectorTowerController.h
|
|
*
|
|
* Detector tower controller driver based on the asynMotorController class
|
|
*
|
|
* Stefan Mathis, September 2024
|
|
********************************************/
|
|
|
|
#ifndef detectorTowerController_H
|
|
#define detectorTowerController_H
|
|
#include "auxiliaryAxis.h"
|
|
#include "detectorTowerAxis.h"
|
|
#include "turboPmacController.h"
|
|
|
|
class detectorTowerController : public turboPmacController {
|
|
|
|
public:
|
|
/**
|
|
* @brief Construct a new detectorTowerController object
|
|
*
|
|
* This controller object can handle both "normal" TurboPMAC axes created
|
|
with the turboPmacAxis constructor and the special detectorTowerAxis.
|
|
*
|
|
* @param portName See sinqController constructor
|
|
* @param ipPortConfigName See sinqController constructor
|
|
* @param numAxes See sinqController constructor
|
|
* @param movingPollPeriod See sinqController constructor
|
|
* @param idlePollPeriod See sinqController constructor
|
|
* @param comTimeout When trying to communicate with the device,
|
|
the underlying asynOctetSyncIO interface waits for a response until this
|
|
time (in seconds) has passed, then it declares a timeout.
|
|
*/
|
|
detectorTowerController(const char *portName, const char *ipPortConfigName,
|
|
int numAxes, double movingPollPeriod,
|
|
double idlePollPeriod, double comTimeout);
|
|
|
|
/**
|
|
* @brief Overloaded function of turboPmacController
|
|
*
|
|
* The function is overloaded in order to read motorCanDisable_
|
|
*
|
|
* @param pasynUser
|
|
* @param value
|
|
* @return asynStatus
|
|
*/
|
|
asynStatus readInt32(asynUser *pasynUser, epicsInt32 *value);
|
|
|
|
/**
|
|
* @brief Overloaded function of turboPmacController
|
|
*
|
|
* The function is overloaded to allow resetting an error.
|
|
*
|
|
* @param pasynUser Specify the axis via the asynUser
|
|
* @param value New value
|
|
* @return asynStatus
|
|
*/
|
|
asynStatus writeInt32(asynUser *pasynUser, epicsInt32 value);
|
|
|
|
/**
|
|
* @brief Get the axis object
|
|
*
|
|
* @param pasynUser Specify the axis via the asynUser
|
|
* @return detectorTowerAxis* If no axis could be found, this is a
|
|
* nullptr
|
|
*/
|
|
detectorTowerAxis *getDetectorTowerAxis(asynUser *pasynUser);
|
|
|
|
/**
|
|
* @brief Get the axis object
|
|
*
|
|
* @param axisNo Specify the axis via its index
|
|
* @return detectorTowerAxis* If no axis could be found, this is a
|
|
* nullptr
|
|
*/
|
|
detectorTowerAxis *getDetectorTowerAxis(int axisNo);
|
|
|
|
private:
|
|
// Indices of additional PVs
|
|
#define FIRST_detectorTower_PARAM positionStateRBV_
|
|
int positionStateRBV_;
|
|
int changeState_;
|
|
#define LAST_detectorTower_PARAM changeState_
|
|
|
|
friend class detectorTowerAxis;
|
|
friend class auxiliaryAxis;
|
|
};
|
|
#define NUM_detectorTower_DRIVER_PARAMS \
|
|
(&LAST_detectorTower_PARAM - &FIRST_detectorTower_PARAM + 1)
|
|
|
|
#endif /* detectorTowerController_H */
|