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

Subversion Repositories w11

[/] [w11/] [tags/] [w11a_V0.7/] [tools/] [src/] [librlink/] [RlinkServer.ipp] - Blame information for rev 33

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 29 wfjm
// $Id: RlinkServer.ipp 632 2015-01-11 12:30:03Z mueller $
2 19 wfjm
//
3 29 wfjm
// Copyright 2013-2015 by Walter F.J. Mueller 
4 19 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 29 wfjm
// 2015-01-10   632   2.2    Exec() without emsg now void, will throw
17 28 wfjm
// 2014-12-30   625   2.1    adopt to Rlink V4 attn logic
18 27 wfjm
// 2014-11-30   607   2.0    re-organize for rlink v4
19 21 wfjm
// 2013-05-01   513   1.0.1  fTraceLevel now uint32_t
20 19 wfjm
// 2013-03-06   495   1.0    Initial version
21
// 2013-01-12   474   0.5    First draft
22
// ---------------------------------------------------------------------------
23
 
24
/*!
25
  \file
26 29 wfjm
  \version $Id: RlinkServer.ipp 632 2015-01-11 12:30:03Z mueller $
27 19 wfjm
  \brief   Implemenation (inline) of RlinkServer.
28
*/
29
 
30
// all method definitions in namespace Retro
31
namespace Retro {
32
 
33
//------------------------------------------+-----------------------------------
34
//! FIXME_docs
35
 
36
inline const boost::shared_ptr& RlinkServer::ConnectSPtr() const
37
{
38
  return fspConn;
39
}
40
 
41
//------------------------------------------+-----------------------------------
42
//! FIXME_docs
43
 
44
inline RlinkConnect& RlinkServer::Connect() const
45
{
46
  return *fspConn;
47
}
48
 
49
//------------------------------------------+-----------------------------------
50
//! FIXME_docs
51
 
52
inline RlogFile& RlinkServer::LogFile() const
53
{
54
  return fspConn->LogFile();
55
}
56
 
57
//------------------------------------------+-----------------------------------
58
//! FIXME_docs
59
 
60
inline RlinkContext& RlinkServer::Context()
61
{
62
  return fContext;
63
}
64
 
65
//------------------------------------------+-----------------------------------
66
//! FIXME_docs
67
 
68
inline bool RlinkServer::Exec(RlinkCommandList& clist, RerrMsg& emsg)
69
{
70
  return Connect().Exec(clist, fContext, emsg);
71
}
72
 
73
//------------------------------------------+-----------------------------------
74
//! FIXME_docs
75
 
76 29 wfjm
inline void RlinkServer::Exec(RlinkCommandList& clist)
77 19 wfjm
{
78 29 wfjm
  Connect().Exec(clist, fContext);
79
  return;
80 19 wfjm
}
81
 
82
//------------------------------------------+-----------------------------------
83
//! FIXME_docs
84
 
85 21 wfjm
inline uint32_t RlinkServer::TraceLevel() const
86 19 wfjm
{
87
  return fTraceLevel;
88
}
89
 
90
//------------------------------------------+-----------------------------------
91
//! FIXME_docs
92
 
93
inline const Rstats& RlinkServer::Stats() const
94
{
95
  return fStats;
96
}
97
 
98
//------------------------------------------+-----------------------------------
99
//! FIXME_docs
100
 
101
inline bool RlinkServer::AttnPending() const
102
{
103 27 wfjm
  return fAttnNotiPatt | fAttnPatt;
104 19 wfjm
}
105
 
106
//------------------------------------------+-----------------------------------
107
//! FIXME_docs
108
 
109
inline bool RlinkServer::ActnPending() const
110
{
111
  return !fActnList.empty();
112
}
113
 
114
//==========================================+===================================
115
// AttnArgs sub class
116
 
117
/*!
118
  \class Retro::RlinkServer::AttnArgs
119
  \brief FIXME_docs
120
*/
121
 
122
//------------------------------------------+-----------------------------------
123
//! Default constructor
124
 
125
inline RlinkServer::AttnArgs::AttnArgs()
126
  : fAttnPatt(0),
127
    fAttnMask(0),
128 28 wfjm
    fAttnHarvest(0),
129
    fHarvestDone(false)
130 19 wfjm
{}
131
 
132
//------------------------------------------+-----------------------------------
133
//! Constructor
134
 
135
inline RlinkServer::AttnArgs::AttnArgs(uint16_t apatt, uint16_t amask)
136
  : fAttnPatt(apatt),
137
    fAttnMask(amask),
138 28 wfjm
    fAttnHarvest(0),
139
    fHarvestDone(false)
140 19 wfjm
{}
141
 
142
//==========================================+===================================
143
// AttnId sub class
144
 
145
/*!
146
  \class Retro::RlinkServer::AttnId
147
  \brief FIXME_docs
148
*/
149
 
150
//------------------------------------------+-----------------------------------
151
//! Default constructor
152
 
153
inline RlinkServer::AttnId::AttnId()
154
  : fMask(0),
155
    fCdata(0)
156
{}
157
 
158
//------------------------------------------+-----------------------------------
159
//! Constructor
160
 
161
inline RlinkServer::AttnId::AttnId(uint16_t mask, void* cdata)
162
  : fMask(mask),
163
    fCdata(cdata)
164
{}
165
 
166
//------------------------------------------+-----------------------------------
167
//! FIXME_docs
168
 
169
inline bool RlinkServer::AttnId::operator==(const AttnId& rhs) const
170
{
171
  return fMask==rhs.fMask && fCdata==rhs.fCdata;
172
}
173
 
174
//==========================================+===================================
175
// AttnDsc sub class
176
 
177
/*!
178
  \class Retro::RlinkServer::AttnDsc
179
  \brief FIXME_docs
180
*/
181
 
182
//------------------------------------------+-----------------------------------
183
//! Default constructor
184
 
185
inline RlinkServer::AttnDsc::AttnDsc()
186
  : fHandler(),
187
    fId()
188
{}
189
 
190
//------------------------------------------+-----------------------------------
191
//! Constructor
192
 
193
inline RlinkServer::AttnDsc::AttnDsc(attnhdl_t hdl, const AttnId& id)
194
  : fHandler(hdl),
195
    fId(id)
196
{}
197
 
198
} // end namespace Retro

powered by: WebSVN 2.1.0

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