MIRA
Classes | Functions
Communication Module


For detailed information see Communication and Networking. More...

Collaboration diagram for Communication Module:

Classes

class  IOService
 Wrapper class for boost::asio::io_service. More...
 
class  MulticastSender
 This class acts as a sender for multicast messages. More...
 
class  SerialPort
 This class acts as a wrapper to boost::asio::serial_port. More...
 

Functions

template<typename SyncReadStream , typename MutableBufferSequence >
std::size_t read_some (SyncReadStream &s, const MutableBufferSequence &buffers, mira::Duration timeout)
 Read some data from the specified stream 's' into the given buffer 'buffers'. More...
 
template<typename SyncReadStream , typename MutableBufferSequence >
std::size_t read_some (SyncReadStream &s, const MutableBufferSequence &buffers, mira::Duration timeout, system::error_code &ec)
 Read some data from the specified stream 's' into the given buffer 'buffers'. More...
 

Detailed Description


For detailed information see Communication and Networking.

Function Documentation

◆ read_some() [1/2]

std::size_t boost::asio::read_some ( SyncReadStream &  s,
const MutableBufferSequence &  buffers,
mira::Duration  timeout 
)

Read some data from the specified stream 's' into the given buffer 'buffers'.

The method returns the number of bytes that were read. Additionally, a timeout can be specified. The method will abort if the timeout has passed before all data was read. If an error occurs, an exception is thrown. If you do not want an exception to be thrown, use the method below.

◆ read_some() [2/2]

std::size_t boost::asio::read_some ( SyncReadStream &  s,
const MutableBufferSequence &  buffers,
mira::Duration  timeout,
system::error_code &  ec 
)

Read some data from the specified stream 's' into the given buffer 'buffers'.

Same as above, but additionally, the caller can pass an system::error_code variable to retrieve the error code if an error occurs.