/* $Id: processor.c,v 1.3 2000/04/01 16:22:38 reinelt Exp $ * * main data processing * * Copyright 1999, 2000 by Michael Reinelt (reinelt@eunet.at) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * * $Log: processor.c,v $ * Revision 1.3 2000/04/01 16:22:38 reinelt * * bug that caused a segfault in processor.c fixed (thanks to herp) * * Revision 1.2 2000/03/23 07:24:48 reinelt * * PPM driver up and running (but slow!) * * Revision 1.1 2000/03/22 07:33:50 reinelt * * FAQ added * new modules 'processor.c' contains all data processing * */ /* * exported functions: * * void process_init (void); * does all necessary initializations * * void process (int smooth); * processes a whole screen * bars will always be processed * texts only if smooth=0 * */ #include #include #include #include "cfg.h" #include "system.h" #include "isdn.h" #include "parser.h" #include "display.h" #include "processor.h" #define ROWS 16 char *row[ROWS]; int rows, cols, xres, yres, supported_bars; int token_usage[256]={0,}; struct { int total, used, free, shared, buffer, cache, avail; } ram; struct { double load1, load2, load3, overload; } load; struct { double user, nice, system, idle; } busy; struct { int read, write, total, max, peak; } disk; struct { int rx, tx, total, max, peak; } net; struct { int usage, in, out, total, max, peak; } isdn; struct { double val, min, max; } sensor[SENSORS]; static double query (int token) { switch (token) { case T_MEM_TOTAL: return ram.total; case T_MEM_USED: return ram.used; case T_MEM_FREE: return ram.free; case T_MEM_SHARED: return ram.shared; case T_MEM_BUFFER: return ram.buffer; case T_MEM_CACHE: return ram.cache; case T_MEM_AVAIL: return ram.avail; case T_LOAD_1: return load.load1; case T_LOAD_2: return load.load2; case T_LOAD_3: return load.load3; case T_CPU_USER: return busy.user; case T_CPU_NICE: return busy.nice; case T_CPU_SYSTEM: return busy.system; case T_CPU_BUSY: return 1.0-busy.idle; case T_CPU_IDLE: return busy.idle; case T_DISK_READ: return disk.read; case T_DISK_WRITE: return disk.write; case T_DISK_TOTAL: return disk.total; case T_DISK_MAX: return disk.max; case T_NET_RX: return net.rx; case T_NET_TX: return net.tx; case T_NET_TOTAL: return net.total; case T_NET_MAX: return net.max; case T_ISDN_IN: return isdn.in; case T_ISDN_OUT: return isdn.out; case T_ISDN_TOTAL: return isdn.total; case T_ISDN_MAX: return isdn.max; case T_SENSOR_1: case T_SENSOR_2: case T_SENSOR_3: case T_SENSOR_4: case T_SENSOR_5: case T_SENSOR_6: case T_SENSOR_7: case T_SENSOR_8: case T_SENSOR_9: return sensor[token-T_SENSOR_1+1].val; } return 0.0; } static double query_bar (int token) { int i; double value=query(token); switch (token) { case T_MEM_TOTAL: case T_MEM_USED: case T_MEM_FREE: case T_MEM_SHARED: case T_MEM_BUFFER: case T_MEM_CACHE: case T_MEM_AVAIL: return value/ram.total; case T_LOAD_1: case T_LOAD_2: case T_LOAD_3: return value/load.overload; case T_DISK_READ: case T_DISK_WRITE: case T_DISK_MAX: return value/disk.peak; case T_DISK_TOTAL: return value/disk.peak/2.0; case T_NET_RX: case T_NET_TX: case T_NET_MAX: return value/net.peak;
# UK, Rosemarkie
# Auto-generated from http://www.dtg.org.uk/retailer/dtt_channels.html
# and http://www.ofcom.org.uk/static/reception_advice/index.asp.html
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
T 682167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
T 714167000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
T 633833000 8MHz 2/3 NONE QAM64 2k 1/32 NONE
T 657833000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
T 674167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE
T 706167000 8MHz 3/4 NONE QAM16 2k 1/32 NONE