RTC Toolkit 5.0.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ExamplePixelsShmPub Class Reference
Inheritance diagram for ExamplePixelsShmPub:
rtctk::standaloneTools::ShmPub< ImageTopic >

Public Member Functions

 ExamplePixelsShmPub (int argc, char *argv[])
 
std::vector< ImageTopicReadFits (std::string filename) override
 Reads in data from a FITS file.
 
std::vector< ImageTopicGenData (int num_frames) override
 Generates data to be circulated.
 
- Public Member Functions inherited from rtctk::standaloneTools::ShmPub< ImageTopic >
 ShmPub (int argc, char *argv[])
 
virtual ~ShmPub ()=default
 
int Run ()
 Entry point for running the ShmPub.
 
virtual void AdjustSample (ImageTopic &sample) const
 Adjust the contents of a data sample just before publishing to shared memory.
 

Additional Inherited Members

- Protected Member Functions inherited from rtctk::standaloneTools::ShmPub< ImageTopic >
std::string GetQueueName () const
 Returns the shared memory queue name argument set on the command line.
 
size_t GetQueueSize () const
 Returns the shared memory queue size argument set on the command line.
 
int GetSampleDelay () const
 Returns the sample delay argument set on the command line.
 
int GetNuma () const
 Returns the NUMA node argument set on the command line.
 
bool GetRepeatMode () const
 Returns the repeat mode flag set on the command line.
 

Constructor & Destructor Documentation

◆ ExamplePixelsShmPub()

ExamplePixelsShmPub::ExamplePixelsShmPub ( int argc,
char * argv[] )
inline

Member Function Documentation

◆ GenData()

std::vector< ImageTopic > ExamplePixelsShmPub::GenData ( int num_frames)
inlineoverridevirtual

Generates data to be circulated.

This is a pure virtual function that must be overloaded by a child class in user code. The user code must allocate the necessary vector of the appropriate size (typically num_frames), fill the vector with generated data, and then return the vector.

If an exception is thrown from this method the process will terminate early with an error message.

Parameters
num_framesThe number of frames for which to generate data.
Returns
A vector of data points of type TopicType, i.e. std::vector<TopicType>. The size of the vector should typically be equal to num_frames.

Implements rtctk::standaloneTools::ShmPub< ImageTopic >.

◆ ReadFits()

std::vector< ImageTopic > ExamplePixelsShmPub::ReadFits ( std::string filename)
inlineoverridevirtual

Reads in data from a FITS file.

This is a pure virtual function that must be overloaded by a child class in user code. The user code must allocate the necessary vector of the appropriate size, perform all FITS file access and handling, and return the filled vector containing the data.

If an exception is thrown from this method the process will terminate early with an error message.

Parameters
filenameThe name of the FITS file to read from.
Returns
A vector of data points of type TopicType, i.e. std::vector<TopicType>.

Implements rtctk::standaloneTools::ShmPub< ImageTopic >.


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