OpenDaVINCI  4.16.0
odcore::dmcp::discoverer::Client Class Reference

#include <Client.h>

Inheritance diagram for odcore::dmcp::discoverer::Client:
Inheritance graph

Public Member Functions

 Client (const std::string &group, const uint32_t &serverPort, const uint32_t &clientPort, const string &name)
 
virtual ~Client ()
 
bool existsServer ()
 
odcore::data::dmcp::ServerInformation getServerInformation () const
 
virtual void onResponse ()
 

Protected Member Functions

void sendDiscoverMessage ()
 
void waitForResponse ()
 
virtual void nextPacket (const odcore::data::Packet &p)
 

Protected Attributes

std::shared_ptr
< odcore::io::udp::UDPSender
m_sender
 
std::shared_ptr
< odcore::io::udp::UDPReceiver
m_receiver
 
odcore::base::Condition m_responseCondition
 
bool m_response
 
odcore::data::dmcp::ServerInformation m_serverInformation
 
string m_moduleName
 

Constructor & Destructor Documentation

odcore::dmcp::discoverer::Client::Client ( const std::string &  group,
const uint32_t &  serverPort,
const uint32_t &  clientPort,
const string &  name 
)

References m_receiver.

odcore::dmcp::discoverer::Client::~Client ( )
virtual

References m_receiver.

Member Function Documentation

bool odcore::dmcp::discoverer::Client::existsServer ( )
ServerInformation odcore::dmcp::discoverer::Client::getServerInformation ( ) const

References m_serverInformation.

void odcore::dmcp::discoverer::Client::nextPacket ( const odcore::data::Packet &  p)
protectedvirtual

This method is called whenever a new packet occurs.

Parameters
pPacket that has been occurred.

Implements odcore::io::PacketListener.

References CLOG1, odcore::data::Container::getData(), m_response, m_responseCondition, m_serverInformation, onResponse(), and odcore::base::Condition::wakeAll().

void odcore::dmcp::discoverer::Client::onResponse ( )
virtual

Referenced by nextPacket().

void odcore::dmcp::discoverer::Client::sendDiscoverMessage ( )
protected

References m_moduleName, m_sender, and m_serverInformation.

Referenced by existsServer().

void odcore::dmcp::discoverer::Client::waitForResponse ( )
protected

Member Data Documentation

string odcore::dmcp::discoverer::Client::m_moduleName
protected

Referenced by sendDiscoverMessage().

std::shared_ptr<odcore::io::udp::UDPReceiver> odcore::dmcp::discoverer::Client::m_receiver
protected

Referenced by Client(), and ~Client().

bool odcore::dmcp::discoverer::Client::m_response
protected
odcore::base::Condition odcore::dmcp::discoverer::Client::m_responseCondition
protected

Referenced by nextPacket(), and waitForResponse().

std::shared_ptr<odcore::io::udp::UDPSender> odcore::dmcp::discoverer::Client::m_sender
protected

Referenced by sendDiscoverMessage().

odcore::data::dmcp::ServerInformation odcore::dmcp::discoverer::Client::m_serverInformation
protected