Skip to content

Commit 71e702c

Browse files
Version 1.0.0 (#1)
* Initial version 1.0.0 --------- Co-authored-by: Maxim Teplyakov <maxim.teplyakov@sick.de>
1 parent 2b08728 commit 71e702c

14 files changed

Lines changed: 10180 additions & 528 deletions

File tree

CHANGELOG.md

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

4-
## Release 0.1.0
5-
- Initial commit
6-
7-
### New features
8-
- ...
9-
10-
### Improvements
11-
- ...
12-
13-
### Bugfix
14-
- ...
4+
## Release 1.0.0
5+
- Initial commit

CSK_Module_MultiHTTPClient/pages/pages/CSK_Module_MultiHTTPClient/CSK_Module_MultiHTTPClient.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,10 @@
55
margin: 6px;
66
}
77

8-
.myCustomCssClass_CSK_Module_MultiHTTPClient {
8+
.myCustomMarginTop2px_CSK_Module_MultiHTTPClient {
9+
margin-top: 2px;
10+
}
11+
12+
.myCustomMarginTop16px_CSK_Module_MultiHTTPClient {
13+
margin-top: 16px;
914
}

CSK_Module_MultiHTTPClient/pages/pages/CSK_Module_MultiHTTPClient/CSK_Module_MultiHTTPClient.html

Lines changed: 807 additions & 42 deletions
Large diffs are not rendered by default.

CSK_Module_MultiHTTPClient/project.mf.xml

Lines changed: 333 additions & 32 deletions
Large diffs are not rendered by default.

CSK_Module_MultiHTTPClient/resources/CSK_Module_MultiHTTPClient/cacert.pem

Lines changed: 4043 additions & 0 deletions
Large diffs are not rendered by default.

CSK_Module_MultiHTTPClient/scripts/CSK_Module_MultiHTTPClient.lua

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
-- If app property "LuaLoadAllEngineAPI" is FALSE, use this to load and check for required APIs
3232
-- This can improve performance of garbage collection
3333

34-
-- _G.availableAPIs = require('Communication/MultiHTTPClient/helper/checkAPIs') -- can be used to adjust function scope of the module related on available APIs of the device
34+
_G.availableAPIs = require('Communication/MultiHTTPClient/helper/checkAPIs') -- can be used to adjust function scope of the module related on available APIs of the device
3535
-----------------------------------------------------------
3636
-- Logger
3737
_G.logger = Log.SharedLogger.create('ModuleLogger')
@@ -62,29 +62,27 @@ multiHTTPClientController.setMultiHTTPClient_Instances_Handle(multiHTTPClient_In
6262

6363
--[[
6464
--- Function to show how this module could be used
65-
local function startProcessing()
65+
local function setup()
6666
67-
CSK_MultiHTTPClient.setSelectedInstance(1) --> select instance of module
68-
CSK_MultiHTTPClient.doSomething() --> preparation
67+
CSK_MultiHTTPClient.setRequestMode('POST')
68+
CSK_MultiHTTPClient.setRequestEndpoint('http://192.168.0.1/api/crown/DateTime/setDateTime')
6969
70-
-- Option A --> prepare an event to trigger processing via this one
71-
--Script.serveEvent("CSK_MultiHTTPClient.OnNewTestEvent", "MultiHTTPClient_OnNewTestEvent") --> Create event to listen to and process forwarded object
72-
--CSK_MultiHTTPClient.setRegisterEvent('CSK_MultiHTTPClient.OnNewTestEvent') --> Register processing to the event
70+
CSK_MultiHTTPClient.setRequestName('TestRequest')
71+
CSK_MultiHTTPClient.setRequestRegisteredEvent('TestApp.OnNewTrigger') -- Needs to be served by another app...
72+
CSK_MultiHTTPClient.setRequestBody('{"data":{"year": 1986,"month": 3,"day": 2,"hour": 10,"minute": 11,"second": 12}}')
73+
CSK_MultiHTTPClient.addEditRequestViaUI()
74+
CSK_MultiHTTPClient.setMaxQueueSize(10)
7375
74-
--Script.notifyEvent('OnNewTestEvent', data)
75-
76-
-- Option B --> trigger processing via function call
77-
local result = CSK_MultiHTTPClient.processSomething(data)
76+
local function getResponse(response)
77+
print(response)
78+
end
7879
80+
if Script.isServedAsEvent('CSK_MultiHTTPClient.OnNewResponse1_TestRequest') then
81+
Script.register("CSK_MultiHTTPClient.OnNewResponse1_TestRequest", getResponse)
7982
end
8083
end
81-
82-
-- Call processing function after persistent data was loaded
83-
--Script.register("CSK_MultiHTTPClient.OnDataLoadedOnReboot", startProcessing)
8484
]]
8585

86-
--OR
87-
8886
--- Function to react on startup event of the app
8987
local function main()
9088

@@ -96,10 +94,10 @@ local function main()
9694
-- (see internal variable _G.multiHTTPClient_Model.parameterLoadOnReboot)
9795
-- If so, the app will trigger the "OnDataLoadedOnReboot" event if ready after loading parameters
9896
--
99-
-- Can be used e.g. like this
10097
----------------------------------------------------------------------------------------
10198

102-
--startProcessing() --> see above
99+
--setup() --> just for docu, see above
100+
CSK_MultiHTTPClient.setSelectedInstance(1)
103101
CSK_MultiHTTPClient.pageCalled() -- Update UI
104102

105103
end

0 commit comments

Comments
 (0)