Skip to content

Commit c11877d

Browse files
authored
Merge pull request #82 from fledge-iot/2.2.0RC
2.2.0RC
2 parents 5f0b879 + 9854097 commit c11877d

File tree

12 files changed

+150
-273
lines changed

12 files changed

+150
-273
lines changed

others/scripts/gcp/VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
fledge_gcp_version=2.1.0
2-
fledge_version>=2.1
1+
fledge_gcp_version=2.2.0
2+
fledge_version>=2.2

others/scripts/iec/VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
fledge_iec_version=2.1.0
2-
fledge_version>=2.1
1+
fledge_iec_version=2.2.0
2+
fledge_version>=2.2

others/scripts/mqtt/VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
fledge_mqtt_version=2.1.0
2-
fledge_version>=2.1
1+
fledge_mqtt_version=2.2.0
2+
fledge_version>=2.2

others/scripts/s2opcua/S2OPC.patch

Lines changed: 45 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/CommonDefs.cmake b/CommonDefs.cmake
2-
index 7cca75030..b22079425 100644
2+
index 70d788b..303ec86 100644
33
--- a/CommonDefs.cmake
44
+++ b/CommonDefs.cmake
55
@@ -29,8 +29,8 @@ endforeach(OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES)
@@ -14,58 +14,67 @@ index 7cca75030..b22079425 100644
1414
set(USE_STATIC_MBEDTLS_LIB ${USE_STATIC_EXT_LIBS})
1515
set(USE_STATIC_EXPAT_LIB ${USE_STATIC_EXT_LIBS})
1616
diff --git a/src/ClientServer/frontend/client_wrapper/libs2opc_client.h b/src/ClientServer/frontend/client_wrapper/libs2opc_client.h
17-
index 693c63ab0..24c67dac2 100644
17+
index 3c187fc..359240f 100644
1818
--- a/src/ClientServer/frontend/client_wrapper/libs2opc_client.h
1919
+++ b/src/ClientServer/frontend/client_wrapper/libs2opc_client.h
20-
@@ -129,7 +129,9 @@ typedef enum
20+
@@ -131,7 +131,9 @@ typedef enum
2121
SOPC_LibSub_DataType_integer = 2,
2222
SOPC_LibSub_DataType_string = 3,
2323
SOPC_LibSub_DataType_bytestring = 4,
2424
- SOPC_LibSub_DataType_other = 5
2525
+ SOPC_LibSub_DataType_float = 5,
26-
+ SOPC_LibSub_DataType_double = 6,
26+
+ SOPC_LibSub_DataType_double = 6,
2727
+ SOPC_LibSub_DataType_other = 7
2828
} SOPC_LibSub_DataType;
2929

3030
/**
3131
diff --git a/src/ClientServer/frontend/client_wrapper/state_machine.c b/src/ClientServer/frontend/client_wrapper/state_machine.c
32-
index 34fbdaa34..bdc2e2d7e 100644
32+
index b45d556..0d3b595 100644
3333
--- a/src/ClientServer/frontend/client_wrapper/state_machine.c
3434
+++ b/src/ClientServer/frontend/client_wrapper/state_machine.c
35-
@@ -1288,10 +1288,12 @@ static void StaMac_ProcessMsg_PublishResponse(SOPC_StaMac_Machine* pSM, uint32_t
36-
assert(SOPC_ExtObjBodyEncoding_Object == pNotifMsg->NotificationData[0].Encoding);
37-
assert(&OpcUa_DataChangeNotification_EncodeableType == pNotifMsg->NotificationData[0].Body.Object.ObjType);
38-
pDataNotif = (OpcUa_DataChangeNotification*) pNotifMsg->NotificationData[0].Body.Object.Value;
39-
+ Helpers_Log(SOPC_LOG_LEVEL_INFO, "%s:%d: pDataNotif->NoOfMonitoredItems=%d", "StaMac_ProcessMsg_PublishResponse", __LINE__, pDataNotif->NoOfMonitoredItems);
40-
for (i = 0; i < pDataNotif->NoOfMonitoredItems; ++i)
35+
@@ -1373,7 +1373,6 @@ static void StaMac_ProcessMsg_PublishResponse(SOPC_StaMac_Machine* pSM, uint32_t
36+
/* Take note to acknowledge later. There is no ack with KeepAlive. */
37+
/* TODO: this limits the benefits of having multiple pending PublishRequest, maybe
38+
* it would be more appropriate to have a list of SeqNumbsToAck... */
39+
- SOPC_ASSERT(!pSM->bAckSubscr);
40+
if (0 < pPubResp->NoOfAvailableSequenceNumbers)
41+
{
42+
pSM->bAckSubscr = true;
43+
@@ -1402,6 +1401,7 @@ static void StaMac_ProcessMsg_PublishResponse(SOPC_StaMac_Machine* pSM, uint32_t
4144
{
4245
pMonItNotif = &pDataNotif->MonitoredItems[i];
4346
status = Helpers_NewValueFromDataValue(&pMonItNotif->Value, &plsVal);
44-
+ Helpers_Log(SOPC_LOG_LEVEL_INFO, "%s:%d: i=%d, plsVal->type=%d", "StaMac_ProcessMsg_PublishResponse", __LINE__, i, plsVal->type);
47+
+ Helpers_Log(SOPC_LOG_LEVEL_INFO, "%s:%d: i=%d, plsVal->type=%d", "StaMac_ProcessMsg_PublishResponse", __LINE__, i, plsVal->type);
4548
if (SOPC_STATUS_OK == status)
4649
{
4750
if (NULL != pSM->pCbkLibSubDataChanged)
51+
@@ -1637,6 +1637,7 @@ static void StaMac_PostProcessActions(SOPC_StaMac_Machine* pSM, SOPC_StaMac_Stat
52+
{
53+
/* Mostly when stActivated is reached */
54+
case stActivated:
55+
+ case stCreatingMonIt:
56+
/* add tokens, but wait for at least a monitored item */
57+
if (0 != pSM->iSubscriptionID && pSM->nTokenUsable < pSM->nTokenTarget)
58+
{
4859
diff --git a/src/ClientServer/frontend/client_wrapper/toolkit_helpers.c b/src/ClientServer/frontend/client_wrapper/toolkit_helpers.c
49-
index e2fa388ff..b4babe046 100644
60+
index 5d36fe1..8242a65 100644
5061
--- a/src/ClientServer/frontend/client_wrapper/toolkit_helpers.c
5162
+++ b/src/ClientServer/frontend/client_wrapper/toolkit_helpers.c
52-
@@ -111,8 +111,8 @@ SOPC_ReturnStatus Helpers_NewSCConfigFromLibSubCfg(const char* szServerUrl,
53-
status = SOPC_PKIProviderStack_CreateFromPaths(lPathsTrustedRoots, lPathsTrustedLinks, lPathsUntrustedRoots,
63+
@@ -120,7 +120,7 @@ SOPC_ReturnStatus Helpers_NewSCConfigFromLibSubCfg(const char* szServerUrl,
5464
lPathsUntrustedLinks, lPathsIssuedCerts, lPathsCRL, &pPki);
5565
if (SOPC_STATUS_OK != status)
56-
- {
66+
{
5767
- Helpers_Log(SOPC_LOG_LEVEL_ERROR, "Failed to create PKI.");
58-
+ {
5968
+ Helpers_Log(SOPC_LOG_LEVEL_ERROR, "Failed to create PKI, status=%d", status);
6069
}
6170
}
6271
else
63-
@@ -536,9 +536,36 @@ SOPC_ReturnStatus Helpers_NewValueFromDataValue(SOPC_DataValue* pVal, SOPC_LibSu
72+
@@ -602,9 +602,31 @@ SOPC_ReturnStatus Helpers_NewValueFromDataValue(SOPC_DataValue* pVal, SOPC_LibSu
6473
}
6574
/* else we leave value NULL and length = 0 */
6675
break;
67-
+
68-
+ case SOPC_Float_Id:
76+
- case SOPC_Null_Id:
77+
case SOPC_Float_Id:
6978
+ plsVal->type = SOPC_LibSub_DataType_float;
7079
+ plsVal->value = SOPC_Malloc(sizeof(float));
7180
+ if (NULL == plsVal->value)
@@ -77,8 +86,7 @@ index e2fa388ff..b4babe046 100644
7786
+ *(float*) plsVal->value = (float) pVal->Value.Value.Floatv;
7887
+ }
7988
+ break;
80-
+
81-
+ case SOPC_Double_Id:
89+
case SOPC_Double_Id:
8290
+ plsVal->type = SOPC_LibSub_DataType_double;
8391
+ plsVal->value = SOPC_Malloc(sizeof(double));
8492
+ if (NULL == plsVal->value)
@@ -90,17 +98,25 @@ index e2fa388ff..b4babe046 100644
9098
+ *(double*) plsVal->value = (double) pVal->Value.Value.Doublev;
9199
+ }
92100
+ break;
93-
+
94-
case SOPC_Null_Id:
95-
- case SOPC_Float_Id:
96-
- case SOPC_Double_Id:
97-
+ // case SOPC_Float_Id:
98-
+ // case SOPC_Double_Id:
101+
+ case SOPC_Null_Id:
99102
case SOPC_DateTime_Id:
100103
case SOPC_Guid_Id:
101104
case SOPC_XmlElement_Id:
105+
diff --git a/src/ClientServer/services/b2c/message_out_bs.c b/src/ClientServer/services/b2c/message_out_bs.c
106+
index 5caa845..02b068f 100644
107+
--- a/src/ClientServer/services/b2c/message_out_bs.c
108+
+++ b/src/ClientServer/services/b2c/message_out_bs.c
109+
@@ -258,7 +258,7 @@ static void internal__message_out_bs__encode_msg(const constants__t_channel_conf
110+
reqHeader = (OpcUa_RequestHeader*) message_out_bs__msg_header;
111+
reqHeader->Timestamp = SOPC_Time_GetCurrentTimeUTC();
112+
// TODO: reqHeader->AuditEntryId ?
113+
- reqHeader->TimeoutHint = SOPC_REQUEST_TIMEOUT_MS / 2; // TODO: to be configured by each service ?
114+
+ reqHeader->TimeoutHint = 0; // TODO: to be configured by each service ?
115+
}
116+
else if (&OpcUa_ResponseHeader_EncodeableType == headerType)
117+
{
102118
diff --git a/src/Common/configuration/sopc_common_constants.h b/src/Common/configuration/sopc_common_constants.h
103-
index 874129c1e..9e24ed808 100644
119+
index cd922b8..ca588e2 100644
104120
--- a/src/Common/configuration/sopc_common_constants.h
105121
+++ b/src/Common/configuration/sopc_common_constants.h
106122
@@ -77,7 +77,7 @@ bool SOPC_Common_SetEncodingConstants(SOPC_Common_EncodingConstants config);

others/scripts/s2opcua/VERSION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
fledge_s2opcua_version=2.1.0
2-
fledge_version>=2.1
1+
fledge_s2opcua_version=2.2.0
2+
fledge_version>=2.2

others/scripts/s2opcua/include/sopc_encodeabletype.h

Lines changed: 0 additions & 184 deletions
This file was deleted.

others/scripts/s2opcua/requirements.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ tar xf check-0.15.2.tar.gz
6363
# S2OPC:
6464
rm -rf S2OPC
6565
echo "Fetching S2OPC OPC UA Toolkit libraries..."
66-
git clone --depth 1 -b S2OPC_Toolkit_1.2.0 https://gitlab.com/systerel/S2OPC.git
66+
git clone --depth 1 -b S2OPC_Toolkit_1.4.1 https://gitlab.com/systerel/S2OPC.git
6767

6868
(
6969
cd S2OPC

0 commit comments

Comments
 (0)