Project

General

Profile

User story #125

Updated by Ivan Herrero almost 10 years ago

Implement requirement MARTe-EX-F-1.1.11 based on the original MARTe implementation

Note: Being a framework aimed at control systems it will naturally interact with a large type of IO interfaces. Given that the endianess encoding of the data arriving/sending from/to these interfaces cannot be prescribed, it is crucial for framework developers to have these kind of functions available.

Note: Add 64 bit native support

Note: Use _intrinsic_ in Visual Studio C++ compiler

h1. Source code files modified

* Source/Core/L0Portability/Architecture/x86_cl/EndianityA.h
* Source/Core/L0Portability/Architecture/x86_gcc/EndianityA.h
* Source/Core/L0Portability/Endianity.cpp
* Source/Core/L0Portability/Endianity.h

h1. Architecture & design review

*Date of the review:* 04/06/2015

*Person who did the review:* Andre' Neto

*Version of architecture & design document:* N/A. This is a support class 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:* 08/06/2015

*Person who did the review:* Ivan Herrero

*Result of review:* FAIL

*List of non-conformities:*

Manual review for Source/Core/L0Portability/Architecture/x86_cl/EndianityA.h
file @date => Wrong format
file @details => It's class oriented, instead functions oriented (it's a template problem that needs to be fixed)
method @pre => Wrong syntax for inout parameters, should be "[in,out]" instead of "[in][out]"
method @detail for EndianitySwap64 => Tag should be @details
method @detail for EndianityMemCopySwap64 => Tag should be @details
method @details for EndianitySwap64 => The description says "Not optimised!", better changing to an implementation TODO
method @details for EndianityMemCopySwap64 => The description says "Not optimised!", better changing to an implementation TODO
some methods EndianityMemCopy* => Non-compliant with "Rule 5–2–10"
some methods EndianityMemCopy* => Non-compliant with "Rule 6–3–1"

Manual review for Source/Core/L0Portability/Architecture/x86_gcc/EndianityA.h
file @date => Wrong format
file @details => It's class oriented, instead functions oriented (it's a template problem that needs to be fixed)
#include "../../GeneralDefinitions.h" => Should be on "Project header includes" section
method @pre => Wrong syntax for inout parameters, should be "[in,out]" instead of "[in][out]"
method @details for EndianitySwap64 => The description says "Not optimised!", better changing to an implementation TODO
method @details for EndianityMemCopySwap64 => The description says "Not optimised!", better changing to an implementation TODO
some methods EndianityMemCopy* => Non-compliant with "Rule 5–2–10"
some methods EndianityMemCopy* => Non-compliant with "Rule 6–3–1"

Manual review for
Source/Core/L0Portability/Endianity.cpp
file @date => Wrong format
file
@brief => Says "Header file" instead of "Source file" (copy text from last marte_cpp_code_templates.xml version) (it's a template problem that needs to be fixed)
file @details => Says "header" and "declaration" instead of "source" and "definition" (copy text from last marte_cpp_code_templates.xml version) (it's a template problem that needs to be fixed)
Endianity::endianityTypeChecked => There is no need to initialise here (could be defined on declaration at Endianity.h)
Endianity::endianityType => There is no need to initialise here (could be defined on declaration at Endianity.h)


Manual review for Source/Core/L0Portability/Endianity.h
file @date => Wrong format
#include "GeneralDefinitions.h" => Should be on "Project header includes" section
class @details => Description done, but tag missing
class @details =>
Should not explain implementation details (AtomicA.h), better explain it on "Inline method definitions" section?
private section of class => Should be at the end of the class declaration
method @pre => Wrong syntax for inout parameters, should be "[in,out]" instead of "[in][out]"
Should be input parameters passed by value declared as const?


*Note:* Automatic review with cppcheck OK

Back