Document metadata

Application name

CSK_Module_MultiTCPIPClient

Version

2.0.0

Date

2024-08-14

Author

SICK AG

Crowns

CSK_Module_MultiTCPIPClient

Short description

This is an automatically generated CROWN (description not necessary).

CSK_MultiTCPIPClient

Short description

Module to provide TCP/IP client functionality for multiple instances. Other modules can access its features / settings.
This module provides a UI for all relevant features.

Typically the features of this module are used like this (check also main script of this module):

1) Setup the TCP/IP client configuration
- Select instance via 'setSelectedInstance'.
- Set IP address of TCP/IP server via 'setServerAddress'.
- Set port via 'setPort'.
- Set interface via 'setInterface'.
- Set framing via 'setRxFraming' and 'setTxFraming'.
- Connect to server via 'setConnectionStatus'.

2) Forward content via TCP/IP, also by other modules
To send content via TCP/IP, there are different possibilities.
You can make use of 'transmitData[NUM]' to directly send the content with this function.
It is also possible to preset the content via 'setCommand' and after that send the preset content via 'transmitCommando' (e.g. used within the UI).

Additionally it is possible to configure the module to listen / wait for specific events of other modules/apps and to forward their content via TCP/IP.
This can be used e.g. to listen to 'OtherModule.OnNewResult'-events and to forward the results via TCP/IP (data will be converted to data type 'string').
To do so make use of 'addEventToForward' (via script) or 'addEventToForwardViaUI' (event needs to be preset via 'setEventToForward').

3) Wait for incoming triggers
It is possible to define trigger commandos to wait for and to forward this on another event, e.g. to another module.
This can be done e.g. via 'addTriggerEventPair("TRG", "OnNewTrigger")'.
By doing this, it will notify the 'CSK_MultiTCPIPClient.OnNewTrigger'-event if a 'TRG' is received on the client.
INFO: Events will dynamically created and served. Other modules can check via 'Script.isServedAsEvent' if event exists.
If there is additional content following the defined trigger command after a ',' it will also be forwarded withint the data content of the event.
The same can be done via the UI step by step (see 'setTrigger', 'setEventName', or 'addTriggerEventPairViaUI').

4) Listen for incoming content
It is also possible to register on the 'CSK_MultiTCPIPClient.OnNewData[NUM]'-event by other modules to get the communication content.

Functions

CSK_MultiTCPIPClient.addEventToForward()
Short description

Add an event to register to and to forward the content of its first parameter (as string) to TCP/IP server.

Parameters
Name Type Multiplicity Description

event

STRING

1

Name of event to register to.

Sample (auto-generated)
CSK_MultiTCPIPClient.addEventToForward(event)
CSK_MultiTCPIPClient.addEventToForwardViaUI()
Short description

Add event to register to and forward content (first event parameter as string) to TCP/IP server via UI (event needs to be prefilled on UI / via "setEventToForward").

Sample (auto-generated)
CSK_MultiTCPIPClient.addEventToForwardViaUI()
CSK_MultiTCPIPClient.addInstance()
Short description

Function to add an additional instance.

Sample (auto-generated)
CSK_MultiTCPIPClient.addInstance()
CSK_MultiTCPIPClient.addTriggerEventPair()
Short description

Add a trigger command to wait for and the related event to call if the trigger command was received.

Parameters
Name Type Multiplicity Description

trigger

STRING

1

Trigger to listen on TCP/IP connection.

event

STRING

1

Name of event to notify if trigger command was received.
Prefix 'TCPIPClient.' will be used in front of the string. Name of event must differ over instances.

Sample (auto-generated)
CSK_MultiTCPIPClient.addTriggerEventPair(trigger, event)
CSK_MultiTCPIPClient.addTriggerEventPairViaUI()
Short description

Add pair of "trigger" and "event" via UI (parameters are prefilled on UI).

Sample (auto-generated)
CSK_MultiTCPIPClient.addTriggerEventPairViaUI()
CSK_MultiTCPIPClient.clearFlowConfigRelevantConfiguration()
Short description

Function to clear FlowConfig relevant configurations.

Sample (auto-generated)
CSK_MultiTCPIPClient.clearFlowConfigRelevantConfiguration()
CSK_MultiTCPIPClient.deleteEventToForward()
Short description

Remove event to forward content.

Parameters
Name Type Multiplicity Description

event

STRING

1

Eventname

Sample (auto-generated)
CSK_MultiTCPIPClient.deleteEventToForward(event)
CSK_MultiTCPIPClient.deleteEventToForwardViaUI()
Short description

Remove event preselected via UI.

Sample (auto-generated)
CSK_MultiTCPIPClient.deleteEventToForwardViaUI()
CSK_MultiTCPIPClient.deleteTriggerEventPair()
Short description

Remove trigger/event pair via trigger name.

Parameters
Name Type Multiplicity Description

trigger

STRING

1

Trigger command

Sample (auto-generated)
CSK_MultiTCPIPClient.deleteTriggerEventPair(trigger)
CSK_MultiTCPIPClient.deleteTriggerEventPairViaUI()
Short description

Remove trigger/event pair selected via modules UI.

Sample (auto-generated)
CSK_MultiTCPIPClient.deleteTriggerEventPairViaUI()
CSK_MultiTCPIPClient.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_MultiTCPIPClient.getInstancesAmount()
CSK_MultiTCPIPClient.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_MultiTCPIPClient.getParameters(instanceNo)
CSK_MultiTCPIPClient.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_MultiTCPIPClient.getStatusModuleActive()
CSK_MultiTCPIPClient.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_MultiTCPIPClient.loadParameters()
CSK_MultiTCPIPClient.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_MultiTCPIPClient.pageCalled()
CSK_MultiTCPIPClient.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_MultiTCPIPClient.resetInstances()
CSK_MultiTCPIPClient.resetModule()
Short description

Function to reset main configuration of module.

Sample (auto-generated)
CSK_MultiTCPIPClient.resetModule()
CSK_MultiTCPIPClient.selectEventToForwardViaUI()
Short description

Select an event to forward the content of its first parameter to TCP/IP server via UI.

Parameters
Name Type Multiplicity Description

selection

STRING

1

Selected event.

Sample (auto-generated)
CSK_MultiTCPIPClient.selectEventToForwardViaUI(selection)
CSK_MultiTCPIPClient.selectTriggerEventPairViaUI()
Short description

Select a trigger/event pair via UI.

Parameters
Name Type Multiplicity Description

selection

STRING

1

Selected trigger/event pair.

Sample (auto-generated)
CSK_MultiTCPIPClient.selectTriggerEventPairViaUI(selection)
CSK_MultiTCPIPClient.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_MultiTCPIPClient.sendParameters(noDataSave)
CSK_MultiTCPIPClient.setCommand()
Short description

Set command to transmit via TCP/IP if triggered via "transmitCommando() (used in modules UI).

Parameters
Name Type Multiplicity Description

cmd

STRING

1

Command to transmit.

Sample (auto-generated)
CSK_MultiTCPIPClient.setCommand(cmd)
CSK_MultiTCPIPClient.setConnectionStatus()
Short description

Set status of TCP/IP connection.

Parameters
Name Type Multiplicity Description

status

BOOL

1

Status

Sample (auto-generated)
CSK_MultiTCPIPClient.setConnectionStatus(status)
CSK_MultiTCPIPClient.setEventToForward()
Short description

Preset event to register to and forward content to TCP/IP server via UI.

Parameters
Name Type Multiplicity Description

value

STRING

1

Event to register to.

Sample (auto-generated)
CSK_MultiTCPIPClient.setEventToForward(value)
CSK_MultiTCPIPClient.setEventValue()
Short description

Set event for trigger/event pair via UI.

Parameters
Name Type Multiplicity Description

value

STRING

1

Event to notify.

Sample (auto-generated)
CSK_MultiTCPIPClient.setEventValue(value)
CSK_MultiTCPIPClient.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_MultiTCPIPClient.setFlowConfigPriority(status)
CSK_MultiTCPIPClient.setInterface()
Short description

Set interface for the TCP/IP connection.

Parameters
Name Type Multiplicity Description

interface

STRING

1

Interface

Sample (auto-generated)
CSK_MultiTCPIPClient.setInterface(interface)
CSK_MultiTCPIPClient.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_MultiTCPIPClient.setLoadOnReboot(status)
CSK_MultiTCPIPClient.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_MultiTCPIPClient.setParameterName(name)
CSK_MultiTCPIPClient.setPort()
Short description

Set port of TCP/IP connection.

Parameters
Name Type Multiplicity Description

port

INT

1

Port

Sample (auto-generated)
CSK_MultiTCPIPClient.setPort(port)
CSK_MultiTCPIPClient.setRxFraming()
Short description

Set Rx frame of TCP/IP connection (only 'empty' or 'STX-ETX' supported). Will become active with next connection.

Parameters
Name Type Multiplicity Description

frame

ENUM
CSK_MultiTCPIPClient.Communication_Frame

1

Frame to use.

Sample (auto-generated)
CSK_MultiTCPIPClient.setRxFraming(frame)
CSK_MultiTCPIPClient.setSelectedInstance()
Short description

Select one of the multiple instances.

Parameters
Name Type Multiplicity Description

instance

INT

1

Instance to select.

Sample (auto-generated)
CSK_MultiTCPIPClient.setSelectedInstance(instance)
CSK_MultiTCPIPClient.setServerAddress()
Short description

Set IP of TCP/IP server.

Parameters
Name Type Multiplicity Description

address

STRING

1

IP

Sample (auto-generated)
CSK_MultiTCPIPClient.setServerAddress(address)
CSK_MultiTCPIPClient.setTrigger()
Short description

Set trigger command for trigger/event pair via UI.

Parameters
Name Type Multiplicity Description

value

STRING

1

Trigger command

Sample (auto-generated)
CSK_MultiTCPIPClient.setTrigger(value)
CSK_MultiTCPIPClient.setTxFraming()
Short description

Set Tx frame of TCP/IP connection (only 'empty' or 'STX-ETX' supported). Will become active with next connection.

Parameters
Name Type Multiplicity Description

frame

ENUM
CSK_MultiTCPIPClient.Communication_Frame

1

Frame to use.

Sample (auto-generated)
CSK_MultiTCPIPClient.setTxFraming(frame)
CSK_MultiTCPIPClient.transmitCommando()
Short description

Transmit preset commando via TCP/IP (used in module UI). See also "setCommand".

Sample (auto-generated)
CSK_MultiTCPIPClient.transmitCommando()
CSK_MultiTCPIPClient.transmitDataNUM()
Short description

Example of dynamically served function to transmit data on specific instance.
NUM will be replaced by the number of instance (e.g. "transmitData1").
INFO: Other modules can check via "Script.isServedAsFunction" if function of sepecific instance exists.
Needs then to be called via "Script.callFunction".

Parameters
Name Type Multiplicity Description

data

STRING

1

Data to transmit.

Return values
Name Type Multiplicity Description

numberOfBytesTransmitted

INT

1

Number of bytes transmitted ('0' if error).

Sample (auto-generated)
numberOfBytesTransmitted = CSK_MultiTCPIPClient.transmitDataNUM(data)

Events

CSK_MultiTCPIPClient.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_MultiTCPIPClient.OnDataLoadedOnReboot", "handleOnDataLoadedOnReboot")
CSK_MultiTCPIPClient.OnNewCommand
Short description

Notify command to send.

Callback arguments
Name Type Multiplicity Description

cmd

STRING

1

Command to transmit.

Sample (auto-generated)
function handleOnNewCommand(cmd)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewCommand", "handleOnNewCommand")
CSK_MultiTCPIPClient.OnNewConnectionStatus
Short description

Notify configuration setup of TCP/IP connection status.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

Sample (auto-generated)
function handleOnNewConnectionStatus(status)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewConnectionStatus", "handleOnNewConnectionStatus")
CSK_MultiTCPIPClient.OnNewCurrentConnectionStatus
Short description

Notify current status of TCP/IP connection.

Callback arguments
Name Type Multiplicity Description

status

BOOL

1

Status

Sample (auto-generated)
function handleOnNewCurrentConnectionStatus(status)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewCurrentConnectionStatus", "handleOnNewCurrentConnectionStatus")
CSK_MultiTCPIPClient.OnNewDataNUM
Short description

Example of dynamically created event to provide received data of instance.
NUM will be replaced by the number of instance (e.g. "OnNewData1").
INFO: Other modules can check via "Script.isServedAsEvent" if event of sepecific instance exists.

Callback arguments
Name Type Multiplicity Description

data

STRING

1

Data

Sample (auto-generated)
function handleOnNewDataNUM(data)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewDataNUM", "handleOnNewDataNUM")
CSK_MultiTCPIPClient.OnNewEventToForward
Short description

Notify event to register to and to forward its content to TCP/IP server.

Callback arguments
Name Type Multiplicity Description

eventName

STRING

1

Name of event

Sample (auto-generated)
function handleOnNewEventToForward(eventName)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewEventToForward", "handleOnNewEventToForward")
CSK_MultiTCPIPClient.OnNewEventToForwardList
Short description

Notify list of events to register to and to forward its content to TCP/IP server.

Callback arguments
Name Type Multiplicity Description

list

STRING

1

List

Sample (auto-generated)
function handleOnNewEventToForwardList(list)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewEventToForwardList", "handleOnNewEventToForwardList")
CSK_MultiTCPIPClient.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_MultiTCPIPClient.OnNewInstanceList", "handleOnNewInstanceList")
CSK_MultiTCPIPClient.OnNewInterface
Short description

Notify selected interface for TCP/IP connection.

Callback arguments
Name Type Multiplicity Description

interface

STRING

1

Interface

Sample (auto-generated)
function handleOnNewInterface(interface)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewInterface", "handleOnNewInterface")
CSK_MultiTCPIPClient.OnNewInterfaceList
Short description

Notify list of available interfaces for TCP/IP connection.

Callback arguments
Name Type Multiplicity Description

list

STRING

1

List of interfaces.

Sample (auto-generated)
function handleOnNewInterfaceList(list)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewInterfaceList", "handleOnNewInterfaceList")
CSK_MultiTCPIPClient.OnNewLog
Short description

Notfiy latest log.

Callback arguments
Name Type Multiplicity Description

log

STRING

1

Log entries.

Sample (auto-generated)
function handleOnNewLog(log)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewLog", "handleOnNewLog")
CSK_MultiTCPIPClient.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_MultiTCPIPClient.OnNewParameterName", "handleOnNewParameterName")
CSK_MultiTCPIPClient.OnNewPort
Short description

Notify port of TCP/IP connection.

Callback arguments
Name Type Multiplicity Description

port

INT

1

Port

Sample (auto-generated)
function handleOnNewPort(port)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewPort", "handleOnNewPort")
CSK_MultiTCPIPClient.OnNewProcessingParameter
Short description

Event to share processing parameters to the instances.

Callback arguments
Name Type Multiplicity Description

objectNo

INT

1

Number of the instance to receive the parameter.

parameter

STRING

1

Name of the parameter.

value

AUTO

?

Value of the parameter.

value2

AUTO

?

2nd value of the parameter.

Sample (auto-generated)
function handleOnNewProcessingParameter(objectNo, parameter, value, value2)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewProcessingParameter", "handleOnNewProcessingParameter")
CSK_MultiTCPIPClient.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_MultiTCPIPClient.OnNewResult", "handleOnNewResult")
CSK_MultiTCPIPClient.OnNewRxFrame
Short description

Notify RxFrame.

Callback arguments
Name Type Multiplicity Description

frame

STRING

1

frame

Sample (auto-generated)
function handleOnNewRxFrame(frame)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewRxFrame", "handleOnNewRxFrame")
CSK_MultiTCPIPClient.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_MultiTCPIPClient.OnNewSelectedInstance", "handleOnNewSelectedInstance")
CSK_MultiTCPIPClient.OnNewServerIP
Short description

Notify TCP/IP server IP.

Callback arguments
Name Type Multiplicity Description

serverIP

STRING

1

IP

Sample (auto-generated)
function handleOnNewServerIP(serverIP)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewServerIP", "handleOnNewServerIP")
CSK_MultiTCPIPClient.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_MultiTCPIPClient.OnNewStatusCSKStyle", "handleOnNewStatusCSKStyle")
CSK_MultiTCPIPClient.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_MultiTCPIPClient.OnNewStatusFlowConfigPriority", "handleOnNewStatusFlowConfigPriority")
CSK_MultiTCPIPClient.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_MultiTCPIPClient.OnNewStatusLoadParameterOnReboot", "handleOnNewStatusLoadParameterOnReboot")
CSK_MultiTCPIPClient.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_MultiTCPIPClient.OnNewStatusModuleIsActive", "handleOnNewStatusModuleIsActive")
CSK_MultiTCPIPClient.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_MultiTCPIPClient.OnNewStatusModuleVersion", "handleOnNewStatusModuleVersion")
CSK_MultiTCPIPClient.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_MultiTCPIPClient.OnNewStatusRegisteredEvent", "handleOnNewStatusRegisteredEvent")
CSK_MultiTCPIPClient.OnNewTriggerEventPairEvent
Short description

Notify event of trigger/event pairs.

Callback arguments
Name Type Multiplicity Description

list

STRING

1

List

Sample (auto-generated)
function handleOnNewTriggerEventPairEvent(list)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewTriggerEventPairEvent", "handleOnNewTriggerEventPairEvent")
CSK_MultiTCPIPClient.OnNewTriggerEventPairList
Short description

Notify list of trigger/event pairs.

Callback arguments
Name Type Multiplicity Description

list

STRING

1

List

Sample (auto-generated)
function handleOnNewTriggerEventPairList(list)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewTriggerEventPairList", "handleOnNewTriggerEventPairList")
CSK_MultiTCPIPClient.OnNewTriggerEventPairTrigger
Short description

Notify trigger of trigger/event pair.

Callback arguments
Name Type Multiplicity Description

list

STRING

1

List

Sample (auto-generated)
function handleOnNewTriggerEventPairTrigger(list)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewTriggerEventPairTrigger", "handleOnNewTriggerEventPairTrigger")
CSK_MultiTCPIPClient.OnNewTxFrame
Short description

Notify TxFrame.

Callback arguments
Name Type Multiplicity Description

frame

STRING

1

frame

Sample (auto-generated)
function handleOnNewTxFrame(frame)
  -- Do something
end

Script.register("CSK_MultiTCPIPClient.OnNewTxFrame", "handleOnNewTxFrame")
CSK_MultiTCPIPClient.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. "OnNewResult1").

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_MultiTCPIPClient.OnNewValueToForwardNUM", "handleOnNewValueToForwardNUM")
CSK_MultiTCPIPClient.OnNewValueUpdateNUM
Short description

Example of dynamically created event to sync paramters between instance threads and Controller part of module.
NUM will be replaced by the number of instance (e.g. "OnNewResult1").

Callback arguments
Name Type Multiplicity Description

instance

INT

1

Instance new value is coming from.

parameter

STRING

1

Name of the paramter 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_MultiTCPIPClient.OnNewValueUpdateNUM", "handleOnNewValueUpdateNUM")
CSK_MultiTCPIPClient.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_MultiTCPIPClient.OnPersistentDataModuleAvailable", "handleOnPersistentDataModuleAvailable")
CSK_MultiTCPIPClient.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_MultiTCPIPClient.OnUserLevelAdminActive", "handleOnUserLevelAdminActive")
CSK_MultiTCPIPClient.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_MultiTCPIPClient.OnUserLevelMaintenanceActive", "handleOnUserLevelMaintenanceActive")
CSK_MultiTCPIPClient.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_MultiTCPIPClient.OnUserLevelOperatorActive", "handleOnUserLevelOperatorActive")
CSK_MultiTCPIPClient.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_MultiTCPIPClient.OnUserLevelServiceActive", "handleOnUserLevelServiceActive")

MultiTCPIPClient_FC

Short description

Crown to provide CSK_FlowConfig relevant features.

Overview

MultiTCPIPClient_FC.OnReceive

Short description

Provide received TCP/IP data.

Functions

MultiTCPIPClient_FC.OnReceive.create()
Short description

Internally used CSK_FlowConfig create function.

Parameters
Name Type Multiplicity Description

Instance

INT

1

Numeric identifier of processing instance (must be >=1).

Command

STRING

?

Optional trigger command (will filter incoming data for messages starting with this command).

Return values
Name Type Multiplicity Description

handle

HANDLE

1

Handle to internally used FlowConfig instance.

Sample (auto-generated)
handle = MultiTCPIPClient_FC.OnReceive.create(Instance, Command)
MultiTCPIPClient_FC.OnReceive.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 = MultiTCPIPClient_FC.OnReceive.register(handle, eventname, callback)

Events

MultiTCPIPClient_FC.OnReceive.OnNewData
Short description

Provide received TCP/IP data.

Callback arguments
Name Type Multiplicity Description

handle

HANDLE

1

Handle to internally used FlowConfig instance.

OnNewData

STRING

1

'CSK_MultiTCPIPClient.OnNewData[InstanceNUM]' or 'CSK_MultiTCPIPClient.OnNewTrigger[InstanceNUM]_[COMMAND]' Parameter: 1: Data content (STRING)

Sample (auto-generated)
function handleOnNewData(handle, OnNewData)
  -- Do something
end

Script.register("MultiTCPIPClient_FC.OnReceive.OnNewData", "handleOnNewData")

MultiTCPIPClient_FC.Transmit

Short description

Set source of incoming data to forward via TCP/IP.

Overview

Functions

MultiTCPIPClient_FC.Transmit.create()
Short description

Internally used CSK_FlowConfig create function.

Parameters
Name Type Multiplicity Description

Instance

INT

1

Numeric identifier of processing instance (must be >=1).

Return values
Name Type Multiplicity Description

handle

HANDLE

1

Handle to internally used FlowConfig instance.

Sample (auto-generated)
handle = MultiTCPIPClient_FC.Transmit.create(Instance)
MultiTCPIPClient_FC.Transmit.transmit()
Short description

Set source of incoming data to forward via TCP/IP.

Parameters
Name Type Multiplicity Description

handle

HANDLE

1

Handle to internally used FlowConfig instance.

source1

STRING

?

Source1 of data to forward via TCP/IP. Parameter: 1: Data content (STRING)

source2

STRING

?

Source2 of data to forward via TCP/IP. Parameter: 1: Data content (STRING)

source3

STRING

?

Source3 of data to forward via TCP/IP. Parameter: 1: Data content (STRING)

source4

STRING

?

Source4 of data to forward via TCP/IP. Parameter: 1: Data content (STRING)

Sample (auto-generated)
MultiTCPIPClient_FC.Transmit.transmit(handle, source1, source2, source3, source4)

Enumerations

CSK_MultiTCPIPClient.Communication_Frame

TCP/IP communication frame.

Items
Value Name Description
empty

empty

No frame.

STX-ETX

STX_ETX

STX / ETX framing.