1 #ifndef ENGINECONFIG_H_
2 #define ENGINECONFIG_H_
5 #include "tools/ToolsConfig.h"
21 max_repeat_count = 100;
22 ignored_future = 60.0;
24 file_size_limit = 100*1024*1024;
25 disconnect_on_disable =
false;
27 chunk_period = write_period;
41 size_t num = (size_t)(write_period * buffer_reserve / scan_period);
73 size_t buffer_reserve;
74 size_t max_repeat_count;
75 double ignored_future;
77 size_t file_size_limit;
78 bool disconnect_on_disable;
131 virtual void addChannel(
const stdString &group_name,
132 const stdString &channel_name,
134 bool disabling,
bool monitor) = 0;
156 void handle_channel(
const stdString &group_name,
void setFileSizeLimit(size_t bytes)
Set the file size limit (Bytes).
Definition: EngineConfig.h:110
void setBufferReserve(size_t times)
Set how many times more buffer is reserved.
Definition: EngineConfig.h:94
double getWritePeriod() const
Definition: EngineConfig.h:31
size_t getSuggestedBufferSpace(double scan_period) const
Definition: EngineConfig.h:37
double getChunkPeriod() const
Definition: EngineConfig.h:66
double getIgnoredFutureSecs() const
Definition: EngineConfig.h:54
double getGetThreshold() const
Definition: EngineConfig.h:57
void setIgnoredFutureSecs(double secs)
Set which data gets ignored because time stamp is too far ahead of host clock.
Definition: EngineConfig.h:104
void setChunkPeriod(double secs)
Set the period in seconds between 'writes' to Storage.
Definition: EngineConfig.h:116
size_t getFileSizeLimit() const
Definition: EngineConfig.h:60
void setGetThreshold(double secs)
Set threshold between 'Get' and 'MonitoredGet'.
Definition: EngineConfig.h:107
virtual void addChannel(const stdString &group_name, const stdString &channel_name, double scan_period, bool disabling, bool monitor)=0
Invoked for each channel that the EngineConfigParser found.
Global engine configuration parameters.
Definition: EngineConfig.h:14
void setDisconnectOnDisable(bool yes_no)
Should engine disconnect channels that are disabled?
Definition: EngineConfig.h:113
size_t getMaxRepeatCount() const
Definition: EngineConfig.h:50
bool getDisconnectOnDisable() const
Definition: EngineConfig.h:63
Modifyable global engine configuration parameters.
Definition: EngineConfig.h:87
void addToFUX(class FUX::Element *doc)
Append this config to a FUX document.
Reads the config from an XML file that should conform to engineconfig.dtd.
Definition: EngineConfig.h:142
One element in the FUX tree.
Definition: FUX.h:51
size_t getBufferReserve() const
Definition: EngineConfig.h:34
void setMaxRepeatCount(size_t count)
Set the max.
Definition: EngineConfig.h:99
Listener to EngineConfigParser.
Definition: EngineConfig.h:124
void read(const char *filename, EngineConfigListener *listener)
Reads the config from an XML file.
void setWritePeriod(double secs)
Set the period in seconds between 'writes' to Storage.
Definition: EngineConfig.h:91