add comment.

This commit is contained in:
Gatsby Van
2024-01-22 11:39:35 +08:00
parent deb7433735
commit 3fb8b7622c
+21 -1
View File
@@ -181,7 +181,7 @@ static int PduHeader_Packing(L2_INST *instPtr, BIT_ARRAY *bitarr, L2_PDU_HEADER_
******************************************************************************/
int32_t L2_Service_Init(L2_SVC_FSM **serviceFSM)
{
(*serviceFSM) = (L2_SVC_FSM *)malloc(sizeof(L2_SVC_FSM));
*serviceFSM = (L2_SVC_FSM *)malloc(sizeof(L2_SVC_FSM));
if (*serviceFSM == NULL)
{
return EALLOC;
@@ -190,13 +190,33 @@ int32_t L2_Service_Init(L2_SVC_FSM **serviceFSM)
return SUCCESS;
}
/*****************************************************************************/
/**
* @brief Reset ServiceNet FSM
*
* @param scanFsmPtr a pointer to service net finite state machine
*
* @return NONE
*
******************************************************************************/
void L2_Service_Reset(L2_SVC_FSM *serviceFSM)
{
ASSERT(serviceFSM != NULL);
serviceFSM->isBisar = false;
serviceFSM->isBisarEven = false;
serviceFSM->bisarDst = L2_NONE_ID;
}
/*****************************************************************************/
/**
* @brief Destroy ServiceNet FSM, free memory
*
* @param scanFsmPtr a pointer to service net finite state machine
*
* @return NONE
*
******************************************************************************/
void L2_Service_Destroy(L2_SVC_FSM *serviceFSM)
{
free(serviceFSM);