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

📄 ztcprimitivehandler.h

📁 freescale的基于802.15.4的无线通讯例程
💻 H
字号:
/******************************************************************************
* This file exposes the functionality of ZTC Primitive handler module.
*
*
* (c) Copyright 2006, Freescale, Inc. All rights reserved.
*
* Freescale Semiconductor Confidential Proprietary
*
* No part of this document must be reproduced in any form - including copied,
* transcribed, printed or by any electronic means - without specific written
* permission from Freescale Semiconductor Danmark A/S.
*
******************************************************************************/
#if ( gZtcIncluded_d == 1  ) 

#ifndef _ZTCPRIMITIVEHANDLER_H_
#define _ZTCPRIMITIVEHANDLER_H_

/******************************************************************************
*******************************************************************************
* Public macros
*******************************************************************************
******************************************************************************/
/******************************************************************************
* This is macro is used to get primitive length
*
* Interface assumptions:
*   None
*
* The routine limitations.
*   None
*
* Return value:
*   None
*
* Effects on global data.
*   None
*
* Source of algorithm used.
*   None
*
* Revison history:
*   date    Author   Comments
*   ------  ------   --------
*   240306  LS,      Updated
******************************************************************************/
#define ZTCPrimHandle_GetInfoOnPrimitive( msgId ) gaInfoOnThePrimitive[ msgId ]

/******************************************************************************
*******************************************************************************
* Public prototypes
*******************************************************************************
******************************************************************************/
/*****************************************************************************
* This will manipulate the data sent from the test client to send it to the
* intended SAP handler 
*
* Interface assumptions:
*   None
*
* The routine limitations.
*   None
*
* Return value:
*   None
*
* Effects on global data.
*   None
*
* Source of algorithm used.
*   None
*
* Revison history:
*   date    Author   Comments
*   ------  ------   --------
*   240306  LS,      Updated
*****************************************************************************/
void ZTCPrimHandle_SendToTheLayer
  (
  const ZTCMessage_t * pMsgZTCPtr /* IN: Pointer to the message received 
    from the test client  */ 
  );

/*****************************************************************************
*This will manipulate the data sent from the SAP handler to store it in ZTC
* queue
*
* Interface assumptions:
*   None
*
* The routine limitations.
*   None
*
* Return value:
*   None
*
* Effects on global data.
*   None
*
* Source of algorithm used.
*   None
*
* Revison history:
*   date    Author   Comments
*   ------  ------   --------
*   240306  LS,      Updated
*****************************************************************************/
uint8_t ZTCPrimHandle_StorePrimInZTCQueue
( 
  const uint8_t   msgInfo,  /* IN: Length of the primitive */
  const uint8_t   status,   /* IN: Success/Failure status returned from 
    SAP Handler */ 
  const uint8_t*  pMsg      /* IN:Pointer to the message */ 
);


/******************************************************************************
*******************************************************************************
* Public type definitions
*******************************************************************************
******************************************************************************/
/* Function pointer to Sap handlers */
typedef uint8_t  (*pfToSAPHandler_t)(void *);

/*-----------------------------------------------------------------------------
This enum defines a unique ZTC message ID for all the primitives handled by 
ZTC.

To add new primitives, for a particular SAP, first locate the SAP and the 
direction of message flow. Define the new primitve as the last primitive in 
that group. Example, to add a primitive to the APSME SAP, from ZDO to APSME 
direction add the definition after gZTC_APSMESetToReadyState_c in the below 
enum 
-----------------------------------------------------------------------------*/
enum  {
  /* Primitives in the NWK to MCPS direction */
  gZTC_MCPSDataReq_c                ,
  gZTC_MCPSPurgeReq_c               ,								
  
  /* Primitives in the MCPS to NWK direction */
  gZTC_MCPSDataConf_c               ,
  gZTC_MCPSDataInd_c                ,
  gZTC_MCPSPurgeConf_c              ,
  gZTC_MCPSPromInd_c                ,

  /* Primitives in the NWK to MLME direction */
  gZTC_MLMEAssociateReq_c           ,
  gZTC_MLMEAssociateRes_c           ,
  gZTC_MLMEDisassociateReq_c        ,
  gZTC_MLMEGetReq_c                 ,
  gZTC_MLME_GTSReq_c                ,
  gZTC_MLMEOrphanRes_c              ,
  gZTC_MLMEResetReq_c               ,
  gZTC_MLMERxEnableReq_c            ,
  gZTC_MLMEScanReq_c                ,
  gZTC_MLMESetReq_c                 ,
  gZTC_MLMEStartReq_c               ,
  gZTC_MLMESyncReq_c                ,
  gZTC_MLMEPollReq_c                ,

  /* Primitives in the MLME to NWK direction */
  gZTCNwkAssociateInd_c             ,  
  gZTCNwkAssociateConf_c            ,
  gZTCNwkDisassociateInd_c          ,
  gZTCNwkDisassociateConf_c         ,
  gZTCNwkBeaconNotifyInd_c          ,
  gZTCNwkGetConf_c                  ,
  gZTCNwkGTSInd_c                   ,
  gZTCNwkGTSConf_c                  ,
  gZTCNwkOrphanInd_c                ,
  gZTCNwkResetConf_c                ,
  gZTCNwkRxEnableConf_c             ,
  gZTCNwkScanConf_c 			          ,
  gZTCNwkCommStatusInd_c 		        ,
  gZTCNwkSetConf_c                  ,
  gZTCNwkStartConf_c 			          ,
  gZTCNwkSyncLossInd_c 		          ,
  gZTCNwkPollConf_c 		            ,
  gZTCNwkErrorConf_c			          ,
  gZTCNwkBeaconStartInd_c		        ,
  gZTCNwkMaintenanceScanConf_c      ,

  /* Primitives in the APP to ASP direction */
  gZTC_ASPGetTimeReq_c			        ,
  gZTC_ASPGetInactiveTimeReq_c	    ,
  gZTC_ASPDozeReq_c     	          ,
  gZTC_ASPAutoDozeReq_c 		        ,
  gZTC_ASPHibernateReq_c		        ,
  gZTC_ASPWakeReq_c 			          ,
  gZTC_ASPEventReq_c			          ,
  gZTC_ASPTrimReq_c 		            ,
  gZTC_ASPDdrReq_c									,
  gZTC_ASPPortReq_c 			          ,
  gZTC_ASPClkoReq_c 			          ,
  gZTC_ASPTempReq_c 			          ,
  gZTC_ASP_NVRAMReq_c			          ,
  gZTC_ASPBatteryReq_c  	          ,
  gZTC_ASPSetNotifyReq_c		        ,
  gZTC_ASPSetMinDozeTimeReq_c	      ,
  gZTC_ASPTelecTestReq_c		        ,
  gZTC_ASPTelecSetChannelReq_c	    ,
  gZTC_ASPSetPowerLevelReq_c  	    ,
  gZTC_ASPAcomaReq_c			          ,
  
  /* Primitives in the ASP to NWK direction */
  gZTCAppGetTimeConf_c              ,
  gZTCAppGetInactiveTimeConf_c			,
  gZTCAppDozeConf_c									,
  gZTCAppAutoDozeConf_c							,
  gZTCAppHibernateConf_c						,
  gZTCAppWakeConf_c									,
  gZTCAppEventConf_c								,
  gZTCAppTrimConf_c									,
  gZTCAppDdrConf_c									,
  gZTCAppPortConf_c									,
  gZTCAppClkoConf_c									,
  gZTCAppTempConf_c									,
  gZTCAppNVRAMConf_c								,
  gZTCAppBatteryConf_c							,
  gZTCAppSetNotifyConf_c						,
  gZTCAppSetMinDozeTimeConf_c				,
  gZTCAppTelecTestConf_c						,
  gZTCAppTelecSetChannelConf_c			,
  gZTCAppSetPowerLevelConf_c				,
  gZTCAppAcomaConf_c								,
  gZTCAppGetMacStateConf_c					,
  gZTCAppErrorConf_c								,
  gZTCAppWakeInd_c									,
  gZTCAppIdleInd_c									,
  gZTCAppInactiveInd_c							,
  gZTCAppEventInd_c									,
  
  /* Primitives in the APS to NWK direction */
  gZTC_NLDEDataReq_c								,
  
  /* Primitives in the NWK to APS direction */																		
  gZTC_NLDEDataConf_c								,
  gZTC_NLDEDataInd_c					      ,
  
  /* Primitives in the ZDO to NLME direction */
  gZTC_NLMENwkDiscoveryReq_c			  ,
  gZTC_NLMENwkFormationReq_c			  ,
  gZTC_NLMEPermitJoinReq_c			    ,
  gZTC_NLMEStartRouterReq_c					,
  gZTC_NLMEJoinReq_c								,
  gZTC_NLMEDirectJoinReq_c					,
  gZTC_NLMELeaveReq_c								,
  gZTC_NLMEResetReq_c               ,
  gZTC_NLMESyncReq_c								,
  gZTC_NLMEGetReq_c									,
  gZTC_NLMESetReq_c									,
  
  /* Primitives in the NLME to ZDO direction */
  gZTC_NLMENwkDiscoveryConf_c       ,
  gZTC_NLMENwkFormationConf_c		    ,
  gZTC_NLMEPermitJoinConf_c		      ,
  gZTC_NLMEStartRouterConf_c				,
  gZTC_NLMEJoinInd_c					      ,
  gZTC_NLMEJoinConf_c								,
  gZTC_NLMEDirectJoinConf_c					,
  gZTC_NLMELeaveConf_c			        ,
  gZTC_NLMELeaveInd_c					      ,
  gZTC_NLMEResetConf_c              ,							
  gZTCSyncLossIndStatus             ,
  gZTC_NLMESyncConf_c								,
  gZTC_NLMEGetConf_c								,
  gZTC_NLMESetConf_c								,
  gZTCErrorStatus_c									,

  /* Primitives in the AF to APSDE direction */
  gZTC_APSDEDataReq_c								,
  
  /* Primitives in the APSDE to AF direction */
  gZTC_APSDEDataConf_c							,
  gZTC_APSDEDataInd_c								,

  /* Primitives in the APP  to AFDE direction */
  gZTCRegEp_c                       ,
  gZTCDeRegEp_c								      ,
  gZTC_KVPDataReq_c							    ,
  gZTCMsgDataReq_c							    ,
  gZTC_AFResetReq_c                 ,
  gZTC_AF_KVPAggregation_c					,
  gZTC_AFMsgAggregation_c						,
  gZTCFindNumOfEpReq_c					    ,
  gZTCFindEPDescReq_c               ,
  gZTCFindEpListReq_c               ,

  
  /* Primitives in the AFDE  to APP direction */  
  gZTC_AFDataConf_c									,
  gZTC_AF_KVPDataInd_c					    ,
  gZTC_AFMsgDataInd_c   		        ,
  
  /* Primitives in the ZDO  to APSME direction */
  gZTC_APSMEBindReq_c               ,
  gZTC_APSMEEstablishKeyReq_c				,
  gZTC_APSMEEstablishKeyResp_c			,
  gZTC_APSMEGetReq_c								,
  gZTC_APSMERemoveDeviceReq_c				,
  gZTC_APSMERequestKeyReq_c					,
  gZTC_APSMESetReq_c								,
  gZTC_APSMESwitchKeyReq_c					,
  gZTC_APSMETransportKeyReq_c				,
  gZTC_APSMEUnbindReq_c    					,
  gZTC_APSMEUpdateDeviceReq_c				,
  gZTC_APSMEReset_c                 , 
  gZTC_APSMESetToReadyState_c       ,
  
  /* Primitives in the  APSME   to ZDO direction */
  gZTC_APAMEEstablishKeyInd_c				,
  gZTC_APSMEEstablishKeyConf_c			,
  gZTC_APSMERemoveDeviceInd_c				,
  gZTCApsmeRequestKeyInd_c					,
  gZTC_APSMESwitchKeyInd_c					,
  gZTC_APSMETransportKeyInd_c	      ,
  gZTC_APSMEUpdateDeviceInd_c				,
  
  /* Primitives in the APP to ZDP direction */
  gZTCNwkAddrReq_c									,
  gZTC_IEEEAddrReq_c								,
  gZTCNodeDescReq_c									,
  gZTCPowerDescReq_c								,
  gZTCSimpleDescReq_c								,
  gZTCActiveEpReq_c									,
  gZTCMatchDescReq_c								,
  gZTCComplexDescReq_c							,
  gZTCUserDescReq_c									,
  gZTCDiscRegReq_c							    ,
  gZTCEndDevAnnounce_c							,
  gZTCUserDescSet_c									,
  gZTCEndDevBindReq_c						    ,
  gZTCBindReq_c											,
  gZTCUnbindReq_c										,
  gZTCMgmtNwkDiscReq_c							,
  gZTCMgmtLQIReq_c									,
  gZTCMgmtRtgReq_c									,
  gZTCMgmtBindReq_c									,
  gZTCMgmtLeaveReq_c								,
  gZTCMgmtDirectJoinReq_c						,
  gZTC_ZDP_APSMEEstablishKeyReq_c		,
  gZTC_ZDP_APSMEEstablishKeyResp_c	,
  gZTC_ZDP_APSMETransportKeyReq_c		,
  gZTC_ZDP_APSMEUpdateDevReq_c			,
  gZTC_ZDP_APSMERemoveDevReq_c			,
  gZTC_ZDP_APSMERequestKeyReq_c			,
  gZTC_ZDP_APSMESwitchKeyReq_c			,
  gZTC_ZDPNwkPermitJoinReq_c			  ,
  gZTC_ZDPNwkDirectJoinReq_c        ,
  gZTC_ZDPNwkSyncReq_c							,  
  gZTC_ZDPNwkDiscReq_c              ,
  
  /* Primitives in the  ZDP   to APP direction */
  gZTCNwkAddrResp_c                 ,              
  gZTC_IEEEAddrResp_c              	,
  gZTCNodeDescResp_c              	,
  gZTCPowerDescResp_c             	,
  gZTCSimpleDescResp_c            	,
  gZTCActiveEpResp_c              	,
  gZTCMatchDescResp_c             	,
  gZTCComplexDescResp_c           	,
  gZTCUserDescResp_c              	,
  gZTCDiscRegResp_c          	      ,
  gZTCDummyMagId_c                  ,
  gZTCUserDescConf_c								,
  gZTCEndDevBindResp_c         	    ,
  gZTCBindResp_c                  	,
  gZTCUnbindResp_c                	,
  gZTCMgmtNwkDiscResp_c           	,
  gZTCMgmtLQIResp_c               	,
  gZTCMgmtRtgResp_c               	,  
  gZTCMgmtBindResp_c              	,
  gZTCMgmtLeaveResp_c             	,
  gZTCMgmtDirectJoinResp_c        	,
  gZTC_ZDP_APSMEEstablishKeyConf_c  ,
  gZTC_ZDP_APSMEEstablishKeyInd_c   ,
  gZTC_ZDP_APSMETransportKeyInd_c   ,
  gZTC_ZDO_APSMEUpdateDevInd_c      ,
  gZTC_ZDP_APSMERemoveDevInd_c      ,
  gZTC_ZDP_APSMERequestKeyInd_c     ,
  gZTC_ZDP_APSMESwitchKeyInd_c      ,
  gZTC_ZDPNwkPermitJoinConf_c				,
  gZTC_ZDPDirectJoinConf_c					,
  gZTC_ZDPSyncInd_c                 ,
  gZTC_ZDPSyncConf_c                ,  
  gZTC_ZDPDiscConf_c						    ,
  gZTCWriteConfigureAttribReq_c     ,
  gZTCWriteConfigureAttribConf_c	  ,
  gZTCWriteExtendedAddrReq_c        ,
  gZTCStopNwkReq_c                  ,
  gZTCWriteExtendedAddrConf_c				,
  gZTCReadExtendedReq_c             ,
  gZTCReadExtendedConf_c					  ,
  gZTCStartNwkReq_c									, 
  gZTCRestartNwkReq_c  							, 
  gZTCBeestackSaveReq_c							,
  gZTCBeestackSaveConf_c  					,
  gZTCInitStackUsage_c              ,
  gZTCMaximumStackUsed_c						,
  
};

/******************************************************************************
*******************************************************************************
* Public memory declarations
*******************************************************************************
******************************************************************************/
const uint8_t gaInfoOnThePrimitive[];
extern const  pfToSAPHandler_t gaSAPIdToSAPHandlers[];
extern bool_t gInjectedTheMessage;

/******************************************************************************
*******************************************************************************
* Public functions
*******************************************************************************
******************************************************************************/
/* None */

#endif  /*  _ZTCPRIMITIVEHANDLER_H_ */
#endif /* ( gZtcIncluded_d == 1  ) */

⌨️ 快捷键说明

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