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 28

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

Line No. Rev Author Line
1 28 wfjm
// $Id: RlinkConnect.ipp 626 2015-01-03 14:41:37Z 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 28 wfjm
// 2015-01-01   626   2.1    full rlink v4 implementation
17 19 wfjm
// 2013-03-05   495   1.2.1  add Exec() without emsg (will send emsg to LogFile)
18
// 2013-02-23   492   1.2    use scoped_ptr for Port; Close allways allowed
19
//                           use RlinkContext, add Context(), Exec(..., cntx)
20
// 2013-02-22   491   1.1    use new RlogFile/RlogMsg interfaces
21
// 2013-02-03   481   1.0.1  add SetServer(),Server()
22 10 wfjm
// 2011-04-02   375   1.0    Initial version
23
// 2011-01-15   356   0.1    First draft
24
// ---------------------------------------------------------------------------
25
 
26
/*!
27
  \file
28 28 wfjm
  \version $Id: RlinkConnect.ipp 626 2015-01-03 14:41:37Z mueller $
29 10 wfjm
  \brief   Implemenation (inline) of RlinkConnect.
30
*/
31
 
32 19 wfjm
// all method definitions in namespace Retro
33 10 wfjm
namespace Retro {
34
 
35
//------------------------------------------+-----------------------------------
36
//! FIXME_docs
37
 
38
inline bool RlinkConnect::IsOpen() const
39
{
40
  return fpPort && fpPort->IsOpen();
41
}
42
 
43
//------------------------------------------+-----------------------------------
44
//! FIXME_docs
45
 
46
inline RlinkPort* RlinkConnect::Port() const
47
{
48 19 wfjm
  return fpPort.get();
49 10 wfjm
}
50
 
51
//------------------------------------------+-----------------------------------
52
//! FIXME_docs
53
 
54 19 wfjm
inline RlinkContext& RlinkConnect::Context()
55
{
56
  return fContext;
57
}
58
 
59
//------------------------------------------+-----------------------------------
60
//! FIXME_docs
61
 
62
inline void RlinkConnect::SetServer(RlinkServer* pserv)
63
{
64
  fpServ = pserv;
65
  return;
66
}
67
 
68
//------------------------------------------+-----------------------------------
69
//! FIXME_docs
70
 
71
inline RlinkServer* RlinkConnect::Server() const
72
{
73
  return fpServ;
74
}
75
 
76
//------------------------------------------+-----------------------------------
77
//! FIXME_docs
78
inline bool RlinkConnect::Exec(RlinkCommandList& clist, RerrMsg& emsg)
79
{
80
  return Exec(clist, fContext, emsg);
81
}
82
 
83
//------------------------------------------+-----------------------------------
84
//! FIXME_docs
85
inline bool RlinkConnect::Exec(RlinkCommandList& clist)
86
{
87
  return Exec(clist, fContext);
88
}
89
 
90
//------------------------------------------+-----------------------------------
91
//! FIXME_docs
92 28 wfjm
inline uint32_t RlinkConnect::SysId() const
93
{
94
  return fSysId;
95
}
96 19 wfjm
 
97 28 wfjm
//------------------------------------------+-----------------------------------
98
//! FIXME_docs
99
inline size_t RlinkConnect::RbufSize() const
100
{
101
  return fRbufSize;
102
}
103
 
104
//------------------------------------------+-----------------------------------
105
//! FIXME_docs
106
inline size_t RlinkConnect::BlockSizeMax() const
107
{
108
  return (fRbufSize-kRbufBlkDelta)/2;
109
}
110
 
111
//------------------------------------------+-----------------------------------
112
//! FIXME_docs
113
inline size_t RlinkConnect::BlockSizePrudent() const
114
{
115
  return (fRbufSize-kRbufPrudentDelta)/2;
116
}
117
 
118
//------------------------------------------+-----------------------------------
119
//! FIXME_docs
120
 
121 10 wfjm
inline bool RlinkConnect::AddrMapInsert(const std::string& name, uint16_t addr)
122
{
123
  return fAddrMap.Insert(name, addr);
124
}
125
 
126
//------------------------------------------+-----------------------------------
127
//! FIXME_docs
128
 
129
inline bool RlinkConnect::AddrMapErase(const std::string& name)
130
{
131
  return fAddrMap.Erase(name);
132
}
133
 
134
//------------------------------------------+-----------------------------------
135
//! FIXME_docs
136
 
137
inline bool RlinkConnect::AddrMapErase(uint16_t addr)
138
{
139
  return fAddrMap.Erase(addr);
140
}
141
 
142
//------------------------------------------+-----------------------------------
143
//! FIXME_docs
144
 
145
inline void RlinkConnect::AddrMapClear()
146
{
147
  return fAddrMap.Clear();
148
}
149
 
150
//------------------------------------------+-----------------------------------
151
//! FIXME_docs
152
 
153
inline const RlinkAddrMap& RlinkConnect::AddrMap() const
154
{
155
  return fAddrMap;
156
}
157
 
158
//------------------------------------------+-----------------------------------
159
//! FIXME_docs
160
 
161
inline const Rstats& RlinkConnect::Stats() const
162
{
163
  return fStats;
164
}
165
 
166
//------------------------------------------+-----------------------------------
167
//! FIXME_docs
168
 
169 27 wfjm
inline const Rstats& RlinkConnect::SndStats() const
170
{
171
  return fSndPkt.Stats();
172
}
173
 
174
//------------------------------------------+-----------------------------------
175
//! FIXME_docs
176
 
177
inline const Rstats& RlinkConnect::RcvStats() const
178
{
179
  return fRcvPkt.Stats();
180
}
181
 
182
//------------------------------------------+-----------------------------------
183
//! FIXME_docs
184
 
185 10 wfjm
inline const RlinkConnect::LogOpts& RlinkConnect::GetLogOpts() const
186
{
187
  return fLogOpts;
188
}
189
 
190
//------------------------------------------+-----------------------------------
191
//! FIXME_docs
192
 
193
inline RlogFile& RlinkConnect::LogFile() const
194
{
195 19 wfjm
  return *fspLog;
196 10 wfjm
}
197
 
198 19 wfjm
//------------------------------------------+-----------------------------------
199
//! FIXME_docs
200 10 wfjm
 
201 19 wfjm
inline const boost::shared_ptr& RlinkConnect::LogFileSPtr() const
202
{
203
  return fspLog;
204
}
205
 
206
 
207 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.