ADC 400F Manuál Strana 15

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 74
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 14
Chapter 2. Setting up the software
string(pPacketVersion)) //
{
module = new CAENcard(slot); //
}
// Destructor:
MyEventSegment::~MyEventSegment()
{
delete module; //
}
// Is called right after the module is created. All one time Setup
// should be done now.
void MyEventSegment::Initialize()
{
module->reset(); //
Clear();
}
// Is called after reading data buffer
void MyEventSegment::Clear()
{
module->clearData(); // Clear data buffer
}
unsigned int MyEventSegment::MaxSize()
{
return 0;
}
//Is called to readout data on module
DAQWordBufferPtr& MyEventSegment::Read(DAQWordBufferPtr& rBuf)
{
for(int i=0;i<CAENTIMEOUT;i++) //
// Loop waits for data to become ready
{
if(module->dataPresent())
// If data is ready stop looping
{
break;
}
}
if(module->dataPresent())
// Tests again that data is ready
{
rBuf = m_MyPacket.Begin(rBuf); // (10)
// Opens a new Packet
module->readEvent(rBuf); // (11)
10
Zobrazit stránku 14
1 2 ... 10 11 12 13 14 15 16 17 18 19 20 ... 73 74

Komentáře k této Příručce

Žádné komentáře