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

Subversion Repositories w11

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

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

Line No. Rev Author Line
1 30 wfjm
// $Id: RlinkConnect.ipp 666 2015-04-12 21:17:54Z mueller $
2 10 wfjm
//
3 28 wfjm
// Copyright 2011-2015 by Walter F.J. Mueller 
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 30 wfjm
// 2015-04-12   666   2.2    add LinkInit,LinkInitDone; transfer xon
17 29 wfjm
// 2015-01-06   631   2.1    full rlink v4 implementation
18 19 wfjm
// 2013-03-05   495   1.2.1  add Exec() without emsg (will send emsg to LogFile)
19
// 2013-02-23   492   1.2    use scoped_ptr for Port; Close allways allowed
20
//                           use RlinkContext, add Context(), Exec(..., cntx)
21
// 2013-02-22   491   1.1    use new RlogFile/RlogMsg interfaces
22
// 2013-02-03   481   1.0.1  add SetServer(),Server()
23 10 wfjm
// 2011-04-02   375   1.0    Initial version
24
// 2011-01-15   356   0.1    First draft
25
// ---------------------------------------------------------------------------
26
 
27
/*!
28
  \file
29 30 wfjm
  \version $Id: RlinkConnect.ipp 666 2015-04-12 21:17:54Z mueller $
30 10 wfjm
  \brief   Implemenation (inline) of RlinkConnect.
31
*/
32
 
33 19 wfjm
// all method definitions in namespace Retro
34 10 wfjm
namespace Retro {
35
 
36
//------------------------------------------+-----------------------------------
37
//! FIXME_docs
38
 
39
inline bool RlinkConnect::IsOpen() const
40
{
41
  return fpPort && fpPort->IsOpen();
42
}
43
 
44
//------------------------------------------+-----------------------------------
45
//! FIXME_docs
46
 
47
inline RlinkPort* RlinkConnect::Port() const
48
{
49 19 wfjm
  return fpPort.get();
50 10 wfjm
}
51
 
52
//------------------------------------------+-----------------------------------
53
//! FIXME_docs
54
 
55 30 wfjm
inline bool RlinkConnect::LinkInitDone() const
56
{
57
  return fLinkInitDone;
58
}
59
 
60
//------------------------------------------+-----------------------------------
61
//! FIXME_docs
62
 
63 19 wfjm
inline RlinkContext& RlinkConnect::Context()
64
{
65
  return fContext;
66
}
67
 
68
//------------------------------------------+-----------------------------------
69
//! FIXME_docs
70
 
71
inline void RlinkConnect::SetServer(RlinkServer* pserv)
72
{
73
  fpServ = pserv;
74
  return;
75
}
76
 
77
//------------------------------------------+-----------------------------------
78
//! FIXME_docs
79
 
80
inline RlinkServer* RlinkConnect::Server() const
81
{
82
  return fpServ;
83
}
84
 
85
//------------------------------------------+-----------------------------------
86
//! FIXME_docs
87
inline bool RlinkConnect::Exec(RlinkCommandList& clist, RerrMsg& emsg)
88
{
89
  return Exec(clist, fContext, emsg);
90
}
91
 
92
//------------------------------------------+-----------------------------------
93
//! FIXME_docs
94 29 wfjm
inline void RlinkConnect::Exec(RlinkCommandList& clist)
95 19 wfjm
{
96 29 wfjm
  Exec(clist, fContext);
97
  return;
98 19 wfjm
}
99
 
100
//------------------------------------------+-----------------------------------
101
//! FIXME_docs
102 28 wfjm
inline uint32_t RlinkConnect::SysId() const
103
{
104
  return fSysId;
105
}
106 19 wfjm
 
107 28 wfjm
//------------------------------------------+-----------------------------------
108
//! FIXME_docs
109
inline size_t RlinkConnect::RbufSize() const
110
{
111
  return fRbufSize;
112
}
113
 
114
//------------------------------------------+-----------------------------------
115
//! FIXME_docs
116
inline size_t RlinkConnect::BlockSizeMax() const
117
{
118
  return (fRbufSize-kRbufBlkDelta)/2;
119
}
120
 
121
//------------------------------------------+-----------------------------------
122
//! FIXME_docs
123
inline size_t RlinkConnect::BlockSizePrudent() const
124
{
125
  return (fRbufSize-kRbufPrudentDelta)/2;
126
}
127
 
128
//------------------------------------------+-----------------------------------
129
//! FIXME_docs
130
 
131 10 wfjm
inline bool RlinkConnect::AddrMapInsert(const std::string& name, uint16_t addr)
132
{
133
  return fAddrMap.Insert(name, addr);
134
}
135
 
136
//------------------------------------------+-----------------------------------
137
//! FIXME_docs
138
 
139
inline bool RlinkConnect::AddrMapErase(const std::string& name)
140
{
141
  return fAddrMap.Erase(name);
142
}
143
 
144
//------------------------------------------+-----------------------------------
145
//! FIXME_docs
146
 
147
inline bool RlinkConnect::AddrMapErase(uint16_t addr)
148
{
149
  return fAddrMap.Erase(addr);
150
}
151
 
152
//------------------------------------------+-----------------------------------
153
//! FIXME_docs
154
 
155
inline void RlinkConnect::AddrMapClear()
156
{
157
  return fAddrMap.Clear();
158
}
159
 
160
//------------------------------------------+-----------------------------------
161
//! FIXME_docs
162
 
163
inline const RlinkAddrMap& RlinkConnect::AddrMap() const
164
{
165
  return fAddrMap;
166
}
167
 
168
//------------------------------------------+-----------------------------------
169
//! FIXME_docs
170
 
171
inline const Rstats& RlinkConnect::Stats() const
172
{
173
  return fStats;
174
}
175
 
176
//------------------------------------------+-----------------------------------
177
//! FIXME_docs
178
 
179 27 wfjm
inline const Rstats& RlinkConnect::SndStats() const
180
{
181
  return fSndPkt.Stats();
182
}
183
 
184
//------------------------------------------+-----------------------------------
185
//! FIXME_docs
186
 
187
inline const Rstats& RlinkConnect::RcvStats() const
188
{
189
  return fRcvPkt.Stats();
190
}
191
 
192
//------------------------------------------+-----------------------------------
193
//! FIXME_docs
194
 
195 29 wfjm
inline uint32_t RlinkConnect::LogBaseAddr() const
196 10 wfjm
{
197 29 wfjm
  return fLogBaseAddr;
198 10 wfjm
}
199
 
200
//------------------------------------------+-----------------------------------
201
//! FIXME_docs
202
 
203 29 wfjm
inline uint32_t RlinkConnect::LogBaseData() const
204
{
205
  return fLogBaseData;
206
}
207
 
208
//------------------------------------------+-----------------------------------
209
//! FIXME_docs
210
 
211
inline uint32_t RlinkConnect::LogBaseStat() const
212
{
213
  return fLogBaseStat;
214
}
215
 
216
//------------------------------------------+-----------------------------------
217
//! FIXME_docs
218
 
219
inline uint32_t RlinkConnect::PrintLevel() const
220
{
221
  return fPrintLevel;
222
}
223
 
224
//------------------------------------------+-----------------------------------
225
//! FIXME_docs
226
 
227
inline uint32_t RlinkConnect::DumpLevel() const
228
{
229
  return fDumpLevel;
230
}
231
 
232
//------------------------------------------+-----------------------------------
233
//! FIXME_docs
234
 
235
inline uint32_t RlinkConnect::TraceLevel() const
236
{
237
  return fTraceLevel;
238
}
239
 
240
//------------------------------------------+-----------------------------------
241
//! FIXME_docs
242
 
243 10 wfjm
inline RlogFile& RlinkConnect::LogFile() const
244
{
245 19 wfjm
  return *fspLog;
246 10 wfjm
}
247
 
248 19 wfjm
//------------------------------------------+-----------------------------------
249
//! FIXME_docs
250 10 wfjm
 
251 19 wfjm
inline const boost::shared_ptr& RlinkConnect::LogFileSPtr() const
252
{
253
  return fspLog;
254
}
255
 
256 29 wfjm
//------------------------------------------+-----------------------------------
257
//! FIXME_docs
258 19 wfjm
 
259 29 wfjm
inline std::string RlinkConnect::LogFileName() const
260
{
261
  return LogFile().Name();
262
}
263
 
264
 
265 10 wfjm
} // end namespace Retro

powered by: WebSVN 2.1.0

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