/* Contest Arbitrator v0.3.2 by Dmitry Gorokh, UR4MCK
This program is freeware!
Cabrillo v.2, v.3, Ermak format description header
*/
#ifndef CABRILLO_H
#define CABRILLO_H
#define CALLSIGN_SIZE 16 /* Maximum size of a hamradio callsign */
#define CHK_SIZE 16 /* Maximum size of check number */
#define CHK_CNT 5 /* Total number of checks */
/* Available operating modes */
static struct {
int id;
char *name;
} mode_type[] = {
{0, "NONE"}, /* Undefined */
{1, "CW"}, /* CW */
{2, "SSB"}, /* SSB */
{3, "DIGI"}, /* Digital modes */
{3, "RTTY"}, /* RTTY (note the same ID with "DIGI") */
/* Reserved: 4-7 */
{8, "MIXED"}, /* Mixed modes */
{8, "ALL"}, /* The same as MIXED */
{0, NULL} /* End of list */
};
/* Available QSO modes */
static struct {
int id;
char *name;
int op_mode;
} qso_mode[] = {
{0, "??", 0}, /* Undefined */
{1, "AM", 3}, /* AMTOR: DIGI */
{2, "AX", 3}, /* PACKET AX25: DIGI */
{3, "CO", 3}, /* CONTESTIA: DIGI */
{4, "CW", 1}, /* CW: CW */
{5, "DO", 3}, /* DOMINO: DIGI */
{6, "FM", 2}, /* FM: SSB (phone) */
{7, "HE", 3}, /* HELLSCHREIBER: DIGI */
{8, "MF", 3}, /* MFSK16: DIGI */
{9, "OL", 3}, /* OLIVIA: DIGI */
{10, "PH", 2}, /* PHONE: SSB */
{11, "PM", 3}, /* PSK63: DIGI */
{12, "PO", 3}, /* PSK125: DIGI */
{13, "PS", 3}, /* PSK31: DIGI */
{14, "PT", 3}, /* PACTOR: DIGI */
{15, "RM", 3}, /* RTTYM: DIGI */
{16, "RY", 3}, /* RTTY: DIGI */
{17, "TH", 3}, /* THROB: DIGI */
{18, "TV", 3}, /* SSTV: DIGI */
{0, NULL, 0} /* End of list */
};
/* Operation types */
static struct {
int id;
char *name;
} operation_type[] = {
{0, "NONE"}, /* Undefined */
{1, "SINGLE-OP"}, /* Sinle operator */
{2, "MULTI-OP"}, /* Many operators */
{3, "MULTIO-OP-2"}, /* Two operators */
/* Reserved: 4-7 */
{8, "CHECKLOG"}, /* Check log */
{0, NULL} /* End of list */
};
/* Band list */ /* TODO: check ranges */
static struct {
int id;
char *name;
unsigned int lo_range; /* in kHz */
unsigned int hi_range; /* in kHz */
} band_list[] = {
{0, "NONE", 0, 0}, /* Undefined/Unknown band */
{1, "160M", 1800, 2000}, /* 160m band (1800...2000 kHz) */
{2, "80M", 3500, 3900}, /* 80m band (3500...3900 kHz) */
{3, "40M", 7000, 7200}, /* 40m band (7000...7200 kHz) */
{4, "20M", 14000, 14350}, /* 20m band (14000...14350 kHz) */
{5, "15M", 21000, 21450}, /* 15m band (21000...21450 kHz) */
{6, "10M", 28000, 30000}, /* 10m band (28000...30000 kHz) */
{7, "6M", 50000, 56000}, /* 6m band (50...56 MHz) */
{8, "2M", 144000, 146000}, /* 2m band (144...146 MHz) */
{9, "222", 222000, 223000}, /* 222 Mhz band (222...223 MHz) */
{10, "432", 430000, 440000}, /* 432 Mhz band (430...440 MHz) */
{11, "902", 902000, 903000}, /* 902 Mhz band (902...903 MHz) */
{12, "1.2G", 1200000, 1300000}, /* 1.2 Ghz band (1200...1300 MHz) */
{13, "2.3G", 2300000, 2450000}, /* 2.3 Ghz band (2300...2450 MHz) */
{14, "3.4G", 3400000, 3500000}, /* 3.4 Ghz band (3400...3500 MHz) */
{15, "5.7G", 5600000, 5800000}, /* 5.7 Ghz band (5600...5800 MHz) */
{16, "10G", 10000000, 11000000}, /* 10 Ghz band (10...10.1 GHz) */
{17, "24G", 24000000, 25000000}, /* 24 Ghz band (24...25 GHz) */
{18, "47G", 47000000, 48000000}, /* 47 Ghz band (47...48 GHz) */
{19, "75G", 75000000, 76000000}, /* 75 Ghz band (75...76 GHz) */
{20, "119G", 119000000, 120000000}, /* 119 Ghz band (119...120 GHz) */
{21, "142G", 142000000, 143000000}, /* 142 Ghz band (142...143 GHz) */
{22, "241G", 241000000, 242000000}, /* 241 Ghz band (241...242 GHz) */
/* Reserved: 23-31 */
{32, "Light", ~(0), ~(0)}, /* Light band */
/* Reserved: 33-127 */
{128, "ALL", 0, ~(0)}, /* All bands */
{0, NULL, 0, 0} /* End of list */
};
/* Power types */
static struct {
int id;
char *name;
unsigned int max_output; /* mW */
} power_type[] = {
{0, "NONE", 0}, /* Unknown/Undefined power type */
{1, "HIGH", ~(0)}, /* High power (> 100W) */
{2, "LOW", 100000}, /* Low power (< 100W) */
{3, "QRP", 5000}, /* QRP (<= 5W) */
{0, NULL, 0} /* End of list */
};
/* Assistment types */
static struct {
int id;
char *name;
} assistment_type[] = {
{0, "NONE"}, /* Undefined */
{1, "ASSISTED"}, /* Assisted operator */
{2, "NON-ASSISTED"}, /* Non assisted operator */
{0, NULL} /* End of list */
};
/* Transmitter types */
static struct {
int id;
char *name;
} tx_type[] = {
{0, "NONE"}, /* Undefined */
{1, "ONE"}, /* 1 transmitter */
{2, "TWO"}, /* 2 transmitters */
{3, "LIMITED"}, /* Limited number of transmitters */
{4, "UNLIMITED"}, /* Unlimited number of transmitters */
/* Reserved: 5-7 */
{8, "SWL"}, /* Short Wave Listeners */
{0, NULL} /* End of list */
};
/* Station types */
static struct {
int id;
char *name;
} station_type[] = {
{0, "NONE"}, /* Undefined */
{1, "FIXED"}, /* Fixed station */
{2, "MOBILE"}, /* Mobile station */
{3, "PORTABLE"}, /* Portable station */
{4, "ROVER"}, /* Station based on rover */
{5, "EXPEDITION"}, /* DXpedition */
{6, "HQ"}, /* Club's high quarter */
{7, "SCHOOL"}, /* School station */
{0, NULL} /* End of list */
};
/* Time types */
static struct {
int id;
char *name;
} time_type[] = {
{0, "NONE"}, /* Undefined */
{1, "6-HOURS"}, /* 6 hours operation */
{2, "12-HOURS"}, /* 12 hours operation */
{3, "24-HOURS"}, /* 24 hours operation */
{0, NULL} /* End of list */
};
/* Overlay types */
static struct {
int id;
char *name;
} overlay_type[] = {
{0, "NONE"}, /* Undefined */
{1, "YL"}, /* Young ladies */
{2, "JR"}, /* Juniors (general) */
{3, "JR-13"}, /* Juniors (13 years old or less) */
{4, "JR-15"}, /* Juniors (15 years old or less) */
{5, "JR-18"}, /* Juniors (18 years old or less) */
{6, "JR-19"}, /* Juniors (19 years old or less) */
{7, "VETERAN"}, /* Veterans */
{8, "SPECIAL"}, /* Special station */
{9, "OVER-50"}, /* Ham with experience of 50 years or more */
{10, "OVER-100"}, /* Ham with sum of experience and age of 100 years or more */
{11, "POLAR"}, /* Polar station */
{12, "ROOKIE"}, /* from Cabrillo v2 */
{13, "BAND-LIMITED"}, /* from Cabrillo v2 */
{14, "TB-WIRES"}, /* from Cabrillo v2 */
{15, "HQ"}, /* from Cabrillo v2 */
{0, NULL} /* End of list */
};
int cabrillo_init(void);
void unresolved_free(void);
int unresolved_get(int id);
char *get_qso_mode(int id);
char *get_mode(int id);
char *get_band(int id);
char *get_optype(int id);
int mode_type2id(int type);
int band(unsigned int freq);
#endif