4646using std::string;
4747
4848CSkeletonSubsystemObject::CSkeletonSubsystemObject (
49- const string& strMappingValue,
50- CInstanceConfigurableElement* pInstanceConfigurableElement,
51- const CMappingContext& context,
52- core::log::Logger& logger
53- ) :
54- base(pInstanceConfigurableElement,
55- logger,
56- strMappingValue,
57- EAmend1,
58- EAmendEnd - EAmend1 + 1 ,
59- context),
60- _bWrongElementTypeError(false )
49+ const string &strMappingValue, CInstanceConfigurableElement *pInstanceConfigurableElement,
50+ const CMappingContext &context, core::log::Logger &logger)
51+ : base(pInstanceConfigurableElement, logger, strMappingValue, EAmend1, EAmendEnd - EAmend1 + 1 ,
52+ context),
53+ _bWrongElementTypeError(false )
6154{
6255 // Get actual element type
63- const CParameterType* pParameterType = static_cast <const CParameterType*>(pInstanceConfigurableElement->getTypeElement ());
56+ const CParameterType *pParameterType =
57+ static_cast <const CParameterType *>(pInstanceConfigurableElement->getTypeElement ());
6458
6559 // Retrieve sizes
6660 _scalarSize = pParameterType->getSize ();
6761 _arraySize = pInstanceConfigurableElement->getFootPrint () / _scalarSize;
6862
6963 // Construct message
70- _strMessage = context.getItem (ESkeletonOwner) + " :" + strMappingValue ;
64+ _strMessage = context.getItem (ESkeletonOwner) + " :" + strMappingValue;
7165
7266 // Handle types
7367 // Check we are able to handle elements (no exception support, defer the error)
74- switch (pInstanceConfigurableElement->getType ()) {
68+ switch (pInstanceConfigurableElement->getType ()) {
7569
76- case CInstanceConfigurableElement::EParameter:
77- break ;
78- default :
79- _bWrongElementTypeError = true ;
80- break ;
70+ case CInstanceConfigurableElement::EParameter:
71+ break ;
72+ default :
73+ _bWrongElementTypeError = true ;
74+ break ;
8175 }
82-
8376}
8477// Sync to/from HW
85- bool CSkeletonSubsystemObject::accessHW (bool bReceive, string& strError)
78+ bool CSkeletonSubsystemObject::accessHW (bool bReceive, string & strError)
8679{
8780 // Check parameter type is ok (deferred error, no exceptions available :-()
8881 if (_bWrongElementTypeError) {
@@ -95,11 +88,11 @@ bool CSkeletonSubsystemObject::accessHW(bool bReceive, string& strError)
9588 return base::accessHW (bReceive, strError);
9689}
9790
98- bool CSkeletonSubsystemObject::sendToHW (string& /* strError*/ )
91+ bool CSkeletonSubsystemObject::sendToHW (string & /* strError*/ )
9992{
100- void * pvValue = alloca (_scalarSize);
93+ void * pvValue = alloca (_scalarSize);
10194
102- for (size_t index = 0 ; index < _arraySize ; index++) {
95+ for (size_t index = 0 ; index < _arraySize; index++) {
10396
10497 // Read Value in BlackBoard
10598 blackboardRead (pvValue, _scalarSize);
@@ -111,11 +104,11 @@ bool CSkeletonSubsystemObject::sendToHW(string& /*strError*/)
111104 return true ;
112105}
113106
114- bool CSkeletonSubsystemObject::receiveFromHW (string& /* strError*/ )
107+ bool CSkeletonSubsystemObject::receiveFromHW (string & /* strError*/ )
115108{
116- void * pvValue = alloca (_scalarSize);
109+ void * pvValue = alloca (_scalarSize);
117110
118- for (size_t index = 0 ; index < _arraySize ; index++) {
111+ for (size_t index = 0 ; index < _arraySize; index++) {
119112
120113 // Retreive here the value
121114 std::cout << " Retreive from HW: " << _strMessage << std::endl;
0 commit comments