Line 1... |
Line 1... |
// $Id: RlinkPortCuff.cpp 632 2015-01-11 12:30:03Z mueller $
|
// $Id: RlinkPortCuff.cpp 666 2015-04-12 21:17:54Z mueller $
|
//
|
//
|
// Copyright 2012-2014 by Walter F.J. Mueller <W.F.J.Mueller@gsi.de>
|
// Copyright 2012-2015 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
|
// Software Foundation, either version 2, or at your option any later version.
|
// Software Foundation, either version 2, or at your option any later version.
|
//
|
//
|
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
|
|
// 2015-04-12 666 1.1.3 add noinit attribute
|
// 2014-08-22 584 1.1.2 use nullptr
|
// 2014-08-22 584 1.1.2 use nullptr
|
// 2013-05-17 521 1.1.1 use Rtools::String2Long
|
// 2013-05-17 521 1.1.1 use Rtools::String2Long
|
// 2013-02-23 492 1.1 use RparseUrl
|
// 2013-02-23 492 1.1 use RparseUrl
|
// 2013-02-10 485 1.0.3 add static const defs
|
// 2013-02-10 485 1.0.3 add static const defs
|
// 2013-02-03 481 1.0.2 use Rexception
|
// 2013-02-03 481 1.0.2 use Rexception
|
Line 22... |
Line 23... |
// 2012-12-26 465 1.0 Initial version
|
// 2012-12-26 465 1.0 Initial version
|
// ---------------------------------------------------------------------------
|
// ---------------------------------------------------------------------------
|
|
|
/*!
|
/*!
|
\file
|
\file
|
\version $Id: RlinkPortCuff.cpp 632 2015-01-11 12:30:03Z mueller $
|
\version $Id: RlinkPortCuff.cpp 666 2015-04-12 21:17:54Z mueller $
|
\brief Implemenation of RlinkPortCuff.
|
\brief Implemenation of RlinkPortCuff.
|
*/
|
*/
|
|
|
#include <errno.h>
|
#include <errno.h>
|
#include <unistd.h>
|
#include <unistd.h>
|
Line 95... |
Line 96... |
{
|
{
|
int irc;
|
int irc;
|
|
|
if (IsOpen()) Close();
|
if (IsOpen()) Close();
|
|
|
if (!fUrl.Set(url, "|trace|", emsg)) return false;
|
if (!fUrl.Set(url, "|trace|noinit|", emsg)) return false;
|
|
|
// initialize USB context
|
// initialize USB context
|
irc = libusb_init(&fpUsbContext);
|
irc = libusb_init(&fpUsbContext);
|
if (irc != 0) {
|
if (irc != 0) {
|
emsg.Init("RlinkPortCuff::Open()",
|
emsg.Init("RlinkPortCuff::Open()",
|