28 std::list<Triple> match = db->
query(t,&context);
30 name = match.begin()->name;
37 std::list<Triple> lst = db->
query(t,
nullptr);
39 tmpid =
atoi(lst.begin()->value.c_str());
47 std::snprintf(buf, 256,
"%d", tmpid);
52 std::snprintf(buf, 256,
"/tmp/port/%u", tmpid);
72 if (
c.getPort()!=-1 &&
c.getPort()!=0) {
92 std::list<Triple> match = db->
query(t,&context);
94 npref = match.begin()->name;
97 match = db->
query(t,&context);
98 if (match.size()==0) {
109 std::list<Triple> lst = db->
query(t,
nullptr);
111 regid =
atoi(lst.begin()->value.c_str());
120 std::list<Triple> match = db->
query(t,&context);
121 if (match.size()>0) {
136 std::snprintf(buf, 256,
"%d", regid);
159 if (
c.getCarrier()!=
"mcast") {
162 if (
c.getHost()!=
"...") {
171 if (context.
rid>=0) {
173 std::list<Triple> match = db->
query(t,&context);
174 if (match.size()>0) {
175 name = match.begin()->name;
180 if (mcastCursor==-1) {
182 std::list<Triple> lst = db->
query(t,
nullptr);
184 mcastCursor =
atoi(lst.begin()->value.c_str());
186 if (mcastCursor==-1) {
192 std::snprintf(buf, 256,
"%d", mcastCursor);
198 int v1 = mcastCursor%255;
199 int v2 = mcastCursor/255;
204 std::snprintf(buf, 256,
"224.1.%d.%d",
v2+1,
v1+1);
228 if (db->
find(t,&context)>=0) {
238 if (db->
find(t,&context)>=0) {
246 if (db->
find(t,&context)>=0) {
A mini-server for performing network communication in the background.
std::string getName() const override
Get name of port.
yarp::os::Contact completeSocket(const yarp::os::Contact &c) override
bool freePortResources(const yarp::os::Contact &c) override
yarp::os::Contact completePortNumber(const yarp::os::Contact &c)
yarp::os::Contact completeHost(const yarp::os::Contact &c)
yarp::os::Contact completePortName(const yarp::os::Contact &c) override
Side information for controlling access to triples.
virtual std::list< Triple > query(Triple &ti, TripleContext *context)=0
virtual int find(Triple &t, TripleContext *context)=0
virtual void update(Triple &t, TripleContext *context)=0
The basic unit of data the name server works with.
void setNsNameValue(const char *ns, const char *name, const char *value)
#define yCError(component,...)
#define YARP_SERVERSQL_LOG_COMPONENT(name, name_string)
An interface to the operating system, including Port based communication.