Document metadata
Application name |
CSK_Module_MultiDataLogger |
|---|---|
Version |
2.1.0 |
Date |
2025-04-17 |
Author |
SICK AG |
Crowns
CSK_Module_MultiDataLogger
Short description
This is an automatically generated CROWN (description not necessary).
CSK_MultiDataLogger
Short description
Module to store / log data like files or images.
Typically, the feature of this module is used like this (check also main script of this module):
1) Setup
- Set instance to configure via 'setSelectedInstance'
- Set data mode and storage path via 'setDataMode' and 'setPath'.
- Set type of data or image via 'setDataType' or 'setImageType'.
- 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'.
- 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.
Overview
Functions
addInstance()
Short description
Function to add an additional instance.
Sample (auto-generated)
CSK_MultiDataLogger.addInstance()
clearFlowConfigRelevantConfiguration()
Short description
Function to clear FlowConfig relevant configurations.
Sample (auto-generated)
CSK_MultiDataLogger.clearFlowConfigRelevantConfiguration()
getInstancesAmount()
Short description
Get the amount of created instances of this module.
Return values
| Name | Type | Multiplicity | Description |
|---|---|---|---|
amount |
INT |
1 |
Amount of created instances. |
Sample (auto-generated)
amount = CSK_MultiDataLogger.getInstancesAmount()
getParameters()
Short description
Function to get all parameters of the client in JSON format.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
instanceNo |
INT |
1 |
Number of instance to get parameters from. |
Return values
| Name | Type | Multiplicity | Description |
|---|---|---|---|
jsonParameters |
STRING |
1 |
JSON string with all parameters. |
Sample (auto-generated)
jsonParameters = CSK_MultiDataLogger.getParameters(instanceNo)
getStatusModuleActive()
Short description
Function to get status if module is active.
Return values
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
status = CSK_MultiDataLogger.getStatusModuleActive()
loadParameters()
Short description
Load parameters for this module from the CSK_PersistentData module if possible and use them.
Return values
| Name | Type | Multiplicity | Description |
|---|---|---|---|
success |
BOOL |
1 |
Success to load parameters. |
Sample (auto-generated)
success = CSK_MultiDataLogger.loadParameters()
pageCalled()
Short description
Function to register "OnResume" of the module UI (only as helper function).
Return values
| Name | Type | Multiplicity | Description |
|---|---|---|---|
empty |
STRING |
1 |
Empty string (only needed to simplify binding). |
Sample (auto-generated)
empty = CSK_MultiDataLogger.pageCalled()
resetInstances()
Short description
Function to reset instances to one single instance.
IMPORTANT: As instances start their own threads, the module needs to be restarted if new instances are needed… (see AppEngine docu for "Script.startScript").
Sample (auto-generated)
CSK_MultiDataLogger.resetInstances()
resetModule()
Short description
Function to reset main configuration of module.
Sample (auto-generated)
CSK_MultiDataLogger.resetModule()
saveCSVFile()
Short description
Function to manually save CSV file.
Sample (auto-generated)
CSK_MultiDataLogger.saveCSVFile()
sendParameters()
Short description
Send parameters to CSK_PersistentData module if possible to save them.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
noDataSave |
BOOL |
? |
[Optional] Set to TRUE if the data should NOT be saved immediately after sending. |
Sample (auto-generated)
CSK_MultiDataLogger.sendParameters(noDataSave)
setCompressionValue()
Short description
Function to set image compression value
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
value |
INT |
1 |
Image compression value. |
Sample (auto-generated)
CSK_MultiDataLogger.setCompressionValue(value)
setCSVFilename()
Short description
Function to set CSV filename.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
name |
STRING |
1 |
Filename |
Sample (auto-generated)
CSK_MultiDataLogger.setCSVFilename(name)
setCSVLabels()
Short description
Function to set CSV labels.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
labels |
STRING |
1 |
CSV labels seperated by comma. |
Sample (auto-generated)
CSK_MultiDataLogger.setCSVLabels(labels)
setCSVLimit()
Short description
Function to set status if CSV entries should be limited.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiDataLogger.setCSVLimit(status)
setCSVLimitAmount()
Short description
Function to set maximum amount of CSV entries if it is limited.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
amount |
INT |
1 |
Amount of maximum CSV entries. |
Sample (auto-generated)
CSK_MultiDataLogger.setCSVLimitAmount(amount)
setDataMode()
Short description
Function to set data mode.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
mode |
1 |
Data mode. |
Sample (auto-generated)
CSK_MultiDataLogger.setDataMode(mode)
setDataType()
Short description
Function to set data type.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
dataType |
ENUM |
1 |
Data type. |
Sample (auto-generated)
CSK_MultiDataLogger.setDataType(dataType)
setFlowConfigPriority()
Short description
Function to configure if FlowConfig should have priority for FlowConfig relevant configuration.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiDataLogger.setFlowConfigPriority(status)
setImageType()
Short description
Function to set image type.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
imgType |
STRING |
1 |
Image type |
Sample (auto-generated)
CSK_MultiDataLogger.setImageType(imgType)
setLoadOnReboot()
Short description
Configure if this module should load its saved parameters at app / device boot up.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Set status |
Sample (auto-generated)
CSK_MultiDataLogger.setLoadOnReboot(status)
setParameterName()
Short description
Function to set the name of the parameters if saved/loaded via the CSK_PersistentData module.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
name |
STRING |
1 |
Name of the parameter |
Sample (auto-generated)
CSK_MultiDataLogger.setParameterName(name)
setPath()
Short description
Function to set storage path.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
path |
STRING |
1 |
Storage path for incoming data. |
Sample (auto-generated)
CSK_MultiDataLogger.setPath(path)
setRegisterEvent()
Short description
Configure event that this module should listen to. If this one is notified, it will be linked to internal processing function.
(Will be set to currently active instance, see "setSelectedObject")
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
event |
STRING |
1 |
(external) Event name to listen to. |
Sample (auto-generated)
CSK_MultiDataLogger.setRegisterEvent(event)
setSaveDataDirectly()
Short description
Set if data should be saved persistently with every new received data.
If FALSE it is needed to call 'saveLog' manually to store log data.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiDataLogger.setSaveDataDirectly(status)
setSaveOnlyChanges()
Short description
Set to TRUE if data should be logged only if value changed.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiDataLogger.setSaveOnlyChanges(status)
setSelectedInstance()
Short description
Select one of the multiple instances.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
instance |
INT |
1 |
Instance to select. |
Sample (auto-generated)
CSK_MultiDataLogger.setSelectedInstance(instance)
Events
OnDataLoadedOnReboot
Short description
Event to call if module tried to load parameters and should be ready.
Sample (auto-generated)
function handleOnDataLoadedOnReboot()
-- Do something
end
Script.register("CSK_MultiDataLogger.OnDataLoadedOnReboot", "handleOnDataLoadedOnReboot")
OnNewInstanceList
Short description
Event to provide list of created instances.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
list |
STRING |
1 |
List of created instances. |
Sample (auto-generated)
function handleOnNewInstanceList(list)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewInstanceList", "handleOnNewInstanceList")
OnNewParameterName
Short description
Notify name of persistent data parameter.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
name |
STRING |
1 |
Parameter name |
Sample (auto-generated)
function handleOnNewParameterName(name)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewParameterName", "handleOnNewParameterName")
OnNewProcessingParameter
Short description
Event to share processing parameters to the instances.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
objectNo |
INT |
1 |
Numeric identifier of the instance to receive the parameter. |
parameter |
STRING |
1 |
Name of the parameter. |
value |
AUTO |
1 |
Value of the parameter. |
internalObjectNo |
INT |
? |
Numeric identifier, if parameter is for specific internal used object. |
Sample (auto-generated)
function handleOnNewProcessingParameter(objectNo, parameter, value, internalObjectNo)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewProcessingParameter", "handleOnNewProcessingParameter")
OnNewResult
Short description
Generic event to notify results. E.g. to forward results from single instances.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
result |
BOOL |
1 |
Result |
Sample (auto-generated)
function handleOnNewResult(result)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewResult", "handleOnNewResult")
OnNewSelectedInstance
Short description
Notify if new instance is selected.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
selectedObject |
INT |
1 |
Selected instance. |
Sample (auto-generated)
function handleOnNewSelectedInstance(selectedObject)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewSelectedInstance", "handleOnNewSelectedInstance")
OnNewStatusAvailableEvents
Short description
Notify available events.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
listOfEvents |
STRING |
1 |
JSON list |
Sample (auto-generated)
function handleOnNewStatusAvailableEvents(listOfEvents)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusAvailableEvents", "handleOnNewStatusAvailableEvents")
OnNewStatusCSKStyle
Short description
Notify UI style to use for CSK modules.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
theme |
STRING |
1 |
UI style |
Sample (auto-generated)
function handleOnNewStatusCSKStyle(theme)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusCSKStyle", "handleOnNewStatusCSKStyle")
OnNewStatusCSVFilename
Short description
Notify name of CSV file to store data.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
name |
STRING |
1 |
Name of file. |
Sample (auto-generated)
function handleOnNewStatusCSVFilename(name)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusCSVFilename", "handleOnNewStatusCSVFilename")
OnNewStatusCSVLables
Short description
Notify CSV labels.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
labels |
STRING |
1 |
CSV labels. |
Sample (auto-generated)
function handleOnNewStatusCSVLables(labels)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusCSVLables", "handleOnNewStatusCSVLables")
OnNewStatusCSVLimitAmount
Short description
Notify limit of entries in CSV file.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
limit |
INT |
1 |
Limit of CSV entries. |
Sample (auto-generated)
function handleOnNewStatusCSVLimitAmount(limit)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusCSVLimitAmount", "handleOnNewStatusCSVLimitAmount")
OnNewStatusDataMode
Short description
Notify mode of data storage
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
mode |
STRING |
1 |
Data mode. |
Sample (auto-generated)
function handleOnNewStatusDataMode(mode)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusDataMode", "handleOnNewStatusDataMode")
OnNewStatusDataType
Short description
Notfiy data type.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
type |
STRING |
1 |
Data type |
Sample (auto-generated)
function handleOnNewStatusDataType(type)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusDataType", "handleOnNewStatusDataType")
OnNewStatusFlowConfigPriority
Short description
Notify if FlowConfig should have priority for FlowConfig relevant configurations.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusFlowConfigPriority(status)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusFlowConfigPriority", "handleOnNewStatusFlowConfigPriority")
OnNewStatusImageCompressionValue
Short description
Notify value of image compression.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
imgCompression |
INT |
1 |
Image compression value. |
Sample (auto-generated)
function handleOnNewStatusImageCompressionValue(imgCompression)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusImageCompressionValue", "handleOnNewStatusImageCompressionValue")
OnNewStatusImageType
Short description
Notify image type.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
imageType |
STRING |
1 |
Type of image |
Sample (auto-generated)
function handleOnNewStatusImageType(imageType)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusImageType", "handleOnNewStatusImageType")
OnNewStatusLimitCSVEntries
Short description
Notify status if CSV entries are limited.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusLimitCSVEntries(status)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusLimitCSVEntries", "handleOnNewStatusLimitCSVEntries")
OnNewStatusLoadParameterOnReboot
Short description
Notify status if parameters should be loaded on app/device boot up.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusLoadParameterOnReboot(status)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusLoadParameterOnReboot", "handleOnNewStatusLoadParameterOnReboot")
OnNewStatusModuleIsActive
Short description
Notify if module can be used on device.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusModuleIsActive(status)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusModuleIsActive", "handleOnNewStatusModuleIsActive")
OnNewStatusModuleVersion
Short description
Notify version of module.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
version |
STRING |
1 |
Version |
Sample (auto-generated)
function handleOnNewStatusModuleVersion(version)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusModuleVersion", "handleOnNewStatusModuleVersion")
OnNewStatusRegisteredEvent
Short description
Notify event instance is registered to receive data to process.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
eventname |
STRING |
1 |
Name of event. |
Sample (auto-generated)
function handleOnNewStatusRegisteredEvent(eventname)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusRegisteredEvent", "handleOnNewStatusRegisteredEvent")
OnNewStatusSaveDataDirectly
Short description
Notify status if log file should be saved automatically as soon as it receives a new data entry.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusSaveDataDirectly(status)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusSaveDataDirectly", "handleOnNewStatusSaveDataDirectly")
OnNewStatusSaveOnlyChanges
Short description
Notify status if log file should log received data only if it differs from previous data.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusSaveOnlyChanges(status)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusSaveOnlyChanges", "handleOnNewStatusSaveOnlyChanges")
OnNewStatusStoragePath
Short description
Notify path to store incoming data
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
path |
STRING |
1 |
Storage path. |
Sample (auto-generated)
function handleOnNewStatusStoragePath(path)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewStatusStoragePath", "handleOnNewStatusStoragePath")
OnNewValueToForwardNUM
Short description
Example of dynamically created event to forward data from instance thread to Controller part of module, e.g. to forward values to UI.
NUM will be replaced by the number of instance (e.g. "OnNewValueToForward1").
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
eventname |
STRING |
1 |
Eventname to use to forward value. |
value |
AUTO |
1 |
Value to forward. |
Sample (auto-generated)
function handleOnNewValueToForwardNUM(eventname, value)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewValueToForwardNUM", "handleOnNewValueToForwardNUM")
OnNewValueUpdateNUM
Short description
Example of dynamically created event to sync parameters between instance threads and Controller part of module.
NUM will be replaced by the number of instance (e.g. "OnNewValueUpdate1").
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
instance |
INT |
1 |
Instance new value is coming from. |
parameter |
STRING |
1 |
Name of the parameter to update/sync. |
value |
AUTO |
1 |
Value to update. |
selectedObject |
INT |
? |
Optionally if internal parameter should be used for internal objects. |
Sample (auto-generated)
function handleOnNewValueUpdateNUM(instance, parameter, value, selectedObject)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnNewValueUpdateNUM", "handleOnNewValueUpdateNUM")
OnPersistentDataModuleAvailable
Short description
Notify status if features of CSK_PersistentData module are available.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnPersistentDataModuleAvailable(status)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnPersistentDataModuleAvailable", "handleOnPersistentDataModuleAvailable")
OnUserLevelAdminActive
Short description
Status of Admin userlevel. Used internally in combination with the CSK_UserManagement module if available.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnUserLevelAdminActive(status)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnUserLevelAdminActive", "handleOnUserLevelAdminActive")
OnUserLevelMaintenanceActive
Short description
Status of Maintenance userlevel. Used internally in combination with the CSK_UserManagement module if available.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnUserLevelMaintenanceActive(status)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnUserLevelMaintenanceActive", "handleOnUserLevelMaintenanceActive")
OnUserLevelOperatorActive
Short description
Status of Operator userlevel. Used internally in combination with the CSK_UserManagement module if available.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnUserLevelOperatorActive(status)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnUserLevelOperatorActive", "handleOnUserLevelOperatorActive")
OnUserLevelServiceActive
Short description
Status of Service userlevel. Used internally in combination with the CSK_UserManagement module if available.
Callback arguments
| Name | Type | Multiplicity | Description |
|---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnUserLevelServiceActive(status)
-- Do something
end
Script.register("CSK_MultiDataLogger.OnUserLevelServiceActive", "handleOnUserLevelServiceActive")
MultiDataLogger_FC
Short description
Crown to provide CSK_FlowConfig relevant features.
Overview
MultiDataLogger_FC.DataSource
Short description
Set source of data to log.
Overview
Functions
create()
Short description
Internally used CSK_FlowConfig create function.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
Instance |
INT |
1 |
Numeric identifier of processing instance. |
Return values
| Name | Type | Multiplicity | Description |
|---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
Sample (auto-generated)
handle = MultiDataLogger_FC.DataSource.create(Instance)
dataSource()
Short description
Set source of data to log.
Parameters
| Name | Type | Multiplicity | Description |
|---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
source |
STRING |
1 |
Source of data to log. Parameter: 1: Data (STRING or Image) |
Sample (auto-generated)
MultiDataLogger_FC.DataSource.dataSource(handle, source)
Enumerations
CSK_MultiDataLogger.DataMode
Mode of data to store.
| Value | Name | Description |
|---|---|---|
file |
file |
Store files |
image |
image |
Store images |
CSK_MultiDataLogger.DataType
Data type
| Value | Name | Description |
|---|---|---|
json |
json |
JSON |
csv |
csv |
CSV |
CSK_MultiDataLogger.ImageFormat
Image format
| Value | Name | Description |
|---|---|---|
bmp |
bmp |
BMP |
png |
png |
PNG |
jpg |
jpg |
JPEG |
json |
json |
JSON |
msgpack |
msgpack |
MSGPACK |