C-Netz: Move transaction routines to seperate file
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "../common/sender.h"
|
||||
#include "fsk_fm_demod.h"
|
||||
#include "scrambler.h"
|
||||
#include "transaction.h"
|
||||
|
||||
#define CNETZ_OGK_KANAL 131
|
||||
|
||||
@@ -27,31 +28,6 @@ enum cnetz_state {
|
||||
CNETZ_BUSY, /* currently processing a call, no other transaction allowed */
|
||||
};
|
||||
|
||||
/* login to the network */
|
||||
#define TRANS_EM (1 << 0) /* attach request received, sending reply */
|
||||
/* roaming to different base station/network */
|
||||
#define TRANS_UM (1 << 1) /* roaming request received, sending reply */
|
||||
/* check if phone is still on */
|
||||
#define TRANS_MA (1 << 2) /* periodic online check, waiting for time slot to send order */
|
||||
#define TRANS_MFT (1 << 3) /* periodic online check sent, waiting for reply */
|
||||
/* mobile originated call */
|
||||
#define TRANS_VWG (1 << 4) /* received dialing request, waiting for time slot to send dial order */
|
||||
#define TRANS_WAF (1 << 5) /* dial order sent, waiting for dialing */
|
||||
#define TRANS_WBP (1 << 6) /* dialing received, waiting for time slot to acknowledge call */
|
||||
#define TRANS_WBN (1 << 7) /* dialing received, waiting for time slot to reject call */
|
||||
#define TRANS_VAG (1 << 8) /* establishment of call sent, switching channel */
|
||||
/* mobile terminated call */
|
||||
#define TRANS_VAK (1 << 9) /* establishment of call sent, switching channel */
|
||||
/* traffic channel */
|
||||
#define TRANS_BQ (1 << 10) /* accnowledge channel */
|
||||
#define TRANS_VHQ (1 << 11) /* hold call */
|
||||
#define TRANS_RTA (1 << 12) /* hold call and make the phone ring */
|
||||
#define TRANS_DS (1 << 13) /* establish speech connection */
|
||||
#define TRANS_AHQ (1 << 14) /* establish speech connection after answer */
|
||||
/* release */
|
||||
#define TRANS_AF (1 << 15) /* release connection by base station */
|
||||
#define TRANS_AT (1 << 16) /* release connection by mobile station */
|
||||
|
||||
/* timers */
|
||||
#define F_BQ 8 /* number of not received frames at BQ state */
|
||||
#define F_VHQK 16 /* number of not received frames at VHQ state during concentrated signalling */
|
||||
@@ -69,22 +45,6 @@ enum cnetz_state {
|
||||
struct cnetz;
|
||||
struct telegramm;
|
||||
|
||||
typedef struct transaction {
|
||||
struct transaction *next; /* pointer to next node in list */
|
||||
struct cnetz *cnetz; /* pointer to cnetz instance */
|
||||
uint8_t futln_nat; /* current station ID (3 values) */
|
||||
uint8_t futln_fuvst;
|
||||
uint16_t futln_rest;
|
||||
char dialing[17]; /* number dialed by the phone */
|
||||
int32_t state; /* state of transaction */
|
||||
int8_t release_cause; /* reason for release, (c-netz coding) */
|
||||
int count; /* counts resending things */
|
||||
struct timer timer; /* for varous timeouts */
|
||||
int mo_call; /* flags a moile originating call */
|
||||
int mt_call; /* flags a moile terminating call */
|
||||
int ma_failed; /* failed to get a response from MS */
|
||||
} transaction_t;
|
||||
|
||||
struct clock_speed {
|
||||
double meas_ti; /* time stamp for measurement interval */
|
||||
double start_ti[4]; /* time stamp for start of counting */
|
||||
|
Reference in New Issue
Block a user