Frame Receiver

The FrameReceiver software application grabs incoming frames from the Percival Mezzanine boards and hands them over via shared memory for further processing and storage on the same compute node.

API Reference Documentation

class FrameReceiver::FrameReceiverApp

Frame receiver application class/.

This class implements the main functionality of the FrameReceiver application, providing the overall framework for running the frame receiver, capturing frames of incoming data and handing them off to a processing application via shared memory. The application communicates with the downstream processing (and internally) via ZeroMQ inter-process channels.

Public Functions

FrameReceiverApp()

Constructor for FrameReceiverApp class.

This constructor initialises the FrameRecevierApp instance

~FrameReceiverApp()

Destructor for FrameRecveiverApp class.

int parse_arguments(int argc, char **argv)

Parse command-line arguments and configuration file options.

This method parses command-line arguments and configuration file options to configure the application for operation. Most options can either be given at the command line or stored in an INI-formatted configuration file. The configuration options are stored in the FrameReceiverConfig helper object for retrieval throughout the application.

Return
return code, 0 if OK, 1 if option parsing failed
Parameters
  • argc -

    - standard command-line argument count

  • argv -

    - array of char command-line options

class FrameReceiver::IpcReactorTimer

IpcReactorTimer - timer objects for use in the IpcReactor class.

Public Functions

IpcReactorTimer(size_t delay_ms, size_t times, TimerCallback callback)

Constructor - instantiates an IpcReactorTimer object.

This instantiates and IpcReactorTimer object for use in an IpcReactor. The timer is not responsible for firing itself; rather it is a tracking object with the real work being performed by the IpcReactor event loop. The timer runs periodiocally, either forever or for a fixed number of times.

Parameters
  • delay_ms -

    Timer delay in milliseconds for

  • times -

    Number of times the timer should fire, a value of 0 indicates forever

  • callback -

    Callback function signature to be called when the timer fires

~IpcReactorTimer()

Destructor - destroys an IpcReactorTimer object.

int get_id(void)

get_id - returns the unique ID of the timer instance

Returns the unique ID of the timer instance.

This method returns the unique ID of the timer, which can be used to track and remove the timer from the reactor as necessary

Return
int unique timer id

void do_callback(void)

Executes the registered callback method of the timer.

This method executes the registered callback method of the timer and then evaluates if the timer should fire again. If so, the time of the next firing is updated according to the specified delay

bool has_fired(void)

Indicates if the timer has fired (e.g. is due for handling).

Indicates if the timer has fired (e.g.

is due for handling)

This method indicates if the timer has fired, i.e. is due for handling by the controlling object.

Return
boolean value, true if timer has fired

bool has_expired(void)

Indicates if the timer has expired, i.e. reached its maximum times fired.

Indicates if the timer has expired, i.e.

reached its maximum times fired

This method indicates if the timer has expired, i.e. reached its maximum number of times fired and is no longer active. It is up to the controlling object to delete the timer as appropriate.

Return
boolean value, true if the timer has fired

TimeMs when(void)

Indicates when (in absolute monotonic time) the timer is due to fire.

this method indicates when a timer is next due to fire, in absolute monotonic time in milliseconds

Return
TimeMs value indicating when the timer is next due to fire

Public Static Functions

TimeMs clock_mono_ms(void)

Returns the current monotonic clock time in milliseconds (static method).

This static method returns the current monotonic system clock time to millisecond precision. The monotonic clock is used rather than the local real time, since the latter can be reset by clock operations on the host system, which would disrupt the periodic operation of any timers

Return
TimeMs value of the current monotonic time in milliseconds

class FrameReceiver::FrameDecoder
class FrameReceiver::FrameDecoderException