Exemplo n.º 1
0
static bool viewer(void *arg, const char *name, size_t , size_t , const CtrlInfo &,
             DbrType , DbrCount , const RawValue::Data *value)
{
	MainWindow *pMain = (MainWindow*)arg;
	if(pMain == 0) return false;

	char timebuf[30];
	epicsTimeToStrftime(timebuf,28,"%m/%d/%Y %H:%M:%S", &(value->stamp));
	//qDebug("Time:%s, PVName(%s:%f)", timebuf, name, value->value);
	//outstream << "Loop:" << pMain->mloop << ", Time: " << timebuf << ", PVName: ("<<name <<":" <<value->value<<")" << endl;

	int curpage = pMain->CurrentPage();

	if(pMain->mloop == 0)
	{
		pMain->AddEPICSTimeStamp(curpage, value->stamp);
	};
	pMain->AddPVAndValue(curpage, name, value->value);

    return true;
}