Document metadata
Application name |
CSK_Module_MultiSerialCom |
---|---|
Version |
2.0.0 |
Date |
2025-03-14 |
Author |
SICK AG |
Crowns
- C
- M
CSK_Module_MultiSerialCom
Short description
This is an automatically generated CROWN (description not necessary).
CSK_MultiSerialCom
Short description
Module to provide SerialCom functionality. Multiple instances can be created and will run in multiple threads on the device.
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
- If multiple instances are needed, these can be added via 'addInstance()' (not needed if you only use 1 single instace).
- Set instance to configure via 'setSelectedInstance'
- Make use of the 'set…' functions to configure the SerialCom interface. Make sure to select a valid interface via 'setInterface'.
- Via 'setActive' it is possible to activate the SerialCom port.
INFO: With every change of the setup parameters it will reopen the connection if it was active.
2) Interaction
Other modules can register on these events / trigger these functions:
- 'OnNewDataNUM (see docu)
- 'receiveInstanceNUM' (see docu)
- 'transmitInstanceNUM' (see docu)
Overview
Functions
addInstance()
Short description
Function to add an additional instance.
Sample (auto-generated)
CSK_MultiSerialCom.addInstance()
clearFlowConfigRelevantConfiguration()
Short description
Function to clear FlowConfig relevant configurations.
Sample (auto-generated)
CSK_MultiSerialCom.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_MultiSerialCom.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_MultiSerialCom.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_MultiSerialCom.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_MultiSerialCom.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_MultiSerialCom.pageCalled()
receive()
Short description
Function to trigger receive function of currently selected instance.
Sample (auto-generated)
CSK_MultiSerialCom.receive()
receiveInstanceNUM()
Short description
Example of dynamically served function to trigger receive function of instance..
NUM will be replaced by the number of instance (e.g. "receiveInstance1").
INFO: Other modules can check via "Script.isServedAsFunction" if function of sepecific instance exists.
Needs then to be called via "Script.callFunction".
Sample (auto-generated)
CSK_MultiSerialCom.receiveInstanceNUM()
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_MultiSerialCom.resetInstances()
resetModule()
Short description
Function to reset main configuration of module.
Sample (auto-generated)
CSK_MultiSerialCom.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_MultiSerialCom.sendParameters(noDataSave)
setActive()
Short description
Function to set if serial communication should be active.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiSerialCom.setActive(status)
setBaudrate()
Short description
Function to set baudrate.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
baudrate |
INT |
1 |
Baudrate |
Sample (auto-generated)
CSK_MultiSerialCom.setBaudrate(baudrate)
setDataBits()
Short description
Function to set data bits.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
bits |
INT |
1 |
DataBits (8 or 7) |
Sample (auto-generated)
CSK_MultiSerialCom.setDataBits(bits)
setDiscardIfFull()
Short description
Function to configure handling of received items.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Set to TRUE to discard the newest item which is currently added instead of discarding the oldest element. |
Sample (auto-generated)
CSK_MultiSerialCom.setDiscardIfFull(status)
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_MultiSerialCom.setFlowConfigPriority(status)
setFlowControl()
Short description
Function to set flow control.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiSerialCom.setFlowControl(status)
setFramingBufferSizeRx()
Short description
Function to set maximum size of a packet which can be parsed by the received framing.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
size |
INT |
1 |
Size in bytes. |
Sample (auto-generated)
CSK_MultiSerialCom.setFramingBufferSizeRx(size)
setFramingBufferSizeTx()
Short description
Function to set maximum size of a packet which can be parsed by the transmitted framing.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
size |
INT |
1 |
Size in bytes. |
Sample (auto-generated)
CSK_MultiSerialCom.setFramingBufferSizeTx(size)
setFramingRxStart()
Short description
Function to set frame of RxStart.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
frame |
STRING |
1 |
Framing |
Sample (auto-generated)
CSK_MultiSerialCom.setFramingRxStart(frame)
setFramingRxStop()
Short description
Function to set frame of RxStop.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
frame |
STRING |
1 |
Framing |
Sample (auto-generated)
CSK_MultiSerialCom.setFramingRxStop(frame)
setFramingTxStart()
Short description
Function to set frame of TxStart.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
frame |
STRING |
1 |
Framing |
Sample (auto-generated)
CSK_MultiSerialCom.setFramingTxStart(frame)
setFramingTxStop()
Short description
Function to set frame of TxStop.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
frame |
STRING |
1 |
Framing |
Sample (auto-generated)
CSK_MultiSerialCom.setFramingTxStop(frame)
setHandshake()
Short description
Function to set if handshake is active.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiSerialCom.setHandshake(status)
setInterface()
Short description
Function to set interface to use for SerialCom.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
interface |
STRING |
1 |
Interface |
Sample (auto-generated)
CSK_MultiSerialCom.setInterface(interface)
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_MultiSerialCom.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_MultiSerialCom.setParameterName(name)
setParity()
Short description
Function to set parity of serial communication.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
mode |
STRING |
1 |
Parity mode. |
Sample (auto-generated)
CSK_MultiSerialCom.setParity(mode)
setReceiveQueueSize()
Short description
Function so set size of internal queue size for the receive function.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
size |
INT |
1 |
Queue size. |
Sample (auto-generated)
CSK_MultiSerialCom.setReceiveQueueSize(size)
setReceiveTimeout()
Short description
Function to set timeout for received data.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
time |
INT |
1 |
Timeout in [ms]. |
Sample (auto-generated)
CSK_MultiSerialCom.setReceiveTimeout(time)
setRegisterEvent()
Short description
Configure event that this module should listen to. If this one is notified, it will transmit the attached data of the event via serial interface.
(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_MultiSerialCom.setRegisterEvent(event)
setSelectedInstance()
Short description
Select one of the multiple instances.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
instance |
INT |
1 |
Instance to select. |
Sample (auto-generated)
CSK_MultiSerialCom.setSelectedInstance(instance)
setShowLog()
Short description
Function to set status if log messages should be shown on UI.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiSerialCom.setShowLog(status)
setStopBits()
Short description
Function to set stop bits.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
bits |
INT |
1 |
Stop bits (1 or 2) |
Sample (auto-generated)
CSK_MultiSerialCom.setStopBits(bits)
setTempDataToSend()
Short description
Function to set temporary data to send via 'trasnitDataViaUI'.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
data |
STRING |
1 |
Data |
Sample (auto-generated)
CSK_MultiSerialCom.setTempDataToSend(data)
setTermination()
Short description
Function to set status of internal termination.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
CSK_MultiSerialCom.setTermination(status)
setType()
Short description
Function to set type of serial communication.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
comType |
STRING |
1 |
SerialCom Type. |
Sample (auto-generated)
CSK_MultiSerialCom.setType(comType)
setWarnOnOverruns()
Short description
Function to set if warning on overruns should be used for the receive function.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Set to false to disable warning on overruns when using the receive()-function. |
Sample (auto-generated)
CSK_MultiSerialCom.setWarnOnOverruns(status)
transmitDataViaUI()
Short description
Function to transmit temporary set data (see 'setTempDataToSend').
Sample (auto-generated)
CSK_MultiSerialCom.transmitDataViaUI()
transmitInstanceNUM()
Short description
Example of dynamically served function to transmit data.
NUM will be replaced by the number of instance (e.g. "transmitInstance1").
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 |
BINARY |
1 |
Data to transmit. |
Return values
Name | Type | Multiplicity | Description |
---|---|---|---|
sendBytes |
INT |
1 |
Number of bytes transmitted; 0 if transmit failed. |
Sample (auto-generated)
sendBytes = CSK_MultiSerialCom.transmitInstanceNUM(data)
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_MultiSerialCom.OnDataLoadedOnReboot", "handleOnDataLoadedOnReboot")
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 |
BINARY |
1 |
Received data. |
timeOfReceive |
INT |
? |
The timestamp in microseconds at which the first bytes of the frame were received. |
Sample (auto-generated)
function handleOnNewDataNUM(data, timeOfReceive)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewDataNUM", "handleOnNewDataNUM")
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_MultiSerialCom.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_MultiSerialCom.OnNewParameterName", "handleOnNewParameterName")
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. |
internalObjectNo |
INT |
? |
If parameter is for specifici internal used object, its number. |
Sample (auto-generated)
function handleOnNewProcessingParameter(objectNo, parameter, value, internalObjectNo)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewProcessingParameter", "handleOnNewProcessingParameter")
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_MultiSerialCom.OnNewSelectedInstance", "handleOnNewSelectedInstance")
OnNewStatusAvailableInterfaces
Short description
Notify available serial communication interfaces.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
interfaces |
STRING |
1 |
List of interfaces |
Sample (auto-generated)
function handleOnNewStatusAvailableInterfaces(interfaces)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusAvailableInterfaces", "handleOnNewStatusAvailableInterfaces")
OnNewStatusBaudrate
Short description
Notify baudrate.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
baudrate |
INT |
1 |
Baudrate |
Sample (auto-generated)
function handleOnNewStatusBaudrate(baudrate)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusBaudrate", "handleOnNewStatusBaudrate")
OnNewStatusBufferSizeRx
Short description
Notify buffer size of receive frame.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
size |
INT |
1 |
Buffer size in bytes. |
Sample (auto-generated)
function handleOnNewStatusBufferSizeRx(size)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusBufferSizeRx", "handleOnNewStatusBufferSizeRx")
OnNewStatusBufferSizeTx
Short description
Notify buffer size of transmit frame.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
size |
INT |
1 |
Buffer size in bytes. |
Sample (auto-generated)
function handleOnNewStatusBufferSizeTx(size)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusBufferSizeTx", "handleOnNewStatusBufferSizeTx")
OnNewStatusCommunicationActive
Short description
Notify if communicaiton is configurated as active.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusCommunicationActive(status)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusCommunicationActive", "handleOnNewStatusCommunicationActive")
OnNewStatusConnected
Short description
Notify if selected serial communication is connected.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusConnected(status)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusConnected", "handleOnNewStatusConnected")
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_MultiSerialCom.OnNewStatusCSKStyle", "handleOnNewStatusCSKStyle")
OnNewStatusDataBits
Short description
Notify number of data bits.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
size |
INT |
1 |
Size |
Sample (auto-generated)
function handleOnNewStatusDataBits(size)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusDataBits", "handleOnNewStatusDataBits")
OnNewStatusDiscardIfFull
Short description
Notify if newest (TRUE) or oldest (FALSE) item should be discarded if queue size of receive function is too big.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusDiscardIfFull(status)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusDiscardIfFull", "handleOnNewStatusDiscardIfFull")
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_MultiSerialCom.OnNewStatusFlowConfigPriority", "handleOnNewStatusFlowConfigPriority")
OnNewStatusFlowControl
Short description
Notify if flow control is active.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusFlowControl(status)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusFlowControl", "handleOnNewStatusFlowControl")
OnNewStatusFrameRxStart
Short description
Notify framing for RxStart.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
frame |
STRING |
1 |
Frame |
Sample (auto-generated)
function handleOnNewStatusFrameRxStart(frame)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusFrameRxStart", "handleOnNewStatusFrameRxStart")
OnNewStatusFrameRxStop
Short description
Notify framing for RxStop.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
frame |
STRING |
1 |
Frame |
Sample (auto-generated)
function handleOnNewStatusFrameRxStop(frame)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusFrameRxStop", "handleOnNewStatusFrameRxStop")
OnNewStatusFrameTxStart
Short description
Notify framing for TxStart.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
frame |
STRING |
1 |
Frame |
Sample (auto-generated)
function handleOnNewStatusFrameTxStart(frame)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusFrameTxStart", "handleOnNewStatusFrameTxStart")
OnNewStatusFrameTxStop
Short description
Notify framing for TxStop.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
frame |
STRING |
1 |
Frame |
Sample (auto-generated)
function handleOnNewStatusFrameTxStop(frame)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusFrameTxStop", "handleOnNewStatusFrameTxStop")
OnNewStatusHandshake
Short description
Notify if handshake is used.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusHandshake(status)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusHandshake", "handleOnNewStatusHandshake")
OnNewStatusInterface
Short description
Notify used serial communication interface.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
interface |
STRING |
1 |
Interface |
Sample (auto-generated)
function handleOnNewStatusInterface(interface)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusInterface", "handleOnNewStatusInterface")
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_MultiSerialCom.OnNewStatusLoadParameterOnReboot", "handleOnNewStatusLoadParameterOnReboot")
OnNewStatusLog
Short description
Notify log of current selected instance communication.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
log |
STRING |
1 |
Log (latest 100 messages). |
Sample (auto-generated)
function handleOnNewStatusLog(log)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusLog", "handleOnNewStatusLog")
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_MultiSerialCom.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_MultiSerialCom.OnNewStatusModuleVersion", "handleOnNewStatusModuleVersion")
OnNewStatusParity
Short description
Notify parity of serial communication.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
parity |
STRING |
1 |
Parity |
Sample (auto-generated)
function handleOnNewStatusParity(parity)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusParity", "handleOnNewStatusParity")
OnNewStatusReceiveQueueSize
Short description
Notify queue size of internal receive function.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
size |
INT |
1 |
Size |
Sample (auto-generated)
function handleOnNewStatusReceiveQueueSize(size)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusReceiveQueueSize", "handleOnNewStatusReceiveQueueSize")
OnNewStatusReceiveTimeout
Short description
Notify timeout to wait for received data.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
timeout |
INT |
1 |
Timeout for receive function in [ms]. |
Sample (auto-generated)
function handleOnNewStatusReceiveTimeout(timeout)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusReceiveTimeout", "handleOnNewStatusReceiveTimeout")
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_MultiSerialCom.OnNewStatusRegisteredEvent", "handleOnNewStatusRegisteredEvent")
OnNewStatusShowLog
Short description
Notify status if log should be shown on UI.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusShowLog(status)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusShowLog", "handleOnNewStatusShowLog")
OnNewStatusStopBits
Short description
Notify amount of stop bits.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
stopBits |
INT |
1 |
Amount of stop bits. |
Sample (auto-generated)
function handleOnNewStatusStopBits(stopBits)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusStopBits", "handleOnNewStatusStopBits")
OnNewStatusTempDataToSend
Short description
Notify temporary set data to transmit.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
data |
STRING |
1 |
Data |
Sample (auto-generated)
function handleOnNewStatusTempDataToSend(data)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusTempDataToSend", "handleOnNewStatusTempDataToSend")
OnNewStatusTermination
Short description
Notfiy if internal termination is used.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusTermination(status)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusTermination", "handleOnNewStatusTermination")
OnNewStatusType
Short description
Notify type of serial communication.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
type |
STRING |
1 |
Type |
Sample (auto-generated)
function handleOnNewStatusType(type)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusType", "handleOnNewStatusType")
OnNewStatusWarnOverruns
Short description
Notify if warnings are active on overruns of the receive function.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
status |
BOOL |
1 |
Status |
Sample (auto-generated)
function handleOnNewStatusWarnOverruns(status)
-- Do something
end
Script.register("CSK_MultiSerialCom.OnNewStatusWarnOverruns", "handleOnNewStatusWarnOverruns")
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_MultiSerialCom.OnNewValueToForwardNUM", "handleOnNewValueToForwardNUM")
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_MultiSerialCom.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_MultiSerialCom.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_MultiSerialCom.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_MultiSerialCom.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_MultiSerialCom.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_MultiSerialCom.OnUserLevelServiceActive", "handleOnUserLevelServiceActive")
MultiSerialCom_FC
Short description
Crown to provide CSK_FlowConfig relevant features.
Overview
MultiSerialCom_FC.OnNewData
Short description
Provide received serial data.
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 = MultiSerialCom_FC.OnNewData.create(Instance)
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 = MultiSerialCom_FC.OnNewData.register(handle, eventname, callback)
Events
OnNewData
Short description
Provide received serial data.
Callback arguments
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
BINARY |
1 |
Handle to internally used FlowConfig instance. |
OnNewData |
STRING |
1 |
'CSK_MultiSerialCom.OnNewData[InstanceNUM]' Parameter: 1: Data (BINARY) |
Sample (auto-generated)
function handleOnNewData(handle, OnNewData)
-- Do something
end
Script.register("MultiSerialCom_FC.OnNewData.OnNewData", "handleOnNewData")
MultiSerialCom_FC.Transmit
Short description
Set source of data to transmit via serial communiciaton.
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 = MultiSerialCom_FC.Transmit.create(Instance)
transmit()
Short description
Set source of data to transmit via serial communiciaton.
Parameters
Name | Type | Multiplicity | Description |
---|---|---|---|
handle |
HANDLE |
1 |
Handle to internally used FlowConfig instance. |
source |
STRING |
1 |
Set source of data to transmit via serial communiciaton. Parameter: 1: Data (BINARY) |
Sample (auto-generated)
MultiSerialCom_FC.Transmit.transmit(handle, source)
Enumerations
CSK_MultiSerialCom.Frames
Available Rx/Tx framing.
Value | Name | Description |
---|---|---|
None |
None |
No framing. |
STX |
STX |
<STX> framing |
ETX |
ETX |
<ETX> framing. |
LF |
LF |
<LF> framing. |
CR |
CR |
<CR> framing. |
CR_LF |
CR_LF |
<CR<>LF> framing. |