User story #351
OPCUA
0%
Description
Documentation, linting and coverage checked. Deployed in develop.
Implement an OPCUA interface for signals and StructuredDataI.
Source code files modified¶
Architecture & design review¶
Date of the review: //2019
Person who did the review: Andre' Neto
Version of architecture & design document: N/A. Strategy and main ideas for implementation discussed with B. Bauvir in informal meetings.
Result of review: N/A
List of non-conformities: N/A
Code and documentation review¶
Date of the review: 13/07/2020
Person who did the review: Dídac Magriñá
Result of review: PASS
List of non-conformities:
Headers
OK: All headers are correctly formatted
OK: no errors found.
OPCUAClientI
GetReferences
:- missing check to number of nodes before accessing
bReq.nodesToBrowse
- missing check to number of nodes before accessing
OPCUAClientMethod
,OPCUAClientRead
,OPCUAClientWrite
- Destructor (of three mentioned classes):
- missing check if
tempVariant
andmonitoredNodes
are allocated before deleting them
- missing check if
GetExtensionObjectByteString
(of three mentioned classes):- missing check if
index
is within range before accessingentryTypes
andentryArrayElements
- missing check if
valueMemories[nodeCounter]
is not null before accessing - missing check if
tempDataPtr[nOfBytes]
is not null before accessing
- missing check if
SetServiceRequest
(of three mentioned classes):- missing delete
bReq.nodesToBrowse
- missing delete
OPCUAClientMethod::SetObjectRequest
- missing delete
tempStringnodeId
after its allocation inOPCUAClientI::GetReferences
- missing delete
ombReq.nodesToBrowse
- missing delete
OPCUAClientMethod::SetMethodRequest
- missing delete
tempStringnodeId
after its allocation inOPCUAClientI::GetReferences
- missing delete
mbReq.nodesToBrowse
- missing delete
OPCUAClientWrite::SetWriteRequest
- missing check if
writeValues[idx]
is not null before accessing
- missing check if
- Destructor (of three mentioned classes):
OPCUADSInput
,OPCUADSOutput
GetSignalMemoryBuffer
(of both classes)- missing check if
signalIdx
is within range before accessingtypes
andnElements
- missing check if
GetStructure
(of both classes)- missing check if
index
is within range before accessingentryArrayElements
,entryTypes
, andentryNumberOfMembers
- missing check if
OPCUANode
- Destructor
- missing delete of
settings->attr.arrayDimensions
created onOPCUANode::InitArray
- missing delete of
settings->attr.value.arrayDimensions
created onOPCUANode::InitArray
- missing delete of
- Destructor
OPCUAClient
MapStructuredData
- missing check if
index
is within range before accessingentryArrayElements
,entryTypes
, andentryMemberNames
- missing check if
- Document structures in
OPCUATypes.h
following Doxygen style - Confirm that multiple extension objects are not supported as per
OPCUADSInput
/OPCUADSOutput
documentation. If they are supported, consider adding a test for this use case.When using Complex DataType Extension, the DataSource only allows to write 1 structure. If you need to add more signals you must add another OPCUADSInput DataSource to your real time application.
ERR: /home/andre/Projects/MARTe2-components/Source/Components/Interfaces/OPCUA/OPCUATypes.h:45: warning: Compound OPCUA::NodeProperties is not documented.
ERR: /home/andre/Projects/MARTe2-components/Source/Components/Interfaces/OPCUA/OPCUATypes.h:60: warning: Compound OPCUA::ObjectProperties is not documented.
ERR: /home/andre/Projects/MARTe2-components/Source/Components/Interfaces/OPCUA/OPCUATypes.h:54: warning: Member OPCUANodeSettings (typedef) of namespace OPCUA is not documented.
ERR: /home/andre/Projects/MARTe2-components/Source/Components/Interfaces/OPCUA/OPCUATypes.h:68: warning: Member OPCUAObjectSettings (typedef) of namespace OPCUA is not documented.
ERR: /home/andre/Projects/MARTe2-components/Source/Components/DataSources/OPCUADataSource/OPCUAClientMethod.h:90: warning: argument 'nodePaths' of command @param is not found in the argument list of MARTe::OPCUAClientMethod::SetMethodRequest(const uint16 methodNamespaceIndex, StreamString methodPath)
ERR: /home/andre/Projects/MARTe2-components/Source/Components/DataSources/OPCUADataSource/OPCUAClientMethod.h:90: warning: The following parameters of MARTe::OPCUAClientMethod::SetMethodRequest(const uint16 methodNamespaceIndex, StreamString methodPath) are not documented:
ERR: /home/andre/Projects/MARTe2-components/Source/Components/DataSources/OPCUADataSource/OPCUAClientMethod.h:79: warning: argument 'nodePaths' of command @param is not found in the argument list of MARTe::OPCUAClientMethod::SetObjectRequest(const uint16 methodNamespaceIndex, StreamString methodPath)
ERR: /home/andre/Projects/MARTe2-components/Source/Components/DataSources/OPCUADataSource/OPCUAClientMethod.h:79: warning: The following parameters of MARTe::OPCUAClientMethod::SetObjectRequest(const uint16 methodNamespaceIndex, StreamString methodPath) are not documented:
ERR: /home/andre/Projects/MARTe2-components/Source/Components/Interfaces/OPCUA/OPCUATypes.h:46: warning: Member attr (variable) of class OPCUA::NodeProperties is not documented.
ERR: /home/andre/Projects/MARTe2-components/Source/Components/Interfaces/OPCUA/OPCUATypes.h:47: warning: Member value (variable) of class OPCUA::NodeProperties is not documented.
ERR: /home/andre/Projects/MARTe2-components/Source/Components/Interfaces/OPCUA/OPCUATypes.h:48: warning: Member nodeId (variable) of class OPCUA::NodeProperties is not documented.
ERR: /home/andre/Projects/MARTe2-components/Source/Components/Interfaces/OPCUA/OPCUATypes.h:49: warning: Member nodeName (variable) of class OPCUA::NodeProperties is not documented.
ERR: /home/andre/Projects/MARTe2-components/Source/Components/Interfaces/OPCUA/OPCUATypes.h:50: warning: Member parentNodeId (variable) of class OPCUA::NodeProperties is not documented.
ERR: /home/andre/Projects/MARTe2-components/Source/Components/Interfaces/OPCUA/OPCUATypes.h:51: warning: Member parentReferenceNodeId (variable) of class OPCUA::NodeProperties is not documented.
ERR: /home/andre/Projects/MARTe2-components/Source/Components/Interfaces/OPCUA/OPCUATypes.h:61: warning: Member attr (variable) of class OPCUA::ObjectProperties is not documented.
ERR: /home/andre/Projects/MARTe2-components/Source/Components/Interfaces/OPCUA/OPCUATypes.h:62: warning: Member nodeId (variable) of class OPCUA::ObjectProperties is not documented.
ERR: /home/andre/Projects/MARTe2-components/Source/Components/Interfaces/OPCUA/OPCUATypes.h:63: warning: Member nodeName (variable) of class OPCUA::ObjectProperties is not documented.
ERR: /home/andre/Projects/MARTe2-components/Source/Components/Interfaces/OPCUA/OPCUATypes.h:64: warning: Member parentNodeId (variable) of class OPCUA::ObjectProperties is not documented.
ERR: /home/andre/Projects/MARTe2-components/Source/Components/Interfaces/OPCUA/OPCUATypes.h:65: warning: Member parentReferenceNodeId (variable) of class OPCUA::ObjectProperties is not documented.
OPCUAClientRead
,OPCUAClientWrite
, andOPCUAClientMethod
have very similar methods that could be moved up to their interfaceOPCUAClientI
:- SetServiceRequest
- GetExtensionObjectByteString
Unit test review¶
Date of the review: 13/07/2019
Person who did the review: Dídac Magriñá
Result of coverage tests review: PASS
Result of functional tests review: PASS
Result of review: PASS
List of non-conformities:OPCUAMessageClient
: coverage lower than 90% (82.9%)- The mock OPCUA server used in other tests could be leveraged on
OPCUAClientMethodTest
,OPCUAMessageClientTest
to check if UpdatePoint method has been called with expected parameters OPCUAServerTest
: onExecute
tests there is no check to confirm that data has been updated correctlyOPCUAClientReadTest
,OPCUAClientWriteTest
: there is no check to confirm that data has been read/written correctly on server
ERR: Test file not found: Test/Components/Interfaces/OPCUA/OPCUATypesGTest.cpp
ERR: OPCUAObject:IsFirstObject is not tested
ERR: OPCUAObject:IsObject is not tested
ERR: OPCUAObject:SetFirst is not tested
ERR: OPCUAMessageClient:GetOPCUAClient is not tested
ERR: OPCUAMessageClient:GetServerAddress is not tested
ERR: OPCUAReferenceContainer:GetNumberOfDimensions is not tested
ERR: OPCUAReferenceContainer:GetNumberOfElements is not tested
ERR: OPCUAReferenceContainer:GetParentNodeId is not tested
ERR: OPCUAReferenceContainer:IsFirstObject is not tested
ERR: OPCUAReferenceContainer:SetNodeId is not tested
ERR: OPCUAReferenceContainer:SetNodeType is not tested
ERR: OPCUAReferenceContainer:SetNumberOfDimensions is not tested
ERR: OPCUAReferenceContainer:SetNumberOfElements is not tested
ERR: OPCUAReferenceContainer:SetParent is not tested
ERR: OPCUANode:IsNode is not tested
ERR: OPCUAServer:GetCPUMask is not tested
ERR: OPCUAServer:GetPort is not tested
ERR: OPCUAServer:GetRunning is not tested
ERR: OPCUAServer:GetStackSize is not tested
ERR: OPCUAServer:SetRunning is not tested
ERR: OPCUAClientMethod:GetMonitoredNodes is not tested
ERR: OPCUAClientRead:GetMonitoredNodes is not tested
ERR: OPCUAClientWrite:GetMonitoredNodes is not tested
ERR: OPCUAClientI:GetDataPtr is not tested
ERR: OPCUAClientI:GetExtensionObjectByteString is not tested
ERR: OPCUAClientI:GetNumberOfNodes is not tested
ERR: OPCUAClientI:GetServerAddress is not tested
ERR: OPCUAClientI:GetValueMemories is not tested
ERR: OPCUAClientI:SetServiceRequest is not tested
ERR: OPCUADSOutput:AllocateMemory is not tested
ERR: OPCUADSOutput:GetBrokerName is not tested
ERR: OPCUADSOutput:GetOPCUAClient is not tested
ERR: OPCUADSOutput:GetServerAddress is not tested
ERR: OPCUADSOutput:GetSignalMemoryBuffer is not tested
ERR: OPCUADSOutput:PrepareNextState is not tested
ERR: OPCUADSOutput:Synchronise is not tested
ERR: OPCUADSInput:AllocateMemory is not tested
ERR: OPCUADSInput:GetBrokerName is not tested
ERR: OPCUADSInput:GetOPCUAClient is not tested
ERR: OPCUADSInput:GetServerAddress is not tested
ERR: OPCUADSInput:GetSignalMemoryBuffer is not tested
ERR: OPCUADSInput:PrepareNextState is not tested
ERR: DataSources/OPCUADataSource/OPCUAClientI.cpp: insufficient line coverage: (87.0 % < 90.0 %)
ERR: DataSources/OPCUADataS.../OPCUAClientMethod.cpp: insufficient line coverage: (85.5 % < 90.0 %)
ERR: DataSources/OPCUADataSource/OPCUAClientRead.cpp: insufficient line coverage: (83.1 % < 90.0 %)
ERR: DataSources/OPCUADataS...e/OPCUAClientWrite.cpp: insufficient line coverage: (84.5 % < 90.0 %)
ERR: Interfaces/OPCUA/OPCUAMessageClient.cpp: insufficient line coverage: (78.9 % < 90.0 %)
GTest report
[----------] Global test environment tear-down [==========] 154 tests from 11 test cases ran. (135431 ms total) [ PASSED ] 154 tests.
History
#1 Updated by André Neto almost 6 years ago
- Status changed from Code: Impl to Code: Rev
#2 Updated by André Neto almost 6 years ago
- Assignee changed from Luca Porzio to André Neto
#3 Updated by André Neto almost 6 years ago
- Status changed from Code: Rev to Unit: Rev
#4 Updated by André Neto almost 6 years ago
- Status changed from Unit: Rev to Closed
- Description updated (diff)
#5 Updated by André Neto over 5 years ago
- Description updated (diff)
- Status changed from Closed to Code: Rev
- Assignee changed from André Neto to Giuseppe Ferro
#6 Updated by André Neto about 5 years ago
- Assignee deleted (
Giuseppe Ferro)
#7 Updated by André Neto about 5 years ago
- Assignee set to Didac Magrina
#8 Updated by André Neto almost 5 years ago
- Status changed from Code: Rev to Code: Impl
#9 Updated by André Neto almost 5 years ago
- Assignee changed from Didac Magrina to Luca Porzio
#10 Updated by André Neto almost 5 years ago
- Status changed from Code: Impl to Code: Rev
#11 Updated by Didac Magrina over 4 years ago
- Description updated (diff)
#12 Updated by Didac Magrina over 4 years ago
#351_OPCUA-Review
has not been merged yet into develop
. A simulation has been performed on branch develop_merge_#351_OPCUA-Review
, it required to:
- Fix conflicts accepting version from
#351_OPCUA-Review
. Conflicts are due to some commits ondevelop
modified OPCUA files but were not present on#351_OPCUA-Review
. See commits between 489e09d6 and 0b7200c7 - Remove tests that remained from develop branch but were removed on
#351_OPCUA-Review
. See commit 33ebbd5c
#13 Updated by André Neto over 4 years ago
- Status changed from Code: Rev to Unit: Rev
#14 Updated by André Neto over 4 years ago
- Assignee changed from Luca Porzio to André Neto
#15 Updated by André Neto over 4 years ago
- Description updated (diff)
#16 Updated by André Neto over 4 years ago
- Status changed from Unit: Rev to Closed
- Assignee deleted (
André Neto)
QA good enough. Merged into develop and user-stories to improve QA will be added.
#17 Updated by André Neto over 4 years ago
- Description updated (diff)