Applied various bugfixes to make this driver fully operational

This commit is contained in:
2025-02-14 16:31:23 +01:00
parent fd4467ae54
commit b4e49a9d7a
6 changed files with 597 additions and 409 deletions

View File

@@ -1,16 +1,16 @@
/********************************************
* turboPmacController.h
*
* PMAC V3 controller driver based on the asynMotorController class
* Turbo PMAC controller driver based on the asynMotorController class
*
* Stefan Mathis, September 2024
********************************************/
#ifndef turboPmacController_H
#define turboPmacController_H
#include "turboPmacAxis.h"
#include "sinqAxis.h"
#include "sinqController.h"
#include "turboPmacAxis.h"
class turboPmacController : public sinqController {
@@ -28,14 +28,15 @@ class turboPmacController : public sinqController {
time (in seconds) has passed, then it declares a timeout.
*/
turboPmacController(const char *portName, const char *ipPortConfigName,
int numAxes, double movingPollPeriod,
double idlePollPeriod, double comTimeout);
int numAxes, double movingPollPeriod,
double idlePollPeriod, double comTimeout);
/**
* @brief Get the axis object
*
* @param pasynUser Specify the axis via the asynUser
* @return turboPmacAxis* If no axis could be found, this is a nullptr
* @return turboPmacAxis* If no axis could be found, this is a
* nullptr
*/
turboPmacAxis *getAxis(asynUser *pasynUser);
@@ -43,7 +44,8 @@ class turboPmacController : public sinqController {
* @brief Get the axis object
*
* @param axisNo Specify the axis via its index
* @return turboPmacAxis* If no axis could be found, this is a nullptr
* @return turboPmacAxis* If no axis could be found, this is a
* nullptr
*/
turboPmacAxis *getAxis(int axisNo);
@@ -81,8 +83,8 @@ class turboPmacController : public sinqController {
int numExpectedResponses);
/**
* @brief Save cast of the given asynAxis pointer to a turboPmacAxis pointer.
* If the cast fails, this function returns a nullptr.
* @brief Save cast of the given asynAxis pointer to a turboPmacAxis
* pointer. If the cast fails, this function returns a nullptr.
*
* @param asynAxis
* @return turboPmacAxis*
@@ -119,7 +121,7 @@ class turboPmacController : public sinqController {
static const uint32_t MAXBUF_ = 200;
/*
Stores the constructor input comTimeout
Timeout for the communication process in seconds
*/
double comTimeout_;
@@ -133,6 +135,7 @@ class turboPmacController : public sinqController {
friend class turboPmacAxis;
};
#define NUM_turboPmac_DRIVER_PARAMS (&LAST_turboPmac_PARAM - &FIRST_turboPmac_PARAM + 1)
#define NUM_turboPmac_DRIVER_PARAMS \
(&LAST_turboPmac_PARAM - &FIRST_turboPmac_PARAM + 1)
#endif /* turboPmacController_H */