This commit is contained in:
2024-03-04 11:22:34 +01:00
parent e092ed9dea
commit 21c010d0be
12 changed files with 433 additions and 184 deletions

View File

@@ -29,6 +29,8 @@ extern "C" {
static int lastEcmcError = 0;
static char* lastConfStr = NULL;
static int alreadyLoaded = 0;
/** Optional.
* Will be called once after successfull load into ecmc.
* Return value other than 0 will be considered error.
@@ -36,11 +38,14 @@ static char* lastConfStr = NULL;
**/
int daqConstruct(char *configStr)
{
//This module is allowed to load several times so no need to check if loaded
if(alreadyLoaded) {
printf("Error: Plugin ecmc_plugin_daq already loaded and can only be loaded once.")
return -1;
}
// create FFT object and register data callback
lastConfStr = strdup(configStr);
return 0; //createDAQ(configStr);
return 0 //createDAQ(configStr); //create from iocsh commands instead
}
/** Optional function.