31 #ifndef NdbApiSignal_H
32 #define NdbApiSignal_H
34 #include <kernel_types.h>
35 #include <RefConvert.hpp>
36 #include <TransporterDefinitions.hpp>
52 :
SignalHeader(header), theNextSignal(0), theRealData(0) {};
56 Uint16 receiversBlockNumber,
61 void setData(Uint32 aWord, Uint32 aDataNo);
62 Uint32 readData(Uint32 aDataNo)
const;
65 int setSignal(
int NdbSignalType, Uint32 receiverBlockNo);
66 int readSignalNumber()
const;
67 Uint32 getLength()
const;
68 void setLength(Uint32 aLength);
73 Uint32 * getDataPtrSend();
74 const Uint32 * getConstDataPtrSend()
const;
75 STATIC_CONST( MaxSignalWords = 25);
77 NodeId get_sender_node();
83 bool isFirstFragment()
const {
return m_fragmentInfo <= 1;}
84 bool isLastFragment()
const {
85 return m_fragmentInfo == 0 || m_fragmentInfo == 3;
88 Uint32 getFragmentId()
const {
89 return (m_fragmentInfo == 0 ? 0 :
getDataPtr()[theLength - 1]);
98 void setDataPtr(Uint32 *);
101 friend class NdbScanReceiver;
109 Uint32 theData[MaxSignalWords];
119 NdbApiSignal::get_sender_node()
121 return refToNode(theSendersBlockRef);
130 NdbApiSignal::getLength()
const{
141 NdbApiSignal::setLength(Uint32 aLength){
154 theNextSignal = aSignal;
165 NdbApiSignal::next(){
166 return theNextSignal;
176 NdbApiSignal::readSignalNumber()
const
178 return (
int)theVerId_signalNumber;
190 NdbApiSignal::readData(Uint32 aDataNo)
const {
204 NdbApiSignal::setData(Uint32 aWord, Uint32 aDataNo){
205 getDataPtrSend()[aDataNo -1] = aWord;
219 NdbApiSignal::getDataPtrSend(){
220 return (Uint32*)&theData[0];
225 NdbApiSignal::getConstDataPtrSend()
const
227 return (Uint32*)&theData[0];
232 NdbApiSignal::setDataPtr(Uint32 * ptr){