This class implements the management of a temperature probe based on LM35 component. It is called to actually add a working channel.
[ back to index ]
ProbeTemp(SerialPort *externalPort, int ch, TTree *datatree, TPad* externalPad);
Constructor. Pointer to global variables are required: communication port, assignment channel, data tree, drawing pad.
static void *Acquire(void *ptr);
This method is called in Start() as a thread function, and performs the acquisition.
void Start(time_t tstart);
Starts acquisition thread. The timestamp tstart is for thread timing coordination.
Deletes acquisition thread.
ProbeTemp *probe; probe = new ProbeTemp(&USBport, 1, dataTree, tpad); probe->Reset(); probe->Start(time(NULL)); refresh_Timer = new TTimer(this, 950, kTRUE); refresh_Timer->Connect("Timeout()", "ProbeTemp", ProbeTemp, "Refresh()"); refresh_Timer->Reset(); refresh_Timer->TurnOn(); usleep(10 * 1000); // waits 10 seconds probe->Stop();