source: svn/newcon3bcm2_21bu/BSEAV/lib/tspsi/tspsi_validate.h @ 22

Last change on this file since 22 was 22, checked in by phkim, 11 years ago
  1. phkim
  2. newcon3sk 를 kctv 로 브랜치 함
  • Property svn:executable set to *
File size: 2.8 KB
Line 
1/***************************************************************************
2 *     Copyright (c) 2004-2005, Broadcom Corporation
3 *     All Rights Reserved
4 *     Confidential Property of Broadcom Corporation
5 *
6 *  THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE
7 *  AGREEMENT  BETWEEN THE USER AND BROADCOM.  YOU HAVE NO RIGHT TO USE OR
8 *  EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT.
9 *
10 * $brcm_Workfile: tspsi_validate.h $
11 * $brcm_Revision: 2 $
12 * $brcm_Date: 3/11/05 6:18p $
13 *
14 * Module Description:
15 *
16 * Revision History:
17 *
18 * $brcm_Log: /BSEAV/lib/tspsi/tspsi_validate.h $
19 *
20 * 2   3/11/05 6:18p erickson
21 * PR13415: add TS_Get_Message_Size
22 *
23 * 1   2/7/05 11:33p dlwin
24 * Merge down for release 2005_REFSW_MERGETOMAIN:
25 *
26 * Irvine_BSEAVSW_Devel/3   9/9/04 2:01p erickson
27 * PR12101: added hardware PR numbers
28 *
29 * Irvine_BSEAVSW_Devel/2   8/19/04 1:14p erickson
30 * PR12101: got working with magnum
31 *
32 * Irvine_BSEAVSW_Devel/1   8/19/04 10:28a erickson
33 * PR12101: added platform-independent tspsi validation code
34 *
35 ****************************************************************/
36#ifndef TSPSI_VALIDATE_H__
37#define TSPSI_VALIDATE_H__
38
39/*=**************************************
40This module is to verify that a correct message has been returned by
41the transport message filtering hardware. Due to a hardware limitation,
42the first message returned after starting message capture may be corrupt.
43
44PR's for this issue include 11331 and 8622.
45
46This check does not provide an absolute guarantee that the message is correct,
47but it obtains a high degree of probability. The tests are as follows:
48
491. The application should only call these functions if it is the first
50message captured after start.
512. Run TS_Filter_Compare to verify that the filter matches the data.
523. Run TS_Validate_Size to make verify that we have only whole messages.
53*****************************************/
54
55#ifndef USE_LEGACY_KERNAL_INTERFACE
56#include <bstd.h>
57#else
58#include <brcm_t.h>
59#endif
60
61#ifdef __cplusplus
62extern "C" {
63#endif
64
65/**
66CPU-based filter comparison.
67**/
68bool TS_Filter_Compare( const uint8_t *msg, const uint8_t *inclMask, const uint8_t *exclMask,
69        const uint8_t *coef, size_t filterSize );
70
71/**
72Return the current message size.
73Description:
74This assumes msg is pointing to a valid message.
75The size includes any end padding.
76**/
77int TS_Get_Message_Size(const uint8_t *msg);
78
79/**
80Validate that a message size is exactly equal to the sum of its section lengths.
81Description:
82This test is only valid if the message starts at the beginning of the buffer.
83The transport hardware will only write whole messages into the buffer, but if
84you're not at the beginning, you may have wrap around and this test will fail.
85**/
86bool TS_Validate_Size( const uint8_t *msg, size_t size);
87
88#ifdef __cplusplus
89}
90#endif
91
92#endif /* TSPSI_VALIDATE_H__ */
Note: See TracBrowser for help on using the repository browser.