Document metadata
Application name |
CSK_Module_DeviceScanner |
---|---|
Version |
2.1.1 |
Date |
2024-07-31 |
Author |
SICK AG |
Crowns
CSK_DeviceScanner
Short description
Module to scan and configure connected devices by using the Command.Scan CROWN.
This module provides a UI for all relevant features.
Typically the feature of this module is used like this:
1) Scan for devices. If wanted only a specific interface can be preselected for the scan.
2) Select a found device.
3) Preset new values for this device.
4) Activate this new setup by sending it to the device.
Overview
Functions
getDeviceListJSON()
Short description
Get json-list of found devices.
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
deviceList |
STRING |
1 |
Json list of devices |
Sample (auto-generated)
deviceList = CSK_DeviceScanner.getDeviceListJSON()
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_DeviceScanner.getStatusModuleActive()
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_DeviceScanner.pageCalled()
scanForDevices()
Short description
Scan for connected devices via Command.Scan API.
Sample (auto-generated)
CSK_DeviceScanner.scanForDevices()
selectDevice()
Short description
Select entry of device list (used in UI).
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
selection |
STRING |
1 |
Selected device |
Sample (auto-generated)
CSK_DeviceScanner.selectDevice(selection)
selectInterface()
Short description
Select interface to search on.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
selection |
STRING |
1 |
Interface ID |
Sample (auto-generated)
CSK_DeviceScanner.selectInterface(selection)
sendNewConfig()
Short description
Try to apply new config on selected device (before this use the "set…" functions).
Sample (auto-generated)
CSK_DeviceScanner.sendNewConfig()
setDeviceIP()
Short description
Set new IP for selected device (see "selectDevice").
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
ip |
STRING |
1 |
IP |
Sample (auto-generated)
CSK_DeviceScanner.setDeviceIP(ip)
setDHCP()
Short description
Set DHCP status for selected device (see "selectDevice").
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status of DHCP |
Sample (auto-generated)
CSK_DeviceScanner.setDHCP(status)
setGateway()
Short description
Set Gateways for selected device (see "selectDevice").
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
gateway |
STRING |
1 |
Gateway IP |
Sample (auto-generated)
CSK_DeviceScanner.setGateway(gateway)
setSubnetMask()
Short description
Set subnetmask for selected device (see "selectDevice").
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
subnetMask |
STRING |
1 |
Subnetmask |
Sample (auto-generated)
CSK_DeviceScanner.setSubnetMask(subnetMask)
Events
OnDeviceSelected
Short description
Notify if a device was selected.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status if a device is selected. |
Sample (auto-generated)
function handleOnDeviceSelected(status)
-- Do something
end
Script.register("CSK_DeviceScanner.OnDeviceSelected", "handleOnDeviceSelected")
OnNewDeviceTable
Short description
Notify json-list of found devices.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
deviceTable |
STRING |
1 |
Json list of devices |
Sample (auto-generated)
function handleOnNewDeviceTable(deviceTable)
-- Do something
end
Script.register("CSK_DeviceScanner.OnNewDeviceTable", "handleOnNewDeviceTable")
OnNewDHCPStatus
Short description
Notify DHCP status.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
DHCP status |
Sample (auto-generated)
function handleOnNewDHCPStatus(status)
-- Do something
end
Script.register("CSK_DeviceScanner.OnNewDHCPStatus", "handleOnNewDHCPStatus")
OnNewErrorActive
Short description
Notify if error of input parameters is active.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
active |
BOOL |
1 |
Status of error. |
Sample (auto-generated)
function handleOnNewErrorActive(active)
-- Do something
end
Script.register("CSK_DeviceScanner.OnNewErrorActive", "handleOnNewErrorActive")
OnNewGateway
Short description
Notify Gateway setting.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
gateway |
STRING |
1 |
Gateway IP |
Sample (auto-generated)
function handleOnNewGateway(gateway)
-- Do something
end
Script.register("CSK_DeviceScanner.OnNewGateway", "handleOnNewGateway")
OnNewInterfaceList
Short description
Notify available interfaces.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
list |
STRING |
1 |
list of interfaces |
Sample (auto-generated)
function handleOnNewInterfaceList(list)
-- Do something
end
Script.register("CSK_DeviceScanner.OnNewInterfaceList", "handleOnNewInterfaceList")
OnNewInterfaceSelected
Short description
Notify selected interface.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
selection |
STRING |
1 |
Selected interface |
Sample (auto-generated)
function handleOnNewInterfaceSelected(selection)
-- Do something
end
Script.register("CSK_DeviceScanner.OnNewInterfaceSelected", "handleOnNewInterfaceSelected")
OnNewIP
Short description
Notify IP setting.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
ip |
STRING |
1 |
IP |
Sample (auto-generated)
function handleOnNewIP(ip)
-- Do something
end
Script.register("CSK_DeviceScanner.OnNewIP", "handleOnNewIP")
OnNewScanStatus
Short description
Notify scan / setup status.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
STRING |
1 |
Status |
Sample (auto-generated)
function handleOnNewScanStatus(status)
-- Do something
end
Script.register("CSK_DeviceScanner.OnNewScanStatus", "handleOnNewScanStatus")
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_DeviceScanner.OnNewStatusCSKStyle", "handleOnNewStatusCSKStyle")
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_DeviceScanner.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_DeviceScanner.OnNewStatusModuleVersion", "handleOnNewStatusModuleVersion")
OnNewSubnetMask
Short description
Notify Subnet setting.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
subnetMask |
STRING |
1 |
Subnetmask |
Sample (auto-generated)
function handleOnNewSubnetMask(subnetMask)
-- Do something
end
Script.register("CSK_DeviceScanner.OnNewSubnetMask", "handleOnNewSubnetMask")
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_DeviceScanner.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_DeviceScanner.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_DeviceScanner.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_DeviceScanner.OnUserLevelServiceActive", "handleOnUserLevelServiceActive")
CSK_Module_DeviceScanner
Short description
This is an automatically generated CROWN (description not necessary).