Go to the documentation of this file.
29 #ifndef _CALCIUM_MACRO_C_INTERFACE_H_
30 #define _CALCIUM_MACRO_C_INTERFACE_H_
37 #define CALCIUM_C2CPP_INTERFACE_HXX_(_name,_porttype,_type,_qual) \
38 extern "C" CalciumTypes::InfoType ecp_lecture_##_name (void * component, int dependencyType, \
39 CalTimeType< _type _qual >::TimeType * ti, \
40 CalTimeType< _type _qual >::TimeType * tf, long * i, \
41 const char * const nomvar, size_t bufferLength, \
42 size_t * nRead, _type _qual ** data ); \
45 extern "C" void ecp_lecture_##_name##_free ( _type _qual * data); \
48 extern "C" CalciumTypes::InfoType ecp_ecriture_##_name (void * component, int dependencyType, \
49 CalTimeType< _type _qual >::TimeType *t, \
51 const char * const nomvar, size_t bufferLength, \
52 _type _qual * data ); \
60 #define CALCIUM_C2CPP_INTERFACE_CXX_(_name,_porttype,_type,_qual) \
61 extern "C" CalciumTypes::InfoType ecp_lecture_##_name (void * component, int dependencyType, \
62 CalTimeType< _type _qual >::TimeType * ti, \
63 CalTimeType< _type _qual >::TimeType * tf, long * i, \
64 const char * const nomvar, size_t bufferLength, \
65 size_t * nRead, _type _qual ** data ) \
67 Superv_Component_i * _component = static_cast<Superv_Component_i *>(component); \
70 if(dependencyType == CalciumTypes::CP_TEMPS) \
76 size_t _bufferLength=bufferLength; \
78 if ( IsSameType< _porttype , cplx >::value ) _bufferLength*=2; \
79 DEBTRACE( "-------- CalciumInterface(lecture Inter Part) MARK 1 ------------------" ) \
82 CalciumInterface::ecp_lecture< _type,_porttype >( *_component, dependencyType, _ti, _tf, *i, nomvar, \
83 _bufferLength, _nRead, *data); \
85 catch ( const CalciumException & ex) \
87 DEBTRACE( ex.what() ); \
88 return ex.getInfo(); \
92 DEBTRACE( "Unexpected exception ") ; \
93 return CalciumTypes::CPATAL; \
95 if ( IsSameType< _porttype , cplx >::value ) \
98 DEBTRACE( "-------- CalciumInterface(lecture Inter Part) IsSameType cplx -------------" ) \
99 DEBTRACE( "-------- CalciumInterface(lecture Inter Part) _nRead : " << _nRead ) \
100 DEBTRACE( "-------- CalciumInterface(lecture Inter Part) *nRead : " << *nRead ) \
104 if (dependencyType == CalciumTypes::CP_SEQUENTIEL ) \
105 *ti=(CalTimeType< _type _qual >::TimeType)(_ti); \
106 DEBTRACE( "-------- CalciumInterface(lecture Inter Part), Data Ptr :" << *data ) \
107 return CalciumTypes::CPOK; \
111 extern "C" void ecp_lecture_##_name##_free ( _type _qual * data) \
113 CalciumInterface::ecp_free< _type, _porttype >(data); \
117 extern "C" CalciumTypes::InfoType ecp_ecriture_##_name (void * component, int dependencyType, \
118 CalTimeType< _type _qual >::TimeType *t, \
120 const char * const nomvar, size_t bufferLength, \
121 _type _qual * data ) \
123 DEBTRACE( "-------- CalciumInterface(ecriture Inter Part) MARK 0 ------------------" ) \
124 Superv_Component_i * _component = static_cast<Superv_Component_i *>(component); \
127 if(dependencyType == CalciumTypes::CP_TEMPS) \
129 size_t _bufferLength=bufferLength; \
130 if ( IsSameType< _porttype , cplx >::value ) _bufferLength=_bufferLength*2; \
131 DEBTRACE( "-------- CalciumInterface(ecriture Inter Part) MARK 1 ------------------" ) \
135 DEBTRACE( "----------->-" << nomvar ) \
136 CalciumInterface::ecp_ecriture< _type, _porttype >( *_component, dependencyType, \
137 _t,i,nomvar,_bufferLength,*data); \
139 catch ( const CalciumException & ex) \
141 DEBTRACE( ex.what() ); \
142 return ex.getInfo(); \
146 DEBTRACE("Unexpected exception " ); \
147 return CalciumTypes::CPATAL; \
149 DEBTRACE( "-------- CalciumInterface(ecriture Inter Part), Valeur de data :" << data ) \
150 return CalciumTypes::CPOK; \