SASC-NG
DVBSoftCAM

cLogChain Class Reference

Inheritance diagram for cLogChain:

List of all members.

Public Member Functions

 cLogChain (cCam *Cam, const char *DevId, bool soft, int src, int tr)
void Process (int pid, const unsigned char *data)
bool Parse (const unsigned char *cat)

Public Attributes

cCam * cam
const char * devId
int caid
int source
int transponder
bool softCSA
bool active
bool delayed
cTimeMs delay
cPids pids
cSimpleList< cSystem > systems

Detailed Description

Definition at line 277 of file cam.c.


Constructor & Destructor Documentation

cLogChain::cLogChain ( cCam *  Cam,
const char *  DevId,
bool  soft,
int  src,
int  tr 
)

Definition at line 292 of file cam.c.

References active, cam, delayed, devId, softCSA, source, tr, and transponder.

{
  cam=Cam; devId=DevId; softCSA=soft; source=src; transponder=tr;
  active=delayed=false;
}

Member Function Documentation

bool cLogChain::Parse ( const unsigned char *  cat)

Definition at line 306 of file cam.c.

References cSimpleListBase::Add(), caid, cam, cSimpleListBase::Count(), devId, cSystems::FindBySysId(), cSimpleList< T >::First(), cSystem::HasLogger(), cOverrides::Ignore(), L_CORE_AU, LBEND, LBPUT, LBSTARTF, cSystem::Name(), cSimpleList< T >::Next(), overrides, cSystem::ParseCAT(), pid::pid, pids, cSystem::Pri(), cSystem::SetOwner(), softCSA, source, systems, transponder, and WORD.

{
  if(cat[0]==0x09) {
    caid=WORD(cat,2,0xFFFF);
    LBSTARTF(L_CORE_AU);
    LBPUT("%s: chain caid %04x",devId,caid);
    cSystem *sys;
    if(systems.Count()>0) {
      LBPUT(" ++");
      for(sys=systems.First(); sys; sys=systems.Next(sys))
        sys->ParseCAT(&pids,cat,source,transponder);
      }
    else {
      LBPUT(" ->");
      if(!overrides.Ignore(source,transponder,caid)) {
        int Pri=0;
        while((sys=cSystems::FindBySysId(caid,!softCSA,Pri))) {
          Pri=sys->Pri();
          if(sys->HasLogger()) {
            sys->SetOwner(cam);
            sys->ParseCAT(&pids,cat,source,transponder);
            systems.Add(sys);
            LBPUT(" %s(%d)",sys->Name(),sys->Pri());
            }
          else
            delete sys;
          }
        }
      }
    if(systems.Count()==0) LBPUT(" none available");
    for(cPid *pid=pids.First(); pid; pid=pids.Next(pid))
       LBPUT(" [%04x-%02x/%02x]",pid->pid,pid->sct,pid->mask);
    LBEND();
    if(systems.Count()>0 && pids.Count()>0)
      return true;
    }
  return false;
}
void cLogChain::Process ( int  pid,
const unsigned char *  data 
)

Definition at line 298 of file cam.c.

References active, caid, cSimpleList< T >::First(), cSimpleList< T >::Next(), and systems.

Referenced by cLogger::Process().

{
  if(active) {
    for(cSystem *sys=systems.First(); sys; sys=systems.Next(sys))
      sys->ProcessEMM(pid,caid,data);
    }
}

Member Data Documentation

Definition at line 282 of file cam.c.

Referenced by cLogChain(), and Process().

Definition at line 281 of file cam.c.

Referenced by Parse(), and Process().

Definition at line 279 of file cam.c.

Referenced by cLogChain(), and Parse().

Definition at line 283 of file cam.c.

Definition at line 282 of file cam.c.

Referenced by cLogChain(), and cLogger::Process().

const char* cLogChain::devId

Definition at line 280 of file cam.c.

Referenced by cLogChain(), and Parse().

Definition at line 284 of file cam.c.

Referenced by Parse().

Definition at line 282 of file cam.c.

Referenced by cLogChain(), and Parse().

Definition at line 281 of file cam.c.

Referenced by cLogChain(), and Parse().

Definition at line 285 of file cam.c.

Referenced by Parse(), and Process().

Definition at line 281 of file cam.c.

Referenced by cLogChain(), and Parse().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines