Project

General

Profile

User story #188

Updated by André Neto about 9 years ago

Define the base infrastructure for object introspection.
This would satisfy requirements:
* MARTe-EX-F-2.2.1: The framework shall allow to fully introspect the properties of any of its object.
* MARTe-EX-F-2.2.2: The framework shall allow to introspect the class name of any of its objects.
* MARTe-EX-F-2.2.3: The framework shall allow to introspect the class type of any of its objects.

h1. Source code files modified

L0Types/BasicTypes.h
L0Types/CompilerTypes.h
L0Types/Introspection.h (Moved to L2Objects)
L0Types/TypeDescriptor.h (Moved to L1Portability)
L0Types/ZeroTerminatedArray.h
L1Portability/ErrorManagement.h
L1Portability/FormatDescriptor.cpp
L1Portability/TypeDescriptor.*
L1Portability/StringHelper.h
L2Objects/ClassRegistryItem.*
L2Objects/IntrospectionEntry.*
L2Objects/Introspection.*
L3Streams/IOBuffer.cpp
L4Configuration/ConfigurationDatabase.*
L4Configuration/TypeConversion.*
L4Configuration/ValidateBasicType.*
L3Streams/IOBuffer.*
Lib/IntrospectionParser.*

h1. Architecture & design review

*Date of the review:* 31/07/2015

*Person who did the review:* Andre' Neto

*Version of architecture & design document:* N/A. As per the original MARTe implementation, this is a support function and does not require formal design in UML.

*Result of review:* N/A

*List of non-conformities:* N/A

h1. Code and documentation review

*Date of the review:* 01/02/2016 31/01/2015

*Person who did the review:* Andre' Neto

*Result of review:* PASS* FAIL (some choices need to be discussed, see below)

*List of non-conformities:*

During Specific Walk:
File ./Source/Core/BareMetal/L3Streams/IOBufferIntegerPrint.cpp line 531: MARTe::BitSetToInteger(?, ?, ?, 8?, !=0) #1
File ./Source/Core/BareMetal/L3Streams/BitSetToInteger.h line 345: MARTe::BitSetToBitSet([1], 0, 8, 1, ?, ?, 8?, !=0) #2
File ./Source/Core/BareMetal/L3Streams/BitSetToInteger.h line 286: MARTe::BSToBS([1], 0, 8, 1, ?, 31? | 0?, 8?, !=0) #3
File ./Source/Core/BareMetal/L3Streams/BitSetToInteger.h line 105: MARTe::MemoryOperationsHelper::Copy([4], ?, 5?) #31
./Source/Core/BareMetal/L1Portability/Environment/Generic/MemoryOperationsHelper_CLIB_Generic.cpp:58:1: Warning 669: Possible data overrun for function 'memcpy(void *, const void *, unsigned long)', argument 3 (size=5) exceeds argument 1 (size=4)
./Source/Core/BareMetal/L3Streams/BitSetToInteger.h:101:1: Info 831: Reference cited
* Why do the functions in prior message GeneralDefinitions.h (isNan, isEqual, ...) start with lower-case?
./Source/Core/BareMetal/L3Streams/BitSetToInteger.h:105:1: Info 831: Reference cited in prior message * GetTypeNameFromStaticTable and GetTypeDescriptorFromStaticTable should be private functions of AnyTypeCreator (OK, I see now that basicTypeInfo is also used by functions TypeDescriptor.cpp.). Can we do better? I don't like this promiscuity between AnyTypeCreator and TypeDescriptor.
./Source/Core/BareMetal/L3Streams/BitSetToInteger.h:227:1: Info 831: Reference cited in prior message * Why do we need the automatic cast of the StructureDataI to AnyType? (I guess it is for the Printf of BufferedStream?)
./Source/Core/BareMetal/L3Streams/BitSetToInteger.h:242:1: Info 831: Reference cited * ConfigurationDatabase::Read/ConfigurationDatabase::Write documentation. Discuss if the structure reading/writing should be true in prior message general i.e. a specification from StructuredDataI or (as it is now) only applicable to the ConfigurationDatabase.
./Source/Core/BareMetal/L3Streams/BitSetToInteger.h:286:1: Info 831: Reference cited in prior message * In ConfigurationDatabase::Write shouldn't currentNode = storeCurrentNode; be performed iif ok?
./Source/Core/BareMetal/L3Streams/BitSetToInteger.h:345:1: Info 831: Reference cited in prior message * Confirm documentation of StructuredDataI::Copy
./Source/Core/BareMetal/L3Streams/IOBufferIntegerPrint.cpp:528:1: Info 831: Reference cited in prior message
./Source/Core/BareMetal/L3Streams/IOBufferIntegerPrint.cpp:531:1: Info 831: Reference cited in prior message
./Source/Core/BareMetal/L4Configuration/ParserI.cpp:51:80: Note 9138: null statement not in line
* Confirm that the AnyTypeCreator is only used by itself [MISRA C++ Rule 6-2-3]

the parser. Check documentation. Understand the exact role of the AnyTypeCreator

h1. Unit test review

*Date of the review:* --/--/2015

*Person who did the review:* -----

*Result of coverage tests review:* [PASS/FAIL]

*Result of functional tests review:* [PASS/FAIL]

*Result of review:* [PASS/FAIL]

*List of non-conformities:*

* CLASS_INTROSPECTION_REGISTER does not seem to be tested.

Back