📄 ztcfilter.h
字号:
/******************************************************************************
* This file exposes the services of filter 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 _ZTCFILTER_H_
#define _ZTCFILTER_H_
/******************************************************************************
*******************************************************************************
* Public macros
*******************************************************************************
******************************************************************************/
/*****************************************************************************
* This MACRO like function sets the filter. It copies the data received from
* the test client to the filter location depending on the SAP selected for
* setting filter..
*
* Interface assumptions:
* It takes SAP ID for which filter to be set and the Filter infromation to be
* set for the SAP ID requested.
*
* 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 ZTCFilter_SetFilterForSAP( sap, pFilter ) FLib_MemCpy ( \
&( gaFilter[ gaSAPIdToFilterIndex[( sap )].startIndex]), \
( pFilter ),gaSAPIdToFilterIndex[( sap )].length )
/*****************************************************************************
* This MACRO like function checks the filter setting for a particular message
* ID.
*
* Interface assumptions:
* It takes the message ID used in ZTC.
*
* The routine limitations.
* None
*
* Return value:
* Returns TRUE : If the message ID is to be filtered.
* FALSE : If the message ID is not to be filtered.
* Effects on global data.
* None
*
* Source of algorithm used.
* None
*
* Revison history:
* date Author Comments
* ------ ------ --------
* 240306 LS, Updated
*****************************************************************************/
#define ZTCFilter_IsToBeFiltered( msgIdUsedInZTC ) \
gaFilter[gaMsgFilterLocator[msgIdUsedInZTC].indexToFilterArray] & \
gaMsgFilterLocator[msgIdUsedInZTC].bitLocation
/******************************************************************************
*******************************************************************************
* Public prototypes
*******************************************************************************
******************************************************************************/
/* None */
/******************************************************************************
*******************************************************************************
* Public type definitions
*******************************************************************************
******************************************************************************/
/* Data type definition to locate the filter information for a particular
primitive */
typedef struct locateFilterPos_tag {
uint8_t indexToFilterArray; /* index in the filter array */
uint8_t bitLocation; /* Bit location in a particular index in the
filter array */
}locateFilterPos_t;
/* This struture stores the index from where the filter information for a
particular SAP starts and its length.*/
typedef struct gSapIdTofilterDetails_tag {
uint8_t startIndex; /* Sap Number */
uint8_t length; /* Number of commands in terms of bytes for that
particular SAP */
}gSAPIdTofilterDetails_t;
/******************************************************************************
*******************************************************************************
* Public memory declarations
*******************************************************************************
******************************************************************************/
/* Stores the position of the filter information in the gaFilter array */
extern const locateFilterPos_t gaMsgFilterLocator[];
/******************************************************************************
*******************************************************************************
* Public functions
*******************************************************************************
******************************************************************************/
/* None */
#endif /* _ZTCFILTER_H_ */
#endif /* ( gZtcIncluded_d == 1 ) */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -