You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<desc>Please fill in information regarding: What is the idea of this module and its features? +
10
-
How to use this module in general.... like: +
11
-
{empty} +
12
-
Typically the features of this module are used like this (check also main script of this module): +
13
-
{empty} +
9
+
<desc>Module to store / log data like files or images. +
10
+
{empty} +
11
+
Typically, the feature of this module is used like this (check also main script of this module): +
12
+
{empty} +
14
13
**1) Setup** +
15
-
ToDo +
16
-
{empty} +
17
-
**2) Something else....** +
18
-
</desc>
14
+
- Set instance to configure via 'setSelectedInstance' +
15
+
- Set data mode and storage path via 'setDataMode' and 'setPath'. +
16
+
- Set type of data or image via 'setDataType' or 'setImageType'. +
17
+
- If it should store data in a CSV-formatted file, you should set the CSV filename via 'setCSVFilename', the CSV labels via 'setCSVLabels'. Additionally, choose mode for 'setSaveOnlyChanges' and 'setSaveDataDirectly'. +
18
+
- Set an event to receive the data / image to store via 'setRegisterEvent'. This event should provide as first parameter the data to store and as second parameter an optional filename (2nd parameter not needed, if data type is 'csv'). Otherwise, it will use the timestamp as filename. +</desc>
19
+
<enumname="DataMode"trait="released">
20
+
<desc>Mode of data to store.</desc>
21
+
<itemdesc="Store files"name="file">file</item>
22
+
<itemdesc="Store images"name="image">image</item>
23
+
</enum>
24
+
<enumname="DataType"trait="released">
25
+
<desc>Data type</desc>
26
+
<itemdesc="JSON"name="json">json</item>
27
+
<itemdesc="CSV"name="csv">csv</item>
28
+
</enum>
29
+
<enumname="ImageFormat"trait="released">
30
+
<desc>Image format</desc>
31
+
<itemdesc="BMP"name="bmp">bmp</item>
32
+
<itemdesc="PNG"name="png">png</item>
33
+
<itemdesc="JPEG"name="jpg">jpg</item>
34
+
<itemdesc="JSON"name="json">json</item>
35
+
<itemdesc="MSGPACK"name="msgpack">msgpack</item>
36
+
</enum>
19
37
<serves>
20
38
<eventname="OnNewStatusLoadParameterOnReboot">
21
39
<desc>Notify status if parameters should be loaded on app/device boot up.</desc>
@@ -31,10 +49,10 @@ ToDo +
31
49
</event>
32
50
<eventname="OnNewProcessingParameter">
33
51
<desc>Event to share processing parameters to the instances.</desc>
34
-
<paramdesc="Number of the instance to receive the parameter."multiplicity="1"name="objectNo"type="int"/>
52
+
<paramdesc="Numeric identifier of the instance to receive the parameter."multiplicity="1"name="objectNo"type="int"/>
35
53
<paramdesc="Name of the parameter."multiplicity="1"name="parameter"type="string"/>
36
54
<paramdesc="Value of the parameter."multiplicity="1"name="value"type="auto"/>
37
-
<paramdesc="If parameter is for specifici internal used object, its number."multiplicity="?"name="internalObjectNo"type="int"/>
55
+
<paramdesc="Numeric identifier, if parameter is for specific internal used object."multiplicity="?"name="internalObjectNo"type="int"/>
38
56
</event>
39
57
<eventname="OnNewSelectedInstance">
40
58
<desc>Notify if new instance is selected.</desc>
@@ -43,12 +61,6 @@ ToDo +
43
61
<eventname="OnDataLoadedOnReboot">
44
62
<desc>Event to call if module tried to load parameters and should be ready.</desc>
45
63
</event>
46
-
<eventname="OnNewResultNUM">
47
-
<desc>Example of dynamically created event to provide result of instance. +
48
-
NUM will be replaced by the number of instance (e.g. "OnNewResult1"). +
49
-
INFO: Other modules can check via "Script.isServedAsEvent" if event of sepecific instance exists.</desc>
<returndesc="Processing result (optional)."multiplicity="?"name="result"type="bool"/>
132
-
</function>
133
177
<functionname="addInstance">
134
178
<desc>Function to add an additional instance.</desc>
135
179
</function>
136
180
<functionname="resetInstances">
137
181
<desc>Function to reset instances to one single instance. +
138
182
IMPORTANT: As instances start their own threads, the module needs to be restarted if new instances are needed... (see AppEngine docu for "Script.startScript").</desc>
139
183
</function>
184
+
<functionname="setPath">
185
+
<desc>Function to set storage path.</desc>
186
+
<paramdesc="Storage path for incoming data."multiplicity="1"name="path"type="string"/>
Copy file name to clipboardExpand all lines: CSK_Module_MultiDataLogger/scripts/CSK_Module_MultiDataLogger.lua
+30-27Lines changed: 30 additions & 27 deletions
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@
31
31
-- If app property "LuaLoadAllEngineAPI" is FALSE, use this to load and check for required APIs
32
32
-- This can improve performance of garbage collection
33
33
34
-
--_G.availableAPIs = require('Data/MultiDataLogger/helper/checkAPIs') -- can be used to adjust function scope of the module related on available APIs of the device
34
+
_G.availableAPIs=require('Data/MultiDataLogger/helper/checkAPIs') -- can be used to adjust function scope of the module related on available APIs of the device
0 commit comments