16 #if defined(YARP_HAS_ACE)
18 # include <ace/Handle_Set.h>
19 # include <ace/INET_Addr.h>
20 # include <ace/Log_Msg.h>
21 # include <ace/OS_Memory.h>
22 # include <ace/OS_NS_sys_select.h>
23 # include <ace/SOCK_Dgram.h>
24 # include <ace/SOCK_Dgram_Mcast.h>
25 # include <ace/os_include/net/os_if.h>
31 # include <arpa/inet.h>
32 # include <netinet/in.h>
33 # include <sys/socket.h>
34 # include <sys/types.h>
45 #define UDP_MAX_DATAGRAM_SIZE (65507 - CRC_SIZE)
56 (length > crcLength) ? (length - crcLength) : 0);
61 bool ok = (alt == curr && pct == altPct);
64 yCDebug(DGRAMTWOWAYSTREAM,
"crc mismatch");
67 yCDebug(DGRAMTWOWAYSTREAM,
"packet code broken");
70 if (store_altPct !=
nullptr) {
71 *store_altPct = altPct;
81 (length > crcLength) ? (length - crcLength) : 0);
91 #if defined(YARP_HAS_ACE)
92 ACE_INET_Addr anywhere((u_short)0, (ACE_UINT32)INADDR_ANY);
93 Contact local(anywhere.get_host_addr(),
94 anywhere.get_port_number());
98 return open(local, remote);
103 localAddress = local;
104 remoteAddress = remote;
106 #if defined(YARP_HAS_ACE)
107 localHandle = ACE_INET_Addr((u_short)(localAddress.getPort()), (ACE_UINT32)INADDR_ANY);
109 remoteHandle.set(remoteAddress.getPort(), remoteAddress.getHost().c_str());
111 dgram =
new ACE_SOCK_Dgram;
112 yCAssert(DGRAMTWOWAYSTREAM, dgram !=
nullptr);
114 int result = dgram->open(localHandle,
115 ACE_PROTOCOL_FAMILY_INET,
123 if ((s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) {
126 struct sockaddr_in dgram_sin;
127 memset((
char*)&dgram_sin, 0,
sizeof(dgram_sin));
128 dgram_sin.sin_family = AF_INET;
129 dgram_sin.sin_addr.s_addr = htonl(INADDR_ANY);
130 dgram_sin.sin_port = htons(remote.
getPort());
131 if (local.isValid()) {
132 if (inet_pton(AF_INET, remote.
getHost().c_str(), &dgram_sin.sin_addr) == 0) {
133 yCError(DGRAMTWOWAYSTREAM,
"could not set up udp client");
136 if (connect(s, (
struct sockaddr*)&dgram_sin,
sizeof(dgram_sin)) == -1) {
137 yCError(DGRAMTWOWAYSTREAM,
"could not connect udp client");
141 if (bind(s, (
struct sockaddr*)&dgram_sin,
sizeof(dgram_sin)) == -1) {
142 yCError(DGRAMTWOWAYSTREAM,
"could not create udp server");
151 struct sockaddr_in sin;
152 socklen_t len =
sizeof(sin);
153 if (getsockname(dgram_sockfd, (
struct sockaddr*)&sin, &len) == 0 && sin.sin_family == AF_INET) {
155 local_port = ntohs(sin.sin_port);
160 yCError(DGRAMTWOWAYSTREAM,
"could not open datagram socket");
164 configureSystemBuffers();
166 #if defined(YARP_HAS_ACE)
167 dgram->get_local_addr(localHandle);
168 yCDebug(DGRAMTWOWAYSTREAM,
"starting DGRAM entity on port number %u",localHandle.get_port_number());
169 localAddress =
Contact(
"127.0.0.1", localHandle.get_port_number());
171 localAddress =
Contact(
"127.0.0.1", local_port);
174 yCDebug(DGRAMTWOWAYSTREAM,
"Update: DGRAM from %s to %s", localAddress.toURI().c_str(), remoteAddress.toURI().c_str());
181 void DgramTwoWayStream::allocate(
int readSize,
int writeSize)
187 int _write_size = -1;
190 std::string _env_mode;
196 if (!_env_mode.empty()) {
197 _env_dgram = _env_mode;
199 if (!_env_dgram.empty()) {
200 int sz = yarp::conf::numeric::from_string<int>(_env_dgram);
202 _read_size = _write_size = sz;
204 yCInfo(DGRAMTWOWAYSTREAM,
"Datagram packet size set to %d", _read_size);
207 _read_size = readSize;
208 yCInfo(DGRAMTWOWAYSTREAM,
"Datagram read size reset to %d", _read_size);
210 if (writeSize != 0) {
211 _write_size = writeSize;
212 yCInfo(DGRAMTWOWAYSTREAM,
"Datagram write size reset to %d", _write_size);
220 if (_read_size < 0) {
221 #if defined(YARP_HAS_ACE)
223 if (dgram !=
nullptr) {
224 int len =
sizeof(_read_size);
225 int result = dgram->get_option(SOL_SOCKET, SO_RCVBUF, &_read_size, &len);
227 yCError(DGRAMTWOWAYSTREAM,
"Failed to read buffer size from RCVBUF socket with error: %s. Setting read buffer size to UDP_MAX_DATAGRAM_SIZE.",
233 socklen_t len =
sizeof(_read_size);
235 int result = getsockopt(dgram_sockfd, SOL_SOCKET, SO_RCVBUF, &_read_size, &len);
237 yCError(DGRAMTWOWAYSTREAM,
"Failed to read buffer size from RCVBUF socket with error: %s. Setting read buffer size to UDP_MAX_DATAGRAM_SIZE.",
244 readBuffer.allocate(_read_size);
245 writeBuffer.allocate(_write_size);
254 void DgramTwoWayStream::configureSystemBuffers()
265 int readBufferSize = -1;
266 if (!socketReadBufferSize.empty()) {
267 readBufferSize = yarp::conf::numeric::from_string<int>(socketReadBufferSize);
268 }
else if (!socketBufferSize.empty()) {
269 readBufferSize = yarp::conf::numeric::from_string<int>(socketBufferSize);
272 int writeBufferSize = -1;
273 if (!socketSendBufferSize.empty()) {
274 writeBufferSize = yarp::conf::numeric::from_string<int>(socketSendBufferSize);
275 }
else if (!socketBufferSize.empty()) {
276 writeBufferSize = yarp::conf::numeric::from_string<int>(socketBufferSize);
282 yCWarning(DGRAMTWOWAYSTREAM,
"The desired SND buffer size is too big. It is set to the max datagram size : %d",
288 if (readBufferSize > 0) {
289 int actualReadSize = -1;
291 #if defined(YARP_HAS_ACE)
292 int intSize =
sizeof(readBufferSize);
293 int setResult = dgram->set_option(SOL_SOCKET, SO_RCVBUF, (
void*)&readBufferSize, intSize);
295 int getResult = dgram->get_option(SOL_SOCKET, SO_RCVBUF, (
void*)&actualReadSize, &intSize);
297 socklen_t intSize =
sizeof(readBufferSize);
298 int setResult = setsockopt(dgram_sockfd, SOL_SOCKET, SO_RCVBUF, (
void*)&readBufferSize, intSize);
299 int getResult = getsockopt(dgram_sockfd, SOL_SOCKET, SO_RCVBUF, (
void*)&actualReadSize, &intSize);
303 #if defined(__linux__)
306 if (setResult < 0 || getResult < 0 || readBufferSize != actualReadSize) {
307 bufferAlertNeeded =
true;
308 bufferAlerted =
false;
309 yCWarning(DGRAMTWOWAYSTREAM,
"Failed to set RECV socket buffer to desired size. Actual: %d, Desired %d",
314 if (writeBufferSize > 0) {
315 int actualWriteSize = -1;
316 #if defined(YARP_HAS_ACE)
317 int intSize =
sizeof(writeBufferSize);
318 int setResult = dgram->set_option(SOL_SOCKET, SO_SNDBUF, (
void*)&writeBufferSize, intSize);
319 int getResult = dgram->get_option(SOL_SOCKET, SO_SNDBUF, (
void*)&actualWriteSize, &intSize);
321 socklen_t intSize =
sizeof(writeBufferSize);
322 int setResult = setsockopt(dgram_sockfd, SOL_SOCKET, SO_SNDBUF, (
void*)&writeBufferSize, intSize);
323 int getResult = getsockopt(dgram_sockfd, SOL_SOCKET, SO_SNDBUF, (
void*)&actualWriteSize, &intSize);
327 #if defined(__linux__)
328 actualWriteSize /= 2;
330 if (setResult < 0 || getResult < 0 || writeBufferSize != actualWriteSize) {
331 bufferAlertNeeded =
true;
332 bufferAlerted =
false;
333 yCWarning(DGRAMTWOWAYSTREAM,
"Failed to set SND socket buffer to desired size. Actual: %d, Desired: %d",
341 #if defined(YARP_HAS_ACE)
342 int DgramTwoWayStream::restrictMcast(ACE_SOCK_Dgram_Mcast* dmcast,
347 restrictInterfaceIp = ipLocal;
349 yCInfo(DGRAMTWOWAYSTREAM,
"multicast connection %s on network interface for %s", group.
getHost().c_str(), ipLocal.
getHost().c_str());
358 ip_mreq multicast_address;
359 ACE_INET_Addr group_addr(group.
getPort(),
361 ACE_INET_Addr interface_addr(ipLocal.
getPort(),
363 multicast_address.imr_interface.s_addr = htonl(interface_addr.get_ip_address());
364 multicast_address.imr_multiaddr.s_addr = htonl(group_addr.get_ip_address());
367 yCDebug(DGRAMTWOWAYSTREAM,
"Trying to correct mcast membership...");
368 result = ((ACE_SOCK*)dmcast)->set_option(IPPROTO_IP, IP_ADD_MEMBERSHIP, &multicast_address,
sizeof(
struct ip_mreq));
370 yCDebug(DGRAMTWOWAYSTREAM,
"Trying to correct mcast output...");
371 result = ((ACE_SOCK*)dmcast)->set_option(IPPROTO_IP, IP_MULTICAST_IF, &multicast_address.imr_interface.s_addr,
sizeof(
struct in_addr));
375 yCDebug(DGRAMTWOWAYSTREAM,
"mcast result: %s", strerror(num));
394 localAddress = ipLocal;
396 #if defined(YARP_HAS_ACE)
397 localHandle = ACE_INET_Addr((u_short)(localAddress.getPort()),
398 (ACE_UINT32)INADDR_ANY);
400 ACE_SOCK_Dgram_Mcast::options mcastOptions = ACE_SOCK_Dgram_Mcast::DEFOPTS;
401 # if defined(__APPLE__)
402 mcastOptions =
static_cast<ACE_SOCK_Dgram_Mcast::options
>(ACE_SOCK_Dgram_Mcast::OPT_BINDADDR_NO | ACE_SOCK_Dgram_Mcast::DEFOPT_NULLIFACE);
405 auto* dmcast =
new ACE_SOCK_Dgram_Mcast(mcastOptions);
408 yCAssert(DGRAMTWOWAYSTREAM, dgram !=
nullptr);
412 result = dmcast->open(addr,
nullptr, 1);
414 result = restrictMcast(dmcast, group, ipLocal,
false);
418 yCError(DGRAMTWOWAYSTREAM,
"could not open multicast datagram socket");
427 struct sockaddr_in dgram_sin;
429 if ((s = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) {
430 yCError(DGRAMTWOWAYSTREAM,
"could not create sender socket");
434 memset((
char*)&dgram_sin, 0,
sizeof(dgram_sin));
435 dgram_sin.sin_family = AF_INET;
436 dgram_sin.sin_port = htons(group.
getPort());
439 if (inet_pton(AF_INET, group.
getHost().c_str(), &dgram_sin.sin_addr) == 0) {
440 yCError(DGRAMTWOWAYSTREAM,
"could not set up mcast client");
443 if (connect(s, (
struct sockaddr*)&dgram_sin,
sizeof(dgram_sin)) == -1) {
444 yCError(DGRAMTWOWAYSTREAM,
"could not connect mcast client");
453 struct sockaddr_in sin;
454 socklen_t len =
sizeof(sin);
455 if (getsockname(dgram_sockfd, (
struct sockaddr*)&sin, &len) == 0 && sin.sin_family == AF_INET) {
456 local_port = ntohs(sin.sin_port);
461 configureSystemBuffers();
462 remoteAddress = group;
465 localHandle.set(localAddress.getPort(), localAddress.getHost().c_str());
466 remoteHandle.set(remoteAddress.getPort(), remoteAddress.getHost().c_str());
469 remoteAddress = group;
470 localAddress =
Contact(
"127.0.0.1", local_port);
471 localHandle = local_port;
472 remoteHandle = remoteAddress.getPort();
476 yCDebug(DGRAMTWOWAYSTREAM,
"Update: DGRAM from %s to %s", localAddress.toURI().c_str(), remoteAddress.toURI().c_str());
485 yCDebug(DGRAMTWOWAYSTREAM,
"subscribing to mcast address %s for %s", group.
toURI().c_str(), (sender ?
"writing" :
"reading"));
491 return openMcast(group, ipLocal);
497 #if defined(YARP_HAS_ACE)
498 ACE_SOCK_Dgram_Mcast::options mcastOptions = ACE_SOCK_Dgram_Mcast::DEFOPTS;
499 # if defined(__APPLE__)
500 mcastOptions =
static_cast<ACE_SOCK_Dgram_Mcast::options
>(ACE_SOCK_Dgram_Mcast::OPT_BINDADDR_NO | ACE_SOCK_Dgram_Mcast::DEFOPT_NULLIFACE);
503 auto* dmcast =
new ACE_SOCK_Dgram_Mcast(mcastOptions);
507 yCAssert(DGRAMTWOWAYSTREAM, dgram !=
nullptr);
513 result = dmcast->join(addr, 1);
516 result = restrictMcast(dmcast, group, ipLocal,
true);
519 result = dmcast->join(addr, 1);
523 yCError(DGRAMTWOWAYSTREAM,
"cannot connect to multi-cast address");
530 if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
531 yCError(DGRAMTWOWAYSTREAM,
"could not create receiver socket");
535 struct sockaddr_in addr;
539 memset(&addr, 0,
sizeof(addr));
540 addr.sin_family = AF_INET;
541 addr.sin_addr.s_addr = htonl(INADDR_ANY);
542 addr.sin_port = htons(group.
getPort());
545 if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &yes,
sizeof(u_int)) < 0) {
546 yCError(DGRAMTWOWAYSTREAM,
"could not allow sockets use the same ADDRESS");
551 # if defined(__APPLE__)
552 if (setsockopt(s, SOL_SOCKET, SO_REUSEPORT, &yes,
sizeof(u_int)) < 0) {
553 yCError(DGRAMTWOWAYSTREAM,
"could not allow sockets use the same PORT number");
560 if (bind(s, (
struct sockaddr*)&addr,
sizeof(addr)) == -1) {
561 yCError(DGRAMTWOWAYSTREAM,
"could not create mcast server");
567 if (inet_pton(AF_INET, group.
getHost().c_str(), &mreq.imr_multiaddr) == 0) {
568 yCError(DGRAMTWOWAYSTREAM,
"Could not set up the mcast server");
571 mreq.imr_interface.s_addr = htonl(INADDR_ANY);
572 if (setsockopt(s, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq,
sizeof(mreq)) < 0) {
573 yCError(DGRAMTWOWAYSTREAM,
"could not join the multicast group");
574 yCError(DGRAMTWOWAYSTREAM,
"sendto: %d, %s", errno, strerror(errno));
582 configureSystemBuffers();
584 localAddress = group;
585 remoteAddress = group;
587 localHandle.set(localAddress.getPort(), localAddress.getHost().c_str());
588 remoteHandle.set(remoteAddress.getPort(), remoteAddress.getHost().c_str());
590 localHandle = localAddress.
getPort();
591 remoteHandle = remoteAddress.getPort();
606 if ((!closed) && (!interrupting) && happy) {
616 while (happy && ct > 0) {
619 if (mgram !=
nullptr) {
620 yCDebug(DGRAMTWOWAYSTREAM,
"* mcast interrupt, interface %s", restrictInterfaceIp.toString().c_str());
621 tmp.
join(localAddress,
true, restrictInterfaceIp);
623 yCDebug(DGRAMTWOWAYSTREAM,
"* dgram interrupt");
627 yCDebug(DGRAMTWOWAYSTREAM,
"* interrupt state %s %s %s",
628 (interrupting ?
"true" :
"false"),
629 (closed ?
"true" :
"false"),
630 (happy ?
"true" :
"false"));
632 for (
size_t i = 0; i < empty.
length(); i++) {
646 yCDebug(DGRAMTWOWAYSTREAM,
"dgram interrupt done");
649 interrupting =
false;
654 while (interrupting) {
655 yCDebug(DGRAMTWOWAYSTREAM,
"waiting for dgram interrupt to be finished...");
664 if (dgram !=
nullptr) {
672 while (interrupting) {
677 if (dgram !=
nullptr) {
678 #if defined(YARP_HAS_ACE)
682 if (dgram_sockfd >= 0) {
683 ::close(dgram_sockfd);
709 if (readAvail == 0) {
714 yCTrace(DGRAMTWOWAYSTREAM,
"DGRAM Waiting for something!");
716 #if defined(YARP_HAS_ACE)
717 if ((dgram !=
nullptr) && restrictInterfaceIp.isValid()) {
718 yCTrace(DGRAMTWOWAYSTREAM,
"Consider remote mcast");
719 yCTrace(DGRAMTWOWAYSTREAM,
"What we know:");
720 yCTrace(DGRAMTWOWAYSTREAM,
" %s", restrictInterfaceIp.toString().c_str());
721 yCTrace(DGRAMTWOWAYSTREAM,
" %s", localAddress.toString().c_str());
722 yCTrace(DGRAMTWOWAYSTREAM,
" %s", remoteAddress.toString().c_str());
724 ACE_INET_Addr iface(restrictInterfaceIp.getPort(),
725 restrictInterfaceIp.getHost().c_str());
726 ACE_INET_Addr dummy((u_short)0, (ACE_UINT32)INADDR_ANY);
727 result = dgram->recv(readBuffer.get(), readBuffer.length(), dummy);
728 yCDebug(DGRAMTWOWAYSTREAM,
"MCAST Got %zd bytes", result);
732 if (dgram !=
nullptr) {
733 yCAssert(DGRAMTWOWAYSTREAM, dgram !=
nullptr);
734 #if defined(YARP_HAS_ACE)
735 ACE_INET_Addr dummy((u_short)0, (ACE_UINT32)INADDR_ANY);
736 yCTrace(DGRAMTWOWAYSTREAM,
"DGRAM Waiting for something!");
737 result = dgram->recv(readBuffer.get(), readBuffer.length(), dummy);
739 result = recv(dgram_sockfd, readBuffer.get(), readBuffer.length(), 0);
741 yCDebug(DGRAMTWOWAYSTREAM,
"DGRAM Got %zd bytes", result);
745 if (monitor.length() > readBuffer.length()) {
746 printf(
"Too big!\n");
749 memcpy(readBuffer.get(), monitor.get(), monitor.length());
750 result = monitor.length();
753 if (closed || (result < 0)) {
765 if (bufferAlertNeeded && !bufferAlerted) {
766 yCError(DGRAMTWOWAYSTREAM,
"*** Multicast/UDP packet dropped - checksum error ***");
767 yCInfo(DGRAMTWOWAYSTREAM,
"The UDP/MCAST system buffer limit on your system is low.");
768 yCInfo(DGRAMTWOWAYSTREAM,
"You may get packet loss under heavy conditions.");
770 yCInfo(DGRAMTWOWAYSTREAM,
"To change the buffer limit on linux: sysctl -w net.core.rmem_max=8388608");
771 yCInfo(DGRAMTWOWAYSTREAM,
"(Might be something like: sudo /sbin/sysctl -w net.core.rmem_max=8388608)");
773 yCInfo(DGRAMTWOWAYSTREAM,
"To change the limit use: sysctl for Linux/FreeBSD, ndd for Solaris, no for AIX");
775 bufferAlerted =
true;
779 if (
now - lastReportTime > 1) {
780 yCError(DGRAMTWOWAYSTREAM,
"*** %d datagram packet(s) dropped - checksum error ***", errCount);
781 lastReportTime =
now;
798 size_t take = readAvail;
802 memcpy(b.
get(), readBuffer.get() + readAt, take);
814 yCTrace(DGRAMTWOWAYSTREAM,
"DGRAM prep writing");
815 yCTrace(DGRAMTWOWAYSTREAM,
"DGRAM write %zu bytes", b.
length());
820 if (writeBuffer.get() ==
nullptr) {
825 while (local.length() > 0) {
826 yCTrace(DGRAMTWOWAYSTREAM,
"DGRAM prep writing");
829 bool shouldFlush =
false;
834 memcpy(writeBuffer.get() + writeAvail, local.get(), rem);
836 local =
Bytes(local.get() + rem, local.length() - rem);
846 if (writeBuffer.get() ==
nullptr) {
857 if (writeAvail > 0) {
861 #if defined(YARP_HAS_ACE)
862 if (mgram !=
nullptr) {
863 len = mgram->send(writeBuffer.get(), writeAvail);
864 yCDebug(DGRAMTWOWAYSTREAM,
"MCAST - wrote %zd bytes", len);
867 if (dgram !=
nullptr) {
868 #if defined(YARP_HAS_ACE)
869 len = dgram->send(writeBuffer.get(), writeAvail, remoteHandle);
871 len = send(dgram_sockfd, writeBuffer.get(), writeAvail, 0);
873 yCDebug(DGRAMTWOWAYSTREAM,
"DGRAM - wrote %zd bytes to %s", len, remoteAddress.toString().c_str());
875 Bytes b(writeBuffer.get(), writeAvail);
879 len = monitor.length();
882 if (len > writeBuffer.length() * 0.75) {
883 yCDebug(DGRAMTWOWAYSTREAM,
"long dgrams might need a little time");
900 }
while (
now - first < 0.001);
905 yCDebug(DGRAMTWOWAYSTREAM,
"DGRAM failed to send message with error: %s", strerror(errno));
910 if (writeAvail != 0) {
913 yCDebug(DGRAMTWOWAYSTREAM,
"dgram/mcast send behaving badly");
954 return monitor.bytes();
966 if (dgram ==
nullptr) {
969 #if defined(YARP_HAS_ACE)
970 return (dgram->set_option(IPPROTO_IP, IP_TOS, (
int*)&tos, (
int)
sizeof(tos)) == 0);
972 return (setsockopt(dgram_sockfd, IPPROTO_IP, IP_TOS, (
int*)&tos, (
int)
sizeof(tos)) == 0);
979 if (dgram ==
nullptr) {
982 #if defined(YARP_HAS_ACE)
984 dgram->get_option(IPPROTO_IP, IP_TOS, (
int*)&tos, &optlen);
987 getsockopt(dgram_sockfd, IPPROTO_IP, IP_TOS, (
int*)&tos, &optlen);
static bool checkCrc(char *buf, yarp::conf::ssize_t length, yarp::conf::ssize_t crcLength, int pct, int *store_altPct=nullptr)
#define UDP_MAX_DATAGRAM_SIZE
static void addCrc(char *buf, yarp::conf::ssize_t length, yarp::conf::ssize_t crcLength, int pct)
A simple abstraction for a block of bytes.
An abstraction for a block of bytes, with optional responsibility for allocating/destroying that bloc...
const Bytes & bytes() const
static int netInt(const yarp::os::Bytes &code)
static unsigned long int getCrc(char *buf, size_t len)
static double nowSystem()
static void delaySystem(double seconds)
A stream abstraction for datagram communication.
bool setTypeOfService(int tos) override
void write(const yarp::os::Bytes &b) override
Write a block of bytes to the stream.
void interrupt() override
Interrupt the stream.
virtual bool open(const Contact &remote)
void close() override
Terminate the stream.
void endPacket() override
Mark the end of a logical packet (see beginPacket).
int getTypeOfService() override
yarp::os::Bytes getMonitor()
virtual bool openMcast(const Contact &group, const Contact &ipLocal)
void reset() override
Reset the stream.
virtual bool join(const Contact &group, bool sender, const Contact &ipLocal)
virtual ~DgramTwoWayStream()
void beginPacket() override
Mark the beginning of a logical packet.
void flush() override
Make sure all pending write operations are finished.
bool isOk() const override
Check if the stream is ok or in an error state.
#define yCInfo(component,...)
#define yCError(component,...)
#define yCAssert(component, x)
#define yCTrace(component,...)
#define yCWarning(component,...)
#define yCDebug(component,...)
#define YARP_OS_LOG_COMPONENT(name, name_string)
std::string get_string(const std::string &key, bool *found=nullptr)
Read a string from an environment variable.
double now()
Return the current time in seconds, relative to an arbitrary starting point.
The components from which ports and connections are built.
An interface to the operating system, including Port based communication.
std::int32_t NetInt32
Definition of the NetInt32 type.