ZClk  0.1.0-alpha.3
Library to build cli programs
zclk.h
Go to the documentation of this file.
1 // Copyright (c) 2020 Abhishek Mishra
2 //
3 // This software is released under the MIT License.
4 // https://opensource.org/licenses/MIT
5 
11 #ifndef __ZCLK_H__
12 #define __ZCLK_H__
13 
14 #include "zclk_common.h"
15 
16 #include <coll_arraylist.h>
17 
18 #ifdef LUA_ENABLED
19 #include <lua.h>
20 #include <lauxlib.h>
21 #endif //LUA_ENABLED
22 
23 #include "zclk_table.h"
24 #include "zclk_dict.h"
25 #include "zclk_progress.h"
26 
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30 
32 #define ZCLK_OPTION_HELP_LONG "help"
34 #define ZCLK_OPTION_HELP_SHORT "h"
36 #define ZCLK_OPTION_HELP_DESC "Print help for command."
37 
42 typedef enum
43 {
44  ZCLK_RES_IS_RUNNING = -1,
45  ZCLK_RES_SUCCESS = 0,
46  ZCLK_RES_ERR_UNKNOWN = 1,
47  ZCLK_RES_ERR_ALLOC_FAILED = 2,
48  ZCLK_RES_ERR_COMMAND_NOT_FOUND = 3,
49  ZCLK_RES_ERR_OPTION_NOT_FOUND = 4,
50  ZCLK_RES_ERR_ARG_NOT_FOUND = 5,
51  ZCLK_RES_ERR_EXTRA_ARGS_FOUND = 6
52 } zclk_res;
53 
58 typedef enum
59 {
60  ZCLK_TYPE_BOOLEAN = 0,
61  ZCLK_TYPE_INT = 1,
62  ZCLK_TYPE_DOUBLE = 2,
63  ZCLK_TYPE_STRING = 3,
64  ZCLK_TYPE_FLAG = 4
65 } zclk_type;
66 
67 #define ZCLK_BOOL_TRUE 1
68 #define ZCLK_BOOL_FALSE 0
69 #define ZCLK_FLAG_ON 1
70 #define ZCLK_FLAG_OFF 0
71 
76 typedef enum
77 {
78  ZCLK_RESULT_STRING = 0,
79  ZCLK_RESULT_TABLE = 1,
80  ZCLK_RESULT_DICT = 2,
81  ZCLK_RESULT_PROGRESS = 3
83 
88 typedef struct zclk_val_t
89 {
91  union {
92  int bool_value;
93  int int_value;
94  double dbl_value;
95  char* str_value;
96  } data;
98 
99 MODULE_API int zclk_val_is_type(zclk_val *val, zclk_type type);
100 
107 #define zclk_val_is_bool(val) zclk_val_is_type(val, ZCLK_TYPE_BOOLEAN)
108 
115 #define zclk_val_is_int(val) zclk_val_is_type(val, ZCLK_TYPE_INT)
116 
123 #define zclk_val_is_double(val) zclk_val_is_type(val, ZCLK_TYPE_DOUBLE)
124 
131 #define zclk_val_is_string(val) zclk_val_is_type(val, ZCLK_TYPE_STRING)
132 
139 #define zclk_val_is_flag(val) zclk_val_is_type(val, ZCLK_TYPE_FLAG)
140 
147 MODULE_API int zclk_val_get_bool(zclk_val *val);
148 
155 MODULE_API int zclk_val_get_int(zclk_val *val);
156 
163 MODULE_API double zclk_val_get_double(zclk_val *val);
164 
171 MODULE_API const char* zclk_val_get_string(zclk_val *val);
172 
179 MODULE_API int zclk_val_get_flag(zclk_val *val);
180 
187 MODULE_API void zclk_val_set_bool(zclk_val *val, int bval);
188 
195 MODULE_API void zclk_val_set_int(zclk_val *val, int ival);
196 
203 MODULE_API void zclk_val_set_dobule(zclk_val *val, double dval);
204 
211 MODULE_API void zclk_val_set_string(zclk_val *val, const char* sval);
212 
219 MODULE_API void zclk_val_set_flag(zclk_val *val, int fval);
220 
221 #ifdef LUA_ENABLED
229 MODULE_API int zclk_val_to_lua(lua_State *L, zclk_val* val);
230 #endif //LUA_ENABLED
231 
238 MODULE_API zclk_val* new_zclk_val_bool(int bool_val);
239 
246 MODULE_API zclk_val* new_zclk_val_int(int int_val);
247 
254 MODULE_API zclk_val* new_zclk_val_double(double double_val);
255 
262 MODULE_API zclk_val* new_zclk_val_string(const char* string_val);
263 
270 MODULE_API zclk_val* new_zclk_val_flag(int flag_val);
271 
277 #define zclk_flag(v) new_zclk_val_flag(v)
278 
284 #define zclk_boolean(v) new_zclk_val_bool(v)
285 
291 #define zclk_int(v) new_zclk_val_int(v)
292 
298 #define zclk_double(v) new_zclk_val_double(v)
299 
305 #define zclk_string(v) new_zclk_val_string(v)
306 
310 typedef struct zclk_option_t
311 {
312  char* name;
313  char* short_name;
316  char* description;
318 
319 #ifdef LUA_ENABLED
327 MODULE_API int zclk_option_to_lua(lua_State *L, zclk_option* option);
328 
336 MODULE_API void arraylist_zclk_option_to_lua(lua_State *L, int index, void *data);
337 #endif //LUA_ENABLED
338 
342 typedef struct zclk_argument_t
343 {
344  char* name;
347  char* description;
348  int optional;
350 
351 #ifdef LUA_ENABLED
359 MODULE_API int zclk_argument_to_lua(lua_State *L, zclk_argument* arg);
360 
368 MODULE_API void arraylist_zclk_argument_to_lua(lua_State *L, int index, void *data);
369 #endif //LUA_ENABLED
370 
377 MODULE_API void zclk_fill_options_in_list(arraylist* optlist, zclk_option* options[]);
378 
383  zclk_result_type result_type, void* result);
384 
385 // declration to assist in defining command fn
386 struct zclk_command_t;
387 
392  void* handler_args);
393 
397 typedef struct zclk_command_t
398 {
399  char* name;
400  char* short_name;
401  char* description;
402  arraylist* sub_commands;
403  arraylist* options;
404  arraylist* args;
413 
421 MODULE_API zclk_res make_zclk_val(zclk_val** val, zclk_type type);
422 
426 MODULE_API void free_zclk_val(zclk_val* val);
427 
431 MODULE_API void clear_zclk_val(zclk_val* val);
432 
440 MODULE_API void copy_zclk_val(zclk_val* to, zclk_val* from);
441 
451 MODULE_API zclk_res parse_zclk_val(zclk_val* val, char* input);
452 
464 MODULE_API zclk_res make_option(zclk_option** option, const char* name,
465  const char* short_name, zclk_val* val, zclk_val* default_val,
466  const char* description);
467 
483 MODULE_API zclk_option* new_zclk_option(const char* name,
484  const char* short_name, zclk_val* val, zclk_val* default_val,
485  const char* desc);
486 
487 MODULE_API zclk_option *new_zclk_option_bool(const char *name,
488  const char *short_name, int default_val, const char *desc);
489 MODULE_API zclk_option *new_zclk_option_int(const char *name,
490  const char *short_name, int default_val, const char *desc);
491 MODULE_API zclk_option *new_zclk_option_double(const char *name,
492  const char *short_name, double default_val, const char *desc);
493 MODULE_API zclk_option *new_zclk_option_string(const char *name,
494  const char *short_name, const char* default_val,
495  const char *desc);
496 MODULE_API zclk_option *new_zclk_option_flag(const char *name,
497  const char *short_name, int default_val, const char *desc);
498 
499 MODULE_API const char *zclk_option_get_name(zclk_option *opt);
500 MODULE_API const char *zclk_option_get_short_name(zclk_option *opt);
501 MODULE_API const char *zclk_option_get_desc(zclk_option *opt);
502 
503 MODULE_API int zclk_option_get_val_bool(zclk_option *opt);
504 MODULE_API int zclk_option_get_val_int(zclk_option *opt);
505 MODULE_API double zclk_option_get_val_double(zclk_option *opt);
506 MODULE_API const char* zclk_option_get_val_string(zclk_option *opt);
507 MODULE_API int zclk_option_get_val_flag(zclk_option *opt);
508 
509 MODULE_API int zclk_option_get_default_val_bool(zclk_option *opt);
510 MODULE_API int zclk_option_get_default_val_int(zclk_option *opt);
511 MODULE_API double zclk_option_get_default_val_double(zclk_option *opt);
512 MODULE_API const char* zclk_option_get_default_val_string(zclk_option *opt);
513 MODULE_API int zclk_option_get_default_val_flag(zclk_option *opt);
514 
520 MODULE_API void free_option(zclk_option* option);
521 
529 MODULE_API zclk_option* get_option_by_name(arraylist* options,
530  const char* name);
531 
547 MODULE_API zclk_res make_argument(zclk_argument** arg, const char* name,
548  zclk_val* val, zclk_val* default_val, const char* desc);
549 
565 MODULE_API zclk_argument* new_zclk_argument(const char* name, zclk_val* val,
566  zclk_val* default_val, const char* desc, int nargs);
567 
568 MODULE_API zclk_argument *new_zclk_argument_bool(const char *name,
569  int default_val, const char *desc, int nargs);
570 MODULE_API zclk_argument *new_zclk_argument_int(const char *name,
571  int default_val, const char *desc, int nargs);
572 MODULE_API zclk_argument *new_zclk_argument_double(const char *name,
573  double default_val, const char *desc, int nargs);
574 MODULE_API zclk_argument *new_zclk_argument_string(const char *name,
575  const char* default_val, const char *desc, int nargs);
576 MODULE_API zclk_argument *new_zclk_argument_flag(const char *name,
577  int default_val, const char *desc, int nargs);
578 
579 MODULE_API const char *zclk_argument_get_name(zclk_argument *opt);
580 MODULE_API const char *zclk_argument_get_desc(zclk_argument *opt);
581 
582 MODULE_API int zclk_argument_get_val_bool(zclk_argument *opt);
583 MODULE_API int zclk_argument_get_val_int(zclk_argument *opt);
584 MODULE_API double zclk_argument_get_val_double(zclk_argument *opt);
585 MODULE_API const char* zclk_argument_get_val_string(zclk_argument *opt);
586 MODULE_API int zclk_argument_get_val_flag(zclk_argument *opt);
587 
588 MODULE_API int zclk_argument_get_default_val_bool(zclk_argument *opt);
589 MODULE_API int zclk_argument_get_default_val_int(zclk_argument *opt);
590 MODULE_API double zclk_argument_get_default_val_double(zclk_argument *opt);
591 MODULE_API const char* zclk_argument_get_default_val_string(zclk_argument *opt);
592 MODULE_API int zclk_argument_get_default_val_flag(zclk_argument *opt);
593 
597 MODULE_API void free_argument(zclk_argument* arg);
598 
612 MODULE_API zclk_res make_command(zclk_command** command, const char* name,
613  const char* short_name, const char* description, zclk_command_fn handler);
614 
625 MODULE_API zclk_command* new_zclk_command(
626  const char* name,
627  const char* short_name,
628  const char* description,
629  zclk_command_fn handler
630  );
631 
640  zclk_command *cmd,
641  zclk_command *subcommand
642  );
643 
652  zclk_command *cmd,
653  zclk_option* option
654  );
655 
664  zclk_command *cmd,
665  zclk_argument* arg
666  );
667 
676 MODULE_API void zclk_command_bool_option(zclk_command *cmd, const char *name,
677  const char* short_name, const char *desc);
678 
688 MODULE_API void zclk_command_int_option(zclk_command *cmd, const char *name,
689  const char* short_name, int default_val, const char *desc);
690 
700 MODULE_API void zclk_command_double_option(zclk_command *cmd, const char *name,
701  const char* short_name, double default_val, const char *desc);
702 
712 MODULE_API void zclk_command_string_option(zclk_command *cmd, const char *name,
713  const char* short_name, const char* default_val,
714  const char *desc);
715 
724 MODULE_API void zclk_command_flag_option(zclk_command *cmd, const char *name,
725  const char* short_name, const char *desc);
726 
736 MODULE_API void zclk_command_bool_argument(zclk_command *cmd, const char *name,
737  int default_val, const char *desc, int nargs);
738 
748 MODULE_API void zclk_command_int_argument(zclk_command *cmd, const char *name,
749  int default_val, const char *desc, int nargs);
750 
760 MODULE_API void zclk_command_double_argument(zclk_command *cmd, const char *name,
761  double default_val, const char *desc, int nargs);
762 
772 MODULE_API void zclk_command_string_argument(zclk_command *cmd, const char *name,
773  const char* default_val, const char *desc, int nargs);
774 
784 MODULE_API void zclk_command_flag_argument(zclk_command *cmd, const char *name,
785  int default_val, const char *desc, int nargs);
786 
795  const char *name);
796 
805  const char *name);
806 
815 #define zclk_command_option_foreach(cmd, opt) \
816  zclk_option *opt = NULL; \
817  size_t len##opt = arraylist_length(cmd->options); \
818  for (size_t i = 0; ((i < len##opt)? \
819  (opt = (zclk_option *) \
820  (arraylist_get(cmd->options, i))) \
821  : 0); \
822  i++)
823 
832 #define zclk_command_argument_foreach(cmd, arg) \
833  zclk_argument *arg = NULL; \
834  size_t len##arg = arraylist_length(cmd->args); \
835  for (size_t i = 0; ((i < len##arg)? \
836  (arg = (zclk_argument *) \
837  (arraylist_get(cmd->args, i))) \
838  : 0); \
839  i++)
840 
850 MODULE_API zclk_res zclk_command_exec(
851  zclk_command *cmd,
852  void *exec_args,
853  int argc, char *argv[]);
854 
860 MODULE_API void free_command(zclk_command* command);
861 
867 MODULE_API char* get_help_for_command(arraylist* cmds_to_exec);
868 
880 MODULE_API zclk_res help_cmd_handler(arraylist* commands,
881  void* handler_args, int argc, char** argv,
882  zclk_command_output_handler success_handler,
883  zclk_command_output_handler error_handler);
884 
892 MODULE_API zclk_res get_help_for(char** help_str, arraylist* commands,
893  arraylist* arg_commands);
894 
905 MODULE_API zclk_res exec_command(arraylist* commands, void* handler_args,
906  int argc, char** argv);
907 
913 MODULE_API void print_table_result(void* result);
914 
923 MODULE_API zclk_res print_handler(zclk_res result_flag,
924  zclk_result_type res_type,
925  void* result);
926 
927 #ifdef __cplusplus
928 }
929 #endif
930 
931 #endif /* __ZCLK_H__ */
CLI Argument object.
Definition: zclk.h:343
char * description
textual description
Definition: zclk.h:347
zclk_val * default_val
default value of the argument
Definition: zclk.h:346
char * name
name of the argument
Definition: zclk.h:344
zclk_val * val
value of the argument
Definition: zclk.h:345
int optional
flag indicating if argument is optional
Definition: zclk.h:348
A CLI Command Ojbect.
Definition: zclk.h:398
arraylist * sub_commands
list of subcommands
Definition: zclk.h:402
zclk_command_output_handler error_handler
error handler for the command
Definition: zclk.h:407
arraylist * args
args list
Definition: zclk.h:404
int lua_udata_ref
lua ref for the udata of this object
Definition: zclk.h:411
zclk_command_output_handler success_handler
success handler for the command
Definition: zclk.h:409
char * short_name
short name of the command
Definition: zclk.h:400
arraylist * options
options list
Definition: zclk.h:403
char * name
name of the command
Definition: zclk.h:399
int lua_handler_ref
lua ref for handler
Definition: zclk.h:410
zclk_command_fn handler
command handler function
Definition: zclk.h:405
char * description
textual description
Definition: zclk.h:401
CLI Option Object.
Definition: zclk.h:311
char * name
name of the option
Definition: zclk.h:312
zclk_val * val
value of the option
Definition: zclk.h:314
char * description
textural description of the option
Definition: zclk.h:316
zclk_val * default_val
default value of the option
Definition: zclk.h:315
char * short_name
short_name of the option
Definition: zclk.h:313
This struct holds the value of the argument or option.
Definition: zclk.h:89
char * str_value
string value
Definition: zclk.h:95
int bool_value
boolean value
Definition: zclk.h:92
int int_value
integer value
Definition: zclk.h:93
union zclk_val_t::@0 data
data of the value
zclk_type type
type of value
Definition: zclk.h:90
double dbl_value
double value
Definition: zclk.h:94
MODULE_API void copy_zclk_val(zclk_val *to, zclk_val *from)
Definition: zclk.c:185
MODULE_API void zclk_command_flag_option(zclk_command *cmd, const char *name, const char *short_name, const char *desc)
Create a new flag option and add it to the given command.
Definition: zclk.c:930
MODULE_API char * get_help_for_command(arraylist *cmds_to_exec)
Definition: zclk.c:1129
struct zclk_argument_t zclk_argument
CLI Argument object.
MODULE_API void zclk_command_flag_argument(zclk_command *cmd, const char *name, int default_val, const char *desc, int nargs)
Create a new bool argument and add it to the given command.
Definition: zclk.c:990
zclk_result_type
This enum defines the possible types of result cli program might output.
Definition: zclk.h:77
MODULE_API void zclk_val_set_flag(zclk_val *val, int fval)
set the flag value
Definition: zclk.c:168
MODULE_API void free_option(zclk_option *option)
Definition: zclk.c:475
MODULE_API void free_command(zclk_command *command)
Definition: zclk.c:1061
struct zclk_option_t zclk_option
CLI Option Object.
MODULE_API zclk_res zclk_command_option_add(zclk_command *cmd, zclk_option *option)
Add an option to the given command.
Definition: zclk.c:851
MODULE_API zclk_option * zclk_command_get_option(zclk_command *cmd, const char *name)
Get the option object corresponding to given name.
Definition: zclk.c:1001
MODULE_API zclk_res parse_zclk_val(zclk_val *val, char *input)
Definition: zclk.c:210
MODULE_API void clear_zclk_val(zclk_val *val)
MODULE_API zclk_res make_command(zclk_command **command, const char *name, const char *short_name, const char *description, zclk_command_fn handler)
Definition: zclk.c:790
MODULE_API zclk_res make_zclk_val(zclk_val **val, zclk_type type)
Definition: zclk.c:29
MODULE_API zclk_res help_cmd_handler(arraylist *commands, void *handler_args, int argc, char **argv, zclk_command_output_handler success_handler, zclk_command_output_handler error_handler)
Definition: zclk.c:1329
MODULE_API void zclk_command_string_argument(zclk_command *cmd, const char *name, const char *default_val, const char *desc, int nargs)
Create a new bool argument and add it to the given command.
Definition: zclk.c:978
MODULE_API void zclk_command_int_argument(zclk_command *cmd, const char *name, int default_val, const char *desc, int nargs)
Create a new bool argument and add it to the given command.
Definition: zclk.c:954
MODULE_API zclk_command * new_zclk_command(const char *name, const char *short_name, const char *description, zclk_command_fn handler)
Create a command object with automatic error handling.
Definition: zclk.c:830
MODULE_API zclk_val * new_zclk_val_string(const char *string_val)
Create a new string value.
Definition: zclk.c:73
MODULE_API zclk_res get_help_for(char **help_str, arraylist *commands, arraylist *arg_commands)
Definition: zclk.c:1354
MODULE_API zclk_option * new_zclk_option(const char *name, const char *short_name, zclk_val *val, zclk_val *default_val, const char *desc)
(Internal Use) Create an option object
Definition: zclk.c:313
MODULE_API void zclk_command_int_option(zclk_command *cmd, const char *name, const char *short_name, int default_val, const char *desc)
Create a new int option and add it to the given command.
Definition: zclk.c:891
MODULE_API zclk_val * new_zclk_val_bool(int bool_val)
Create a new boolean value.
Definition: zclk.c:40
MODULE_API void free_zclk_val(zclk_val *val)
Definition: zclk.c:176
MODULE_API zclk_res zclk_command_argument_add(zclk_command *cmd, zclk_argument *arg)
Add an argument to the given command.
Definition: zclk.c:865
MODULE_API double zclk_val_get_double(zclk_val *val)
get the double value
Definition: zclk.c:122
MODULE_API zclk_res exec_command(arraylist *commands, void *handler_args, int argc, char **argv)
Definition: zclk.c:1562
MODULE_API zclk_res zclk_command_exec(zclk_command *cmd, void *exec_args, int argc, char *argv[])
Execute the command with the given args.
Definition: zclk.c:1038
MODULE_API zclk_res make_argument(zclk_argument **arg, const char *name, zclk_val *val, zclk_val *default_val, const char *desc)
Definition: zclk.c:565
struct zclk_val_t zclk_val
This struct holds the value of the argument or option.
zclk_res
This enum defines the possible error codes generated by functions in the API.
Definition: zclk.h:43
MODULE_API zclk_res print_handler(zclk_res result_flag, zclk_result_type res_type, void *result)
A Print handler prints the result of the command.
Definition: zclk.c:1776
MODULE_API int zclk_val_get_flag(zclk_val *val)
get the flag value
Definition: zclk.c:132
MODULE_API zclk_val * new_zclk_val_double(double double_val)
Create a new double value.
Definition: zclk.c:62
zclk_type
This enum defines the possible datatypes of argument or option values.
Definition: zclk.h:59
MODULE_API void zclk_val_set_int(zclk_val *val, int ival)
set the int value
Definition: zclk.c:145
MODULE_API int zclk_val_get_int(zclk_val *val)
get the int value
Definition: zclk.c:116
MODULE_API void zclk_command_bool_option(zclk_command *cmd, const char *name, const char *short_name, const char *desc)
Create a new boolean option and add it to the given command.
Definition: zclk.c:879
MODULE_API void free_argument(zclk_argument *arg)
Definition: zclk.c:739
MODULE_API void print_table_result(void *result)
Print a tabular result object to the stdout.
Definition: zclk.c:1688
MODULE_API void zclk_command_double_option(zclk_command *cmd, const char *name, const char *short_name, double default_val, const char *desc)
Create a new double option and add it to the given command.
Definition: zclk.c:904
MODULE_API int zclk_val_get_bool(zclk_val *val)
get the boolean value
Definition: zclk.c:111
MODULE_API zclk_res make_option(zclk_option **option, const char *name, const char *short_name, zclk_val *val, zclk_val *default_val, const char *description)
Definition: zclk.c:297
MODULE_API zclk_option * get_option_by_name(arraylist *options, const char *name)
Get the option by name object.
Definition: zclk.c:495
MODULE_API void zclk_fill_options_in_list(arraylist *optlist, zclk_option *options[])
Fill the entries in the given option array into an arraylist.
Definition: zclk.c:554
zclk_res(* zclk_command_fn)(struct zclk_command_t *cmd, void *handler_args)
defines a function to run a command
Definition: zclk.h:391
zclk_res(* zclk_command_output_handler)(zclk_res result_flag, zclk_result_type result_type, void *result)
Defines a function to handle command output.
Definition: zclk.h:382
MODULE_API zclk_argument * new_zclk_argument(const char *name, zclk_val *val, zclk_val *default_val, const char *desc, int nargs)
(Internal use) Create an argument object
Definition: zclk.c:581
MODULE_API void zclk_command_bool_argument(zclk_command *cmd, const char *name, int default_val, const char *desc, int nargs)
Create a new bool argument and add it to the given command.
Definition: zclk.c:943
MODULE_API zclk_argument * zclk_command_get_argument(zclk_command *cmd, const char *name)
Get the argument object corresponding to given name.
Definition: zclk.c:1020
MODULE_API zclk_res zclk_command_subcommand_add(zclk_command *cmd, zclk_command *subcommand)
Add a subcommand to the given command.
Definition: zclk.c:839
MODULE_API zclk_val * new_zclk_val_int(int int_val)
Create a new int value.
Definition: zclk.c:51
MODULE_API void zclk_command_double_argument(zclk_command *cmd, const char *name, double default_val, const char *desc, int nargs)
Create a new bool argument and add it to the given command.
Definition: zclk.c:966
MODULE_API void zclk_val_set_bool(zclk_val *val, int bval)
set the boolean value
Definition: zclk.c:137
MODULE_API const char * zclk_val_get_string(zclk_val *val)
get the string value
Definition: zclk.c:127
MODULE_API void zclk_command_string_option(zclk_command *cmd, const char *name, const char *short_name, const char *default_val, const char *desc)
Create a new string option and add it to the given command.
Definition: zclk.c:917
MODULE_API zclk_val * new_zclk_val_flag(int flag_val)
Create a new flag value.
Definition: zclk.c:84
MODULE_API void zclk_val_set_string(zclk_val *val, const char *sval)
set the string value
Definition: zclk.c:160
struct zclk_command_t zclk_command
A CLI Command Ojbect.
MODULE_API void zclk_val_set_dobule(zclk_val *val, double dval)
set the double value
Definition: zclk.c:152