ifw-fgf 2.0.0
 
Loading...
Searching...
No Matches
ifw::fgf::common Namespace Reference

Classes

class  BinarySemaphore
 Binary semaphore class to be used for thread synchronisation. More...
 
struct  CameraSetup
 Structure to hold camera setup parameters. More...
 
struct  CameraStatus
 Structure to hold camera status parameters. More...
 
class  ICommAdapter
 Abstract base class for implementing FGF Communication Adapters. More...
 
class  MudpiCreator
 RTMS creator class. More...
 
class  MudpiCreatorParallel
 RTMS creator class which implements parallel generation of MUDPI packets. More...
 
class  RawImage
 Raw Image Class to handle one image in memory. More...
 
class  RtmsPublisher
 RTMS Publisher. More...
 
class  Semaphore
 Semaphore class for safe semaphore usage. More...
 
struct  SetupParam
 Setup ("ctrl" category) parameters enums. More...
 
struct  State
 State struct defining enums to handle states/substates. More...
 
struct  StatusParam
 The status parameters enums definitions. More...
 

Typedefs

using Variant = std::variant<bool,int,unsigned int,short,double,std::string>
 
using PairVariant = std::pair<std::string, Variant>
 
using VectorVariant = std::vector<PairVariant>
 

Enumerations

enum class  OpMode { FINITE = 1 , CONTINUOUS , FINITE = 1 , CONTINUOUS }
 Operational Mode: Finite or Continuous. More...
 
enum class  OpMode { FINITE = 1 , CONTINUOUS , FINITE = 1 , CONTINUOUS }
 Operational Mode: Finite or Continuous. More...
 

Functions

double Time ()
 Return time as seconds since epoch with micro second precision.
 
void Sleep (const float sleep_time)
 Make the calling thread sleep for the given period of time given as seconds.
 
const std::string & LogPropertiesName (const std::string &log_properties={})
 
const std::string & AppLogName (const std::string &logger_name={})
 Get/optionally set the application logger name (e.g. "fgfapp").
 
void ConfigureLogging ()
 One-time logging configuration (idempotent; safe to call many times).
 
log4cplus::Logger & GetRootLogger ()
 Root/application loggers (configured on first use).
 
log4cplus::Logger & GetAppLogger ()
 
std::string FindFile (const std::string &resource_filename)
 Resolve a resource file (e.g. properties) using your search rules.
 
void CustomOpen62541Log (void *log_context, UA_LogLevel level, UA_LogCategory category, const char *msg, va_list args)
 open62541 logging callback (attach via cfg->logger.log = &CustomOpen62541Log).
 
UA_Logger make_ua_logger (void *context=nullptr, UA_LogLevel min=UA_LOGLEVEL_INFO)
 Convenience: build a UA_Logger value you can assign to cfg->logger.
 
log4cplus::Logger & Logger ()
 

Variables

UA_Logger s_custom_logger = { &CustomOpen62541Log, nullptr }
 
constexpr auto STAT_WINDOW_SIZE = 1000
 
constexpr auto CTRL_EXPO_TIME_STR = "ctrl_expo_time"
 
constexpr auto CTRL_FRAME_RATE_STR = "ctrl_frame_rate"
 
constexpr auto CTRL_BIN_X_STR = "ctrl_bin_x"
 
constexpr auto CTRL_BIN_Y_STR = "ctrl_bin_y"
 
constexpr auto CTRL_FRAME_TARGET_STR = "ctrl_frame_target"
 
constexpr auto CTRL_OP_MODE_STR = "ctrl_op_mode"
 
constexpr auto CTRL_OFFSET_X_STR = "ctrl_offset_x"
 
constexpr auto CTRL_OFFSET_Y_STR = "ctrl_offset_y"
 
constexpr auto CTRL_WIDTH_STR = "ctrl_width"
 
constexpr auto CTRL_HEIGHT_STR = "ctrl_height"
 
constexpr auto KEY_STATUS_SUBSYS_STATE = "state"
 
constexpr auto KEY_STATUS_SUBSYS_SUBSTATE = "substate"
 
constexpr auto STATE_UNDEFINED_STR = "Undefined"
 
constexpr auto STATE_NOT_OP_ERROR_STR = "NotOpError"
 
constexpr auto STATE_ERROR_STR = "Error"
 
constexpr auto STATE_OFF_STR = "Off"
 
constexpr auto STATE_NOT_OPERATIONAL_STR = "NotOperational"
 
constexpr auto STATE_OPERATIONAL_STR = "Operational"
 
constexpr auto SUBSTATE_NOTREADY_STR = "NotReady"
 
constexpr auto SUBSTATE_INITIALISING_STR = "Initialising"
 
constexpr auto SUBSTATE_READY_STR = "Ready"
 
constexpr auto SUBSTATE_ENABLING_STR = "Enabling"
 
constexpr auto SUBSTATE_RECOVERING_STR = "Recovering"
 
constexpr auto SUBSTATE_IDLE_STR = "Idle"
 
constexpr auto SUBSTATE_BUSY_STR = "Busy"
 
constexpr auto SUBSTATE_ACQUIRING_STR = "Acquiring"
 
constexpr auto STAT_EXPO_TIME_STR = "expo_time"
 
constexpr auto STAT_FRAME_RATE_STR = "frame_rate"
 
constexpr auto STAT_FRAME_COUNTER_STR = "frame_counter"
 
constexpr auto STAT_TOTAL_FRAME_COUNTER_STR = "total_frame_counter"
 
constexpr auto STAT_WIDTH_STR = "width"
 
constexpr auto STAT_HEIGHT_STR = "height"
 
constexpr auto STAT_CAMERA_INTERFACE_STR = "camera_interface"
 
constexpr auto STAT_CAMERA_MODEL_STR = "camera_model"
 
constexpr auto STAT_CAMERA_NAME_STR = "camera_name"
 
constexpr auto STAT_CAMERA_SERIAL_NUMBER_STR = "camera_serial_number"
 
constexpr auto STAT_STATE_STR = "state"
 
constexpr auto STAT_SUBSTATE_STR = "substate"
 
constexpr auto STAT_RPC_ERROR_TEXT_STR = "rpc_error_text"
 
constexpr auto STAT_SYSTEM_ERROR_TEXT_STR = "system_error_text"
 

Typedef Documentation

◆ PairVariant

typedef std::pair< std::string, Variant > ifw::fgf::common::PairVariant = std::pair<std::string, Variant>

◆ Variant

typedef std::variant< bool, int, unsigned int, short, double, std::string > ifw::fgf::common::Variant = std::variant<bool,int,unsigned int,short,double,std::string>

◆ VectorVariant

typedef std::vector< PairVariant > ifw::fgf::common::VectorVariant = std::vector<PairVariant>

Enumeration Type Documentation

◆ OpMode [1/2]

enum class ifw::fgf::common::OpMode
strong

Operational Mode: Finite or Continuous.

Enumerator
FINITE 
CONTINUOUS 
FINITE 
CONTINUOUS 

◆ OpMode [2/2]

enum class ifw::fgf::common::OpMode
strong

Operational Mode: Finite or Continuous.

Enumerator
FINITE 
CONTINUOUS 
FINITE 
CONTINUOUS 

Function Documentation

◆ AppLogName()

const std::string & ifw::fgf::common::AppLogName ( const std::string & logger_name = {})

Get/optionally set the application logger name (e.g. "fgfapp").

◆ ConfigureLogging()

void ifw::fgf::common::ConfigureLogging ( )

One-time logging configuration (idempotent; safe to call many times).

◆ CustomOpen62541Log()

void ifw::fgf::common::CustomOpen62541Log ( void * log_context,
UA_LogLevel level,
UA_LogCategory category,
const char * msg,
va_list args )

open62541 logging callback (attach via cfg->logger.log = &CustomOpen62541Log).

◆ FindFile()

std::string ifw::fgf::common::FindFile ( const std::string & resource_filename)

Resolve a resource file (e.g. properties) using your search rules.

◆ GetAppLogger()

log4cplus::Logger & ifw::fgf::common::GetAppLogger ( )

◆ GetRootLogger()

log4cplus::Logger & ifw::fgf::common::GetRootLogger ( )

Root/application loggers (configured on first use).

◆ Logger()

log4cplus::Logger & ifw::fgf::common::Logger ( )
inline

◆ LogPropertiesName()

const std::string & ifw::fgf::common::LogPropertiesName ( const std::string & log_properties = {})

Get/optionally set the path to the log4cplus properties file. Pass a non-empty value once to set; subsequent calls can use the default.

◆ make_ua_logger()

UA_Logger ifw::fgf::common::make_ua_logger ( void * context = nullptr,
UA_LogLevel min = UA_LOGLEVEL_INFO )
inline

Convenience: build a UA_Logger value you can assign to cfg->logger.

◆ Sleep()

void ifw::fgf::common::Sleep ( const float sleep_time)
inline

Make the calling thread sleep for the given period of time given as seconds.

◆ Time()

double ifw::fgf::common::Time ( )
inline

Return time as seconds since epoch with micro second precision.

Variable Documentation

◆ CTRL_BIN_X_STR

auto ifw::fgf::common::CTRL_BIN_X_STR = "ctrl_bin_x"
constexpr

◆ CTRL_BIN_Y_STR

auto ifw::fgf::common::CTRL_BIN_Y_STR = "ctrl_bin_y"
constexpr

◆ CTRL_EXPO_TIME_STR

auto ifw::fgf::common::CTRL_EXPO_TIME_STR = "ctrl_expo_time"
constexpr

◆ CTRL_FRAME_RATE_STR

auto ifw::fgf::common::CTRL_FRAME_RATE_STR = "ctrl_frame_rate"
constexpr

◆ CTRL_FRAME_TARGET_STR

auto ifw::fgf::common::CTRL_FRAME_TARGET_STR = "ctrl_frame_target"
constexpr

◆ CTRL_HEIGHT_STR

auto ifw::fgf::common::CTRL_HEIGHT_STR = "ctrl_height"
constexpr

◆ CTRL_OFFSET_X_STR

auto ifw::fgf::common::CTRL_OFFSET_X_STR = "ctrl_offset_x"
constexpr

◆ CTRL_OFFSET_Y_STR

auto ifw::fgf::common::CTRL_OFFSET_Y_STR = "ctrl_offset_y"
constexpr

◆ CTRL_OP_MODE_STR

auto ifw::fgf::common::CTRL_OP_MODE_STR = "ctrl_op_mode"
constexpr

◆ CTRL_WIDTH_STR

auto ifw::fgf::common::CTRL_WIDTH_STR = "ctrl_width"
constexpr

◆ KEY_STATUS_SUBSYS_STATE

auto ifw::fgf::common::KEY_STATUS_SUBSYS_STATE = "state"
constexpr

◆ KEY_STATUS_SUBSYS_SUBSTATE

auto ifw::fgf::common::KEY_STATUS_SUBSYS_SUBSTATE = "substate"
constexpr

◆ s_custom_logger

UA_Logger ifw::fgf::common::s_custom_logger = { &CustomOpen62541Log, nullptr }

◆ STAT_CAMERA_INTERFACE_STR

auto ifw::fgf::common::STAT_CAMERA_INTERFACE_STR = "camera_interface"
constexpr

◆ STAT_CAMERA_MODEL_STR

auto ifw::fgf::common::STAT_CAMERA_MODEL_STR = "camera_model"
constexpr

◆ STAT_CAMERA_NAME_STR

auto ifw::fgf::common::STAT_CAMERA_NAME_STR = "camera_name"
constexpr

◆ STAT_CAMERA_SERIAL_NUMBER_STR

auto ifw::fgf::common::STAT_CAMERA_SERIAL_NUMBER_STR = "camera_serial_number"
constexpr

◆ STAT_EXPO_TIME_STR

auto ifw::fgf::common::STAT_EXPO_TIME_STR = "expo_time"
constexpr

◆ STAT_FRAME_COUNTER_STR

auto ifw::fgf::common::STAT_FRAME_COUNTER_STR = "frame_counter"
constexpr

◆ STAT_FRAME_RATE_STR

auto ifw::fgf::common::STAT_FRAME_RATE_STR = "frame_rate"
constexpr

◆ STAT_HEIGHT_STR

auto ifw::fgf::common::STAT_HEIGHT_STR = "height"
constexpr

◆ STAT_RPC_ERROR_TEXT_STR

auto ifw::fgf::common::STAT_RPC_ERROR_TEXT_STR = "rpc_error_text"
constexpr

◆ STAT_STATE_STR

auto ifw::fgf::common::STAT_STATE_STR = "state"
constexpr

◆ STAT_SUBSTATE_STR

auto ifw::fgf::common::STAT_SUBSTATE_STR = "substate"
constexpr

◆ STAT_SYSTEM_ERROR_TEXT_STR

auto ifw::fgf::common::STAT_SYSTEM_ERROR_TEXT_STR = "system_error_text"
constexpr

◆ STAT_TOTAL_FRAME_COUNTER_STR

auto ifw::fgf::common::STAT_TOTAL_FRAME_COUNTER_STR = "total_frame_counter"
constexpr

◆ STAT_WIDTH_STR

auto ifw::fgf::common::STAT_WIDTH_STR = "width"
constexpr

◆ STAT_WINDOW_SIZE

auto ifw::fgf::common::STAT_WINDOW_SIZE = 1000
constexpr

◆ STATE_ERROR_STR

auto ifw::fgf::common::STATE_ERROR_STR = "Error"
constexpr

◆ STATE_NOT_OP_ERROR_STR

auto ifw::fgf::common::STATE_NOT_OP_ERROR_STR = "NotOpError"
constexpr

◆ STATE_NOT_OPERATIONAL_STR

auto ifw::fgf::common::STATE_NOT_OPERATIONAL_STR = "NotOperational"
constexpr

◆ STATE_OFF_STR

auto ifw::fgf::common::STATE_OFF_STR = "Off"
constexpr

◆ STATE_OPERATIONAL_STR

auto ifw::fgf::common::STATE_OPERATIONAL_STR = "Operational"
constexpr

◆ STATE_UNDEFINED_STR

auto ifw::fgf::common::STATE_UNDEFINED_STR = "Undefined"
constexpr

◆ SUBSTATE_ACQUIRING_STR

auto ifw::fgf::common::SUBSTATE_ACQUIRING_STR = "Acquiring"
constexpr

◆ SUBSTATE_BUSY_STR

auto ifw::fgf::common::SUBSTATE_BUSY_STR = "Busy"
constexpr

◆ SUBSTATE_ENABLING_STR

auto ifw::fgf::common::SUBSTATE_ENABLING_STR = "Enabling"
constexpr

◆ SUBSTATE_IDLE_STR

auto ifw::fgf::common::SUBSTATE_IDLE_STR = "Idle"
constexpr

◆ SUBSTATE_INITIALISING_STR

auto ifw::fgf::common::SUBSTATE_INITIALISING_STR = "Initialising"
constexpr

◆ SUBSTATE_NOTREADY_STR

auto ifw::fgf::common::SUBSTATE_NOTREADY_STR = "NotReady"
constexpr

◆ SUBSTATE_READY_STR

auto ifw::fgf::common::SUBSTATE_READY_STR = "Ready"
constexpr

◆ SUBSTATE_RECOVERING_STR

auto ifw::fgf::common::SUBSTATE_RECOVERING_STR = "Recovering"
constexpr