Line 1... |
Line 1... |
// $Id: RlinkConnect.cpp 495 2013-03-06 17:13:48Z mueller $
|
// $Id: RlinkConnect.cpp 509 2013-04-21 20:46:20Z mueller $
|
//
|
//
|
// Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
// Copyright 2011-2013 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
//
|
//
|
// This program is free software; you may redistribute and/or modify it under
|
// This program is free software; you may redistribute and/or modify it under
|
// the terms of the GNU General Public License as published by the Free
|
// the terms of the GNU General Public License as published by the Free
|
Line 11... |
Line 11... |
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
// for complete details.
|
// for complete details.
|
//
|
//
|
// Revision History:
|
// Revision History:
|
// Date Rev Version Comment
|
// Date Rev Version Comment
|
|
// 2013-04-21 509 1.3.2 add SndAttn() method
|
// 2013-03-01 493 1.3.1 add Server(Active..|SignalAttn)() methods
|
// 2013-03-01 493 1.3.1 add Server(Active..|SignalAttn)() methods
|
// 2013-02-23 492 1.3 use scoped_ptr for Port; Close allways allowed
|
// 2013-02-23 492 1.3 use scoped_ptr for Port; Close allways allowed
|
// use RlinkContext, add Context(), Exec(..., cntx)
|
// use RlinkContext, add Context(), Exec(..., cntx)
|
// 2013-02-22 491 1.2 use new RlogFile/RlogMsg interfaces
|
// 2013-02-22 491 1.2 use new RlogFile/RlogMsg interfaces
|
// 2013-02-03 481 1.1.2 use Rexception
|
// 2013-02-03 481 1.1.2 use Rexception
|
Line 25... |
Line 26... |
// 2011-01-15 356 0.1 First draft
|
// 2011-01-15 356 0.1 First draft
|
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
|
|
/*!
|
/*!
|
\file
|
\file
|
\version $Id: RlinkConnect.cpp 495 2013-03-06 17:13:48Z mueller $
|
\version $Id: RlinkConnect.cpp 509 2013-04-21 20:46:20Z mueller $
|
\brief Implemenation of RlinkConnect.
|
\brief Implemenation of RlinkConnect.
|
*/
|
*/
|
|
|
#include <iostream>
|
#include <iostream>
|
|
|
Line 572... |
Line 573... |
//------------------------------------------+-----------------------------------
|
//------------------------------------------+-----------------------------------
|
//! FIXME_docs
|
//! FIXME_docs
|
|
|
bool RlinkConnect::SndOob(uint16_t addr, uint16_t data, RerrMsg& emsg)
|
bool RlinkConnect::SndOob(uint16_t addr, uint16_t data, RerrMsg& emsg)
|
{
|
{
|
|
boost::lock_guard<RlinkConnect> lock(*this);
|
fStats.Inc(kStatNSndOob);
|
fStats.Inc(kStatNSndOob);
|
return fTxPkt.SndOob(fpPort.get(), addr, data, emsg);
|
return fTxPkt.SndOob(fpPort.get(), addr, data, emsg);
|
}
|
}
|
|
|
//------------------------------------------+-----------------------------------
|
//------------------------------------------+-----------------------------------
|
//! FIXME_docs
|
//! FIXME_docs
|
|
|
|
bool RlinkConnect::SndAttn(RerrMsg& emsg)
|
|
{
|
|
boost::lock_guard<RlinkConnect> lock(*this);
|
|
return fTxPkt.SndAttn(fpPort.get(), emsg);
|
|
}
|
|
|
|
//------------------------------------------+-----------------------------------
|
|
//! FIXME_docs
|
|
|
void RlinkConnect::SetLogOpts(const LogOpts& opts)
|
void RlinkConnect::SetLogOpts(const LogOpts& opts)
|
{
|
{
|
if (opts.baseaddr!=2 && opts.baseaddr!=8 && opts.baseaddr!=16)
|
if (opts.baseaddr!=2 && opts.baseaddr!=8 && opts.baseaddr!=16)
|
throw Rexception("RlinkConnect::SetLogOpts()",
|
throw Rexception("RlinkConnect::SetLogOpts()",
|
"Bad args: baseaddr != 2,8,16");
|
"Bad args: baseaddr != 2,8,16");
|