2024-04-01 18:21:09 +01:00
|
|
|
#ifndef REPEATER_H
|
|
|
|
#define REPEATER_H
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
SLEEP,
|
|
|
|
IDLE,
|
|
|
|
KEYCHUNK,
|
|
|
|
HANG,
|
|
|
|
GW,
|
|
|
|
TT,
|
|
|
|
TOT,
|
|
|
|
}state;
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
TONE,
|
|
|
|
CW,
|
|
|
|
}c_type;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
c_type courtesy;
|
2024-04-06 19:10:18 +01:00
|
|
|
int cw_pitch;
|
|
|
|
int cw_speed;
|
|
|
|
int pip_length;
|
|
|
|
char pip_letter;
|
|
|
|
int pip_pitch;
|
|
|
|
int pip_speed;
|
|
|
|
int pip_gw_length;
|
|
|
|
char pip_gw_letter;
|
|
|
|
int pip_gw_pitch;
|
2024-04-01 18:21:09 +01:00
|
|
|
}params;
|
|
|
|
|
|
|
|
typedef struct {
|
2024-04-06 19:10:18 +01:00
|
|
|
bool tx;
|
2024-04-01 18:21:09 +01:00
|
|
|
unsigned long long tx_time;
|
|
|
|
}transmitter;
|
|
|
|
|
|
|
|
typedef struct {
|
2024-04-06 19:10:18 +01:00
|
|
|
int id;
|
|
|
|
bool rx;
|
2024-04-01 18:21:09 +01:00
|
|
|
unsigned long long rx_time;
|
|
|
|
}receiver;
|
|
|
|
|
|
|
|
typedef struct {
|
2024-04-06 19:10:18 +01:00
|
|
|
bool enable;
|
|
|
|
unsigned long speed;
|
|
|
|
}serial;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
bool enable;
|
|
|
|
receiver receiver;
|
2024-04-01 18:21:09 +01:00
|
|
|
transmitter transmitter;
|
|
|
|
}gateway;
|
|
|
|
|
|
|
|
typedef struct {
|
2024-04-06 19:10:18 +01:00
|
|
|
char* callsign;
|
|
|
|
gateway gateway;
|
2024-04-01 18:21:09 +01:00
|
|
|
unsigned long id_time;
|
2024-04-06 19:10:18 +01:00
|
|
|
state last;
|
|
|
|
params params;
|
|
|
|
receiver receiver;
|
|
|
|
serial serial;
|
|
|
|
state state;
|
|
|
|
transmitter transmitter;
|
2024-04-01 18:21:09 +01:00
|
|
|
}repeater;
|
|
|
|
|
|
|
|
#endif
|