Skip to content

Commit b18a24e

Browse files
Release 2.1.0 (#4)
# Release 2.1.0 ## New features - Check if persistent data to load provides all relevant parameters. Otherwise add default values ## Improvements - Better instance handling regarding FlowConfig ## Bugfix - Legacy bindings of ValueDisplay elements within UI did not work if deployed with VS Code AppSpace SDK - UI differs if deployed via Appstudio or VS Code AppSpace SDK - Fullscreen icon of iFrame was visible
1 parent e1bc7a0 commit b18a24e

15 files changed

Lines changed: 162 additions & 88 deletions

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,19 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
33

4+
## Release 2.1.0
5+
6+
### New features
7+
- Check if persistent data to load provides all relevant parameters. Otherwise add default values
8+
9+
### Improvements
10+
- Better instance handling regarding FlowConfig
11+
12+
### Bugfix
13+
- Legacy bindings of ValueDisplay elements within UI did not work if deployed with VS Code AppSpace SDK
14+
- UI differs if deployed via Appstudio or VS Code AppSpace SDK
15+
- Fullscreen icon of iFrame was visible
16+
417
## Release 2.0.0
518

619
### New features

CSK_Module_MultiTCPIPServer/pages/pages/CSK_Module_MultiTCPIPServer/CSK_Module_MultiTCPIPServer.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,5 @@
116116

117117
.myCustomButton_CSK_Module_MultiTCPIPServer {
118118
border-radius: 30px;
119-
padding-right: 0px;
119+
padding: 11px;
120120
}

CSK_Module_MultiTCPIPServer/pages/pages/CSK_Module_MultiTCPIPServer/CSK_Module_MultiTCPIPServer.html

Lines changed: 46 additions & 41 deletions
Large diffs are not rendered by default.

CSK_Module_MultiTCPIPServer/pages/src/converter.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@ export function str2num(newstr){
1818
export function changeStyle(theme) {
1919
const style: HTMLStyleElement = document.createElement('style');
2020
style.id ='blub'
21+
22+
const toggleSW = document.querySelectorAll("davinci-toggle-switch")
23+
toggleSW.forEach((userItem) => {
24+
const shadowToggle = userItem.shadowRoot
25+
const finalToggleSW = shadowToggle?.querySelector('div')
26+
finalToggleSW?.classList.add('hasIcon')
27+
});
28+
2129
if (theme == 'CSK_Style'){
2230
var headerToolbar = `.sopasjs-ui-header-toolbar-wrapper { background-color: #FFFFFF; }`
2331
var uiHeader = `.sopasjs-ui-header>.app-logo { margin-right:0px; }`

CSK_Module_MultiTCPIPServer/pages/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ document.addEventListener('sopasjs-ready', () => {
1212
page_Setup.remove();
1313

1414
setTimeout(() => {
15+
const element = document.querySelector("div.sjs-wrapper > div > div.sjs-fullscreen-toggle")
16+
if(element) {
17+
element.parentElement.removeChild(element)
18+
}
1519
document.title = 'CSK_Module_MultiTCPIPServer'
1620
}, 500);
1721
})

CSK_Module_MultiTCPIPServer/project.mf.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ Needs then to be called via "Script.callFunction".</desc>
645645
</crown>
646646
</crown>
647647
<meta key="author">SICK AG</meta>
648-
<meta key="version">2.0.0</meta>
648+
<meta key="version">2.1.0</meta>
649649
<meta key="priority">low</meta>
650650
<meta key="copy-protected">false</meta>
651651
<meta key="read-protected">false</meta>

CSK_Module_MultiTCPIPServer/scripts/CSK_Module_MultiTCPIPServer.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,9 @@ local multiTCPIPServer_Instances = {} -- Handle all instances
5151
local multiTCPIPServerController = require('Communication/MultiTCPIPServer/MultiTCPIPServer_Controller')
5252

5353
if _G.availableAPIs.default and _G.availableAPIs.specific then
54-
local setInstanceHandle = require('Communication/MultiTCPIPServer/FlowConfig/MultiTCPIPServer_FlowConfig')
54+
require('Communication/MultiTCPIPServer/FlowConfig/MultiTCPIPServer_FlowConfig')
5555
table.insert(multiTCPIPServer_Instances, multiTCPIPServer_Model.create(1)) -- Create at least 1 instance
5656
multiTCPIPServerController.setMultiTCPIPServer_Instances_Handle(multiTCPIPServer_Instances) -- share handle of instances
57-
setInstanceHandle(multiTCPIPServer_Instances)
5857
else
5958
_G.logger:warning("CSK_MultiTCPIPServer: Relevant CROWN(s) not available on device. Module is not supported...")
6059
end

CSK_Module_MultiTCPIPServer/scripts/Communication/MultiTCPIPServer/FlowConfig/MultiTCPIPServer_FlowConfig.lua

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,7 @@ local multiTCPIPServer_Instances
1212
--- Function to react if FlowConfig was updated
1313
local function handleOnClearOldFlow()
1414
if _G.availableAPIs.default and _G.availableAPIs.specific then
15-
for i = 1, #multiTCPIPServer_Instances do
16-
if multiTCPIPServer_Instances[i].parameters.flowConfigPriority then
17-
CSK_MultiTCPIPServer.clearFlowConfigRelevantConfiguration()
18-
break
19-
end
20-
end
15+
CSK_MultiTCPIPServer.clearFlowConfigRelevantConfiguration()
2116
end
2217
end
2318
Script.register('CSK_FlowConfig.OnClearOldFlow', handleOnClearOldFlow)
24-
25-
--- Function to get access to the multiTCPIPServer_Instances
26-
---@param handle handle Handle of multiTCPIPServer_Instances object
27-
local function setMultiTCPIPServer_Instances_Handle(handle)
28-
multiTCPIPServer_Instances = handle
29-
end
30-
31-
return setMultiTCPIPServer_Instances_Handle

CSK_Module_MultiTCPIPServer/scripts/Communication/MultiTCPIPServer/FlowConfig/MultiTCPIPServer_Transmit.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ local function create(instance, broadcast)
6565
local handle = Container.create()
6666
instanceTable[fullInstanceName] = fullInstanceName
6767
Container.add(handle, 'Instance', instance)
68-
Container.add(handle, 'Broadcast', broadcast)
68+
Container.add(handle, 'Broadcast', broadcast or '')
6969
return handle
7070
end
7171
end

CSK_Module_MultiTCPIPServer/scripts/Communication/MultiTCPIPServer/MultiTCPIPServer_Controller.lua

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -905,9 +905,11 @@ Script.serveFunction('CSK_MultiTCPIPServer.getStatusModuleActive', getStatusModu
905905

906906
local function clearFlowConfigRelevantConfiguration()
907907
for i = 1, #multiTCPIPServer_Instances do
908-
Script.notifyEvent('MultiTCPIPServer_OnNewProcessingParameter', selectedInstance, 'clearAll')
909-
multiTCPIPServer_Instances[selectedInstance].parameters.clientBroadcasts.forwardEvents = {}
910-
multiTCPIPServer_Instances[selectedInstance].parameters.forwardEvents = {}
908+
if multiTCPIPServer_Instances[i].parameters.flowConfigPriority then
909+
Script.notifyEvent('MultiTCPIPServer_OnNewProcessingParameter', selectedInstance, 'clearAll')
910+
multiTCPIPServer_Instances[selectedInstance].parameters.clientBroadcasts.forwardEvents = {}
911+
multiTCPIPServer_Instances[selectedInstance].parameters.forwardEvents = {}
912+
end
911913
end
912914
end
913915
Script.serveFunction('CSK_MultiTCPIPServer.clearFlowConfigRelevantConfiguration', clearFlowConfigRelevantConfiguration)
@@ -976,6 +978,8 @@ local function loadParameters()
976978
_G.logger:info(nameOfModule .. ": Loaded parameters for multiTCPIPServerObject " .. tostring(selectedInstance) .. " from CSK_PersistentData module.")
977979
multiTCPIPServer_Instances[selectedInstance].parameters = helperFuncs.convertContainer2Table(data)
978980

981+
multiTCPIPServer_Instances[selectedInstance].parameters = helperFuncs.checkParameters(multiTCPIPServer_Instances[selectedInstance].parameters, helperFuncs.defaultParameters.getParameters())
982+
979983
-- If something needs to be configured/activated with new loaded data
980984
updateProcessingParameters()
981985

@@ -1070,8 +1074,10 @@ Script.register("CSK_PersistentData.OnInitialDataLoaded", handleOnInitialDataLoa
10701074

10711075
local function resetModule()
10721076
if _G.availableAPIs.default and _G.availableAPIs.specific then
1073-
clearFlowConfigRelevantConfiguration()
10741077
for i = 1, #multiTCPIPServer_Instances do
1078+
Script.notifyEvent('MultiTCPIPServer_OnNewProcessingParameter', selectedInstance, 'clearAll')
1079+
multiTCPIPServer_Instances[selectedInstance].parameters.clientBroadcasts.forwardEvents = {}
1080+
multiTCPIPServer_Instances[selectedInstance].parameters.forwardEvents = {}
10751081
setListenState(false)
10761082
end
10771083
pageCalled()

0 commit comments

Comments
 (0)