ICAROUS
All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Modules Pages
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
larcfm::FilePushTransmitter Class Reference
Inheritance diagram for larcfm::FilePushTransmitter:
larcfm::Transmitter

Public Member Functions

virtual void publish (const std::string &address, const std::string &keyword)
 
virtual void unpublish (const std::string &keyword)
 
virtual void update (const std::string &keyword, const std::string &data)
 
virtual bool hasSubscribers (const std::string &keyword) const
 
virtual bool shutdown ()
 

Static Private Member Functions

static bool exists (const std::string &name)
 
static bool createNewFile (const std::string &name)
 
static bool deleteFile (const std::string &name)
 

Private Attributes

std::string filename
 
std::string keyword
 
std::string outfile
 
std::string lockfile
 
bool running
 

Member Function Documentation

◆ hasSubscribers()

bool larcfm::FilePushTransmitter::hasSubscribers ( const std::string &  keyword) const
virtual

Returns true if there is at least one active subscriber associated with this keyword

Parameters
keyword
Returns

Implements larcfm::Transmitter.

◆ publish()

void larcfm::FilePushTransmitter::publish ( const std::string &  address,
const std::string &  keyword 
)
virtual

Publisher announces it has data of type keyword.

Parameters
addressstring representing the address to be listened to for subscribers (e.g. port)
keywordKeywords should be cumulative for all data types presented

Implements larcfm::Transmitter.

◆ shutdown()

bool larcfm::FilePushTransmitter::shutdown ( )
virtual

Attempts to cleanly shuts down this transmitter, releasing any associated resources. This does not "unpublish" the transmitter.

Returns
true if shut down successfully.

Implements larcfm::Transmitter.

◆ unpublish()

void larcfm::FilePushTransmitter::unpublish ( const std::string &  keyword)
virtual

Publisher removes a certain keyword from its publishing list.

Parameters
keywordKeywords to remove

Implements larcfm::Transmitter.

◆ update()

void larcfm::FilePushTransmitter::update ( const std::string &  keyword,
const std::string &  data 
)
virtual

Publisher updates data to be transmitted. Depending on the connection type, this may immediately push the data to all subscribers or cache it until requested.

Parameters
keywordwhich keyword this data is associated with
data

Implements larcfm::Transmitter.


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