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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.74/] [tools/] [src/] [librlink/] [RlinkCommandList.hpp] - Blame information for rev 25

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

Line No. Rev Author Line
1 25 wfjm
// $Id: RlinkCommandList.hpp 576 2014-08-02 12:24:28Z mueller $
2 10 wfjm
//
3 25 wfjm
// Copyright 2011-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
4 10 wfjm
//
5
// This program is free software; you may redistribute and/or modify it under
6
// the terms of the GNU General Public License as published by the Free
7
// Software Foundation, either version 2, or at your option any later version.
8
//
9
// This program is distributed in the hope that it will be useful, but
10
// WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY
11
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12
// for complete details.
13
// 
14
// Revision History: 
15
// Date         Rev Version  Comment
16 25 wfjm
// 2014-08-02   576   1.1    rename LastExpect->SetLastExpect
17 19 wfjm
// 2013-05-06   495   1.0.1  add RlinkContext to Print() args; drop oper<<()
18 10 wfjm
// 2011-03-05   366   1.0    Initial version
19
// 2011-01-09   354   0.1    First draft
20
// ---------------------------------------------------------------------------
21
 
22
 
23
/*!
24
  \file
25 25 wfjm
  \version $Id: RlinkCommandList.hpp 576 2014-08-02 12:24:28Z mueller $
26 10 wfjm
  \brief   Declaration of class RlinkCommandList.
27
*/
28
 
29
#ifndef included_Retro_RlinkCommandList
30
#define included_Retro_RlinkCommandList 1
31
 
32
#include <cstddef>
33
#include <cstdint>
34
#include <vector>
35
#include <iostream>
36
 
37
#include "RlinkCommandExpect.hpp"
38
#include "RlinkCommand.hpp"
39 19 wfjm
#include "RlinkContext.hpp"
40 10 wfjm
#include "RlinkAddrMap.hpp"
41
 
42
namespace Retro {
43
 
44
  class RlinkCommandList {
45
    public:
46
 
47
                    RlinkCommandList();
48
                    RlinkCommandList(const RlinkCommandList&);
49 19 wfjm
                   ~RlinkCommandList();
50 10 wfjm
 
51
      size_t        AddCommand(RlinkCommand* cmd);
52
      size_t        AddCommand(const RlinkCommand& cmd);
53
      size_t        AddCommand(const RlinkCommandList& clist);
54
      size_t        AddRreg(uint16_t addr);
55
      size_t        AddRblk(uint16_t addr, size_t size);
56
      size_t        AddRblk(uint16_t addr, uint16_t* block, size_t size);
57
      size_t        AddWreg(uint16_t addr, uint16_t data);
58
      size_t        AddWblk(uint16_t addr, std::vector<uint16_t> block);
59
      size_t        AddWblk(uint16_t addr, const uint16_t* block, size_t size);
60
      size_t        AddStat();
61
      size_t        AddAttn();
62
      size_t        AddInit(uint16_t addr, uint16_t data);
63
 
64 25 wfjm
      void          LastVolatile();         // deprecated !!
65
      void          SetLastExpect(RlinkCommandExpect* exp);
66 10 wfjm
 
67
      void          Clear();
68
      size_t        Size() const;
69
 
70 19 wfjm
      void          Print(std::ostream& os, const RlinkContext& cntx,
71
                          const RlinkAddrMap* pamap=0, size_t abase=16,
72
                          size_t dbase=16, size_t sbase=16) const;
73 10 wfjm
      void          Dump(std::ostream& os, int ind=0, const char* text=0) const;
74
 
75
      RlinkCommandList& operator=(const RlinkCommandList& rhs);
76
 
77
      RlinkCommand& operator[](size_t ind);
78
      const RlinkCommand& operator[](size_t ind) const;
79
 
80
    protected:
81
      std::vector<RlinkCommand*> fList;     //!< vector of commands 
82
  };
83
 
84
} // end namespace Retro
85
 
86
#include "RlinkCommandList.ipp"
87
 
88
#endif

powered by: WebSVN 2.1.0

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