neic-glass3  1.4.6
Public Member Functions | Protected Attributes | List of all members
glass3::outputTopic Class Reference

glass3 output topic class More...

#include <outputTopic.h>

Collaboration diagram for glass3::outputTopic:
Collaboration graph

Public Member Functions

 outputTopic (hazdevbroker::Producer *producer)
 outputTopic constructor More...
 
 ~outputTopic ()
 outputTopic destructor More...
 
bool setup (const json::Value &config)
 outputTopic configuration function More...
 
void clear ()
 outputTopic clear function More...
 
bool isInBounds (double lat, double lon)
 outputTopic bounds check function More...
 
void send (const std::string &message)
 outputTopic send function The function sends the provided message using the producer pointer and the configured topic. More...
 
void heartbeat ()
 outputTopic heartbeat function The function sends generates a heartbeat using the producer pointer and the configured topic. Note that the producer takes care of deciding whether it has been long enough to generate a heartbeat More...
 

Protected Attributes

double m_dTopLatitude
 the top of the bounds rectangle in degrees of latitude. More...
 
double m_dBottomLatitude
 the bottom of the bounds rectangle in degrees of latitude. More...
 
double m_dLeftLongitude
 the left side of the bounds rectangle in degrees of longitude. More...
 
double m_dRightLongitude
 the right side of the bounds rectangle in degrees of longitude. More...
 
std::string m_sTopicName
 the std::string containing the topic name More...
 

Detailed Description

glass3 output topic class

The glass3 output topic class is a class that encapsulates a broker output topic plus the bounds for which a message should be sent via that topic.

Constructor & Destructor Documentation

glass3::outputTopic::outputTopic ( hazdevbroker::Producer *  producer)
explicit

outputTopic constructor

The outputTopic for the brokerOutput class. Initializes members to default values, sets the hazdevbroker::Producer pointer.

Parameters
producer- A pointer to a hazdevbroker::Producer to use for the topic.
glass3::outputTopic::~outputTopic ( )

outputTopic destructor

The destructor for the outputTopic class.

Member Function Documentation

void glass3::outputTopic::clear ( )

outputTopic clear function

The clear function for the outputTopic class. Clears all configuration

void glass3::outputTopic::heartbeat ( )

outputTopic heartbeat function The function sends generates a heartbeat using the producer pointer and the configured topic. Note that the producer takes care of deciding whether it has been long enough to generate a heartbeat

bool glass3::outputTopic::isInBounds ( double  lat,
double  lon 
)

outputTopic bounds check function

This function checks to see if the provided coordinates are within the bounds for this outputTopic.

Parameters
lat- a double value containing the latitude to check in degrees
lon- a double value containing the longitude to check in degrees
Returns
Returns true if the provided coordinates are within the bounds, false otherwise
void glass3::outputTopic::send ( const std::string &  message)

outputTopic send function The function sends the provided message using the producer pointer and the configured topic.

Parameters
message- A string containing the message
bool glass3::outputTopic::setup ( const json::Value &  config)

outputTopic configuration function

The this function configures the outputTopic class

Parameters
config- A pointer to a json::Value containing to the configuration to use
Returns
returns true if successful.

Member Data Documentation

double glass3::outputTopic::m_dBottomLatitude
protected

the bottom of the bounds rectangle in degrees of latitude.

double glass3::outputTopic::m_dLeftLongitude
protected

the left side of the bounds rectangle in degrees of longitude.

double glass3::outputTopic::m_dRightLongitude
protected

the right side of the bounds rectangle in degrees of longitude.

double glass3::outputTopic::m_dTopLatitude
protected

the top of the bounds rectangle in degrees of latitude.

std::string glass3::outputTopic::m_sTopicName
protected

the std::string containing the topic name


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