#include <discover.h>
Public Types | |
typedef SocketLinux | SocketType |
Public Member Functions | |
void | broadcastRequest () |
Broadcasts a discovery command request. More... | |
Discover () | |
Initializes a socket ready for broadcasting requests. More... | |
bool | getResponse (std::vector< DeviceInfo > &info, int timeout_per_socket=1000) |
Returns a discovery response. More... | |
~Discover () | |
Private Attributes | |
std::vector< std::tuple< std::uint8_t, std::uint8_t > > | req_nums_ |
std::vector< SocketType > | sockets_ |
Definition at line 50 of file discover.h.
Definition at line 56 of file discover.h.
rcdiscover::Discover::Discover | ( | ) |
Initializes a socket ready for broadcasting requests.
NOTE: Exceptions are thrown in case of severe network errors.
Definition at line 72 of file discover.cc.
rcdiscover::Discover::~Discover | ( | ) |
Definition at line 82 of file discover.cc.
void rcdiscover::Discover::broadcastRequest | ( | ) |
Broadcasts a discovery command request.
Definition at line 85 of file discover.cc.
bool rcdiscover::Discover::getResponse | ( | std::vector< DeviceInfo > & | info, |
int | timeout_per_socket = 1000 |
||
) |
Returns a discovery response.
This method should be called until there is no further response.
info | Info object that will be filled if there is an available response. |
timeout | Timeout in Milliseconds. |
Definition at line 107 of file discover.cc.
|
private |
Definition at line 92 of file discover.h.
|
private |
Definition at line 91 of file discover.h.