aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/low-can.cpp
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-09-26 18:36:47 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-14 11:00:25 +0100
commitc22ad857bcd2f567d22f3239d91fa65720718713 (patch)
tree165407be42745a190672ff64fe27503074380735 /plugins/low-can.cpp
parent7f5a4ef3053eaac5c3f936b6294087d3d2b72c38 (diff)
lua2c completely operationnal
- Retrieve args from lua call correctly - Correctly push and set function pointer into plugin symbols Change-Id: I12d03e1101c458a042887a67a35a08082bd98f4c Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'plugins/low-can.cpp')
-rw-r--r--plugins/low-can.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/low-can.cpp b/plugins/low-can.cpp
index c4f79d2..18138b5 100644
--- a/plugins/low-can.cpp
+++ b/plugins/low-can.cpp
@@ -46,7 +46,7 @@ typedef struct {
} allDoorsCtxT;
typedef struct {
- struct pluginCBT* pluginHandle;
+ struct signalCBT* pluginHandle;
json_object *subscriptionBatch;
allDoorsCtxT allDoorsCtx;
} lowCANCtxT;
@@ -63,7 +63,7 @@ CTLP_ONLOAD(plugin, composerHandle)
{
lowCANCtxT *pluginCtx= (lowCANCtxT*)calloc (1, sizeof(lowCANCtxT));
- pluginCtx->pluginHandle = (struct pluginCBT*)composerHandle;
+ pluginCtx->pluginHandle = (struct signalCBT*)composerHandle;
pluginCtx->subscriptionBatch = json_object_new_array();
AFB_NOTICE ("Low-can plugin: label='%s' version='%s' info='%s'",
@@ -148,22 +148,22 @@ CTLP_CAPI (isOpen, source, argsJ, eventJ, context) {
};
if(strcasestr(eventName, "front_left"))
{
- pluginCtx->pluginHandle->setsignalValue(eventName,(long long int)timestamp, value);
+ pluginCtx->pluginHandle->setSignalValue(eventName,(uint64_t)timestamp, value);
setDoor(&pluginCtx->allDoorsCtx.front_left, eventName, eventStatus);
}
else if(strcasestr(eventName, "front_right"))
{
- pluginCtx->pluginHandle->setsignalValue(eventName,(long long int)timestamp, value);
+ pluginCtx->pluginHandle->setSignalValue(eventName,(uint64_t)timestamp, value);
setDoor(&pluginCtx->allDoorsCtx.front_right, eventName, eventStatus);
}
else if(strcasestr(eventName, "rear_left"))
{
- pluginCtx->pluginHandle->setsignalValue(eventName,(long long int)timestamp, value);
+ pluginCtx->pluginHandle->setSignalValue(eventName,(uint64_t)timestamp, value);
setDoor(&pluginCtx->allDoorsCtx.rear_left, eventName, eventStatus);
}
else if(strcasestr(eventName, "rear_right"))
{
- pluginCtx->pluginHandle->setsignalValue(eventName,(long long int)timestamp, value);
+ pluginCtx->pluginHandle->setSignalValue(eventName,(uint64_t)timestamp, value);
setDoor(&pluginCtx->allDoorsCtx.rear_right, eventName, eventStatus);
}
else