21 const int MAXAPIDS=32;
22 const uint32_t UNSET=0xffffffff;
23 const uint16_t NOID=0xffff;
24 const uint16_t NOPID=0xffff;
56 friend ostream &operator<<(ostream &stream, Transponder &x);
57 friend istream &operator>>(istream &stream, Transponder &x);
78 int set(int sid, char *sname, int slnbid, int srotorid) {
82 friend ostream &operator<<(ostream &stream, Sat &x);
83 friend istream &operator>>(istream &stream, Sat &x);
102 void cpy (const Lnb &olnb){
104 this->type=olnb.type;
105 this->lof1=olnb.lof1;
106 this->lof2=olnb.lof2;
107 this->slof=olnb.slof;
108 this->diseqcnr=olnb.diseqcnr;
109 this->diseqcid=olnb.diseqcid;
110 this->swiid=olnb.swiid;
111 strncpy(this->name,olnb.name,maxname);
114 void init(int t, uint l1, uint l2, uint sl,
115 int dnr, int disid, int sw) {
135 Lnb (const Lnb &olnb){
141 friend ostream &operator<<(ostream &stream, Lnb &x);
142 friend istream &operator>>(istream &stream, Lnb &x);
148 unsigned char msg[8];
154 char name[maxname+1];
157 friend ostream &operator<<(ostream &stream, DiSEqC &x);
158 friend istream &operator>>(istream &stream, DiSEqC &x);
164 char name[maxname+1];
167 friend ostream &operator<<(ostream &stream, Rotor &x);
168 friend istream &operator>>(istream &stream, Rotor &x);
175 char name[maxname+1];
178 friend ostream &operator<<(ostream &stream, Switch &x);
179 friend istream &operator>>(istream &stream, Switch &x);
185 char name[maxname+1];
187 friend ostream &operator<<(ostream &stream, Network &x);
188 friend istream &operator>>(istream &stream, Network &x);
194 char name[maxname+1];
196 friend ostream &operator<<(ostream &stream, Bouquet &x);
197 friend istream &operator>>(istream &stream, Bouquet &x);
202 #define MAX_ECM_DESC 256
203 typedef struct ecm_struct {
205 uint16_t sysid[MAX_ECM];
206 uint16_t pid[MAX_ECM];
207 uint16_t length[MAX_ECM];
208 uint8_t data[MAX_ECM*MAX_ECM_DESC];
217 char name[maxname+1];
223 uint16_t apids[MAXAPIDS];
224 char apids_name[MAXAPIDS*4];
235 int (*ecm_callback)(Channel *chan);
247 void clearall(void) {
259 memset(apids, 0, sizeof(uint16_t)*MAXAPIDS);
260 memset(apids_name, 0, sizeof(char)*MAXAPIDS*4);
274 memset(&ecm,0, sizeof(ecm_t));
281 Channel(int cid, char *nam, int ty, int prognr,
282 int vid, int aid, int tid) {
290 strncpy(name, nam, l);
300 cerr <<"Channel " << name << " destroyed" << endl;
304 friend ostream &operator<<(ostream &stream, Channel &x);
305 friend istream &operator>>(istream &stream, Channel &x);
308 int findkey(char *name, char *keys[]);
309 void getname(char *name,istream &ins);