supla-device
Loading...
Searching...
No Matches
Supla::Control::HvacBase Class Reference
Inheritance diagram for Supla::Control::HvacBase:
Collaboration diagram for Supla::Control::HvacBase:

Public Member Functions

 HvacBase (Supla::Control::OutputInterface *primaryOutput=nullptr, Supla::Control::OutputInterface *secondaryOutput=nullptr)
 
void onLoadConfig (SuplaDeviceClass *) override
 First method called on element in SuplaDevice.begin().
 
void onLoadState () override
 Second method called on element in SuplaDevice.begin().
 
void onInit () override
 Third method called on element in SuplaDevice.begin()
 
void onSaveState () override
 Method called periodically during SuplaDevice iteration.
 
void onRegistered (Supla::Protocol::SuplaSrpc *suplaSrpc) override
 Method called each time when device successfully registers to Supla server.
 
void iterateAlways () override
 Method called on each SuplaDevice iteration.
 
bool iterateConnected () override
 Method called on each SuplaDevice iteration when device is connected and registered to Supla server or other protocol.
 
void purgeConfig () override
 Removes all configration data related to the element from Storage::Config.
 
int32_t handleNewValueFromServer (TSD_SuplaChannelNewValue *newValue) override
 Handles "new value" request from server.
 
uint8_t handleChannelConfig (TSD_ChannelConfig *config, bool local=false) override
 Handles "set channel config" request from server.
 
uint8_t handleWeeklySchedule (TSD_ChannelConfig *newWeeklySchedule, bool altSchedule=false, bool local=false) override
 Handles "set channel config" with "weekly schedule" type request from server.
 
void handleSetChannelConfigResult (TSDS_SetChannelConfigResult *result) override
 Handles "set channel config" reply from server.
 
void handleChannelConfigFinished () override
 Handles "channel config finished" message from server.
 
void handleAction (int event, int action) override
 
void setTargetMode (int mode, bool keepSchedule=false)
 
void clearTemperatureSetpointHeat ()
 
void clearTemperatureSetpointCool ()
 
void setTemperatureSetpointHeat (int tHeat)
 
void setTemperatureSetpointCool (int tCool)
 
int getTemperatureSetpointHeat ()
 
int getTemperatureSetpointCool ()
 
int getMode ()
 
int getDefaultManualMode ()
 
bool isWeeklyScheduleEnabled ()
 
bool isCountdownEnabled ()
 
bool isThermostatDisabled ()
 
bool isManualModeEnabled ()
 
void saveConfig ()
 
void saveWeeklySchedule ()
 
void setHeatingAndCoolingSupported (bool supported)
 
void setHeatCoolSupported (bool supported)
 
void setFanSupported (bool supported)
 
void setDrySupported (bool supported)
 
void addAvailableAlgorithm (unsigned _supla_int16_t algorithm)
 
void removeAvailableAlgorithm (unsigned _supla_int16_t algorithm)
 
bool isOutputControlledInternally () const
 
bool setUsedAlgorithm (unsigned _supla_int16_t newAlgorithm)
 
unsigned _supla_int16_t getUsedAlgorithm () const
 
void setButtonTemperatureStep (int16_t step)
 
void addLocalUILockCapability (enum LocalUILock capability)
 
void removeLocalUILockCapability (enum LocalUILock capability)
 
enum LocalUILock getLocalUILockCapabilityAsEnum (uint8_t capability) const
 
void setLocalUILockCapabilities (uint8_t capabilities)
 
uint8_t getLocalUILockCapabilities () const
 
bool isLocalUILockCapabilitySupported (enum LocalUILock capability) const
 
bool setLocalUILock (enum LocalUILock lock)
 
enum LocalUILock getLocalUILock () const
 
void setLocalUILockTemperatureMin (int16_t min)
 
int16_t getLocalUILockTemperatureMin () const
 
void setLocalUILockTemperatureMax (int16_t max)
 
int16_t getLocalUILockTemperatureMax () const
 
void setSubfunction (uint8_t subfunction)
 
void setDefaultSubfunction (uint8_t subfunction)
 
bool setMainThermometerChannelNo (uint8_t channelNo)
 
uint8_t getMainThermometerChannelNo () const
 
bool setAuxThermometerChannelNo (uint8_t channelNo)
 
uint8_t getAuxThermometerChannelNo () const
 
void setAuxThermometerType (uint8_t type)
 
uint8_t getAuxThermometerType () const
 
bool setPumpSwitchChannelNo (uint8_t channelNo)
 
void clearPumpSwitchChannelNo ()
 
uint8_t getPumpSwitchChannelNo () const
 
bool isPumpSwitchSet () const
 
bool setHeatOrColdSourceSwitchChannelNo (uint8_t channelNo)
 
void clearHeatOrColdSourceSwitchChannelNo ()
 
uint8_t getHeatOrColdSourceSwitchChannelNo () const
 
bool isHeatOrColdSourceSwitchSet () const
 
bool setMasterThermostatChannelNo (uint8_t channelNo)
 
void clearMasterThermostatChannelNo ()
 
uint8_t getMasterThermostatChannelNo () const
 
bool isMasterThermostatSet () const
 
void setAntiFreezeAndHeatProtectionEnabled (bool enebled)
 
bool isAntiFreezeAndHeatProtectionEnabled () const
 
void setAuxMinMaxSetpointEnabled (bool enabled)
 
bool isAuxMinMaxSetpointEnabled () const
 
void setTemperatureSetpointChangeSwitchesToManualMode (bool enabled)
 
bool isTemperatureSetpointChangeSwitchesToManualMode () const
 
void setUseSeparateHeatCoolOutputs (bool enabled)
 
bool isUseSeparateHeatCoolOutputs () const
 
bool setMinOnTimeS (uint16_t seconds)
 
uint16_t getMinOnTimeS () const
 
bool isMinOnOffTimeValid (uint16_t seconds) const
 
bool setMinOffTimeS (uint16_t seconds)
 
uint16_t getMinOffTimeS () const
 
bool setOutputValueOnError (signed char value)
 
signed char getOutputValueOnError () const
 
void setDefaultTemperatureRoomMin (int32_t channelFunction, _supla_int16_t temperature)
 
void setDefaultTemperatureRoomMax (int32_t channelFunction, _supla_int16_t temperature)
 
_supla_int16_t getDefaultTemperatureRoomMin () const
 
_supla_int16_t getDefaultTemperatureRoomMax () const
 
void initDefaultConfig ()
 
void initDefaultWeeklySchedule ()
 
void initDefaultAlgorithm ()
 
void setTemperatureRoomMin (_supla_int16_t temperature)
 
void setTemperatureRoomMax (_supla_int16_t temperature)
 
void setTemperatureAuxMin (_supla_int16_t temperature)
 
void setTemperatureAuxMax (_supla_int16_t temperature)
 
void setTemperatureHisteresisMin (_supla_int16_t temperature)
 
void setTemperatureHisteresisMax (_supla_int16_t temperature)
 
void setTemperatureHeatCoolOffsetMin (_supla_int16_t temperature)
 
void setTemperatureHeatCoolOffsetMax (_supla_int16_t temperature)
 
_supla_int16_t getTemperatureRoomMin (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureRoomMax (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureAuxMin (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureAuxMax (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureHisteresisMin (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureHisteresisMax (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureHeatCoolOffsetMin (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureHeatCoolOffsetMax (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureRoomMin () const
 
_supla_int16_t getTemperatureRoomMax () const
 
_supla_int16_t getTemperatureAuxMin () const
 
_supla_int16_t getTemperatureAuxMax () const
 
_supla_int16_t getTemperatureHisteresisMin () const
 
_supla_int16_t getTemperatureHisteresisMax () const
 
_supla_int16_t getTemperatureHeatCoolOffsetMin () const
 
_supla_int16_t getTemperatureHeatCoolOffsetMax () const
 
bool setTemperatureFreezeProtection (_supla_int16_t temperature)
 
bool setTemperatureHeatProtection (_supla_int16_t temperature)
 
bool setTemperatureEco (_supla_int16_t temperature)
 
bool setTemperatureComfort (_supla_int16_t temperature)
 
bool setTemperatureBoost (_supla_int16_t temperature)
 
bool setTemperatureHisteresis (_supla_int16_t temperature)
 
bool setTemperatureBelowAlarm (_supla_int16_t temperature)
 
bool setTemperatureAboveAlarm (_supla_int16_t temperature)
 
bool setTemperatureAuxMinSetpoint (_supla_int16_t temperature)
 
bool setTemperatureAuxMaxSetpoint (_supla_int16_t temperature)
 
_supla_int16_t getTemperatureFreezeProtection (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureHeatProtection (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureEco (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureComfort (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureBoost (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureHisteresis (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureBelowAlarm (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureAboveAlarm (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureAuxMinSetpoint (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureAuxMaxSetpoint (const THVACTemperatureCfg *temperatures) const
 
_supla_int16_t getTemperatureFreezeProtection () const
 
_supla_int16_t getTemperatureHeatProtection () const
 
_supla_int16_t getTemperatureEco () const
 
_supla_int16_t getTemperatureComfort () const
 
_supla_int16_t getTemperatureBoost () const
 
_supla_int16_t getTemperatureHisteresis () const
 
_supla_int16_t getTemperatureBelowAlarm () const
 
_supla_int16_t getTemperatureAboveAlarm () const
 
_supla_int16_t getTemperatureAuxMinSetpoint () const
 
_supla_int16_t getTemperatureAuxMaxSetpoint () const
 
bool isHeatingAndCoolingSupported () const
 
bool isHeatCoolSupported () const
 
bool isFanSupported () const
 
bool isDrySupported () const
 
bool isHeatingSubfunction () const
 
bool isCoolingSubfunction () const
 
bool isFunctionSupported (_supla_int_t channelFunction) const
 
bool isConfigValid (TChannelConfig_HVAC *config) const
 
bool isWeeklyScheduleValid (TChannelConfig_WeeklySchedule *newSchedule, bool isAltWeeklySchedule=false) const
 
bool isChannelThermometer (uint8_t channelNo) const
 
bool isChannelBinarySensor (uint8_t channelNo) const
 
bool isAlgorithmValid (unsigned _supla_int16_t algorithm) const
 
bool areTemperaturesValid (const THVACTemperatureCfg *temperatures) const
 
void fixTempearturesConfig ()
 
bool isModeSupported (int mode) const
 
bool isTemperatureInRoomConstrain (_supla_int16_t temperature) const
 
bool isTemperatureInAuxConstrain (_supla_int16_t temperature) const
 
bool isTemperatureFreezeProtectionValid (_supla_int16_t temperature) const
 
bool isTemperatureHeatProtectionValid (_supla_int16_t temperature) const
 
bool isTemperatureEcoValid (_supla_int16_t temperature) const
 
bool isTemperatureComfortValid (_supla_int16_t temperature) const
 
bool isTemperatureBoostValid (_supla_int16_t temperature) const
 
bool isTemperatureHisteresisValid (_supla_int16_t temperature) const
 
bool isTemperatureBelowAlarmValid (_supla_int16_t temperature) const
 
bool isTemperatureAboveAlarmValid (_supla_int16_t temperature) const
 
bool isTemperatureAuxMinSetpointValid (_supla_int16_t temperature) const
 
bool isTemperatureAuxMaxSetpointValid (_supla_int16_t temperature) const
 
bool isTemperatureInHeatCoolConstrain (_supla_int16_t tHeat, _supla_int16_t tCool) const
 
bool isTemperatureFreezeProtectionValid (const THVACTemperatureCfg *temperatures) const
 
bool isTemperatureHeatProtectionValid (const THVACTemperatureCfg *temperatures) const
 
bool isTemperatureEcoValid (const THVACTemperatureCfg *temperatures) const
 
bool isTemperatureComfortValid (const THVACTemperatureCfg *temperatures) const
 
bool isTemperatureBoostValid (const THVACTemperatureCfg *temperatures) const
 
bool isTemperatureHisteresisValid (const THVACTemperatureCfg *temperatures) const
 
bool isTemperatureBelowAlarmValid (const THVACTemperatureCfg *temperatures) const
 
bool isTemperatureAboveAlarmValid (const THVACTemperatureCfg *temperatures) const
 
bool isTemperatureAuxMinSetpointValid (const THVACTemperatureCfg *temperatures) const
 
bool isTemperatureAuxMaxSetpointValid (const THVACTemperatureCfg *temperatures) const
 
void clearChannelConfigChangedFlag ()
 
void clearWeeklyScheduleChangedFlag ()
 
int getWeeklyScheduleProgramId (const TChannelConfig_WeeklySchedule *schedule, int index) const
 
bool isProgramValid (const TWeeklyScheduleProgram &program, bool isAltWeeklySchedule) const
 
bool setProgram (int programId, unsigned char mode, _supla_int16_t tHeat, _supla_int16_t tCool, bool isAltWeeklySchedule=false)
 
bool setWeeklySchedule (int index, int programId, bool isAltWeeklySchedule=false)
 
bool setWeeklySchedule (enum DayOfWeek dayOfWeek, int hour, int quarter, int programId, bool isAltWeeklySchedule=false)
 
int calculateIndex (enum DayOfWeek dayOfWeek, int hour, int quarter) const
 
int getCurrentQuarter () const
 
TWeeklyScheduleProgram getCurrentProgram () const
 
int getCurrentProgramId () const
 
TWeeklyScheduleProgram getProgramAt (int quarterIndex) const
 
TWeeklyScheduleProgram getProgramById (int programId, bool isAltWeeklySchedule=false) const
 
void copyFixedChannelConfigTo (HvacBase *hvac) const
 
void copyFullChannelConfigTo (TChannelConfig_HVAC *hvac) const
 
void turnOn ()
 
bool turnOnWeeklySchedlue ()
 
void changeFunction (int32_t newFunction, bool changedLocally)
 
_supla_int_t getChannelFunction ()
 
void addPrimaryOutput (Supla::Control::OutputInterface *output)
 
void addSecondaryOutput (Supla::Control::OutputInterface *output)
 
void enableDifferentialFunctionSupport ()
 
bool isDifferentialFunctionSupported () const
 
void enableDomesticHotWaterFunctionSupport ()
 
bool isDomesticHotWaterFunctionSupported () const
 
bool applyNewRuntimeSettings (int mode, int16_t tHeat, int16_t tCool, int32_t durationSec=0)
 
bool applyNewRuntimeSettings (int mode, int32_t durationSec=0)
 
_supla_int16_t getLastTemperature ()
 
bool setBinarySensorChannelNo (uint8_t channelNo)
 
uint8_t getBinarySensorChannelNo () const
 
_supla_int16_t getPrimaryTemp ()
 
_supla_int16_t getSecondaryTemp ()
 
bool isWeelkySchedulManualOverrideMode () const
 
void clearWaitingFlags ()
 
void allowWrapAroundTemperatureSetpoints ()
 
void enableInitialConfig ()
 
time_t getCountDownTimerEnds () const
 
int32_t getRemainingCountDownTimeSec () const
 
void stopCountDownTimer ()
 
bool ignoreAggregatorForRelay (int32_t relayChannelNumber) const
 
void setIgnoreDefaultPumpForAggregator (bool)
 
void setIgnoreDefaultHeatOrColdSourceForAggregator (bool)
 
bool isAltWeeklySchedulePossible () const
 
- Public Member Functions inherited from Supla::ChannelElement
 ChannelElement (int channelNumber=-1)
 
ChannelgetChannel () override
 
const ChannelgetChannel () const override
 Returns pointer to main channel.
 
- Public Member Functions inherited from Supla::ElementWithChannelActions
void addAction (uint16_t action, ActionHandler &client, uint16_t event, bool alwaysEnabled=false) override
 
void addAction (uint16_t action, ActionHandler *client, uint16_t event, bool alwaysEnabled=false) override
 
virtual void addAction (uint16_t action, ActionHandler &client, Supla::Condition *condition, bool alwaysEnabled=false)
 
virtual void addAction (uint16_t action, ActionHandler *client, Supla::Condition *condition, bool alwaysEnabled=false)
 
bool isEventAlreadyUsed (uint16_t event, bool ignoreAlwaysEnabled) override
 
void clearChannelConfigChangedFlag ()
 
void runAction (uint16_t event) const override
 
virtual bool setAndSaveFunction (_supla_int_t channelFunction)
 
virtual bool loadFunctionFromConfig ()
 
virtual bool saveConfigChangeFlag ()
 
virtual bool loadConfigChangeFlag ()
 
bool isAnyUpdatePending () override
 Returns true if any update is pending.
 
virtual uint8_t applyChannelConfig (TSD_ChannelConfig *result, bool local)
 
virtual void fillChannelConfig (void *channelConfig, int *size)
 
virtual void fillChannelOcrConfig (void *channelConfig, int *size)
 
void triggerSetChannelConfig ()
 
- Public Member Functions inherited from Supla::Element
Elementnext ()
 Returns next Element from the list.
 
virtual bool iterateConnected (void *ptr)
 deprecated
 
virtual void onTimer ()
 Method called on timer interupt.
 
virtual void onFastTimer ()
 Method called on fast timer interupt.
 
virtual void onSoftReset ()
 Method called when device soft restart is triggered.
 
virtual void onDeviceConfigChange (uint64_t fieldBit)
 Method called when device config is changed.
 
virtual void fillSuplaChannelNewValue (TSD_SuplaChannelNewValue *value)
 Fills TSD_SuplaChannelNewValue based on current state.
 
virtual void handleGetChannelState (TDSC_ChannelState *channelState)
 Handles "get channel state (i)" request from server.
 
virtual int handleCalcfgFromServer (TSD_DeviceCalCfgRequest *request)
 Handles CALCFG requests from server.
 
int getChannelNumber () const
 Returns channel number.
 
int getSecondaryChannelNumber () const
 Returns secondary channel number.
 
virtual bool isOwnerOfSubDeviceId (int subDeviceId) const
 Returns true if element is owner of subDeviceId.
 
virtual const ChannelgetSecondaryChannel () const
 Returns pointer to secondary channel.
 
virtual ChannelgetSecondaryChannel ()
 
virtual void generateKey (char *output, const char *key) const
 Generates key used for Config.
 
ElementdisableChannelState ()
 Disables channel state (i) function.
 
bool isChannelStateEnabled () const
 Returns true if channel state (i) function is enabled.
 
void setInitialCaption (const char *caption, bool secondaryChannel=false)
 Sets initial caption.
 
void setDefaultFunction (int32_t defaultFunction)
 Sets default channel's function.
 
- Public Member Functions inherited from Supla::LocalAction
virtual ActionHandlerClientgetHandlerForFirstClient (uint16_t event)
 
virtual ActionHandlerClientgetHandlerForClient (ActionHandler *client, uint16_t event)
 
virtual void disableOtherClients (const ActionHandler &client, uint16_t event)
 
virtual void enableOtherClients (const ActionHandler &client, uint16_t event)
 
virtual void disableOtherClients (const ActionHandler *client, uint16_t event)
 
virtual void enableOtherClients (const ActionHandler *client, uint16_t event)
 
virtual void disableAction (int32_t action, ActionHandler *client, int32_t event)
 
virtual void enableAction (int32_t action, ActionHandler *client, int32_t event)
 
virtual bool disableActionsInConfigMode ()
 
- Public Member Functions inherited from Supla::ActionHandler
virtual void activateAction (int action)
 
virtual bool deleteClient ()
 
virtual ActionHandlergetRealClient ()
 

Static Public Member Functions

static bool isTemperatureSetInStruct (const THVACTemperatureCfg *temperatures, unsigned _supla_int_t index)
 
static _supla_int16_t getTemperatureFromStruct (const THVACTemperatureCfg *temperatures, unsigned _supla_int_t index)
 
static void setTemperatureInStruct (THVACTemperatureCfg *temperatures, unsigned _supla_int_t index, _supla_int16_t temperature)
 
static void clearTemperatureInStruct (THVACTemperatureCfg *temperatures, unsigned _supla_int_t index)
 
static int32_t getArrayIndex (int32_t bitIndex)
 
static void debugPrintConfigStruct (const TChannelConfig_HVAC *config, int id)
 
static void debugPrintConfigDiff (const TChannelConfig_HVAC *configCurrent, const TChannelConfig_HVAC *configNew, int id)
 
static const char * temperatureName (int32_t index)
 
static void debugPrintProgram (const TWeeklyScheduleProgram *program, int id)
 
- Static Public Member Functions inherited from Supla::Element
static Elementbegin ()
 Returns first Element (based on creation order)
 
static Elementlast ()
 Returns last Element (based on creation order)
 
static ElementgetElementByChannelNumber (int channelNumber)
 Returns Element by channel number.
 
static ElementgetOwnerOfSubDeviceId (int subDeviceId)
 Returns Element which owns given subDeviceId.
 
static bool IsAnyUpdatePending ()
 Checks if any element has pending update for remote server.
 
static void NotifyElementsAboutConfigChange (uint64_t fieldBit)
 Notifies all elements about device config change.
 
static bool IsInvalidPtrSet ()
 When "invalid pointer" is set, previously obtained Element pointer may be invalid.
 
static void ClearInvalidPtr ()
 Clears "invalid pointer" flag.
 
- Static Public Member Functions inherited from Supla::LocalAction
static void DeleteActionsHandledBy (const ActionHandler *client)
 
static void DeleteActionsTriggeredBy (const LocalAction *action)
 
static void NullifyActionsHandledBy (const ActionHandler *client)
 
static ActionHandlerClientgetClientListPtr ()
 

Public Attributes

HvacParameterFlags parameterFlags = {}
 

Protected Member Functions

void setOutput (int value, bool force=false)
 
void updateChannelState ()
 
virtual bool applyAdditionalValidation (TChannelConfig_HVAC *hvacConfig)
 
- Protected Member Functions inherited from Supla::ElementWithChannelActions
virtual bool hasOcrConfig () const
 
virtual bool isOcrConfigMissing () const
 
virtual void clearOcrConfig ()
 

Additional Inherited Members

- Protected Attributes inherited from Supla::ChannelElement
Channel channel
 
- Protected Attributes inherited from Supla::ElementWithChannelActions
Supla::ChannelConfigState channelConfigState
 
bool configFinishedReceived = false
 
uint8_t setChannelConfigAttempts = 0
 
- Protected Attributes inherited from Supla::Element
ElementnextPtr = nullptr
 
- Static Protected Attributes inherited from Supla::Element
static ElementfirstPtr = nullptr
 
static bool invalidatePtr = false
 

Member Function Documentation

◆ handleAction()

void HvacBase::handleAction ( int event,
int action )
overridevirtual

Implements Supla::ActionHandler.

◆ handleChannelConfig()

uint8_t HvacBase::handleChannelConfig ( TSD_ChannelConfig * newChannelConfig,
bool local = false )
overridevirtual

Handles "set channel config" request from server.

Parameters
newChannelConfigpointer to new channel configuration
localtrue if request is local (issued by device itself), false when requests originates from server.
Returns
SUPLA_RESULTCODE_* (see proto.h)

Reimplemented from Supla::ElementWithChannelActions.

◆ handleChannelConfigFinished()

void HvacBase::handleChannelConfigFinished ( )
overridevirtual

Handles "channel config finished" message from server.

This message informs device that server finished sending channel config for this element.

Reimplemented from Supla::ElementWithChannelActions.

◆ handleNewValueFromServer()

int32_t HvacBase::handleNewValueFromServer ( TSD_SuplaChannelNewValue * newValue)
overridevirtual

Handles "new value" request from server.

Parameters
newValuepointer to TSD_SuplaChannelNewValue
Returns
-1 - don't send reply to server 0 - success==false 1 - success==true

Reimplemented from Supla::Element.

◆ handleSetChannelConfigResult()

void HvacBase::handleSetChannelConfigResult ( TSDS_SetChannelConfigResult * result)
overridevirtual

Handles "set channel config" reply from server.

All types of channel config should be handled here (including weekly schedule, default config, etc).

Parameters
result

Reimplemented from Supla::ElementWithChannelActions.

◆ handleWeeklySchedule()

uint8_t HvacBase::handleWeeklySchedule ( TSD_ChannelConfig * newWeeklySchedule,
bool altSchedule = false,
bool local = false )
overridevirtual

Handles "set channel config" with "weekly schedule" type request from server.

Parameters
newWeeklySchedulepointer to new weekly schedule
altScheduletrue if request is for alternative schedule (for cooling)
localtrue if request is local (issued by device itself), false when requests originates from server.
Returns
SUPLA_RESULTCODE_* (see proto.h)

Reimplemented from Supla::Element.

◆ iterateAlways()

void HvacBase::iterateAlways ( )
overridevirtual

Method called on each SuplaDevice iteration.

It should provide all actions that have to be executed periodically regardless of network state.

Reimplemented from Supla::Element.

◆ iterateConnected()

bool HvacBase::iterateConnected ( )
overridevirtual

Method called on each SuplaDevice iteration when device is connected and registered to Supla server or other protocol.

Returns
false when element didn't communicate with server and next element should be iterated instead. true otherwise.

Reimplemented from Supla::ElementWithChannelActions.

◆ onInit()

void HvacBase::onInit ( )
overridevirtual

Third method called on element in SuplaDevice.begin()

Method called during SuplaDevice initialization. I.e. load initial state, initialize pins etc.

Reimplemented from Supla::Element.

◆ onLoadConfig()

void HvacBase::onLoadConfig ( SuplaDeviceClass * sdc)
overridevirtual

First method called on element in SuplaDevice.begin().

Called only if Config Storage class is configured. Element should read its configration in this method.

Parameters
sdc

Reimplemented from Supla::Element.

◆ onLoadState()

void HvacBase::onLoadState ( )
overridevirtual

Second method called on element in SuplaDevice.begin().

Method called during state Storage initialization (i.e. read from EEPROM, FRAM). Called only if Storage class is configured.

Reimplemented from Supla::Element.

◆ onRegistered()

void HvacBase::onRegistered ( Supla::Protocol::SuplaSrpc * suplaSrpc)
overridevirtual

Method called each time when device successfully registers to Supla server.

Parameters
suplaSrpc

Reimplemented from Supla::ElementWithChannelActions.

◆ onSaveState()

void HvacBase::onSaveState ( )
overridevirtual

Method called periodically during SuplaDevice iteration.

It should provide state saving for this elemnet to Storage

Reimplemented from Supla::Element.

◆ purgeConfig()

void HvacBase::purgeConfig ( )
overridevirtual

Removes all configration data related to the element from Storage::Config.

Reimplemented from Supla::ElementWithChannelActions.


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