Commit b153f796 authored by kpetersn's avatar kpetersn
Browse files

Removed the test function

parent 68c31bc5
......@@ -22,51 +22,25 @@ Linkam::Linkam(const char *portName) : asynPortDriver(portName, MAX_CONTROLLERS,
// Must be in the directory with the DLL when this line is executed
LoadMonoLibrary("LinkamCommsDll.dll");
//
// Call to internal library method, will return wrapper version.
wrapperVersion_ = GetWrapperVersion();
printf("Using Wrapper Version %s\n", wrapperVersion_);
// Call to LinkamCommsDll.Comms.GetDllVersion().
libraryVersion_ = GetDllVersion();
printf("Comms Library Version %s\n", libraryVersion_);
// TODO: should this be moved to an init method?
// Open communication with the device [Wrapped call to LinkamCommsDll.Comms.OpenComms()]
// TODO: should this be moved to an init or connect method?
// Wrapped call to LinkamCommsDll.Comms.OpenComms()
OpenComms(true, 0, 0);
// Start poller?
// For now just read the temp and exit
// Start poller? For now just initialize the temperature
// Wrapped call to LinkamCommDll.Comms.GetValue(). Index 0 is temperature.
// See Linkam.SharedEnums.eVALUETYPE page for full listing.
temperatureRbv_ = GetValue(0);
printf("Stage temperature:%f °C\n", temperatureRbv_);
// Disconnect
OpenComms(false, 0, 0);
}
int test(void) {
LoadMonoLibrary("LinkamCommsDll.dll");
/*
* 1. Call to internal library method, will return wrapper version.
*/
printf("Using Wrapper Version %s \n",GetWrapperVersion());
/*
* 2. Call to LinkamCommsDll.Comms.GetDllVersion(). Use Search feature for method documentation
*/
printf("Comms Library Version %s \n",GetDllVersion());
printf("Press Enter to continue or CTRL+C to close \n");
getchar();
/*
* 3. Wrapped call to LinkamCommsDll.Comms.OpenComms()
*/
OpenComms(true, 0, 0);
printf("Press Enter to Read Temperature\n");
getchar();
/*
* 4. Wrapped call to LinkamCommDll.Comms.GetValue(). Index 0 is temperature.
* See Linkam.SharedEnums.eVALUETYPE page for full listing.
*/
printf("Stage temperature:%f °C", GetValue(0));
OpenComms(false, 0, 0);
getchar();
return 0;
//OpenComms(false, 0, 0);
}
extern "C" int LinkamConfig(const char *portName)
......@@ -75,13 +49,6 @@ extern "C" int LinkamConfig(const char *portName)
return(asynSuccess);
}
extern "C" int LinkamTest(void) {
int retval;
retval = test();
return retval;
}
static const iocshArg linkamArg0 = { "Port name", iocshArgString};
static const iocshArg * const linkamArgs[1] = {&linkamArg0};
static const iocshFuncDef linkamFuncDef = {"LinkamConfig", 0, linkamArgs};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment