OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [ecos-3.0/] [host/] [tools/] [ecostest/] [common/] [eCosTestMonitorFilter.h] - Blame information for rev 790

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 786 skrzyp
// ####ECOSHOSTGPLCOPYRIGHTBEGIN####                                        
2
// -------------------------------------------                              
3
// This file is part of the eCos host tools.                                
4
// Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.            
5
//
6
// This program is free software; you can redistribute it and/or modify     
7
// it under the terms of the GNU General Public License as published by     
8
// the Free Software Foundation; either version 2 or (at your option) any   
9
// later version.                                                           
10
//
11
// This program is distributed in the hope that it will be useful, but      
12
// WITHOUT ANY WARRANTY; without even the implied warranty of               
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        
14
// General Public License for more details.                                 
15
//
16
// You should have received a copy of the GNU General Public License        
17
// along with this program; if not, write to the                            
18
// Free Software Foundation, Inc., 51 Franklin Street,                      
19
// Fifth Floor, Boston, MA  02110-1301, USA.                                
20
// -------------------------------------------                              
21
// ####ECOSHOSTGPLCOPYRIGHTEND####                                          
22
//=================================================================
23
//
24
//        eCosTestMonitorFilter.h
25
//
26
//        Simple filter for monitoring data flowing through the client
27
//
28
//=================================================================
29
//=================================================================
30
//#####DESCRIPTIONBEGIN####
31
//
32
// Author(s):     jskov
33
// Contributors:  jskov
34
// Date:          2000-03-16
35
//####DESCRIPTIONEND####
36
#ifndef _CECOSMONITORFILTER_H
37
#define _CECOSMONITORFILTER_H
38
 
39
#include "eCosStd.h"
40
#include "eCosTest.h"
41
#include "eCosSocket.h"
42
#include "eCosSerial.h"
43
 
44
//----------------------------------------------------------------------------
45
// The filter class
46
class CeCosTestMonitorFilter;
47
 
48
class CeCosTestMonitorFilter {
49
public:
50
    enum data_origin_t {MF_TARGET=0, MF_HOST} ;
51
 
52
    // Constructor
53
    CeCosTestMonitorFilter();
54
    ~CeCosTestMonitorFilter();
55
 
56
    // Configuration methods
57
    void SetVerbose(bool bVerbose)
58
        { m_bOptVerbose = bVerbose; }
59
    void SetOrigin(data_origin_t eOrigin)
60
        { m_eOrigin = eOrigin; }
61
 
62
    bool FilterFunctionProper(void*& pBuf, unsigned int& nRead);
63
 
64
private:
65
 
66
    // Output methods
67
    void ConsoleWrite(const char* pszStr);
68
    void Trace(const char* pszFormat, ...);
69
    void PrintHex(const unsigned char* d1, int len,
70
                  data_origin_t origin=MF_TARGET);
71
 
72
 
73
    // Options used for configuring behavior.
74
    bool m_bOptVerbose;
75
 
76
    data_origin_t m_eOrigin;
77
 
78
};
79
 
80
extern bool CALLBACK SerialMonitorFunction(void*& pBuf,
81
                                           unsigned int& nRead,
82
                                           CeCosSerial& serial,
83
                                           CeCosSocket& socket,
84
                                           void* pParem);
85
 
86
#endif // _CECOSMONITORFILTER_H

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.