[go: up one dir, main page]

Menu

[8a2cb6]: / cabrillo.h  Maximize  Restore  History

Download this file

211 lines (195 with data), 6.9 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
/* 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