OMSimulatorLib The OMSimulator project is a FMI-based co-simulation environment.

Loading...
Searching...
No Matches
Namespaces | Macros | Functions
Logging.h File Reference
`#include "OMSimulator/Types.h"`
`#include <string>`
Include dependency graph for Logging.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Namespaces
namespace | oms
namespace | oms::Log
namespace | oms::Log::Internal

## Macros
#define | logInfo(msg) oms::Log::Internal::Info(msg)
#define | logWarning(msg) oms::Log::Internal::Warning(msg)
#define | logError(msg) oms::Log::Internal::Error(msg, __func__)
#define | logDebugEnabled() oms::Log::Internal::DebugEnabled()
#define | logTraceEnabled() oms::Log::Internal::TraceEnabled()
#define | logDebug(msg) oms::Log::Internal::Debug(msg)
#define | logTrace() oms::Log::Internal::Trace(__func__, __FILE__, __LINE__)
#define | logError_AlreadyInScope(cref) logError("\"" + std::string(cref) + "\" already exists in the scope")
#define | logError_BusAndConnectorNotSameModel(bus, connector) logError("Bus \"" + std::string(bus) + "\" and connector \"" + std::string(connector) + "\" do not belong to same model")
#define | logError_BusAndConnectorNotSameSystem(bus, connector) logError("Bus \"" + std::string(bus) + "\" and connector \"" + std::string(connector) + "\" do not belong to same system")
#define | logError_BusNotInComponent(cref, component) logError("Bus connector \"" + std::string(cref) + "\" not found in component \"" + std::string(component->getFullCref()) + "\"")
#define | logError_BusNotInSystem(cref, system) logError("Bus connector \"" + std::string(cref) + "\" not found in system \"" + std::string(system->getFullCref()) + "\"")
#define | logError_ComponentNotInSystem(system, component) logError("System \"" + std::string(system->getFullCref()) + "\" does not contain component \"" + std::string(component) + "\"")
#define | logError_ConnectionExistsAlready(crefA, crefB, system) logError("Connection <\"" + std::string(crefA) + "\", \"" + std::string(crefB) + "\"> exists already in system \"" + std::string(system->getFullCref()) + "\"")
#define | logError_ConnectionNotInSystem(crefA, crefB, system) logError("Connection <\"" + std::string(crefA) + "\", \"" + std::string(crefB) + "\"> not found in system \"" + std::string(system->getFullCref()) + "\"")
#define | logError_ConnectorNotInComponent(cref, component) logError("Connector \"" + std::string(cref) + "\" not found in component \"" + std::string(component->getFullCref()) + "\"")
#define | logError_ConnectorNotInSystem(cref, system) logError("Connector \"" + std::string(cref) + "\" not found in system \"" + std::string(system->getFullCref()) + "\"")
#define | logError_FMUCall(call, fmu) logError(std::string(call) + " failed for FMU \"" + std::string(fmu->getFullCref()) + "\"")
#define | logError_Initialization(system) logError("Initialization of system \"" + std::string(system) + "\" failed")
#define | logError_InternalError logError("internal error")
#define | logError_InvalidIdent(cref) logError("\"" + std::string(cref) + "\" is not a valid ident")
#define | logError_ModelInWrongState(cref) logError("Model \"" + std::string(cref) + "\" is in wrong model state")
#define | logError_ModelNotInScope(cref) logError("Model \"" + std::string(cref) + "\" does not exist in the scope")
#define | logError_NotForScSystem logError("Not available for strongly coupled systems")
#define | logError_NotImplemented logError("Not implemented")
#define | logError_OnlyForModel logError("Only implemented for model identifiers")
#define | logError_OnlyForRealInputs(cref) logError("Signal \"" + std::string(cref) + "\" is not a real input signal")
#define | logError_OnlyForSystemWC logError("Only available for WC systems")
#define | logError_ResetFailed(system) logError("failed to reset system \"" + std::string(system) + "\" to instantiation mode")
#define | logError_SubSystemNotInSystem(system, subsystem) logError("System \"" + std::string(system) + "\" does not contain subsystem \"" + std::string(subsystem) + "\"")
#define | logError_SystemNotInModel(model, system) logError("Model \"" + std::string(model) + "\" does not contain system \"" + std::string(system) + "\"")
#define | logError_Termination(system) logError("Termination of system \"" + std::string(system) + "\" failed")
#define | logError_UnknownSignal(cref) logError("Unknown signal \"" + std::string(cref) + "\"")
#define | logError_WrongSchema(name) logError("Wrong xml schema detected. Unexpected tag \"" + name + "\"")
#define | logWarning_deprecated logWarning("Wrong/deprecated content detected but successfully loaded. Please re-export the SSP file to avoid this message.")

## Functions
void | oms::Log::Internal::Info (const std::string &msg)
oms_status_enu_t | oms::Log::Internal::Warning (const std::string &msg)
oms_status_enu_t | oms::Log::Internal::Error (const std::string &msg, const std::string &function)
bool | oms::Log::Internal::DebugEnabled ()
bool | oms::Log::Internal::TraceEnabled ()
void | oms::Log::Internal::Debug (const std::string &msg)
void | oms::Log::Internal::Trace (const std::string &function, const std::string &file, const long line)
void | oms::Log::ProgressBar (double start, double stop, double value)
void | oms::Log::TerminateBar ()
void | oms::Log::SetCallback (void(*cb)(oms_message_type_enu_t type, const char *message))
oms_status_enu_t | oms::Log::SetLogFile (const std::string &filename)
oms_status_enu_t | oms::Log::SetLoggingLevel (int logLevel)
const int | oms::Log::GetLoggingLevel ()
void | oms::Log::SetMaxLogFileSize (const unsigned long size)

## Macro Definition Documentation

## ◆ logDebug

#define logDebug | ( |  | msg | ) | oms::Log::Internal::Debug(msg)

## ◆ logDebugEnabled

#define logDebugEnabled | ( |  | ) | oms::Log::Internal::DebugEnabled()

## ◆ logError

#define logError | ( |  | msg | ) | oms::Log::Internal::Error(msg, __func__)

## ◆ logError_AlreadyInScope

#define logError_AlreadyInScope | ( |  | cref | ) | logError("\"" + std::string(cref) + "\" already exists in the scope")

## ◆ logError_BusAndConnectorNotSameModel

#define logError_BusAndConnectorNotSameModel | ( |  | bus,
|  |  | connector
| ) |  | logError("Bus \"" + std::string(bus) + "\" and connector \"" + std::string(connector) + "\" do not belong to same model")

## ◆ logError_BusAndConnectorNotSameSystem

#define logError_BusAndConnectorNotSameSystem | ( |  | bus,
|  |  | connector
| ) |  | logError("Bus \"" + std::string(bus) + "\" and connector \"" + std::string(connector) + "\" do not belong to same system")

## ◆ logError_BusNotInComponent

#define logError_BusNotInComponent | ( |  | cref,
|  |  | component
| ) |  | logError("Bus connector \"" + std::string(cref) + "\" not found in component \"" + std::string(component->getFullCref()) + "\"")

## ◆ logError_BusNotInSystem

#define logError_BusNotInSystem | ( |  | cref,
|  |  | system
| ) |  | logError("Bus connector \"" + std::string(cref) + "\" not found in system \"" + std::string(system->getFullCref()) + "\"")

## ◆ logError_ComponentNotInSystem

#define logError_ComponentNotInSystem | ( |  | system,
|  |  | component
| ) |  | logError("System \"" + std::string(system->getFullCref()) + "\" does not contain component \"" + std::string(component) + "\"")

## ◆ logError_ConnectionExistsAlready

#define logError_ConnectionExistsAlready | ( |  | crefA,
|  |  | crefB,
|  |  | system
| ) |  | logError("Connection <\"" + std::string(crefA) + "\", \"" + std::string(crefB) + "\"> exists already in system \"" + std::string(system->getFullCref()) + "\"")

## ◆ logError_ConnectionNotInSystem

#define logError_ConnectionNotInSystem | ( |  | crefA,
|  |  | crefB,
|  |  | system
| ) |  | logError("Connection <\"" + std::string(crefA) + "\", \"" + std::string(crefB) + "\"> not found in system \"" + std::string(system->getFullCref()) + "\"")

## ◆ logError_ConnectorNotInComponent

#define logError_ConnectorNotInComponent | ( |  | cref,
|  |  | component
| ) |  | logError("Connector \"" + std::string(cref) + "\" not found in component \"" + std::string(component->getFullCref()) + "\"")

## ◆ logError_ConnectorNotInSystem

#define logError_ConnectorNotInSystem | ( |  | cref,
|  |  | system
| ) |  | logError("Connector \"" + std::string(cref) + "\" not found in system \"" + std::string(system->getFullCref()) + "\"")

## ◆ logError_FMUCall

#define logError_FMUCall | ( |  | call,
|  |  | fmu
| ) |  | logError(std::string(call) + " failed for FMU \"" + std::string(fmu->getFullCref()) + "\"")

## ◆ logError_Initialization

#define logError_Initialization | ( |  | system | ) | logError("Initialization of system \"" + std::string(system) + "\" failed")

## ◆ logError_InternalError

#define logError_InternalError logError("internal error")

## ◆ logError_InvalidIdent [1/2]

#define logError_InvalidIdent | ( |  | cref | ) | logError("\"" + std::string(cref) + "\" is not a valid ident")

## ◆ logError_InvalidIdent [2/2]

#define logError_InvalidIdent | ( |  | cref | ) | logError("\"" + std::string(cref) + "\" is not a valid ident")

## ◆ logError_ModelInWrongState

#define logError_ModelInWrongState | ( |  | cref | ) | logError("Model \"" + std::string(cref) + "\" is in wrong model state")

## ◆ logError_ModelNotInScope

#define logError_ModelNotInScope | ( |  | cref | ) | logError("Model \"" + std::string(cref) + "\" does not exist in the scope")

## ◆ logError_NotForScSystem

#define logError_NotForScSystem logError("Not available for strongly coupled systems")

## ◆ logError_NotImplemented

#define logError_NotImplemented logError("Not implemented")

## ◆ logError_OnlyForModel

#define logError_OnlyForModel logError("Only implemented for model identifiers")

## ◆ logError_OnlyForRealInputs

#define logError_OnlyForRealInputs | ( |  | cref | ) | logError("Signal \"" + std::string(cref) + "\" is not a real input signal")

## ◆ logError_OnlyForSystemWC

#define logError_OnlyForSystemWC logError("Only available for WC systems")

## ◆ logError_ResetFailed

#define logError_ResetFailed | ( |  | system | ) | logError("failed to reset system \"" + std::string(system) + "\" to instantiation mode")

## ◆ logError_SubSystemNotInSystem

#define logError_SubSystemNotInSystem | ( |  | system,
|  |  | subsystem
| ) |  | logError("System \"" + std::string(system) + "\" does not contain subsystem \"" + std::string(subsystem) + "\"")

## ◆ logError_SystemNotInModel

#define logError_SystemNotInModel | ( |  | model,
|  |  | system
| ) |  | logError("Model \"" + std::string(model) + "\" does not contain system \"" + std::string(system) + "\"")

## ◆ logError_Termination

#define logError_Termination | ( |  | system | ) | logError("Termination of system \"" + std::string(system) + "\" failed")

## ◆ logError_UnknownSignal

#define logError_UnknownSignal | ( |  | cref | ) | logError("Unknown signal \"" + std::string(cref) + "\"")

## ◆ logError_WrongSchema

#define logError_WrongSchema | ( |  | name | ) | logError("Wrong xml schema detected. Unexpected tag \"" + name + "\"")

## ◆ logInfo

#define logInfo | ( |  | msg | ) | oms::Log::Internal::Info(msg)

## ◆ logTrace

#define logTrace | ( |  | ) | oms::Log::Internal::Trace(__func__, __FILE__, __LINE__)

## ◆ logTraceEnabled

#define logTraceEnabled | ( |  | ) | oms::Log::Internal::TraceEnabled()

## ◆ logWarning

#define logWarning | ( |  | msg | ) | oms::Log::Internal::Warning(msg)

## ◆ logWarning_deprecated

#define logWarning_deprecated logWarning("Wrong/deprecated content detected but successfully loaded. Please re-export the SSP file to avoid this message.")