RTC Toolkit 5.0.0
Loading...
Searching...
No Matches
Functions
userExtension.cpp File Reference

Custom MUDPI publisher component user function. More...

#include <userExtension.hpp>
#include <rtctk/componentFramework/exceptions.hpp>
#include <rtctk/componentFramework/logger.hpp>
#include <cfitsio/fitsio.h>
#include <fmt/format.h>
#include <cassert>
#include <cstring>

Functions

std::vector< std::vector< uint8_t > > GetFitsColumn (const std::string &filename, const std::string &colname)
 
std::map< std::string, std::vector< std::vector< uint8_t > > > ExtractDataFromFile (const std::string &filename)
 User Function that reads data from input file and returns big data structure.
 

Detailed Description

Custom MUDPI publisher component user function.

Function Documentation

◆ ExtractDataFromFile()

std::map< std::string, std::vector< std::vector< uint8_t > > > ExtractDataFromFile ( const std::string & filename)

User Function that reads data from input file and returns big data structure.

This function is only invoked once during Initialisation and returns a data structure that is a map with a key for each named publisher object / topic the map value is a vector of samples and each sample is a vector of bytes

If the map does not contain a key for a certain publisher object, the default behaviour is that the specific publisher object falls back to pattern generation mode.

Parameters
[in]filenamepathname of the file to read, can also be used as a generic discriminator.
Returns
data structure containing data to publish

◆ GetFitsColumn()

std::vector< std::vector< uint8_t > > GetFitsColumn ( const std::string & filename,
const std::string & colname )