DUECA/DUSIME
|
Generic DDFF file format logging. More...
#include <DDFFLogger.hxx>
Public Member Functions | |
DDFFLogger (Entity *e, const char *part, const PrioritySpec &ts) | |
Constructor. | |
bool | complete () |
Continued construction. | |
~DDFFLogger () | |
Destructor. | |
Static Public Member Functions | |
static const ParameterTable * | getMyParameterTable () |
Return the parameter table. | |
Static Public Attributes | |
static const char *const | classname |
Name of the module. | |
Friends | |
class | EntryWatcher |
Generic DDFF file format logging.
This provide a configurable interface to logging with DDFF format.
You can specify a label/location for logging individual channels, or monitor channels for logging all entries in those channels. The interface for logging is similar to the interface for the dueca::HDF5Logger.
Use the ddff-convert program installed with DUECA to convert a DDFF log to HDF5, or use the ddff python module to directly read a file and convert the contents to numpy arrays.
The instructions to create an module of this class from the Scheme script are:
dueca.Module('ddff-logger', <part name; string>, <PrioritySpec>).param( set_timing = <TimeSpec>, # Supply a time specification to define the update rate of the main activity check_timing = <array of integers>, # Supply three integer parameters to specify a check on the timing of # the main activity: warning limit (in us), critical limit (in us), and # the number of loops to test before sending a report (optional, dflt=2000) log_entry = <array of strings>, # log a specific channel entry; enter channel name, dataclass type, if # applicable entry label and as last the path where the data should be # stored in the file. Without label, only the first entry is logged, # with, only the first entry matching the label watch_channel = <array of strings>, # log all entries in a specific channel; enter channel name and path # where entries should be stored filename_template = <string>, # Template for file name; check boost time_facet for format strings # Default name: datalog-%Y%m%d_%H%M%S.ddff log_always = <boolean>, # For watched channels or channel entries created with always_logging, # logging also is done in HoldCurrent mode. Default off, toggles # this capability for logging defined hereafter. immediate_start = <boolean>, # Immediately start the logging module, do not wait for DUECA control # reduction = <TimeSpec>, # Reduce the logging data rate according to the given time # specification. Applies to all following logged values config_channel = <string>, # Specify a channel with configuration events, to control logging # check DUECALogConfig doc for options ) '''Description: Generic logging facilities for channel data to DDFF data files. The logger may be controlled with DUECALogConfig events, but may also be run without control. Note that DDFF may sometimes take unpredictable time (when it needs to flush data to disk). DUECA has no problem with that, but you are advised to configure a separate priority for the DDFF modules.'''
DDFFLogger::DDFFLogger | ( | Entity * | e, |
const char * | part, | ||
const PrioritySpec & | ts ) |
Constructor.
Is normally called from scheme/the creation script.
bool DDFFLogger::complete | ( | ) |
Continued construction.
This is called after all script parameters have been read and filled in, according to the parameter table. Your running environment, e.g. for OpenGL drawing, is also prepared. Any lengty initialisations (like reading the 4 GB of wind tables) should be done here. Return false if something in the parameters is wrong (by the way, it would help if you printed what!) May be deleted.