Remove unused class parameter and update the devOrcaConfig iocsh function
This commit is contained in:
+14
-31
@@ -28,17 +28,14 @@ static void c_temperaturetask(void* arg) {
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
Orca::Orca(const char* portName, int cameraId, int maxBuffers, size_t maxMemory,
|
||||
int priority, int stackSize, int maxFrames)
|
||||
Orca::Orca(const char* portName, int maxBuffers, size_t maxMemory, int priority,
|
||||
int stackSize, int maxFrames)
|
||||
: ADDriver(portName, 1, 0, maxBuffers, maxMemory, asynEnumMask,
|
||||
asynEnumMask,
|
||||
ASYN_CANBLOCK, /* ASYN_CANBLOCK=1 ASYN_MULTIDEVICE=0 */
|
||||
1, /* autoConnect=1 */
|
||||
priority, stackSize),
|
||||
m_hdcam(NULL),
|
||||
m_id(0)
|
||||
|
||||
{
|
||||
m_hdcam(NULL) {
|
||||
const char* functionName = "orcaDetector::orcaDetector";
|
||||
stopThread = 0;
|
||||
|
||||
@@ -1888,25 +1885,14 @@ int Orca::connectCamera(void) {
|
||||
|
||||
//============================================================================
|
||||
int Orca::disconnectCamera(void) {
|
||||
static const char* functionName = "disconnectCamera";
|
||||
|
||||
int status = 0;
|
||||
|
||||
if (m_hdcam == NULL) {
|
||||
return status;
|
||||
}
|
||||
|
||||
asynPrint(pasynUserSelf, ASYN_TRACE_FLOW, "%s:%s: disconnecting camera %d\n",
|
||||
driverName, functionName, m_id);
|
||||
|
||||
dcamdev_close(m_hdcam);
|
||||
|
||||
if (status) {
|
||||
asynPrint(pasynUserSelf, ASYN_TRACE_ERROR,
|
||||
"%s:%s: error closing camera %d\n", driverName, functionName,
|
||||
m_id);
|
||||
}
|
||||
|
||||
m_hdcam = NULL;
|
||||
return status;
|
||||
}
|
||||
@@ -2163,33 +2149,30 @@ int Orca::roundToNearestMultipleOfFour(int value) {
|
||||
}
|
||||
|
||||
/* Code for iocsh registration */
|
||||
extern "C" int OrcaConfig(const char* portName, int cameraId, int maxBuffers,
|
||||
extern "C" int OrcaConfig(const char* portName, int maxBuffers,
|
||||
size_t maxMemory, int priority, int stackSize,
|
||||
int maxFrames) {
|
||||
new Orca(portName, cameraId, maxBuffers, maxMemory, priority, stackSize,
|
||||
maxFrames);
|
||||
new Orca(portName, maxBuffers, maxMemory, priority, stackSize, maxFrames);
|
||||
|
||||
return (asynSuccess);
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
static const iocshArg OrcaConfigArg0 = {"Port name", iocshArgString};
|
||||
static const iocshArg OrcaConfigArg1 = {"CameraId", iocshArgInt};
|
||||
static const iocshArg OrcaConfigArg2 = {"maxBuffers", iocshArgInt};
|
||||
static const iocshArg OrcaConfigArg3 = {"maxMemory", iocshArgInt};
|
||||
static const iocshArg OrcaConfigArg4 = {"priority", iocshArgInt};
|
||||
static const iocshArg OrcaConfigArg5 = {"stackSize", iocshArgInt};
|
||||
static const iocshArg OrcaConfigArg6 = {"maxFrames", iocshArgInt};
|
||||
static const iocshArg OrcaConfigArg1 = {"maxBuffers", iocshArgInt};
|
||||
static const iocshArg OrcaConfigArg2 = {"maxMemory", iocshArgInt};
|
||||
static const iocshArg OrcaConfigArg3 = {"priority", iocshArgInt};
|
||||
static const iocshArg OrcaConfigArg4 = {"stackSize", iocshArgInt};
|
||||
static const iocshArg OrcaConfigArg5 = {"maxFrames", iocshArgInt};
|
||||
static const iocshArg* const OrcaConfigArgs[] = {
|
||||
&OrcaConfigArg0, &OrcaConfigArg1, &OrcaConfigArg2, &OrcaConfigArg3,
|
||||
&OrcaConfigArg4, &OrcaConfigArg5, &OrcaConfigArg6};
|
||||
&OrcaConfigArg0, &OrcaConfigArg1, &OrcaConfigArg2,
|
||||
&OrcaConfigArg3, &OrcaConfigArg4, &OrcaConfigArg5};
|
||||
|
||||
static const iocshFuncDef configorca = {"devOrcamatsuConfig", 7,
|
||||
OrcaConfigArgs};
|
||||
static const iocshFuncDef configorca = {"devOrcaConfig", 6, OrcaConfigArgs};
|
||||
|
||||
static void configorcaCallFunc(const iocshArgBuf* args) {
|
||||
OrcaConfig(args[0].sval, args[1].ival, args[2].ival, args[3].ival,
|
||||
args[4].ival, args[5].ival, args[6].ival);
|
||||
args[4].ival, args[5].ival);
|
||||
}
|
||||
|
||||
static void orcaRegister(void) {
|
||||
|
||||
Reference in New Issue
Block a user