53 auto map = std::make_unique<shmem::SharedMemory>();
54 if (!map->open(data_name)) {
91 auto pNewMap = std::make_unique<shmem::SharedMemory>();
92 if (!pNewMap->open(data_name)) {
99 m_pMap = std::move(pNewMap);
141 memcpy((
void*)(data + first_block_size), (
void*)
m_pData, len - first_block_size);
164 char* data = b.
get();
171 while (!(ret =
read(data, (
int)len))) {
const yarp::os::LogComponent & SHMEMCARRIER()
bool waitFor(double timeout)
Wait at most timeout seconds. Returns true if the semaphore was acquired.
bool wait()
Wait until the semaphore is available.
static void unlink(const std::string &name)
Remove the name of the semaphore (no-op on Windows)
bool open(const std::string &name)
Open an existing semaphore.
static void unlink(const std::string &name)
Remove the name of the segment (no-op on Windows)
A minimal IPv4 TCP socket.
bool isPeerClosed()
Check, on a non-blocking socket, whether the connection was closed or reset by the peer (e....
A simple abstraction for a block of bytes.
#define yCError(component,...)
#define yCDebug(component,...)
std::string objectName(const char *kind, int port, int index=-1)
Build the name of a named inter-process object.