blob: aa0ebb44e55b3a4dfbc8c6e51671bd4ec1d6b759 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
---
edit_link: ''
title: Plugins
origin_url: >-
https://git.automotivelinux.org/apps/agl-service-signal-composer/plain/docs/part-1/3-Plugins.md?h=master
---
<!-- WARNING: This file is generated by fetch_docs.js using /home/boron/Documents/AGL/docs-webtemplate/site/_data/tocs/apis_services/master/agl-service-signal-composer-developer-guides-api-services-book.yml -->
# Plugins
Plugins are C/C++ shared libraries loaded by the binding to execute some
simple routine. Routine could be on reception of a new signal or at sources
initialization time or signal subscription with the respective JSON field
`onReceived` `init` and `getSignals`
A default plugin (builtin) is provided with 2 functions:
- **defaultOnReceived**: set and record a new signal value and its timestamp
in the signal composer service. It simply tooks the incoming event JSON object
and search for *key* `value` and `timestamp` then call function
`setSignalValue`.
- **setSignalValueWrap**: a `lua2c` function the could be called from any LUA
script to record a new signal value.
> **CAUTION**: `timestamp` value has to be typed as *uint64_t* with
> a **nanosecond** precision using a realtime clock. To correctly store it in
> a JSON-C object use the int64 type with the according fonctions:
> *json_object_new_int64()*
> *json_object_get_int64()*
> *json_object_set_int64()*
> *...*
|