DUECA/DUSIME
|
Store configuration files. More...
#include <ConfigStorage.hxx>
Public Member Functions | |
ConfigStorage (Entity *e, const char *part, const PrioritySpec &ts) | |
Constructor. | |
bool | complete () final |
Continued construction. | |
~ConfigStorage () | |
Destructor. | |
bool | isPrepared () final |
indicate that everything is ready. | |
void | startModule (const TimeSpec &time) final |
start responsiveness to input data. | |
void | stopModule (const TimeSpec &time) final |
stop responsiveness to input data. | |
void | entryAdded (const ChannelEntryInfo &i) |
respond to new entry in channel | |
void | entryRemoved (const ChannelEntryInfo &i) |
remove after disconnect and entry deletion | |
Public Member Functions inherited from dueca::Module | |
virtual | ~Module () |
Destructor. | |
virtual bool | isInitialPrepared () |
To check whether the module is prepared to be prepared. | |
ObjectType | getObjectType () const |
The object type within DUECA. | |
virtual void | initialStartModule (const TimeSpec &time) |
Initial start opportunity. | |
virtual void | finalStopModule (const TimeSpec &time) |
Final stop command. | |
const Entity * | getMyEntity () |
Return a pointer to the entity to which this module belongs. | |
const ModuleState & | getState () |
Return the module state. | |
Public Member Functions inherited from dueca::NamedObject | |
const std::string | getEntity () const |
Returns the "entity" part of the name. | |
const std::string | getClass () const |
Returns the "class" part of the name. | |
const std::string | getPart () const |
Returns the sub-entity or "part" part of the name. | |
const NameSet & | getNameSet () const |
This returns the complete name set. | |
const GlobalId & | getId () const |
This returns the id. | |
Static Public Member Functions | |
static const ParameterTable * | getMyParameterTable () |
Return the parameter table. | |
Public Attributes | |
std::string | file_suffix |
Suffix for the configuration files. | |
std::string | path_configfiles |
Folder for storing and retrieving the configuration files. | |
std::string | w_channelname |
Sending channel name. | |
std::string | r_channelname |
Receiving channel name. | |
bool | allow_overwrite |
Do we allow overwrite. | |
std::string | lftemplate |
Optional timing filename template. | |
Static Public Attributes | |
static const char *const | classname |
Name of the module. | |
Additional Inherited Members | |
Protected Member Functions inherited from dueca::Module | |
Module (const Entity *e, const char *m_class, const char *part) | |
Constructor. | |
virtual void | setSafetyStop () |
Put a brake on this module's activities. | |
Protected Member Functions inherited from dueca::NamedObject | |
NamedObject (const GlobalId &id) | |
Reserve for AssociateObject. | |
NamedObject (const NameSet &ns) | |
Normal constructor, protected, because it has no use to create a NamedObject by itself. | |
virtual | ~NamedObject () |
Destructor. | |
Protected Attributes inherited from dueca::Module | |
ModuleState | state |
Flag to remember whether we are stopped due to some error with hardware device manipulation. | |
Store configuration files.
This module communicates over two channels to offer the storage and retrieval of configuration files. It will monitor a folder for files with a specific suffix, send a list of these files on request, send the contents of one of the files or accept content for a new file.
Within DUECA, it is used for storing web-based quickview configuration files.
The instructions to create an module of this class from a script are:
dueca.Module('config-storage', <part name; string>, <PrioritySpec>).param( file_suffix = <string>, # Suffix for selecting filenames. path_configfiles = <string>, # Location of the configuration files. receiving_channel = <string>, # Name of the receiving channel sending_channel = <string>, # Name of the sending channel allow_overwrite = <boolean>, # Allow overwriting of existing files filename_template = <string>, # Template for last part of the file name, optional; check boost # time_facet for format strings. Is combined with the file name as # given in the write request and the suffix. Optional. # Default suggestion: -%Y%m%d_%H%M%S ) '''Description: Storage module for configuration files.'''
dueca::ConfigStorage::ConfigStorage | ( | Entity * | e, |
const char * | part, | ||
const PrioritySpec & | ts ) |
Constructor.
Is normally called from scheme/the creation script.
|
finalvirtual |
Continued construction.
Reimplemented from dueca::Module.
|
finalvirtual |
indicate that everything is ready.
Implements dueca::Module.
start responsiveness to input data.
Implements dueca::Module.
stop responsiveness to input data.
Implements dueca::Module.