void cLogStats::Action(void) { while(Running()) { cCondWait::SleepMs(50); if(sTime.Elapsed()>SAMPLE) { sCounts[sIdx][0]=sCount; sCount=0; sCounts[sIdx][1]=sTime.Elapsed(); sTime.Set(); if(++sIdx >= COUNTS) sIdx=0; } if(repTime.Elapsed()>REPORT) { repTime.Set(); if(sCounts[(sIdx+COUNTS-1)%COUNTS][0]>0) { LBSTART(L_CORE_AUSTATS); LBPUT("EMM packet load average (%d/%d/%dmin)",AVR1/60000,AVR2/60000,AVR3/60000); int s=0, t=0; for(int i=1; i<=COUNTS; i++) { s+=sCounts[(sIdx+COUNTS-i)%COUNTS][0]; t+=sCounts[(sIdx+COUNTS-i)%COUNTS][1]; if(i==(AVR1/SAMPLE) || i==(AVR2/SAMPLE) || i==(AVR3/SAMPLE)) LBPUT(" %4d",(int)((float)s/(float)t*1000.0)); } LBPUT(" pks/s"); LBEND(); } } } }
off_t cVideoBufferRecording::Available() { if (m_ScanTimer.TimedOut()) { m_RecPlayer->reScan(); m_ScanTimer.Set(1000); } m_BufferSize = m_WritePtr = m_RecPlayer->getLengthBytes(); return cVideoBufferTimeshift::Available(); }
void cSatipMenuInfo::UpdateInfo() { cSatipDevice *device = cSatipDevice::GetSatipDevice(cDevice::ActualDevice()->CardIndex()); if (device) textM = device->GetInformation(pageM); else textM = cString(tr("SAT>IP information not available!")); Display(); timeoutM.Set(eInfoTimeoutMs); }
bool cVideoBufferRecording::Init() { m_ReadCacheMaxSize = 32000; m_ReadCache = (uint8_t*)malloc(m_ReadCacheMaxSize); if (!m_ReadCache) return false; m_RecPlayer = new cRecPlayer(m_Recording, true); if (!m_RecPlayer) return false; m_WritePtr = 0; m_ReadPtr = 0; m_ReadCacheSize = 0; m_InputAttached = false; m_ScanTimer.Set(0); return true; }
void cLogger::Process(cPidFilter *filter, unsigned char *data, int len) { if(data && len>0) { if(filter==catfilt) { int vers=(data[5]&0x3E)>>1; if(data[0]==0x01 && vers!=catVers) { PRINTF(L_CORE_AUEXTRA,"%d: got CAT version %02x",cardNum,vers); catVers=vers; HEXDUMP(L_HEX_CAT,data,len,"CAT vers %02x",catVers); ClearChains(); ProcessCat(&data[8],len-4-8); unsigned char buff[2048]; if((len=overrides.GetCat(source,transponder,buff,sizeof(buff)))>0) { HEXDUMP(L_HEX_CAT,buff,len,"override CAT"); ProcessCat(buff,len); } SetChains(); if(prescan==pmStart) { prescan=pmWait; pretime.Set(2000); } } if(prescan==pmWait && pretime.TimedOut()) { prescan=pmActive; SetChains(); } } else {
void cSatipMenuDeviceStatus::UpdateInfo() { textM = cSatipDevice::GetSatipStatus(); Display(); timeoutM.Set(eInfoTimeoutMs); }