Initial version of sinqMotor
This commit is contained in:
54
src/sinqController.h
Normal file
54
src/sinqController.h
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
This class contains the necessary changes to have an additional text fields
|
||||
for messages with each axis.
|
||||
|
||||
Code lifted from Torsten Boegershausens ESS code.
|
||||
|
||||
Mark Koennecke, March 2017
|
||||
*/
|
||||
|
||||
#ifndef __sinqController
|
||||
#define __sinqController
|
||||
#include "asynMotorController.h"
|
||||
|
||||
#define motorMessageIsFromDriverString "MOTOR_MESSAGE_DRIVER"
|
||||
#define motorMessageTextString "MOTOR_MESSAGE_TEXT"
|
||||
|
||||
class epicsShareClass sinqController : public asynMotorController {
|
||||
public:
|
||||
sinqController(const char *portName, const char *SINQPortName, int numAxes,
|
||||
const int &extraParams = 2);
|
||||
|
||||
friend class sinqAxis;
|
||||
|
||||
/**
|
||||
If accessing the parameter library failed (return status != asynSuccess),
|
||||
calling this function writes a standardized message to both the IOC shell
|
||||
and the motor message text PV. It then returns the input status.
|
||||
*/
|
||||
asynStatus paramLibAccessFailed(asynStatus status, const char *parameter,
|
||||
const char *functionName, int lineNumber);
|
||||
|
||||
/**
|
||||
This function writes a standardized message to both the IOC shell and
|
||||
the motor message text PV in case parsing a response (e.g. via sscanf)
|
||||
failed. It always returns asynError.
|
||||
*/
|
||||
asynStatus errMsgCouldNotParseResponse(const char *command,
|
||||
const char *response, int axisNo_,
|
||||
const char *functionName,
|
||||
int lineNumber);
|
||||
|
||||
/**
|
||||
Convert an asynStatus into a descriptive string. This string can then e.g.
|
||||
be used to create debugging messages.
|
||||
*/
|
||||
char *stringifyAsynStatus(asynStatus status);
|
||||
|
||||
protected:
|
||||
asynUser *lowLevelPortUser_;
|
||||
int motorMessageIsFromDriver_;
|
||||
int motorMessageText_;
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user