Document metadata
Application name |
CSK_Module_ImagePlayer |
---|---|
Version |
3.1.1 |
Date |
2025-02-18 |
Author |
SICK AG |
Crowns
CSK_ImagePlayer
Short description
Module to load offline images and to (optionally) forward them via event to other modules via event "CSK_ImagePlayer.OnNewImage".
Typically the features of this module are used like this (check also main script of this module):
1) Setup
Set image type to load via "setImageType".
Select path to the images via "setPath".
If you want to periodically load the images it is possible to set the cycle time via "setCycleTime".
To resize the image it is possible to set the resoze factor via "setResizeFactor".
Via "setForwardImage" it is possible to activate the module to forward the loaded image via its CSK_ImagePlayer.OnNewImage event.
Start to load images via "startProvider" or "triggerOnce"
Overview
Functions
clearFlowConfigRelevantConfiguration()
Short description
Function to clear FlowConfig relevant configurations.
Sample (auto-generated)
CSK_ImagePlayer.clearFlowConfigRelevantConfiguration()
getParameters()
Short description
Function to get all parameters of the client in JSON format.
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
jsonParameters |
STRING |
1 |
JSON string with all parameters. |
Sample (auto-generated)
jsonParameters = CSK_ImagePlayer.getParameters()
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_ImagePlayer.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_ImagePlayer.loadParameters()
pageCalled()
Short description
Function to register "On Resume" of the module UI ( (only helper function).
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
empty |
STRING |
1 |
Empty string (only needed to simplify binding). |
Sample (auto-generated)
empty = CSK_ImagePlayer.pageCalled()
resetModule()
Short description
Function to reset main configuration of module.
Sample (auto-generated)
CSK_ImagePlayer.resetModule()
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_ImagePlayer.sendParameters(noDataSave)
setCycleTime()
Short description
Set cycle time of loading images.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
time |
INT |
1 |
Time in ms |
Sample (auto-generated)
CSK_ImagePlayer.setCycleTime(time)
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_ImagePlayer.setFlowConfigPriority(status)
setForwardImage()
Short description
Set if images should be forwarded via event.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_ImagePlayer.setForwardImage(status)
setImageType()
Short description
Set image type
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
imgType |
1 |
Image type (bmp, jpg, png) |
Sample (auto-generated)
CSK_ImagePlayer.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 |
Status |
Sample (auto-generated)
CSK_ImagePlayer.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_ImagePlayer.setParameterName(name)
setPath()
Short description
Set path to load iamges from.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
path |
STRING |
1 |
Local Path (like '/public/images') |
Sample (auto-generated)
CSK_ImagePlayer.setPath(path)
setResizeFactor()
Short description
Set resize factor for loaded images.
INFO: If the internal resizeFactor is changed, this module will notify the "OnNewImageSizeToShare", so that other modules can react on that.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
factor |
FLOAT |
1 |
Factor |
Sample (auto-generated)
CSK_ImagePlayer.setResizeFactor(factor)
setViewerActive()
Short description
Set if UI should show images in viewer.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
status |
Sample (auto-generated)
CSK_ImagePlayer.setViewerActive(status)
startProvider()
Short description
Start provider to load images.
Sample (auto-generated)
CSK_ImagePlayer.startProvider()
stopProvider()
Short description
Stop provider to load images.
Sample (auto-generated)
CSK_ImagePlayer.stopProvider()
triggerOnce()
Short description
Load only one single image.
Sample (auto-generated)
CSK_ImagePlayer.triggerOnce()
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_ImagePlayer.OnDataLoadedOnReboot", "handleOnDataLoadedOnReboot")
OnNewCycleTime
Short description
Notify cycle time.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
time |
INT |
1 |
Time |
Sample (auto-generated)
function handleOnNewCycleTime(time)
-- Do something
end
Script.register("CSK_ImagePlayer.OnNewCycleTime", "handleOnNewCycleTime")
OnNewImage
Short description
Event to forward images per default.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
image |
OBJECT |
1 |
Image |
timestamp |
INT |
1 |
Timestamp |
Sample (auto-generated)
function handleOnNewImage(image, timestamp)
-- Do something
end
Script.register("CSK_ImagePlayer.OnNewImage", "handleOnNewImage")
OnNewImageSizeToShare
Short description
Notify that there is a new image size so that e.g. other modules can react on that (e.g. by triggering new measurement of the resulting new image size).
This event will be notified if the resizeFactor was changed via "setResizeFactor".
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
relatedEvent |
STRING |
1 |
The name of the event which provides the images (currently 'CSK_ImagePlayer.OnNewImage'). |
Sample (auto-generated)
function handleOnNewImageSizeToShare(relatedEvent)
-- Do something
end
Script.register("CSK_ImagePlayer.OnNewImageSizeToShare", "handleOnNewImageSizeToShare")
OnNewImageType
Short description
Notify type of images to load.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
type |
STRING |
1 |
Image type (jpg, bmp, png). |
Sample (auto-generated)
function handleOnNewImageType(type)
-- Do something
end
Script.register("CSK_ImagePlayer.OnNewImageType", "handleOnNewImageType")
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_ImagePlayer.OnNewParameterName", "handleOnNewParameterName")
OnNewPath
Short description
Notify local offlline image path.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
path |
STRING |
1 |
Local image path. |
Sample (auto-generated)
function handleOnNewPath(path)
-- Do something
end
Script.register("CSK_ImagePlayer.OnNewPath", "handleOnNewPath")
OnNewResizeFactor
Short description
Notify new resize factor.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
factor |
FLOAT |
1 |
Factor |
Sample (auto-generated)
function handleOnNewResizeFactor(factor)
-- Do something
end
Script.register("CSK_ImagePlayer.OnNewResizeFactor", "handleOnNewResizeFactor")
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_ImagePlayer.OnNewStatusCSKStyle", "handleOnNewStatusCSKStyle")
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_ImagePlayer.OnNewStatusFlowConfigPriority", "handleOnNewStatusFlowConfigPriority")
OnNewStatusFolderList
Short description
Notify list of available folders.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
list |
STRING |
1 |
List of folders. |
Sample (auto-generated)
function handleOnNewStatusFolderList(list)
-- Do something
end
Script.register("CSK_ImagePlayer.OnNewStatusFolderList", "handleOnNewStatusFolderList")
OnNewStatusForwardImage
Short description
Notify status of forwarding images.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusForwardImage(status)
-- Do something
end
Script.register("CSK_ImagePlayer.OnNewStatusForwardImage", "handleOnNewStatusForwardImage")
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_ImagePlayer.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_ImagePlayer.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_ImagePlayer.OnNewStatusModuleVersion", "handleOnNewStatusModuleVersion")
OnNewStatusViewerActive
Short description
Notify status of UI viewer activation.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusViewerActive(status)
-- Do something
end
Script.register("CSK_ImagePlayer.OnNewStatusViewerActive", "handleOnNewStatusViewerActive")
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_ImagePlayer.OnPersistentDataModuleAvailable", "handleOnPersistentDataModuleAvailable")
OnPlayerActive
Short description
Notify status of image player activation.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnPlayerActive(status)
-- Do something
end
Script.register("CSK_ImagePlayer.OnPlayerActive", "handleOnPlayerActive")
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_ImagePlayer.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_ImagePlayer.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_ImagePlayer.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_ImagePlayer.OnUserLevelServiceActive", "handleOnUserLevelServiceActive")
CSK_Module_ImagePlayer
Short description
This is an automatically generated CROWN (description not necessary).
ImagePlayer_FC
Short description
Crown to provide CSK_FlowConfig relevant features.
Overview
ImagePlayer_FC.OnNewImage
Short description
Provide loaded offline images.
Overview
Functions
create()
Short description
Internally used CSK_FlowConfig create function.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
Path |
STRING |
? |
Path to load images. (e.g. "resources/CSK_Module_ImagePlayer/ColorPins" (default) or "public/Images") |
ImageType |
? |
Image type (jpg is default) |
|
CycleTime |
INT |
? |
Cycle time to trigger new image in ms (1000 is default). |
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
Sample (auto-generated)
handle = ImagePlayer_FC.OnNewImage.create(Path, ImageType, CycleTime)
register()
Short description
Internally used CSK_FlowConfig register function.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
eventname |
STRING |
1 |
Internal parameter (not used). |
callback |
STRING |
1 |
Internally used callback function. |
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
success |
BOOL |
1 |
Success of register process. |
Sample (auto-generated)
success = ImagePlayer_FC.OnNewImage.register(handle, eventname, callback)
Events
OnNewImage
Short description
Provide loaded offline images.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
OnNewImage |
STRING |
1 |
'CSK_ImagePlayer.OnNewImage' Parameter: 1: Image (IMAGE) 2: Timestamp (INT) |
Sample (auto-generated)
function handleOnNewImage(handle, OnNewImage)
-- Do something
end
Script.register("ImagePlayer_FC.OnNewImage.OnNewImage", "handleOnNewImage")
Enumerations
CSK_ImagePlayer.ImageTypes
Image types to load.
Value | Name | Description |
---|---|---|
jpg |
jpg |
JPG images. |
png |
png |
PNG images. |
bmp |
bmp |
BMP images. |