m0zah/GB3TX/repeater.h

92 lines
1.4 KiB
C
Raw Permalink Normal View History

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,
2024-05-06 11:28:43 +01:00
NONE,
2024-04-01 18:21:09 +01:00
}c_type;
typedef struct {
c_type courtesy;
2024-05-06 11:28:43 +01:00
int close_down;
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-05-06 11:28:43 +01:00
int start_up;
2024-04-01 18:21:09 +01:00
}params;
2024-05-06 11:28:43 +01:00
typedef struct {
unsigned long tx_start;
unsigned long rx_start;
unsigned long gw_start;
}timer;
typedef struct {
unsigned long tx_time;
unsigned long rx_time;
unsigned long gw_time;
}stats;
2024-04-01 18:21:09 +01:00
typedef struct {
bool tx;
2024-04-01 18:21:09 +01:00
unsigned long long tx_time;
}transmitter;
typedef struct {
int id;
bool rx;
2024-04-01 18:21:09 +01:00
unsigned long long rx_time;
}receiver;
typedef struct {
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 {
char* callsign;
gateway gateway;
2024-04-01 18:21:09 +01:00
unsigned long id_time;
state last;
params params;
receiver receiver;
serial serial;
2024-05-06 11:28:43 +01:00
stats stats;
state state;
2024-05-06 11:28:43 +01:00
timer timer;
transmitter transmitter;
2024-04-17 20:30:32 +01:00
unsigned long tail;
2024-04-01 18:21:09 +01:00
}repeater;
2024-05-06 11:28:43 +01:00
typedef struct {
byte type;
stats* stats;
bool transmitter;
bool receiver;
bool gateway;
}info;
2024-04-01 18:21:09 +01:00
#endif