1
1
diff --git a/CommonDefs.cmake b/CommonDefs.cmake
2
- index 7cca75030..b22079425 100644
2
+ index 70d788b..303ec86 100644
3
3
--- a/CommonDefs.cmake
4
4
+++ b/CommonDefs.cmake
5
5
@@ -29,8 +29,8 @@ endforeach(OUTPUTCONFIG CMAKE_CONFIGURATION_TYPES)
@@ -14,58 +14,67 @@ index 7cca75030..b22079425 100644
14
14
set(USE_STATIC_MBEDTLS_LIB ${USE_STATIC_EXT_LIBS})
15
15
set(USE_STATIC_EXPAT_LIB ${USE_STATIC_EXT_LIBS})
16
16
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
18
18
--- a/src/ClientServer/frontend/client_wrapper/libs2opc_client.h
19
19
+++ b/src/ClientServer/frontend/client_wrapper/libs2opc_client.h
20
- @@ -129 ,7 +129 ,9 @@ typedef enum
20
+ @@ -131 ,7 +131 ,9 @@ typedef enum
21
21
SOPC_LibSub_DataType_integer = 2,
22
22
SOPC_LibSub_DataType_string = 3,
23
23
SOPC_LibSub_DataType_bytestring = 4,
24
24
- SOPC_LibSub_DataType_other = 5
25
25
+ SOPC_LibSub_DataType_float = 5,
26
- + SOPC_LibSub_DataType_double = 6,
26
+ + SOPC_LibSub_DataType_double = 6,
27
27
+ SOPC_LibSub_DataType_other = 7
28
28
} SOPC_LibSub_DataType;
29
29
30
30
/**
31
31
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
33
33
--- a/src/ClientServer/frontend/client_wrapper/state_machine.c
34
34
+++ 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
41
44
{
42
45
pMonItNotif = &pDataNotif->MonitoredItems[i];
43
46
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);
45
48
if (SOPC_STATUS_OK == status)
46
49
{
47
50
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
+ {
48
59
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
50
61
--- a/src/ClientServer/frontend/client_wrapper/toolkit_helpers.c
51
62
+++ 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,
54
64
lPathsUntrustedLinks, lPathsIssuedCerts, lPathsCRL, &pPki);
55
65
if (SOPC_STATUS_OK != status)
56
- - {
66
+ {
57
67
- Helpers_Log(SOPC_LOG_LEVEL_ERROR, "Failed to create PKI.");
58
- + {
59
68
+ Helpers_Log(SOPC_LOG_LEVEL_ERROR, "Failed to create PKI, status=%d", status);
60
69
}
61
70
}
62
71
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
64
73
}
65
74
/* else we leave value NULL and length = 0 */
66
75
break;
67
- +
68
- + case SOPC_Float_Id:
76
+ - case SOPC_Null_Id:
77
+ case SOPC_Float_Id:
69
78
+ plsVal->type = SOPC_LibSub_DataType_float;
70
79
+ plsVal->value = SOPC_Malloc(sizeof(float));
71
80
+ if (NULL == plsVal->value)
@@ -77,8 +86,7 @@ index e2fa388ff..b4babe046 100644
77
86
+ *(float*) plsVal->value = (float) pVal->Value.Value.Floatv;
78
87
+ }
79
88
+ break;
80
- +
81
- + case SOPC_Double_Id:
89
+ case SOPC_Double_Id:
82
90
+ plsVal->type = SOPC_LibSub_DataType_double;
83
91
+ plsVal->value = SOPC_Malloc(sizeof(double));
84
92
+ if (NULL == plsVal->value)
@@ -90,17 +98,25 @@ index e2fa388ff..b4babe046 100644
90
98
+ *(double*) plsVal->value = (double) pVal->Value.Value.Doublev;
91
99
+ }
92
100
+ 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:
99
102
case SOPC_DateTime_Id:
100
103
case SOPC_Guid_Id:
101
104
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
+ {
102
118
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
104
120
--- a/src/Common/configuration/sopc_common_constants.h
105
121
+++ b/src/Common/configuration/sopc_common_constants.h
106
122
@@ -77,7 +77,7 @@ bool SOPC_Common_SetEncodingConstants(SOPC_Common_EncodingConstants config);
0 commit comments