Files
2024-09-27 15:39:34 +08:00

163 lines
3.6 KiB
C

#ifndef _INC_H
#define _INC_H
#include <string.h>
#include <stdio.h>
#include "../../../mtp3/src/include/mtp3.h"
#include "../../../snmp/src/include/snmp.h"
#include "biccif.h"
#define BICC_VERSION {9, 0, 10, 0}
#define BICC_SCREEN_SIZE 32
#define BICC_TIMER_STOP 0
#define BICC_TIMER_EXPIRED 1
#define BICC_T1 15
#define BICC_T5 300
#define BICC_T7 30
#define BICC_T8 10
#define BICC_T9 120
#define BICC_T12 15
#define BICC_T13 300
#define BICC_T14 15
#define BICC_T15 300
#define BICC_T16 15
#define BICC_T17 300
#define BICC_T18 15
#define BICC_T19 300
#define BICC_T20 15
#define BICC_T21 300
#define BICC_T22 15
#define BICC_T23 300
//#define BICC_T24 1
//#define BICC_T25 1
//#define BICC_T26 60
//#define BICC_T27 240
#define BICC_T28 10
#define BICC_T33 12
#define BICC_T34 2
#define BICC_T35 15
//#define BICC_T36 10
//#define BICC_T37 2
#define BICC_T40 10
#define BICC_T41 10
#define BICC_T42 5
#define BICC_T43 5
#define BICC_USER_T10 10//user defined timer,10s
#define BICC_CIC_IDLE 0
#define BICC_INCOMING 1
#define BICC_OUTGOING 2
#define BICC_RESET 3
#define BICC_TYPE_INCOMING 0
#define BICC_TYPE_OUTGOING 1
#define BICC_TYPE_BIDIRECT 2
#define BICC_ORIG_SUSPEND 0 //originating side suspend
#define BICC_TERM_SUSPEND 1 //terminating side suspend
typedef struct BiccTimer_struct
{
int t1;
int t5;
int t7;
int t8;
int t9;
int t12;
int t13;
int t14;
int t15;
int t16;
int t17;
int t18;
int t19;
int t20;
int t21;
int t22;
int t23;
int t28;
int t33;
int t34;
int t35;
int t40;
int t41;
int t42;
int t43;
int user_t10;
}BiccTimer_struct;
typedef struct BiccMng_struct {
u8 state;
u32 lnk_id;
RangeStatus_struct rangeStatus;
} BiccMng_struct;
typedef struct BiccDebug_struct {
u32 flag;
u8 sap_enable[BICC_SCREEN_SIZE];
u8 sap_cg_num[BICC_SCREEN_SIZE];
//u8 cg_enable[BICC_SCREEN_SIZE];
//u8 network_id[BICC_SCREEN_SIZE];
// page 1 //
u8 cic_enable[BICC_SCREEN_SIZE];
u8 cic_type[BICC_SCREEN_SIZE];
u8 l_block[BICC_SCREEN_SIZE];
u8 r_block[BICC_SCREEN_SIZE];
// page 2 //
u8 cic_status[BICC_SCREEN_SIZE];
u8 cpc_state[BICC_SCREEN_SIZE];
u8 mgbs_state[BICC_SCREEN_SIZE];
u8 mgbr_state[BICC_SCREEN_SIZE];
u8 crs_state[BICC_SCREEN_SIZE];
u8 crr_state[BICC_SCREEN_SIZE];
u8 cgrs_state[BICC_SCREEN_SIZE];
u8 cgrr_state[BICC_SCREEN_SIZE];
// page 3 //
u8 sprc_command[BICC_SCREEN_SIZE];
u8 mgbs_command[BICC_SCREEN_SIZE];
u8 mgbr_command[BICC_SCREEN_SIZE];
u8 crs_command[BICC_SCREEN_SIZE];
u8 crr_command[BICC_SCREEN_SIZE];
u8 cgrs_command[BICC_SCREEN_SIZE];
u8 cgrr_command[BICC_SCREEN_SIZE];
u8 prim_command[BICC_SCREEN_SIZE];
// page 4 //
u8 mng_state;
u8 mng_lnk_id;
} BiccDebug_struct;
typedef struct BiccData_struct
{
BiccDebug_struct debug_data;
BiccMng_struct mng_data;
BiccDmp_struct dmp_data;
BiccTimer_struct timer_data[BICC_MAX_PORT];
//BICC_Fsm_state fsm_data[BICC_MAX_PORT];
BICC_Port_struct port_data[BICC_MAX_PORT];
}BiccData_struct;
typedef struct stat_struct {
// u32 en_cic;
u32 lblo_cic;
u32 rblo_cic;
// u32 in_cic;
// u32 out_cic;
// u32 bi_cic;
u32 idle_call;
u32 in_call;
u32 out_call;
u32 lsus_cic;
u32 rsus_cic;
}stat_struct;
#endif