summaryrefslogtreecommitdiffstats
path: root/ucs2-afb
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-10-05 01:34:33 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-10-12 13:06:17 +0200
commit81e5dad8294f20c3cb69383d0a6e8b04c3579094 (patch)
tree30696d9b4bf681ec7e02ca3667ddd6f8a20376d4 /ucs2-afb
parent81124d50004ee8c0a141771c4b59a79b1a9ec4f1 (diff)
External mXML project library inclusion
Change-Id: I7ed0a21f3aa79cc007ff224eec66a048f53ba98f Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'ucs2-afb')
-rw-r--r--ucs2-afb/CMakeLists.txt30
-rw-r--r--ucs2-afb/ucs_apidef.h18
2 files changed, 17 insertions, 31 deletions
diff --git a/ucs2-afb/CMakeLists.txt b/ucs2-afb/CMakeLists.txt
index 9bac628..31d8c0d 100644
--- a/ucs2-afb/CMakeLists.txt
+++ b/ucs2-afb/CMakeLists.txt
@@ -16,35 +16,20 @@
# limitations under the License.
###########################################################################
-
-# Generate API-v2 hat from OpenAPI json definition
-macro(SET_TARGET_GENSKEL TARGET_NAME API_DEF_NAME)
- add_custom_command(OUTPUT ${API_DEF_NAME}.h
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
- DEPENDS ${API_DEF_NAME}.json
- COMMAND afb-genskel ${API_DEF_NAME}.json >${API_DEF_NAME}.h
- )
- add_custom_target(${API_DEF_NAME}_OPENAPI DEPENDS ${API_DEF_NAME}.h)
- add_dependencies(${TARGET_NAME} ${API_DEF_NAME}_OPENAPI)
-
-endmacro(SET_TARGET_GENSKEL)
-
# Add target to project dependency list
PROJECT_TARGET_ADD(ucs2-afb)
# Define project Targets
ADD_LIBRARY(${TARGET_NAME} MODULE ucs_apihat.c ucs_binding.c )
- # Generate API-v2 hat from OpenAPI json definition
- SET_TARGET_GENSKEL(${TARGET_NAME} ucs_apidef)
+ SET_OPENAPI_FILENAME(ucs_apidef)
# Binder exposes a unique public entry point
SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
- PREFIX "afb-"
- LABELS "BINDING"
- LINK_FLAGS ${BINDINGS_LINK_FLAG}
- OUTPUT_NAME ucs2
-
+ PREFIX "afb-"
+ LABELS "BINDINGV2"
+ LINK_FLAGS ${BINDINGS_LINK_FLAG}
+ OUTPUT_NAME ucs2
)
# Library dependencies (include updates automatically)
@@ -52,8 +37,3 @@ PROJECT_TARGET_ADD(ucs2-afb)
ucs2-inter
${link_libraries}
)
-
- # installation directory
- INSTALL(TARGETS ${TARGET_NAME}
- LIBRARY DESTINATION ${BINDINGS_INSTALL_DIR})
-
diff --git a/ucs2-afb/ucs_apidef.h b/ucs2-afb/ucs_apidef.h
index 876ac89..f8e9c9c 100644
--- a/ucs2-afb/ucs_apidef.h
+++ b/ucs2-afb/ucs_apidef.h
@@ -60,37 +60,43 @@ static const struct afb_verb_v2 _afb_verbs_v2_UNICENS[] = {
.verb = "listconfig",
.callback = ucs2_listconfig,
.auth = &_afb_auths_v2_UNICENS[0],
- .info = NULL,
+ .info = "List Config Files",
.session = AFB_SESSION_NONE_V2
},
{
.verb = "initialise",
.callback = ucs2_initialise,
.auth = &_afb_auths_v2_UNICENS[0],
- .info = NULL,
+ .info = "configure Unicens2 lib from NetworkConfig.XML.",
.session = AFB_SESSION_NONE_V2
},
{
.verb = "subscribe",
.callback = ucs2_subscribe,
.auth = &_afb_auths_v2_UNICENS[1],
- .info = NULL,
+ .info = "Subscribe to UNICENS Events.",
.session = AFB_SESSION_NONE_V2
},
{
.verb = "writei2c",
.callback = ucs2_writei2c,
.auth = &_afb_auths_v2_UNICENS[1],
- .info = NULL,
+ .info = "Writes I2C command to remote node.",
.session = AFB_SESSION_NONE_V2
},
- { .verb = NULL }
+ {
+ .verb = NULL,
+ .callback = NULL,
+ .auth = NULL,
+ .info = NULL,
+ .session = 0
+ }
};
const struct afb_binding_v2 afbBindingV2 = {
.api = "UNICENS",
.specification = _afb_description_v2_UNICENS,
- .info = NULL,
+ .info = "",
.verbs = _afb_verbs_v2_UNICENS,
.preinit = NULL,
.init = NULL,