YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
logicresource.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5
6#ifndef YARP_MANAGER_LOGICRESOURCE
7#define YARP_MANAGER_LOGICRESOURCE
8
10#include <yarp/manager/node.h>
13#include <yarp/conf/api.h>
14
15namespace yarp::manager {
16
17
19{
20public:
21 Platform();
22 Platform(const char* szName);
23 ~Platform() override;
24 Node* clone() override;
25 bool satisfy(GenericResource* resource) override;
26
27 void setDistribution(const char* str) { if(str) { strDistrib = str; } }
28 void setRelease(const char* str) { if(str) { strRelease = str; } }
29 const char* getDistribution() { return strDistrib.c_str(); }
30 const char* getRelease() { return strRelease.c_str(); }
31
32protected:
33
34private:
35 std::string strDistrib;
36 std::string strRelease;
37 bool satisfy_platform(Platform* os);
38
39};
40
41
43{
44public:
46 ResYarpPort(const char* szName);
47 ~ResYarpPort() override;
48 void setPort(const char* szPort) { if(szPort) { strPort = szPort; } }
49 const char* getPort() { return strPort.c_str(); }
50 void setRequest(const char* szReq) { if(szReq) { strRequest = szReq; } }
51 void setReply(const char* szRep) { if(szRep) { strReply = szRep; } }
52 const char* getRequest() { return strRequest.c_str(); }
53 const char* getReply() { return strReply.c_str(); }
54 void setTimeout(double t) { timeout = t; }
55 double getTimeout() { return timeout; }
56 Node* clone() override;
57 bool satisfy(GenericResource* resource) override;
58
59protected:
60
61private:
62 std::string strPort;
63 std::string strRequest;
64 std::string strReply;
65 double timeout;
66};
67
68} // namespace yarp::manager
69
70
71#endif // __YARP_MANAGER_LOGICRESOURCE__
float t
a Node of a Graph
Definition node.h:64
const char * getRelease()
Node * clone() override
Platform()
Class Platform.
void setDistribution(const char *str)
const char * getDistribution()
void setRelease(const char *str)
bool satisfy(GenericResource *resource) override
bool satisfy(GenericResource *resource) override
void setPort(const char *szPort)
void setReply(const char *szRep)
ResYarpPort()
Class ResYarpPort.
void setRequest(const char *szReq)