Skip to content

In v3, Parameters needed for DACCountScan aren't actually passed to the driver #8

Description

@ericonr

The numModulesX and numModulesY parameters from pimegaDetectorConfig aren't configured in the iocsh command definition, so they aren't passed to the registered function.

extern "C" int pimegaDetectorConfig(
const char *portName, const char *address_module01,
const char *address_module02, const char *address_module03,
const char *address_module04, const char *address_module05,
const char *address_module06, const char *address_module07,
const char *address_module08, const char *address_module09,
const char *address_module10, int port, int maxSizeX, int maxSizeY,
int detectorModel, int maxBuffers, size_t maxMemory, int priority,
int stackSize, int simulate, int backendOn, int log,
unsigned short backend_port, unsigned short vis_frame_port,
int IntAcqResetRDMA, int numModulesX, int numModulesY) {
new pimegaDetector(portName, address_module01, address_module02,
address_module03, address_module04, address_module05,
address_module06, address_module07, address_module08,
address_module09, address_module10, port, maxSizeX,
maxSizeY, detectorModel, maxBuffers, maxMemory, priority,
stackSize, simulate, backendOn, log, backend_port,
vis_frame_port, IntAcqResetRDMA, numModulesX, numModulesY);
return (asynSuccess);
}

static const iocshArg *const pimegaDetectorConfigArgs[] = {
&pimegaDetectorConfigArg0, &pimegaDetectorConfigArg1,
&pimegaDetectorConfigArg2, &pimegaDetectorConfigArg3,
&pimegaDetectorConfigArg4, &pimegaDetectorConfigArg5,
&pimegaDetectorConfigArg6, &pimegaDetectorConfigArg7,
&pimegaDetectorConfigArg8, &pimegaDetectorConfigArg9,
&pimegaDetectorConfigArg10, &pimegaDetectorConfigArg11,
&pimegaDetectorConfigArg12, &pimegaDetectorConfigArg13,
&pimegaDetectorConfigArg14, &pimegaDetectorConfigArg15,
&pimegaDetectorConfigArg16, &pimegaDetectorConfigArg17,
&pimegaDetectorConfigArg18, &pimegaDetectorConfigArg19,
&pimegaDetectorConfigArg20, &pimegaDetectorConfigArg21,
&pimegaDetectorConfigArg22, &pimegaDetectorConfigArg23,
&pimegaDetectorConfigArg24};
static const iocshFuncDef configpimegaDetector = {"pimegaDetectorConfig", 25,
pimegaDetectorConfigArgs};
static void configpimegaDetectorCallFunc(const iocshArgBuf *args) {
pimegaDetectorConfig(
args[0].sval, args[1].sval, args[2].sval, args[3].sval, args[4].sval,
args[5].sval, args[6].sval, args[7].sval, args[8].sval, args[9].sval,
args[10].sval, args[11].ival, args[12].ival, args[13].ival, args[14].ival,
args[15].ival, args[16].ival, args[17].ival, args[18].ival, args[19].ival,
args[20].ival, args[21].ival, args[22].ival, args[23].ival, args[24].ival,
args[25].ival, args[26].ival);
}

While the command can be fixed, we'd suggest having information about the geometric organization of detectors supplied by pimega-api, instead of having to pass them to the driver configuration function.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    pitec-v3Issue affects pitec-v3 branch

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions