⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bs_fsm.c

📁 wimax bs模拟器
💻 C
📖 第 1 页 / 共 2 页
字号:
#include <vxWorks.h>
#include <stdio.h>
#include "global.h"
#include "common.h"
#include "r64_message.h"
#include "r64_message_ie.h"
#include "bs_common.h"

#include "bs_ue.h"
#include "bs_msghandle.h"
#include "bs_fsm.h"

#define BS_FSM_NORMAL   0
#define BS_FSM_ABNORMAL 1
#define BS_FSM_ERROR    2

typedef int (*BS_FSM_SIGNAL)(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
typedef struct _BS_FSM_NODE{
    int i_state;
    int i_event;
    BS_FSM_SIGNAL fsm_routine;
    int i_attribute;
}BS_FSM_NODE;

typedef struct _BS_FSM_MATRIX{
    BS_FSM_SIGNAL fsm_routine;
    int i_attribute;
}BS_FSM_MATRIX;

int bs_fsm_state_BSFS_NULL_event_BSFE_INIT_CALL(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);

int bs_fsm_state_BSFS_SBC_NEGOTIATING_event_BSFE_SBC_ENTRY_STATE_CHANGE_RESP(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_SBC_NEGOTIATING_event_BSFE_ERR_REP(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_SBC_NEGOTIATING_event_BSFE_TIME_OUT(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);

int bs_fsm_state_BSFS_EAP_INITIATE_event_BSFE_EAP_IDENTITY_REQ(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_EAP_INITIATE_event_BSFE_ERR_REP(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_EAP_INITIATE_event_BSFE_TIME_OUT(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);

int bs_fsm_state_BSFS_EAP_START_event_BSFE_EAP_IDENTITY_REQ(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_EAP_START_event_BSFE_EAP_MESSAGE(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_EAP_START_event_BSFE_ERR_REP(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_EAP_START_event_BSFE_TIME_OUT(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);

int bs_fsm_state_BSFS_EAP_PENDING_event_BSFE_EAP_MESSAGE(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_EAP_PENDING_event_BSFE_EAP_CTXT_REP(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_EAP_PENDING_event_BSFE_ERR_REP(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_EAP_PENDING_event_BSFE_TIME_OUT(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);

int bs_fsm_state_BSFS_EAP_COMPLETE_event_BSFE_REG_ENTRY_STATE_CHANGE_RESP(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_EAP_COMPLETE_event_BSFE_ERR_REP(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_EAP_COMPLETE_event_BSFE_TIME_OUT(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);

int bs_fsm_state_BSFS_MS_REG_PENDING_event_BSFE_DP_REG_REQ(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_MS_REG_PENDING_event_BSFE_ERR_REP(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_MS_REG_PENDING_event_BSFE_TIME_OUT(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);

int bs_fsm_state_BSFS_DP_EST_PENDING_event_BSFE_DP_REG_REQ(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_DP_EST_PENDING_event_BSFE_DP_REG_ACK(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_DP_EST_PENDING_event_BSFE_ERR_REP(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_DP_EST_PENDING_event_BSFE_TIME_OUT(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);

int bs_fsm_state_BSFS_DATA_TRANSFER_event_BSFE_INIT_DEREG(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_DATA_TRANSFER_event_BSFE_ERR_REP(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);

int bs_fsm_state_BSFS_DP_DEREG_START_event_BSFE_DP_DEREG_RESP(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_DP_DEREG_START_event_BSFE_ERR_REP(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);
int bs_fsm_state_BSFS_DP_DEREG_START_event_BSFE_TIME_OUT(St_BsUeCtxt *pUeCtxt, R64_MSG_S * pR64Msg);

int bs_fsm_show_stat();
int bs_fsm_clear_stat();
int bs_fsm_show_state_name();
int bs_fsm_show_event_name();
int bs_fsm_show_state_event_relation();
int bs_fsm_help();

char * gp_str_bs_fsm_state[] = {
    "BSFS_NULL",
    "BSFS_SBC_NEGOTIATING",
    "BSFS_EAP_INITIATE",
    "BSFS_EAP_START",
    "BSFS_EAP_PENDING",
    "BSFS_EAP_COMPLETE",
    "BSFS_MS_REG_PENDING",
    "BSFS_DP_EST_PENDING",
    "BSFS_DATA_TRANSFER",
    "BSFS_DP_DEREG_START",
    NULL
};

char * gp_str_bs_fsm_event[] = {
    "BSFE_INIT_CALL",
    "BSFE_SBC_ENTRY_STATE_CHANGE_RESP",
    "BSFE_EAP_IDENTITY_REQ",
    "BSFE_EAP_MESSAGE",
    "BSFE_EAP_CTXT_REP",
    "BSFE_REG_ENTRY_STATE_CHANGE_RESP",
    "BSFE_DP_REG_REQ",
    "BSFE_DP_REG_ACK",
    "BSFE_INIT_DEREG",
    "BSFE_DP_DEREG_RESP",
    "BSFE_ERR_REP",
    "BSFE_TIME_OUT",
    NULL
};

/* The attribute is needed to modify according to application requirement. */
BS_FSM_NODE ga_bs_fsm[]={
    {BSFS_NULL,	BSFE_INIT_CALL,	bs_fsm_state_BSFS_NULL_event_BSFE_INIT_CALL,	BS_FSM_NORMAL}, 

    {BSFS_SBC_NEGOTIATING,	BSFE_SBC_ENTRY_STATE_CHANGE_RESP,	bs_fsm_state_BSFS_SBC_NEGOTIATING_event_BSFE_SBC_ENTRY_STATE_CHANGE_RESP,	BS_FSM_NORMAL}, 
    {BSFS_SBC_NEGOTIATING,	BSFE_ERR_REP,	bs_fsm_state_BSFS_SBC_NEGOTIATING_event_BSFE_ERR_REP,	BS_FSM_NORMAL}, 
    {BSFS_SBC_NEGOTIATING,	BSFE_TIME_OUT,	bs_fsm_state_BSFS_SBC_NEGOTIATING_event_BSFE_TIME_OUT,	BS_FSM_ABNORMAL}, 

    {BSFS_EAP_INITIATE,	BSFE_EAP_IDENTITY_REQ,	bs_fsm_state_BSFS_EAP_INITIATE_event_BSFE_EAP_IDENTITY_REQ,	BS_FSM_NORMAL}, 
    {BSFS_EAP_INITIATE,	BSFE_ERR_REP,	bs_fsm_state_BSFS_EAP_INITIATE_event_BSFE_ERR_REP,	BS_FSM_NORMAL}, 
    {BSFS_EAP_INITIATE,	BSFE_TIME_OUT,	bs_fsm_state_BSFS_EAP_INITIATE_event_BSFE_TIME_OUT,	BS_FSM_ABNORMAL}, 

    {BSFS_EAP_START,	BSFE_EAP_IDENTITY_REQ,	bs_fsm_state_BSFS_EAP_START_event_BSFE_EAP_IDENTITY_REQ,	BS_FSM_NORMAL}, 
    {BSFS_EAP_START,	BSFE_EAP_MESSAGE,	bs_fsm_state_BSFS_EAP_START_event_BSFE_EAP_MESSAGE,	BS_FSM_NORMAL}, 
    {BSFS_EAP_START,	BSFE_ERR_REP,	bs_fsm_state_BSFS_EAP_START_event_BSFE_ERR_REP,	BS_FSM_NORMAL}, 
    {BSFS_EAP_START,	BSFE_TIME_OUT,	bs_fsm_state_BSFS_EAP_START_event_BSFE_TIME_OUT,	BS_FSM_ABNORMAL}, 

    {BSFS_EAP_PENDING,	BSFE_EAP_MESSAGE,	bs_fsm_state_BSFS_EAP_PENDING_event_BSFE_EAP_MESSAGE,	BS_FSM_NORMAL}, 
    {BSFS_EAP_PENDING,	BSFE_EAP_CTXT_REP,	bs_fsm_state_BSFS_EAP_PENDING_event_BSFE_EAP_CTXT_REP,	BS_FSM_NORMAL}, 
    {BSFS_EAP_PENDING,	BSFE_ERR_REP,	bs_fsm_state_BSFS_EAP_PENDING_event_BSFE_ERR_REP,	BS_FSM_NORMAL}, 
    {BSFS_EAP_PENDING,	BSFE_TIME_OUT,	bs_fsm_state_BSFS_EAP_PENDING_event_BSFE_TIME_OUT,	BS_FSM_ABNORMAL}, 

    {BSFS_EAP_COMPLETE,	BSFE_REG_ENTRY_STATE_CHANGE_RESP,	bs_fsm_state_BSFS_EAP_COMPLETE_event_BSFE_REG_ENTRY_STATE_CHANGE_RESP,	BS_FSM_NORMAL}, 
    {BSFS_EAP_COMPLETE,	BSFE_ERR_REP,	bs_fsm_state_BSFS_EAP_COMPLETE_event_BSFE_ERR_REP,	BS_FSM_NORMAL}, 
    {BSFS_EAP_COMPLETE,	BSFE_TIME_OUT,	bs_fsm_state_BSFS_EAP_COMPLETE_event_BSFE_TIME_OUT,	BS_FSM_ABNORMAL}, 

    {BSFS_MS_REG_PENDING,	BSFE_DP_REG_REQ,	bs_fsm_state_BSFS_MS_REG_PENDING_event_BSFE_DP_REG_REQ,	BS_FSM_NORMAL}, 
    {BSFS_MS_REG_PENDING,	BSFE_ERR_REP,	bs_fsm_state_BSFS_MS_REG_PENDING_event_BSFE_ERR_REP,	BS_FSM_NORMAL}, 
    {BSFS_MS_REG_PENDING,	BSFE_TIME_OUT,	bs_fsm_state_BSFS_MS_REG_PENDING_event_BSFE_TIME_OUT,	BS_FSM_ABNORMAL}, 

    {BSFS_DP_EST_PENDING,	BSFE_DP_REG_REQ,	bs_fsm_state_BSFS_DP_EST_PENDING_event_BSFE_DP_REG_REQ,	BS_FSM_NORMAL}, 
    {BSFS_DP_EST_PENDING,	BSFE_DP_REG_ACK,	bs_fsm_state_BSFS_DP_EST_PENDING_event_BSFE_DP_REG_ACK,	BS_FSM_NORMAL}, 
    {BSFS_DP_EST_PENDING,	BSFE_ERR_REP,	bs_fsm_state_BSFS_DP_EST_PENDING_event_BSFE_ERR_REP,	BS_FSM_NORMAL}, 
    {BSFS_DP_EST_PENDING,	BSFE_TIME_OUT,	bs_fsm_state_BSFS_DP_EST_PENDING_event_BSFE_TIME_OUT,	BS_FSM_ABNORMAL}, 

    {BSFS_DATA_TRANSFER,	BSFE_INIT_DEREG,	bs_fsm_state_BSFS_DATA_TRANSFER_event_BSFE_INIT_DEREG,	BS_FSM_NORMAL}, 
    {BSFS_DATA_TRANSFER,	BSFE_ERR_REP,	bs_fsm_state_BSFS_DATA_TRANSFER_event_BSFE_ERR_REP,	BS_FSM_NORMAL}, 

    {BSFS_DP_DEREG_START,	BSFE_DP_DEREG_RESP,	bs_fsm_state_BSFS_DP_DEREG_START_event_BSFE_DP_DEREG_RESP,	BS_FSM_NORMAL}, 
    {BSFS_DP_DEREG_START,	BSFE_ERR_REP,	bs_fsm_state_BSFS_DP_DEREG_START_event_BSFE_ERR_REP,	BS_FSM_NORMAL}, 
    {BSFS_DP_DEREG_START,	BSFE_TIME_OUT,	bs_fsm_state_BSFS_DP_DEREG_START_event_BSFE_TIME_OUT,	BS_FSM_ABNORMAL}

};

BS_FSM_MATRIX ga_bs_fsm_matrix[BS_FSM_NUM_STATES * BS_FSM_NUM_EVENTS];
unsigned long ga_bs_fsm_stat[BS_FSM_NUM_STATES][BS_FSM_NUM_EVENTS] = {{0}};

int bs_fsm_init()
{
    int i;
    for (i=0; i<BS_FSM_NUM_STATES * BS_FSM_NUM_EVENTS; i++)
    {
        ga_bs_fsm_matrix[i].fsm_routine = NULL;
        ga_bs_fsm_matrix[i].i_attribute = BS_FSM_ERROR;
    }

    for (i=0; i<sizeof(ga_bs_fsm)/sizeof(BS_FSM_NODE); i++)
    {
        ga_bs_fsm_matrix[(ga_bs_fsm[i].i_state-1) * BS_FSM_NUM_EVENTS + ga_bs_fsm[i].i_event - 1].fsm_routine = ga_bs_fsm[i].fsm_routine;
        ga_bs_fsm_matrix[(ga_bs_fsm[i].i_state-1) * BS_FSM_NUM_EVENTS + ga_bs_fsm[i].i_event - 1].i_attribute = ga_bs_fsm[i].i_attribute;
    }

    return SUCCESS;
}

int bs_fsm_show_state_name()
{
    int i;

    for (i=0; i<BS_FSM_NUM_STATES; i++)
    {
        printf("%s\n", gp_str_bs_fsm_state[i]);
    }
    return 0;
}

int bs_fsm_show_event_name()
{
    int i;

    for (i=0; i<BS_FSM_NUM_EVENTS; i++)
    {
        printf("%s\n", gp_str_bs_fsm_event[i]);
    }
    return 0;
}

int bs_fsm_show_state_event_relation()
{
    printf("BSFS_NULL,	BSFE_INIT_CALL,	bs_fsm_state_BSFS_NULL_event_BSFE_INIT_CALL, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_NULL-1) * BS_FSM_NUM_EVENTS + BSFE_INIT_CALL - 1].i_attribute);
    printf("\n");

    printf("BSFS_SBC_NEGOTIATING,	BSFE_SBC_ENTRY_STATE_CHANGE_RESP,	bs_fsm_state_BSFS_SBC_NEGOTIATING_event_BSFE_SBC_ENTRY_STATE_CHANGE_RESP, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_SBC_NEGOTIATING-1) * BS_FSM_NUM_EVENTS + BSFE_SBC_ENTRY_STATE_CHANGE_RESP - 1].i_attribute);
    printf("BSFS_SBC_NEGOTIATING,	BSFE_ERR_REP,	bs_fsm_state_BSFS_SBC_NEGOTIATING_event_BSFE_ERR_REP, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_SBC_NEGOTIATING-1) * BS_FSM_NUM_EVENTS + BSFE_ERR_REP - 1].i_attribute);
    printf("BSFS_SBC_NEGOTIATING,	BSFE_TIME_OUT,	bs_fsm_state_BSFS_SBC_NEGOTIATING_event_BSFE_TIME_OUT, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_SBC_NEGOTIATING-1) * BS_FSM_NUM_EVENTS + BSFE_TIME_OUT - 1].i_attribute);
    printf("\n");

    printf("BSFS_EAP_INITIATE,	BSFE_EAP_IDENTITY_REQ,	bs_fsm_state_BSFS_EAP_INITIATE_event_BSFE_EAP_IDENTITY_REQ, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_EAP_INITIATE-1) * BS_FSM_NUM_EVENTS + BSFE_EAP_IDENTITY_REQ - 1].i_attribute);
    printf("BSFS_EAP_INITIATE,	BSFE_ERR_REP,	bs_fsm_state_BSFS_EAP_INITIATE_event_BSFE_ERR_REP, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_EAP_INITIATE-1) * BS_FSM_NUM_EVENTS + BSFE_ERR_REP - 1].i_attribute);
    printf("BSFS_EAP_INITIATE,	BSFE_TIME_OUT,	bs_fsm_state_BSFS_EAP_INITIATE_event_BSFE_TIME_OUT, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_EAP_INITIATE-1) * BS_FSM_NUM_EVENTS + BSFE_TIME_OUT - 1].i_attribute);
    printf("\n");

    printf("BSFS_EAP_START,	BSFE_EAP_IDENTITY_REQ,	bs_fsm_state_BSFS_EAP_START_event_BSFE_EAP_IDENTITY_REQ, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_EAP_START-1) * BS_FSM_NUM_EVENTS + BSFE_EAP_IDENTITY_REQ - 1].i_attribute);
    printf("BSFS_EAP_START,	BSFE_EAP_MESSAGE,	bs_fsm_state_BSFS_EAP_START_event_BSFE_EAP_MESSAGE, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_EAP_START-1) * BS_FSM_NUM_EVENTS + BSFE_EAP_MESSAGE - 1].i_attribute);
    printf("BSFS_EAP_START,	BSFE_ERR_REP,	bs_fsm_state_BSFS_EAP_START_event_BSFE_ERR_REP, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_EAP_START-1) * BS_FSM_NUM_EVENTS + BSFE_ERR_REP - 1].i_attribute);
    printf("BSFS_EAP_START,	BSFE_TIME_OUT,	bs_fsm_state_BSFS_EAP_START_event_BSFE_TIME_OUT, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_EAP_START-1) * BS_FSM_NUM_EVENTS + BSFE_TIME_OUT - 1].i_attribute);
    printf("\n");

    printf("BSFS_EAP_PENDING,	BSFE_EAP_MESSAGE,	bs_fsm_state_BSFS_EAP_PENDING_event_BSFE_EAP_MESSAGE, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_EAP_PENDING-1) * BS_FSM_NUM_EVENTS + BSFE_EAP_MESSAGE - 1].i_attribute);
    printf("BSFS_EAP_PENDING,	BSFE_EAP_CTXT_REP,	bs_fsm_state_BSFS_EAP_PENDING_event_BSFE_EAP_CTXT_REP, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_EAP_PENDING-1) * BS_FSM_NUM_EVENTS + BSFE_EAP_CTXT_REP - 1].i_attribute);
    printf("BSFS_EAP_PENDING,	BSFE_ERR_REP,	bs_fsm_state_BSFS_EAP_PENDING_event_BSFE_ERR_REP, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_EAP_PENDING-1) * BS_FSM_NUM_EVENTS + BSFE_ERR_REP - 1].i_attribute);
    printf("BSFS_EAP_PENDING,	BSFE_TIME_OUT,	bs_fsm_state_BSFS_EAP_PENDING_event_BSFE_TIME_OUT, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_EAP_PENDING-1) * BS_FSM_NUM_EVENTS + BSFE_TIME_OUT - 1].i_attribute);
    printf("\n");

    printf("BSFS_EAP_COMPLETE,	BSFE_REG_ENTRY_STATE_CHANGE_RESP,	bs_fsm_state_BSFS_EAP_COMPLETE_event_BSFE_REG_ENTRY_STATE_CHANGE_RESP, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_EAP_COMPLETE-1) * BS_FSM_NUM_EVENTS + BSFE_REG_ENTRY_STATE_CHANGE_RESP - 1].i_attribute);
    printf("BSFS_EAP_COMPLETE,	BSFE_ERR_REP,	bs_fsm_state_BSFS_EAP_COMPLETE_event_BSFE_ERR_REP, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_EAP_COMPLETE-1) * BS_FSM_NUM_EVENTS + BSFE_ERR_REP - 1].i_attribute);
    printf("BSFS_EAP_COMPLETE,	BSFE_TIME_OUT,	bs_fsm_state_BSFS_EAP_COMPLETE_event_BSFE_TIME_OUT, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_EAP_COMPLETE-1) * BS_FSM_NUM_EVENTS + BSFE_TIME_OUT - 1].i_attribute);
    printf("\n");

    printf("BSFS_MS_REG_PENDING,	BSFE_DP_REG_REQ,	bs_fsm_state_BSFS_MS_REG_PENDING_event_BSFE_DP_REG_REQ, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_MS_REG_PENDING-1) * BS_FSM_NUM_EVENTS + BSFE_DP_REG_REQ - 1].i_attribute);
    printf("BSFS_MS_REG_PENDING,	BSFE_ERR_REP,	bs_fsm_state_BSFS_MS_REG_PENDING_event_BSFE_ERR_REP, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_MS_REG_PENDING-1) * BS_FSM_NUM_EVENTS + BSFE_ERR_REP - 1].i_attribute);
    printf("BSFS_MS_REG_PENDING,	BSFE_TIME_OUT,	bs_fsm_state_BSFS_MS_REG_PENDING_event_BSFE_TIME_OUT, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_MS_REG_PENDING-1) * BS_FSM_NUM_EVENTS + BSFE_TIME_OUT - 1].i_attribute);
    printf("\n");

    printf("BSFS_DP_EST_PENDING,	BSFE_DP_REG_REQ,	bs_fsm_state_BSFS_DP_EST_PENDING_event_BSFE_DP_REG_REQ, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_DP_EST_PENDING-1) * BS_FSM_NUM_EVENTS + BSFE_DP_REG_REQ - 1].i_attribute);
    printf("BSFS_DP_EST_PENDING,	BSFE_DP_REG_ACK,	bs_fsm_state_BSFS_DP_EST_PENDING_event_BSFE_DP_REG_ACK, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_DP_EST_PENDING-1) * BS_FSM_NUM_EVENTS + BSFE_DP_REG_ACK - 1].i_attribute);
    printf("BSFS_DP_EST_PENDING,	BSFE_ERR_REP,	bs_fsm_state_BSFS_DP_EST_PENDING_event_BSFE_ERR_REP, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_DP_EST_PENDING-1) * BS_FSM_NUM_EVENTS + BSFE_ERR_REP - 1].i_attribute);
    printf("BSFS_DP_EST_PENDING,	BSFE_TIME_OUT,	bs_fsm_state_BSFS_DP_EST_PENDING_event_BSFE_TIME_OUT, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_DP_EST_PENDING-1) * BS_FSM_NUM_EVENTS + BSFE_TIME_OUT - 1].i_attribute);
    printf("\n");

    printf("BSFS_DATA_TRANSFER,	BSFE_INIT_DEREG,	bs_fsm_state_BSFS_DATA_TRANSFER_event_BSFE_INIT_DEREG, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_DATA_TRANSFER-1) * BS_FSM_NUM_EVENTS + BSFE_INIT_DEREG - 1].i_attribute);
    printf("BSFS_DATA_TRANSFER,	BSFE_ERR_REP,	bs_fsm_state_BSFS_DATA_TRANSFER_event_BSFE_ERR_REP, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_DATA_TRANSFER-1) * BS_FSM_NUM_EVENTS + BSFE_ERR_REP - 1].i_attribute);
    printf("\n");

    printf("BSFS_DP_DEREG_START,	BSFE_DP_DEREG_RESP,	bs_fsm_state_BSFS_DP_DEREG_START_event_BSFE_DP_DEREG_RESP, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_DP_DEREG_START-1) * BS_FSM_NUM_EVENTS + BSFE_DP_DEREG_RESP - 1].i_attribute);
    printf("BSFS_DP_DEREG_START,	BSFE_ERR_REP,	bs_fsm_state_BSFS_DP_DEREG_START_event_BSFE_ERR_REP, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_DP_DEREG_START-1) * BS_FSM_NUM_EVENTS + BSFE_ERR_REP - 1].i_attribute);
    printf("BSFS_DP_DEREG_START,	BSFE_TIME_OUT,	bs_fsm_state_BSFS_DP_DEREG_START_event_BSFE_TIME_OUT, Attribute = %d\n", 
        ga_bs_fsm_matrix[(BSFS_DP_DEREG_START-1) * BS_FSM_NUM_EVENTS + BSFE_TIME_OUT - 1].i_attribute);
    printf("\n");

    return 0;
}

int bs_fsm_show_stat()

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -