Public Member Functions

wosh::automations::AutomationDayLightEvent Class Reference

Extended CronJob which raises a custom event on sun-rise and sun-set, based on Weather information event (wosh::xtended::WeatherInfo). More...

#include <H:/WOSH/win32_vc2010/src/framework/automations/AutomationDayLightEvent.h>

List of all members.

Public Member Functions

 AutomationDayLightEvent ()
 Empty constructor.
 AutomationDayLightEvent (const AutomationDayLightEvent &m)
 Copy constructor.
virtual ~AutomationDayLightEvent ()
 Empty destructor.
virtual WRESULT preinit ()
 register properties, methods. once in instance's life
virtual WRESULT init ()
 initiatialize state and connect to bus(ses)
void setAutoUpdate (bool value)
void setAlwaysApply (bool value)
virtual WRESULT updateSunTimes (long sun_rise, long sun_set, bool force_when_late)
virtual WRESULT clear ()
IPropertiesProviderListener interface
virtual bool updatingProperty (bool &doUpdate, const Variant &value_proposed, Property &property_current, const PropertiesProvider *source)
Operators Overloading
AutomationDayLightEventoperator= (const AutomationDayLightEvent &m)
bool operator== (const AutomationDayLightEvent &other) const


bool getAutoUpdate () const
bool getAlwaysApply () const
static struct
getDayLightStateEnum ()
static const char * getDayLightStateAsString (STATE_DAY_LIGHT state)
static std::string getDayLightStateSetAsString (long state_mask)
static STATE_DAY_LIGHT getDayLightStateFromString (const char *state)

Detailed Description

Extended CronJob which raises a custom event on sun-rise and sun-set, based on Weather information event (wosh::xtended::WeatherInfo).

This automation (wosh::automations::CronJob extension) acts as adapter/interpreter between Weather information updates and other automations.

WOSH system comes with a Weather service bundle (wosh::bundles::WeatherBundle), (which implements wosh::interfaces::various::Weather) and provides a big set of information about past, current and future weather conditions.

AutomationDayLightEvent automation assumes the bundle is installed and running.

The Weather service will periodically (or on updates available) raise events, such as WeatherCondition_Updated, the automation monitors this event and receonfigure itself to raise the next sun-rise/sun-set events.

Sun-rise and sun-set events are claimed once for each day.

See also:
DayLight Automation
AutomationDayLightEvent.h 3775 2011-01-01 16:38:17Z alex
Alessandro Polo

Definition at line 142 of file AutomationDayLightEvent.h.

Constructor & Destructor Documentation

wosh::automations::AutomationDayLightEvent::AutomationDayLightEvent (  )

Empty constructor.

Definition at line 58 of file AutomationDayLightEvent.cpp.

wosh::automations::AutomationDayLightEvent::AutomationDayLightEvent ( const AutomationDayLightEvent m )

Copy constructor.

m[in] the source object to be copied

Definition at line 74 of file AutomationDayLightEvent.cpp.

virtual wosh::automations::AutomationDayLightEvent::~AutomationDayLightEvent (  ) [inline, virtual]

Empty destructor.

Definition at line 167 of file AutomationDayLightEvent.h.

Member Function Documentation

WRESULT wosh::automations::AutomationDayLightEvent::init (  ) [virtual]

initiatialize state and connect to bus(ses)

: we could find the busses by looking triggers source-bus field

Reimplemented from wosh::automations::CronJob.

Definition at line 99 of file AutomationDayLightEvent.cpp.

References wosh::automations::Automation::Log, wosh::LOG_CRITICAL, and WRET_OK.

WRESULT wosh::automations::AutomationDayLightEvent::preinit (  ) [virtual]

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

Generated on Tue Feb 8 2011 09:33:33 for WOSH system 0.8.888 [wolf] by Alessandro Polo, using DoxyGen 1.7.2 hosted by WOSH Framework