Torc  0.1
Public Slots | Public Member Functions | List of all members
TorcSystemNotification Class Referencefinal

#include <torcsystemnotification.h>

Inheritance diagram for TorcSystemNotification:
[legend]

Public Slots

bool event (QEvent *Event) override
 Listen for system events (TorcEvent). More...
 
- Public Slots inherited from TorcDevice
virtual void SetValue (double Value)
 
virtual void SetValid (bool Valid)
 
bool GetValid (void)
 
double GetValue (void)
 
double GetDefaultValue (void)
 
QString GetModelId (void)
 
QString GetUniqueId (void)
 
QString GetUserName (void)
 
QString GetUserDescription (void)
 

Public Member Functions

 TorcSystemNotification (const QVariantMap &Details)
 
 ~TorcSystemNotification ()
 
QStringList GetDescription (void) override
 
void Graph (QByteArray *Data) override
 
- Public Member Functions inherited from TorcNotification
 TorcNotification (const QVariantMap &Details)
 
virtual bool Setup (void)
 
virtual bool IsKnownInput (const QString &UniqueId)
 
- Public Member Functions inherited from TorcReferenceCounter
 TorcReferenceCounter (void)
 
virtual ~TorcReferenceCounter (void)=default
 
void UpRef (void)
 
virtual bool DownRef (void)
 
bool IsShared (void)
 

Additional Inherited Members

- Signals inherited from TorcNotification
void Notify (const QVariantMap &Message)
 
- Signals inherited from TorcDevice
void ValidChanged (bool Valid)
 
void ValueChanged (double Value)
 
- Static Public Member Functions inherited from TorcReferenceCounter
static void EventLoopEnding (bool Ending)
 
- Protected Member Functions inherited from TorcNotification
virtual ~TorcNotification ()=default
 
- Protected Member Functions inherited from TorcDevice
virtual ~TorcDevice ()
 
- Protected Attributes inherited from TorcNotification
QStringList m_notifierNames
 
QList< TorcNotifier * > m_notifiers
 
QString m_title
 
QString m_body
 
- Protected Attributes inherited from TorcDevice
double value
 
double defaultValue
 
QString modelId
 
QString uniqueId
 
QString userName
 
QString userDescription
 
QMutex lock
 
bool wasInvalid
 
- Protected Attributes inherited from TorcReferenceCounter
QAtomicInt m_refCount
 
- Static Protected Attributes inherited from TorcDevice
static QHash< QString, TorcDevice * > * gDeviceList = new QHash<QString,TorcDevice*>()
 
static QMutex * gDeviceListLock = new QMutex(QMutex::Recursive)
 
- Static Protected Attributes inherited from TorcReferenceCounter
static bool m_eventLoopEnding = false
 
- Properties inherited from TorcDevice
bool valid
 

Detailed Description

TorcSystemNotification listens for Torc system events, such as Start, Stop, Suspending etc and messages when the specified events are seen.

The configuration file must specifiy a comma separated list of events (per the Torc definitions) and a comma separated list of notifiers who will send the appropriate messages.

Example configuration:-

<notify>
<notifications>
<system>
<name>systemtest</name>
<inputs>
<event>start</event>
<event>stop</event>
</inputs>
<outputs>
<notifier>testnotifier</notifier>
<notifier>testnotifier2</notifier>
</outputs>
<message>
<!-- title is optional -->
<title>%applicationname% message:</title>
<!-- body is mandatory -->
<body>System event: '%event%' (%shortdatetime%)</body>
</message>
</system>
</notifications>
</notify>

Definition at line 8 of file torcsystemnotification.h.

Constructor & Destructor Documentation

TorcSystemNotification::TorcSystemNotification ( const QVariantMap &  Details)
explicit

Definition at line 59 of file torcsystemnotification.cpp.

TorcSystemNotification::~TorcSystemNotification ( )

Definition at line 93 of file torcsystemnotification.cpp.

Member Function Documentation

bool TorcSystemNotification::event ( QEvent *  Event)
overrideslot

Listen for system events (TorcEvent).

Definition at line 117 of file torcsystemnotification.cpp.

QStringList TorcSystemNotification::GetDescription ( void  )
overridevirtual

Implements TorcNotification.

Definition at line 98 of file torcsystemnotification.cpp.

void TorcSystemNotification::Graph ( QByteArray *  Data)
overridevirtual

Implements TorcNotification.

Definition at line 107 of file torcsystemnotification.cpp.


The documentation for this class was generated from the following files: