Addes instructions how to use sinqMotor as static dependency.
This commit is contained in:
@@ -61,8 +61,7 @@ asynStatus setAxisParam<const char *>(sinqAxis *axis, const char *indexName,
|
||||
template <>
|
||||
asynStatus getAxisParam<int>(sinqAxis *axis, const char *indexName,
|
||||
int (sinqController::*func)(), int *readValue,
|
||||
const char *callerFunctionName, int lineNumber,
|
||||
int maxChars) {
|
||||
const char *callerFunctionName, int lineNumber) {
|
||||
int indexValue = (axis->pController()->*func)();
|
||||
asynStatus status = axis->pController()->getIntegerParam(
|
||||
axis->axisNo(), indexValue, readValue);
|
||||
@@ -76,18 +75,16 @@ asynStatus getAxisParam<int>(sinqAxis *axis, const char *indexName,
|
||||
template <>
|
||||
asynStatus getAxisParam<bool>(sinqAxis *axis, const char *indexName,
|
||||
int (sinqController::*func)(), bool *readValue,
|
||||
const char *callerFunctionName, int lineNumber,
|
||||
int maxChars) {
|
||||
const char *callerFunctionName, int lineNumber) {
|
||||
return getAxisParam(axis, indexName, func, (int *)readValue,
|
||||
callerFunctionName, lineNumber);
|
||||
}
|
||||
|
||||
template <>
|
||||
asynStatus getAxisParam<double>(sinqAxis *axis, const char *indexName,
|
||||
int (sinqController::*func)(),
|
||||
double *readValue,
|
||||
const char *callerFunctionName, int lineNumber,
|
||||
int maxChars) {
|
||||
asynStatus
|
||||
getAxisParam<double>(sinqAxis *axis, const char *indexName,
|
||||
int (sinqController::*func)(), double *readValue,
|
||||
const char *callerFunctionName, int lineNumber) {
|
||||
int indexValue = (axis->pController()->*func)();
|
||||
asynStatus status = axis->pController()->getDoubleParam(
|
||||
axis->axisNo(), indexValue, readValue);
|
||||
@@ -101,8 +98,10 @@ asynStatus getAxisParam<double>(sinqAxis *axis, const char *indexName,
|
||||
template <>
|
||||
asynStatus getAxisParam<char>(sinqAxis *axis, const char *indexName,
|
||||
int (sinqController::*func)(), char *readValue,
|
||||
const char *callerFunctionName, int lineNumber,
|
||||
int maxChars) {
|
||||
const char *callerFunctionName, int lineNumber) {
|
||||
|
||||
int maxChars = 190;
|
||||
|
||||
int indexValue = (axis->pController()->*func)();
|
||||
asynStatus status = axis->pController()->getStringParam(
|
||||
axis->axisNo(), indexValue, maxChars, readValue);
|
||||
@@ -114,11 +113,10 @@ asynStatus getAxisParam<char>(sinqAxis *axis, const char *indexName,
|
||||
}
|
||||
|
||||
template <>
|
||||
asynStatus getAxisParam<std::string>(sinqAxis *axis, const char *indexName,
|
||||
int (sinqController::*func)(),
|
||||
std::string *readValue,
|
||||
const char *callerFunctionName,
|
||||
int lineNumber, int maxChars) {
|
||||
asynStatus
|
||||
getAxisParam<std::string>(sinqAxis *axis, const char *indexName,
|
||||
int (sinqController::*func)(), std::string *readValue,
|
||||
const char *callerFunctionName, int lineNumber) {
|
||||
int indexValue = (axis->pController()->*func)();
|
||||
|
||||
// Convert the pointer to a reference, since getStringParam expects the
|
||||
|
||||
@@ -474,8 +474,7 @@ asynStatus setAxisParam(sinqAxis *axis, const char *indexName,
|
||||
template <typename T>
|
||||
asynStatus getAxisParam(sinqAxis *axis, const char *indexName,
|
||||
int (sinqController::*func)(), T *readValue,
|
||||
const char *callerFunctionName, int lineNumber,
|
||||
int maxChars = 0);
|
||||
const char *callerFunctionName, int lineNumber);
|
||||
|
||||
/**
|
||||
* @brief Macro to get an paramLib parameter and error checking the return value
|
||||
@@ -523,13 +522,25 @@ asynStatus getAxisParam(sinqAxis *axis, const char *indexName,
|
||||
* ```
|
||||
* =============================================================================
|
||||
*/
|
||||
#define getAxisParamChecked(axis, indexGetterFunction, readValue, ...) \
|
||||
// #define getAxisParamChecked(axis, indexGetterFunction, readValue, ...) \
|
||||
// { \
|
||||
// asynStatus getStatus = getAxisParam( \
|
||||
// axis, #indexGetterFunction, \
|
||||
// &std::remove_pointer< \
|
||||
// decltype(axis->pController())>::type::indexGetterFunction, \
|
||||
// readValue, __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); \
|
||||
// if (getStatus != asynSuccess) { \
|
||||
// return getStatus; \
|
||||
// } \
|
||||
// }
|
||||
|
||||
#define getAxisParamChecked(axis, indexGetterFunction, readValue) \
|
||||
{ \
|
||||
asynStatus getStatus = getAxisParam( \
|
||||
axis, #indexGetterFunction, \
|
||||
&std::remove_pointer< \
|
||||
decltype(axis->pController())>::type::indexGetterFunction, \
|
||||
readValue, __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__); \
|
||||
readValue, __PRETTY_FUNCTION__, __LINE__); \
|
||||
if (getStatus != asynSuccess) { \
|
||||
return getStatus; \
|
||||
} \
|
||||
|
||||
Reference in New Issue
Block a user