failed approach
This commit is contained in:
Makefile
config/objects
gomspace
gomspace.mkclock.ccommands.cconn.ccsp.cwscript
libgscsp
include
gs
lib
libcsp
CHANGELOGCONTRIBUTORSCOPYINGINSTALL.rstREADME.rst
bindings
python
libcsp
doc
example.rsthistory.rstinterfaces.rstlibcsp.rstmemory.rstmtu.rstprotocolstack.rststructure.rsttopology.rst
examples
csp_if_fifo.ccsp_if_fifo_windows.ckiss.cpython_bindings_example_client.pypython_bindings_example_client_can.pypython_bindings_example_server.pysimple.czmqproxy.c
include
csp
src
arch
freertos
macosx
posix
windows
bindings
python
crypto
csp_bridge.ccsp_buffer.ccsp_conn.ccsp_conn.hcsp_crc32.ccsp_debug.ccsp_dedup.ccsp_dedup.hcsp_endian.ccsp_hex_dump.ccsp_iflist.ccsp_io.ccsp_io.hcsp_port.ccsp_port.hcsp_promisc.ccsp_promisc.hcsp_qfifo.ccsp_qfifo.hcsp_route.ccsp_route.hcsp_service_handler.ccsp_services.ccsp_sfp.cdrivers
interfaces
rtable
transport
utils
wafwscriptsrc
bindings
python
drivers
error.cfreertos
linux
local.hlog.crouter.crtable.cservice_dispatcher.cservice_handler.ctransaction.clibp60_client
libutil
include
deprecated
gs
uthash
util
base16.hbytebuffer.hbyteorder.hcheck.hclock.hconf_util.hcrc32.hcrc8.hdelay.h
drivers
endian.herror.hfletcher.hfunction_scheduler.hgosh
hexdump.hlinux
log.hlog
minmax.hmutex.hpgm.hqueue.hrtc.hsem.hstdio.hstring.htest
thread.htime.htimestamp.htypes.hunistd.hvmem.hwatchdog
zip
src
base16.cbytebuffer.cbyteorder.cclock.ccrc32.ccrc8.c
wscriptbindings
python
drivers
error.cfletcher.cfunction_scheduler.cgosh
hexdump.clinux
argp.cclock.ccommand_line.ccwd.cdelay.c
lock.clock.hdrivers
function.cmutex.cqueue.crtc.csem.csignal.cstdio.csysfs_helper.cthread.ctime.clog
rtc.cstdio.cstring.cstrtoint.ctest
time.ctimestamp.cvmem
watchdog
zip
mission
test/testtasks
49
gomspace/libutil/include/gs/util/linux/function.h
Normal file
49
gomspace/libutil/include/gs/util/linux/function.h
Normal file
@ -0,0 +1,49 @@
|
||||
#ifndef GS_UTIL_LINUX_FUNCTION_H
|
||||
#define GS_UTIL_LINUX_FUNCTION_H
|
||||
/* Copyright (c) 2013-2018 GomSpace A/S. All rights reserved. */
|
||||
/**
|
||||
@file
|
||||
|
||||
Function interface - invokes a function by name.
|
||||
*/
|
||||
|
||||
#include <gs/util/error.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
Function prototype.
|
||||
@param[in] arg argument provided to gs_function_invoke().
|
||||
@return_gs_error_t
|
||||
*/
|
||||
typedef gs_error_t (*gs_function_t)(void * arg);
|
||||
|
||||
/**
|
||||
Register \a function by name.
|
||||
|
||||
@param[in] short_name short name for function, used by gs_function_invoke() to find function to invoke.
|
||||
@param[in] long_name long name (unique) for function, used by gs_function_invoke() to find function to invoke.
|
||||
@param[in] function function to be invoked by gs_function_invoke()
|
||||
@return #GS_ERROR_FULL if registry is full.
|
||||
@return_gs_error_t
|
||||
*/
|
||||
gs_error_t gs_function_register(const char * short_name, const char * long_name, gs_function_t function);
|
||||
|
||||
/**
|
||||
Invoke \a function by name.
|
||||
|
||||
The return value is from the registered function, except for #GS_ERROR_NOT_IMPLEMENTED.
|
||||
|
||||
@param[in] name registered function name.
|
||||
@param[in] arg argument for function.
|
||||
@return #GS_ERROR_NOT_IMPLEMENTED if the \a name isn't found.
|
||||
@return_gs_error_t
|
||||
*/
|
||||
gs_error_t gs_function_invoke(const char * name, void * arg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
Reference in New Issue
Block a user