Skip to content

Commit

Permalink
Hotfix config.h autoconf system (ISIO PR #64), fix CLIcore_help.c by …
Browse files Browse the repository at this point in the history
…#including ImageStreamIO/config.h
  • Loading branch information
DasVinch committed Aug 29, 2024
1 parent ec9119d commit 1ee867c
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 121 deletions.
242 changes: 122 additions & 120 deletions src/CommandLineInterface/CLIcore/CLIcore_help.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
#include <unistd.h>

#include "CommandLineInterface/CLIcore.h"
#include "ImageStreamIO/ImageStreamIO_config.h" // For IMAGESTRUCT_VERSION


#define COLORRESET "\033[0m"
#define COLORCMD "\033[94m"
Expand Down Expand Up @@ -504,41 +506,41 @@ int CLIhelp_make_argstring(CLICMDARGDEF fpscliarg[],

switch(fpscliarg[arg].type)
{
case CLIARG_FLOAT32:
strcpy(typestring, "float32");
break;
case CLIARG_FLOAT32:
strcpy(typestring, "float32");
break;

case CLIARG_FLOAT64:
strcpy(typestring, "float64");
break;
case CLIARG_FLOAT64:
strcpy(typestring, "float64");
break;

case CLIARG_INT32:
strcpy(typestring, "int32");
break;
case CLIARG_INT32:
strcpy(typestring, "int32");
break;

case CLIARG_UINT32:
strcpy(typestring, "uint32");
break;
case CLIARG_UINT32:
strcpy(typestring, "uint32");
break;

case CLIARG_INT64:
strcpy(typestring, "int64");
break;
case CLIARG_INT64:
strcpy(typestring, "int64");
break;

case CLIARG_UINT64:
strcpy(typestring, "uint64");
break;
case CLIARG_UINT64:
strcpy(typestring, "uint64");
break;

case CLIARG_STR_NOT_IMG:
strcpy(typestring, "string");
break;
case CLIARG_STR_NOT_IMG:
strcpy(typestring, "string");
break;

case CLIARG_IMG:
strcpy(typestring, "string");
break;
case CLIARG_IMG:
strcpy(typestring, "string");
break;

case CLIARG_STR:
strcpy(typestring, "string");
break;
case CLIARG_STR:
strcpy(typestring, "string");
break;
}

if(arg == 0)
Expand Down Expand Up @@ -688,24 +690,24 @@ errno_t help_command(
data.cmd[cmdi].cmdsettings.triggermode);
switch(data.cmd[cmdi].cmdsettings.triggermode)
{
case PROCESSINFO_TRIGGERMODE_IMMEDIATE:
printf("IMMEDIATE");
break;
case PROCESSINFO_TRIGGERMODE_CNT0:
printf("CNT0");
break;
case PROCESSINFO_TRIGGERMODE_CNT1:
printf("CNT1");
break;
case PROCESSINFO_TRIGGERMODE_SEMAPHORE:
printf("SEMAPHORE");
break;
case PROCESSINFO_TRIGGERMODE_DELAY:
printf("DELAY");
break;
default:
printf("unknown");
break;
case PROCESSINFO_TRIGGERMODE_IMMEDIATE:
printf("IMMEDIATE");
break;
case PROCESSINFO_TRIGGERMODE_CNT0:
printf("CNT0");
break;
case PROCESSINFO_TRIGGERMODE_CNT1:
printf("CNT1");
break;
case PROCESSINFO_TRIGGERMODE_SEMAPHORE:
printf("SEMAPHORE");
break;
case PROCESSINFO_TRIGGERMODE_DELAY:
printf("DELAY");
break;
default:
printf("unknown");
break;
}
printf("\n");

Expand Down Expand Up @@ -769,92 +771,92 @@ errno_t help_command(

switch(data.cmd[cmdi].argdata[argi].type)
{
/*case CLIARG_FLOAT:
SNPRINTF_CHECK(valuestring, STRINGMAXLEN_CLICMDARG, "[ float ] %f",
data.cmd[cmdi].argdata[argi].val.f);
break;*/

case CLIARG_FLOAT32:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[float32] %f",
data.cmd[cmdi].argdata[argi].val.f32);
break;
/*case CLIARG_FLOAT:
SNPRINTF_CHECK(valuestring, STRINGMAXLEN_CLICMDARG, "[ float ] %f",
data.cmd[cmdi].argdata[argi].val.f);
break;*/

case CLIARG_FLOAT32:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[float32] %f",
data.cmd[cmdi].argdata[argi].val.f32);
break;

case CLIARG_FLOAT64:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[float64] %lf",
data.cmd[cmdi].argdata[argi].val.f64);
break;
case CLIARG_FLOAT64:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[float64] %lf",
data.cmd[cmdi].argdata[argi].val.f64);
break;

case CLIARG_ONOFF:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[ ONOFF ] %ld",
data.cmd[cmdi].argdata[argi].val.ui64);
break;
case CLIARG_ONOFF:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[ ONOFF ] %ld",
data.cmd[cmdi].argdata[argi].val.ui64);
break;

/*case CLIARG_LONG:
SNPRINTF_CHECK(valuestring, STRINGMAXLEN_CLICMDARG, "[ long ] %ld",
data.cmd[cmdi].argdata[argi].val.l);
break;*/
/*case CLIARG_LONG:
SNPRINTF_CHECK(valuestring, STRINGMAXLEN_CLICMDARG, "[ long ] %ld",
data.cmd[cmdi].argdata[argi].val.l);
break;*/

case CLIARG_INT32:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[ int32 ] %d",
data.cmd[cmdi].argdata[argi].val.i32);
break;
case CLIARG_INT32:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[ int32 ] %d",
data.cmd[cmdi].argdata[argi].val.i32);
break;

case CLIARG_UINT32:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[uint32 ] %u",
data.cmd[cmdi].argdata[argi].val.ui32);
break;
case CLIARG_UINT32:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[uint32 ] %u",
data.cmd[cmdi].argdata[argi].val.ui32);
break;

case CLIARG_INT64:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[ int64 ] %ld",
data.cmd[cmdi].argdata[argi].val.i64);
break;
case CLIARG_INT64:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[ int64 ] %ld",
data.cmd[cmdi].argdata[argi].val.i64);
break;

case CLIARG_UINT64:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[uint64 ] %lu",
data.cmd[cmdi].argdata[argi].val.ui64);
break;
case CLIARG_UINT64:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[uint64 ] %lu",
data.cmd[cmdi].argdata[argi].val.ui64);
break;

case CLIARG_STR_NOT_IMG:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[ STRnI ] %s",
data.cmd[cmdi].argdata[argi].val.s);
break;
case CLIARG_STR_NOT_IMG:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[ STRnI ] %s",
data.cmd[cmdi].argdata[argi].val.s);
break;

case CLIARG_IMG:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[ IMG ] %s",
data.cmd[cmdi].argdata[argi].val.s);
break;
case CLIARG_IMG:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[ IMG ] %s",
data.cmd[cmdi].argdata[argi].val.s);
break;

case CLIARG_STR:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[ STR ] %s",
data.cmd[cmdi].argdata[argi].val.s);
break;
case CLIARG_STR:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[ STR ] %s",
data.cmd[cmdi].argdata[argi].val.s);
break;

case CLIARG_STREAM:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[ STREA ] %s",
data.cmd[cmdi].argdata[argi].val.s);
break;
case CLIARG_STREAM:
SNPRINTF_CHECK(valuestring,
STRINGMAXLEN_CLICMDARG,
"[ STREA ] %s",
data.cmd[cmdi].argdata[argi].val.s);
break;
}

if(!(data.cmd[cmdi].argdata[argi].flag & CLICMDARG_FLAG_NOCLI))
Expand Down
2 changes: 1 addition & 1 deletion src/ImageStreamIO

0 comments on commit 1ee867c

Please sign in to comment.