10 #include <tbb/concurrent_queue.h>
43 const DtSimulationAddress& simAddress,
44 std::unique_ptr<DtVrfDatabaseConnection> conn)
override;
47 virtual bool isEnabled()
const override {
return true; };
62 virtual std::unique_ptr<DtVrfDatabaseEvent>
popEvent()
override;
73 virtual unsigned queueSize()
override {
return myEventQueue.size(); };
virtual bool isEnabled() const override
Returns true if database logging is enabled.
Definition: vrfDatabaseLogger.h:47
DtVrfDatabaseLoggerInterface & operator=(const DtVrfDatabaseLoggerInterface &other)
Assignment Operator not implemented – Do Not copy.
The standard database logger used in VRF. The database logger is responsible for logging database eve...
Definition: vrfDatabaseLogger.h:27
EventType
The unique event types for different types of data that will be logged by VRF. Each event type will g...
Definition: vrfDatabaseEvent.h:28
Contains the configuration options for the database logger.
Definition: rwDatabaseLoggerConfig.h:22
The base class for database loggers. A database logger is responsible for logging database events int...
Definition: vrfDatabaseLoggerInterface.h:29
static const DtString theScenarioRealWorldTimeStartParamName
Definition: vrfDatabaseLogger.h:36
virtual void initialize(const DtRwDatabaseLoggerConfig &config, const DtSimulationAddress &simAddress, std::unique_ptr< DtVrfDatabaseConnection > conn)
static const DtString theScenarioDateAndTimeAtStartParamName
Definition: vrfDatabaseLogger.h:35
std::vector< bool > myEnabledEventTypes
Definition: vrfDatabaseLogger.h:102
static DtString type()
Type of this database logger.
Definition: vrfDatabaseLogger.h:83
static const DtString theScenarioSimTimeParamName
Definition: vrfDatabaseLogger.h:33
virtual void setScenarioLoadInformation(int runId, const DtFilename &scenarioName, DtTime simTime)
Sets information about the current scenario run at load time.
virtual unsigned queueSize() override
The number of events currently queued to be logged to the database.
Definition: vrfDatabaseLogger.h:73
virtual void forceDatabaseUpdate()
Forces all pending events to be written to the database. Normally it is not necessary to call this...
Definition: vrfDatabaseLoggerInterface.h:78
static DtVrfDatabaseLoggerInterface * create()
Creator function for this class. Not generally used directly. Created by the DtVrfDatabaseLoggerCreat...
Definition: vrfDatabaseLogger.h:80
virtual bool logEvent(DtVrfDatabaseEvent::EventType eventType, const DtVrfDatabaseEvent &event)=0
Logs an event to be recorded in the database.
tbb::concurrent_bounded_queue< DtVrfDatabaseEvent * > myEventQueue
Definition: vrfDatabaseLogger.h:101
virtual std::unique_ptr< DtVrfDatabaseEvent > popEvent()=0
Pops the next event from the queue. Logger gives up ownership of the popped event.
Represents a single event to be recorded in the database. Anytime something occurs that requires data...
Definition: vrfDatabaseEvent.h:22
static const DtString theScenarioNameParamName
Definition: vrfDatabaseLogger.h:31
static const DtString theScenarioSimAddressParamName
Definition: vrfDatabaseLogger.h:34
#define DT_DLL_vrfMsgTransport
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfCommunicationManagerDefines.h:26
static const DtString theScenarioRunIdParamName
Definition: vrfDatabaseLogger.h:32
virtual void setScenarioRunInformation(const DtFilename &scenarioName, DtTime simTime, DtTime dateAndTimeOfDay, DtTime realWorldTime)
Sets information about the current scenario run when run, in case it changed since load...
virtual bool isEventEnabled(DtVrfDatabaseEvent::EventType eventType) const =0
Returns true if logging is enabled for the specified event type.