add comment.
This commit is contained in:
@@ -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)
|
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)
|
if (*serviceFSM == NULL)
|
||||||
{
|
{
|
||||||
return EALLOC;
|
return EALLOC;
|
||||||
@@ -190,13 +190,33 @@ int32_t L2_Service_Init(L2_SVC_FSM **serviceFSM)
|
|||||||
return SUCCESS;
|
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)
|
void L2_Service_Reset(L2_SVC_FSM *serviceFSM)
|
||||||
{
|
{
|
||||||
|
ASSERT(serviceFSM != NULL);
|
||||||
serviceFSM->isBisar = false;
|
serviceFSM->isBisar = false;
|
||||||
serviceFSM->isBisarEven = false;
|
serviceFSM->isBisarEven = false;
|
||||||
serviceFSM->bisarDst = L2_NONE_ID;
|
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)
|
void L2_Service_Destroy(L2_SVC_FSM *serviceFSM)
|
||||||
{
|
{
|
||||||
free(serviceFSM);
|
free(serviceFSM);
|
||||||
|
|||||||
Reference in New Issue
Block a user