TwiceAsNice  2019-02-18
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
UdpSocketBase Class Referenceabstract

Base class for a upd socket that finds apogee devices on a subnet. More...

#include <UdpSocketBase.h>

Inheritance diagram for UdpSocketBase:
Inheritance graph
Collaboration diagram for UdpSocketBase:
Collaboration graph

Public Member Functions

virtual ~UdpSocketBase ()
 
std::vector< std::string > Search4ApogeeDevices (const std::string &subnet, uint16_t portNum)
 
int32_t GetElapsedSecs ()
 
int32_t GetTimeout ()
 

Protected Member Functions

 UdpSocketBase ()
 
virtual void CloseSocket ()=0
 

Protected Attributes

int32_t m_SocketDescriptor
 

Private Member Functions

void CreateSocket (uint16_t portNum)
 
void SetSocketOptions ()
 
void CreateUpdPacket ()
 
void BroadcastMsg (const std::string &subnet, uint16_t portNum)
 
std::string FetchMsgFromSocket ()
 
std::vector< std::string > GetReturnedMsgs ()
 
 UdpSocketBase (const UdpSocketBase &)
 
UdpSocketBaseoperator= (UdpSocketBase &)
 

Private Attributes

std::string m_udpPacket
 
const std::string m_fileName
 
int32_t m_timeout
 
int32_t m_elapsedSec
 

Detailed Description

Base class for a upd socket that finds apogee devices on a subnet.

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Copyright(c) 2009 Apogee Instruments, Inc.

Constructor & Destructor Documentation

◆ ~UdpSocketBase()

UdpSocketBase::~UdpSocketBase ( )
virtual

◆ UdpSocketBase() [1/2]

UdpSocketBase::UdpSocketBase ( )
protected

◆ UdpSocketBase() [2/2]

UdpSocketBase::UdpSocketBase ( const UdpSocketBase )
private

Member Function Documentation

◆ BroadcastMsg()

void UdpSocketBase::BroadcastMsg ( const std::string &  subnet,
uint16_t  portNum 
)
private

◆ CloseSocket()

virtual void UdpSocketBase::CloseSocket ( )
protectedpure virtual

Implemented in UdpSocketWin, and UdpSocketLinux.

◆ CreateSocket()

void UdpSocketBase::CreateSocket ( uint16_t  portNum)
private

◆ CreateUpdPacket()

void UdpSocketBase::CreateUpdPacket ( )
private

◆ FetchMsgFromSocket()

std::string UdpSocketBase::FetchMsgFromSocket ( )
private

◆ GetElapsedSecs()

int32_t UdpSocketBase::GetElapsedSecs ( )
inline

◆ GetReturnedMsgs()

std::vector< std::string > UdpSocketBase::GetReturnedMsgs ( )
private

◆ GetTimeout()

int32_t UdpSocketBase::GetTimeout ( )
inline

◆ operator=()

UdpSocketBase& UdpSocketBase::operator= ( UdpSocketBase )
private

◆ Search4ApogeeDevices()

std::vector< std::string > UdpSocketBase::Search4ApogeeDevices ( const std::string &  subnet,
uint16_t  portNum 
)

◆ SetSocketOptions()

void UdpSocketBase::SetSocketOptions ( )
private

Member Data Documentation

◆ m_elapsedSec

int32_t UdpSocketBase::m_elapsedSec
private

◆ m_fileName

const std::string UdpSocketBase::m_fileName
private

◆ m_SocketDescriptor

int32_t UdpSocketBase::m_SocketDescriptor
protected

◆ m_timeout

int32_t UdpSocketBase::m_timeout
private

◆ m_udpPacket

std::string UdpSocketBase::m_udpPacket
private

The documentation for this class was generated from the following files: