ADC 400F Manual Pagina 51

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 74
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 50
Chapter 5. Complete program listings.
using namespace std;
#endif
#include "MyEventSegment.h" // co:myheader
static char* pPacketVersion = "1.0"; // co:packetversion
// Packet version -should be changed whenever major changes are made
// to the packet structure.
//constructor set Packet details
MyEventSegment::MyEventSegment(short slot, unsigned short Id):
m_MyPacket(Id,
string("My Packet"),
string("Sample documented packet"),
string(pPacketVersion)) // co:packetinit
{
module = new CAENcard(slot); // co:cardcreate
}
// Destructor:
MyEventSegment::~MyEventSegment()
{
delete module; // co:destroy
}
// Is called right after the module is created. All one time Setup
// should be done now.
void MyEventSegment::Initialize()
{
module->reset(); // co:moduleInit
Clear();
}
// Is called after reading data buffer
void MyEventSegment::Clear()
{
module->clearData(); // Clear data buffer co:cleardata
}
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++) // co:waitready
46
Vista de pagina 50
1 2 ... 46 47 48 49 50 51 52 53 54 55 56 ... 73 74

Comentarios a estos manuales

Sin comentarios