📄 ztcinterface.h
字号:
/******************************************************************************
* This file is the interface file for ZTC.It exposes the services of ZTC
* 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 _ZTCINTERFACE_H_
#define _ZTCINTERFACE_H_
#include "TS_Configuration.h"
/******************************************************************************
*******************************************************************************
* Public macros
*******************************************************************************
******************************************************************************/
/* ZTC Configuration details */
#ifndef gResCapability_d
#define gResCapability_d 0
#endif
#ifndef gComCapability_d
#define gComCapability_d 0
#endif
#ifndef gCoordinatorCapability_d
#define gCoordinatorCapability_d 0
#endif
#ifndef gRouterCapability_d
#define gRouterCapability_d 0
#endif
#ifndef gEndDevCapability_d
#define gEndDevCapability_d 0
#endif
#if (( gRouterCapability_d == 1 ) && ( gComCapability_d == 1 ))
#define gZTC_AutomatedScriptEnabled_d 0
#else
#define gZTC_AutomatedScriptEnabled_d 0
#endif
/* This will enable Filter capability */
#if ((( gRouterCapability_d == 1 ) && \
( gResCapability_d == 1 || gComCapability_d == 1 )) \
|| (( gCoordinatorCapability_d == 1 ) && ( gComCapability_d == 1 )))
#define gZTC_FilterCapability_d 0
#else
#define gZTC_FilterCapability_d 1
#endif
/* This will enable to monitor, hook and inject all synchronous primitives.
Mlme-Reset.Request, Mlme-Set.Request, Mlme-Get.Request,
Nlme-Reset.Request, Nlme-Set.Request, Nlme-Get.Request,
Apsme-Set.Request, Apsme-Get.Request, Apsme-Bind.Request, Apsme-Unbind.Request
*/
#if (( gRouterCapability_d == 1 ) && \
( gResCapability_d == 1 || gComCapability_d == 1 )) \
|| (( gCoordinatorCapability_d == 1 ) && ( gComCapability_d == 1 )))
#define gZTC_SyncPrimitiveHandlingCapability_d 0
#else
#define gZTC_SyncPrimitiveHandlingCapability_d 1
#endif
/* This will enable to monitor, hook and inject all primitives with one pointer
Mcps-Data.Request, Mcps-Data.Indication, Mcps-Prom.Indication,
Asp-NvRam.Request, Nlde-Data.Request, Nlde-Data.Indication,
Af-MsgData.Indication, Nlme-NetworkDiscovery.Confirmation,
Apsde-Data.Request, Apsde-Data.Indication */
#if (( gRouterCapability_d == 1 ) && ( gComCapability_d == 1 ))
#define gZTC_PrimitiveWithOnePointerHandlingCapability_d 0
#else
#define gZTC_PrimitiveWithOnePointerHandlingCapability_d 1
#endif
/* This will enable to monitor, hook and inject all primitives with table list.
ZDP-NwkAddr.Response, ZDP-IeeeAddr.Response,
ZDP-ActiveEp.Response, ZDP-MatchDesc.Response,
ZDP-UserDesc.Response, ZDP-MgmtNwkDisc.Response,
ZDP-MgmtLqi.Response, ZDP-MgmtRtg.Response,
ZDP-MgmtBind.Response, Af-MsgData.Request */
#if (( gRouterCapability_d == 1 ) && \
( gResCapability_d == 1 || gComCapability_d == 1 ))
#define gZTC_PrimitiveWithTableListHandlingCapability_d 0
#else
#define gZTC_PrimitiveWithTableListHandlingCapability_d 1
#endif
/* This will enable to monitor, hook and inject all primitives listed below.
Nlme-Scan.Confirmation, Mlme-NwkBeaconNotify.Indication,
ZDP-MatchDesc.Request, ZDP-EndDeviceBind.Request,
Af-KvpData.Request, Af-KvpAggregation.Request,
Af-MsgAggregation.Request, Af-KvpData.Indicaton,
ZDP-SimpleDesc.Response */
#if (( gRouterCapability_d == 1 ) && \
( gResCapability_d == 1 || gComCapability_d == 1 )) \
|| (( gCoordinatorCapability_d == 1 ) && ( gComCapability_d == 1 )))
#define gZTC_OtherComplexPrimitiveHandlingCapability_d 0
#else
#define gZTC_OtherComplexPrimitiveHandlingCapability_d 1
#endif
/* If this is enabled, ZTC will support the following utility functionality.
WriteConfigAttrib.Req, WriteExtendedAddr.Req,
ReadExtendedAddr.Req, gBeestackSave.Req,
Zdp2AppEvent, RegEndPoint,StartNwk.Req, RestartNwk.Req,StopNwkReq,
DeRegEndPoint */
#define gZTC_UtilitySupportCapability_d 1
#if gZTC_UtilitySupportCapability_d == 1
#define gZTC_WriteConfigureAttribReqCapabilty_d 1
#define gZTC_WriteExtendedAddrReqCapabilty_d 1
#define gZTC_ReadExtendedAddrReqCapabilty_d 1
#define gZTC_StartNwkReqCapabilty_d 1
#define gZTC_RestartNwkReqCapabilty_d 1
#define gZTC_StopNwkReqCapabilty_d 1
#if ((gResCapability_d == 1) && (gCoordinatorCapability_d == 1))
#define gZTC_FindNumOfEpReqCapability_d 0
#define gZTC_FindEpDescReqCapability_d 0
#define gZTC_FindEpListReqCapability_d 0
#define gZTC_BeestackSaveReqCapabilty_d 0
#define gZTC_DeRegEpCapabilty_d 0
#define gZTC_StackTestingCapability_d 0
#define gZTC_RegEpCapabilty_d 1
#define gZTC_APSResetCapability_d 0
#define gZTC_AFResetCapability_d 0
#define gZTC_APSSetToReadyStateCapability_d 0
#else
#define gZTC_FindNumOfEpReqCapability_d 1
#define gZTC_FindEpDescReqCapability_d 1
#define gZTC_FindEpListReqCapability_d 1
#define gZTC_BeestackSaveReqCapabilty_d 1
#define gZTC_DeRegEpCapabilty_d 1
#define gZTC_StackTestingCapability_d 1
#define gZTC_RegEpCapabilty_d 1
#define gZTC_APSResetCapability_d 1
#define gZTC_AFResetCapability_d 1
#define gZTC_APSSetToReadyStateCapability_d 1
#endif /* gResCapability_d == 1 && gCoordinatorCapability_d */
#endif gZTC_UtilitySupportCapability_d
/* ZTC buffer length can be configured using this MACRO */
#define gZTCBufferLength_c 128 /* Maximum Length of the buffer */
#if gZTC_OtherComplexPrimitiveHandlingCapability_d == 1
#define gZTC_NwkScanConfCapabilty_d 1
#define gZTC_NwkBeaconNotifyCapability_d 1
#define gZTC_MatchDescReqCapability_d 1
#define gZTC_EndDeviceBindReqCapability_d 1
#define gZTC_AFResetReqCapability_d 1
#define gZTC_KVPDataReqCapability_d 1
#define gZTC_AF_KVPAggregationReqCapability_d 1
#define gZTC_AFMsgAggregationReqCapability_d 1
#define gZTC_AF_KVPDataIndCapability_d 1
#define gZTC_SimpleDescRespCapability_d 1
#endif gZTC_OtherComplexPrimitiveHandlingCapability_d
/* Enums for Modes */
enum {
gZTC_ModeDisable_c,
gZTC_ModeHook_c,
gZTC_ModeMonitor_c
};
/* Default mode setting for SAPs */
enum{
gDefaultMCPS_SAPMode_c = gZTC_ModeDisable_c,
gDefaultMLME_SAPMode_c = gZTC_ModeDisable_c,
gDefaultAPS_SAPMode_c = gZTC_ModeDisable_c,
gDefaultNLDE_SAPMode_c = gZTC_ModeDisable_c,
gDefaultNLME_SAPMode_c = gZTC_ModeDisable_c,
gDefaultAPSDE_SAPMode_c = gZTC_ModeDisable_c,
gDefaultAPSME_SAPMode_c = gZTC_ModeDisable_c,
gDefaultAFDE_SAPMode_c = gZTC_ModeDisable_c,
gDefaultZDP_SAPMode_c = gZTC_ModeDisable_c,
};
/* MCPS filter setting */
enum{
gFilterSetValueForMCPSDataReq_c = 1 << 0,
gFilterSetValueForMCPSDataConf_c = 1 << 1,
gFilterSetValueForMCPSDataInd_c = 1 << 2,
gFilterSetValueForMCPSPurgeReq_c = 1 << 3,
gFilterSetValueForMCPSPurgeConf_c = 1 << 4
};
/* MLME Join and leave Commands */
enum{
gFilterSetValueForMLMEAssociateReq_c = 1 << 0,
gFilterSetValueForMLMEAssociateConf_c = 1 << 1,
gFilterSetValueForMLMEAssociateResp_c = 1 << 2,
gFilterSetValueForMLMEAssociateInd_c = 1 << 3,
gFilterSetValueForMLMEDisAssociateReq_c = 1 << 4,
gFilterSetValueForMLMEDisAssociateConf_c = 1 << 5,
gFilterSetValueForMLMEDisAssociateInd_c = 1 << 6
};
/* MLME Synchronous Calls */
enum{
gFilterSetValueForMLMEGetReq_c = 1 << 0,
gFilterSetValueForMLMEGetConf_c = 1 << 1,
gFilterSetValueForMLMESetReq_c = 1 << 2,
gFilterSetValueForMLMESetConf_c = 1 << 3,
gFilterSetValueForMLMEResetReq_c = 1 << 4,
gFilterSetValueForMLMEResetConf_c = 1 << 5,
gFilterSetValueForMLMERXEnableReq_c = 1 << 6,
gFilterSetValueForMLMERXEnableConf_c = 1 << 7
};
/* MLME Sync and GTS Commands */
enum{
gFilterSetValueForMLMEGtsReq_c = 1 << 0,
gFilterSetValueForMLMEGtsConf_c = 1 << 1,
gFilterSetValueForMLMEGtsInd_c = 1 << 2,
gFilterSetValueForMLMECommStatusInd_c = 1 << 3,
gFilterSetValueForMLMESyncReq_c = 1 << 4,
gFilterSetValueForMLMESyncLossInd_c = 1 << 5,
gFilterSetValueForMLMEPollReq_c = 1 << 6,
gFilterSetValueForMLMEPollConf_c = 1 << 7
};
/* MLME Scan and Start Commands */
enum{
gFilterSetValueForMLMEScanReq_c = 1 << 0,
gFilterSetValueForMLMEScanConf_c = 1 << 1,
gFilterSetValueForMLMEStartReq_c = 1 << 2,
gFilterSetValueForMLMEStartConf_c = 1 << 3,
gFilterSetValueForMLMEOrphanInd_c = 1 << 4,
gFilterSetValueForMLMEOrphanResp_c = 1 << 5,
gFilterSetValueForMLMEBeaconNotifyInd_c = 1 << 6
};
/* ASP to APP direction Primitives */
enum{
gFilterSetValueForASPWakeInd_c = 1 << 0,
gFilterSetValueForASPIdleInd_c = 1 << 1,
gFilterSetValueForASPInactiveInd_c = 1 << 2,
gFilterSetValueForASPEventInd_c = 1 << 3
};
/* APP to ASP direction Primitive Set1 */
enum{
gFilterSetValueForASPGetTimeReq_c = 1 << 0,
gFilterSetValueForASPGetInactiveTimeReq_c = 1 << 1,
gFilterSetValueForASPDozeReq_c = 1 << 2,
gFilterSetValueForASPAutoDozeReq_c = 1 << 3,
gFilterSetValueForASPHibernateReq_c = 1 << 4,
gFilterSetValueForASPWakeReq_c = 1 << 5,
gFilterSetValueForASPEventReq_c = 1 << 6,
gFilterSetValueForASPTrimReq_c = 1 << 7
};
/* APP to ASP direction Primitive Set2 */
enum{
gFilterSetValueForASP_DDRReq_c = 1 << 0,
gFilterSetValueForASPPortReq_c = 1 << 1,
gFilterSetValueForASP_CLCK0Req_c = 1 << 2,
gFilterSetValueForASPSetNotifyReq_c = 1 << 3,
gFilterSetValueForASPSetMinDozeTimeReq_c = 1 << 4
};
/* NLDE SAP Commands */
enum{
gFilterSetValueForNLDEDataReq_c = 1 << 0,
gFilterSetValueForNLDEDataConf_c = 1 << 1,
gFilterSetValueForNLDEDataInd_c = 1 << 2
};
/* NLME NWK Discovery Commands */
enum{
gFilterSetValueForNLMENwkDiscoveryReq_c = 1 << 0,
gFilterSetValueForNLMENwkDiscoveryConf_c = 1 << 1,
gFilterSetValueForNLMENwkFormationReq_c = 1 << 2,
gFilterSetValueForNLMENwkFormationConf_c = 1 << 3,
gFilterSetValueForNLMEPermitJoiningReq_c = 1 << 4,
gFilterSetValueForNLMEPermitJoiningConf_c = 1 << 5,
gFilterSetValueForNLMEStartRouterReq_c = 1 << 6,
gFilterSetValueForNLMEStartRouterConf_c = 1 << 7
};
/* NLME NWK Join And Leave Commands */
enum{
gFilterSetValueForNLMEJoinReq_c = 1 << 0,
gFilterSetValueForNLMEJoinInd_c = 1 << 1,
gFilterSetValueForNLMEJoinConf_c = 1 << 2,
gFilterSetValueForNLMEDirectJoinReq_c = 1 << 3,
gFilterSetValueForNLMEDirectJoinConf_c = 1 << 4,
gFilterSetValueForNLMELeaveReq_c = 1 << 5,
gFilterSetValueForNLMELeaveInd_c = 1 << 6,
gFilterSetValueForNLMELeaveConf_c = 1 << 7
};
/* NLME NWK Sync And IB Maintainance Commands */
enum{
gFilterSetValueForNLMESyncReq_c = 1 << 0,
gFilterSetValueForNLMESyncConf_c = 1 << 1,
gFilterSetValueForNLMEResetReq_c = 1 << 2,
gFilterSetValueForNLMEResetConf_c = 1 << 3,
gFilterSetValueForNLMEGetReq_c = 1 << 4,
gFilterSetValueForNLMEGetConf_c = 1 << 5,
gFilterSetValueForNLMESetReq_c = 1 << 6,
gFilterSetValueForNLMESetConf_c = 1 << 7
};
/* APSDE SAP Commands */
enum{
gFilterSetValueForAPSDEDataReq_c = 1 << 0,
gFilterSetValueForAPSDEDataConf_c = 1 << 1,
gFilterSetValueForAPSDEDataInd_c = 1 << 2
};
/* APSME SAP Commands */
enum{
gFilterSetValueForAPSMEBindReq_c = 1 << 0,
gFilterSetValueForAPSMEBindConf_c = 1 << 1,
gFilterSetValueForAPSMEGetReq_c = 1 << 2,
gFilterSetValueForAPSMEGetConf_c = 1 << 3,
gFilterSetValueForAPSMESetReq_c = 1 << 4,
gFilterSetValueForAPSMESetConf_c = 1 << 5,
gFilterSetValueForAPSMEUnBindReq_c = 1 << 6,
gFilterSetValueForAPSMEUnBindConf_c = 1 << 7
};
/* APSMESEC Establish And Transport Key Commands */
enum{
gFilterSetValueForAPSMEEstablishKeyReq_c = 1 << 0,
gFilterSetValueForAPSMEEstablishKeyConf_c = 1 << 1,
gFilterSetValueForAPSMEEstablishKeyInd_c = 1 << 2,
gFilterSetValueForAPSMEEstablishKeyResp_c = 1 << 3,
gFilterSetValueForAPSMETransportKeyReq_c = 1 << 4,
gFilterSetValueForAPSMETransportKeyInd_c = 1 << 5
};
/* APSMESEC Device And Key Maintainance Commands */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -