YARP
Yet Another Robot Platform
yarpdevbroker.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #ifndef YARP_MANAGER_YARPDEVBROKER
10 #define YARP_MANAGER_YARPDEVBROKER
11 
12 #include <string>
13 
16 
17 
18 namespace yarp {
19 namespace manager {
20 
22 {
23 
24 public:
26  virtual ~YarpdevLocalBroker() {}
28  bool init(const char* szcmd, const char* szparam,
29  const char* szhost, const char* szstdio,
30  const char* szworkdir, const char* szenv) override {
31 
32  OSTRINGSTREAM strDevParam;
33  std::string strParam;
34  std::string strCmd;
35  if(szcmd) strCmd = szcmd;
36  if(szparam) strParam = szparam;
37  strDevParam<<"--device "<<strCmd<<" "<<strParam;
38  return LocalBroker::init("yarpdev", strDevParam.str().c_str(),
39  szhost, szstdio, szworkdir, szenv);
40  }
41 };
42 
43 
45 {
46 
47 public:
49  virtual ~YarpdevYarprunBroker() {}
51  bool init(const char* szcmd, const char* szparam,
52  const char* szhost, const char* szstdio,
53  const char* szworkdir, const char* szenv) override {
54 
55  OSTRINGSTREAM strDevParam;
56  std::string strParam;
57  std::string strCmd;
58  if(szcmd) strCmd = szcmd;
59  if(szparam) strParam = szparam;
60  strDevParam<<"--device "<<strCmd<<" "<<strParam;
61  return YarpBroker::init("yarpdev", strDevParam.str().c_str(),
62  szhost, szstdio, szworkdir, szenv);
63  }
64 };
65 
66 } // namespace yarp
67 } // namespace manager
68 
69 
70 #endif // __YARP_MANAGER_YARPDEVBROKER__
yarp::manager::YarpdevLocalBroker::~YarpdevLocalBroker
virtual ~YarpdevLocalBroker()
Definition: yarpdevbroker.h:26
yarp::manager::OSTRINGSTREAM
std::stringstream OSTRINGSTREAM
Definition: utility.h:52
yarp::manager::YarpdevYarprunBroker
Definition: yarpdevbroker.h:45
localbroker.h
yarp::manager::YarpdevYarprunBroker::~YarpdevYarprunBroker
virtual ~YarpdevYarprunBroker()
Definition: yarpdevbroker.h:49
yarp::manager::YarpdevLocalBroker
Definition: yarpdevbroker.h:22
yarp::manager::LocalBroker::init
bool init() override
Definition: localbroker.cpp:164
yarp::manager::YarpdevYarprunBroker::init
bool init(const char *szcmd, const char *szparam, const char *szhost, const char *szstdio, const char *szworkdir, const char *szenv) override
Definition: yarpdevbroker.h:51
yarp::manager::YarpBroker
Class Broker.
Definition: yarpbroker.h:37
yarpbroker.h
yarp::manager::YarpdevYarprunBroker::YarpdevYarprunBroker
YarpdevYarprunBroker()
Definition: yarpdevbroker.h:48
yarp::manager::YarpdevLocalBroker::init
bool init(const char *szcmd, const char *szparam, const char *szhost, const char *szstdio, const char *szworkdir, const char *szenv) override
Definition: yarpdevbroker.h:28
yarp::manager::YarpBroker::init
bool init() override
Definition: yarpbroker.cpp:64
yarp
The main, catch-all namespace for YARP.
Definition: environment.h:18
yarp::manager::LocalBroker
Class LocalBroker.
Definition: localbroker.h:37
yarp::manager::YarpdevLocalBroker::YarpdevLocalBroker
YarpdevLocalBroker()
Definition: yarpdevbroker.h:25