Home2L - Python API v1.4-0-g38cc (2024-05-25)
Smart Tools for a Private Home
|
Request specifications. Request objects define the request for a certain value together with some additional attributes. The concept of requests is introduced to deal with potentially concurrent write accesses to resources. Besides the requested value, a request has the following attributes: - a unique GID by which it can be later be changed or deleted. - a priority (see also: comments on the 'prio*' constants) - a start (on) time (optional) - an expiration (off) time (optional) - a hysteresis to avoid too frequent value changes (optional)
Inherits object.
Public Member Functions | |
def | Reset (self) |
def | Set (self, *args) |
def | SetValue (self, *args) |
def | SetGid (self, _gid) |
def | SetPriority (self, _priority) |
def | SetTimeOn (self, _t0) |
def | SetTimeOff (self, _t1) |
def | SetRepeat (self, _repeat) |
def | SetHysteresis (self, _hysteresis) |
def | SetForTrigger (self) |
def | Convert (self, rc, warn=True) |
def | IsCompatible (self) |
def | Gid (self) |
def | Origin (self) |
def | Type (self) |
def | Value (self) |
def | Priority (self) |
def | TimeOn (self) |
def | TimeOff (self) |
def | Repeat (self) |
def | Hysteresis (self) |
def | SetFromStr (self, str) |
def | SetAttrsFromStr (self, str) |
def | ToStr (self, *args) |
def | Set (self, reqDef=None, attrs=None, value=None, id=None, priority=None, t0=None, t1=None, repeat=None, hysteresis=None) |
Versatile setter. More... | |
def Reset | ( | self | ) |
Reset(CRcRequest self)
def Set | ( | self, | |
* | args | ||
) |
Set(CRcRequest self, CRcRequest req) Set(CRcRequest self, CRcValueState _value=None, char const * _gid=None, int _priority=-1, TTicks _t0=NEVER, TTicks _t1=NEVER, TTicks _repeat=NEVER, TTicks _hysteresis=NEVER)
def SetValue | ( | self, | |
* | args | ||
) |
SetValue(CRcRequest self, CRcValueState _value) SetValue(CRcRequest self, bool _value) SetValue(CRcRequest self, int _value) SetValue(CRcRequest self, float _value) SetValue(CRcRequest self, char const * _value) SetValue(CRcRequest self, TTicks _value)
def SetGid | ( | self, | |
_gid | |||
) |
SetGid(CRcRequest self, char const * _gid)
def SetPriority | ( | self, | |
_priority | |||
) |
SetPriority(CRcRequest self, int _priority)
def SetTimeOn | ( | self, | |
_t0 | |||
) |
SetTimeOn(CRcRequest self, TTicks _t0)
def SetTimeOff | ( | self, | |
_t1 | |||
) |
SetTimeOff(CRcRequest self, TTicks _t1)
def SetRepeat | ( | self, | |
_repeat | |||
) |
SetRepeat(CRcRequest self, TTicks _repeat)
def SetHysteresis | ( | self, | |
_hysteresis | |||
) |
SetHysteresis(CRcRequest self, TTicks _hysteresis)
def SetForTrigger | ( | self | ) |
SetForTrigger(CRcRequest self)
def Convert | ( | self, | |
rc, | |||
warn = True |
|||
) |
Convert(CRcRequest self, CResource rc, bool warn=True)
def IsCompatible | ( | self | ) |
IsCompatible(CRcRequest self) -> bool
def Gid | ( | self | ) |
Gid(CRcRequest self) -> char const *
def Origin | ( | self | ) |
Origin(CRcRequest self) -> char const *
def Type | ( | self | ) |
Type(CRcRequest self) -> ERcType
def Value | ( | self | ) |
Value(CRcRequest self) -> CRcValueState
def Priority | ( | self | ) |
Priority(CRcRequest self) -> int
def TimeOn | ( | self | ) |
TimeOn(CRcRequest self) -> TTicks
def TimeOff | ( | self | ) |
TimeOff(CRcRequest self) -> TTicks
def Repeat | ( | self | ) |
Repeat(CRcRequest self) -> TTicks
def Hysteresis | ( | self | ) |
Hysteresis(CRcRequest self) -> TTicks
def SetFromStr | ( | self, | |
str | |||
) |
SetFromStr(CRcRequest self, char const * str) -> bool
def SetAttrsFromStr | ( | self, | |
str | |||
) |
SetAttrsFromStr(CRcRequest self, char const * str) -> bool
def ToStr | ( | self, | |
* | args | ||
) |
ToStr(CRcRequest self, CString * ret, bool precise=True, bool tabular=False, TTicks relativeTimeThreshold=NEVER, char const * skipAttrs=CString::emptyStr) -> char const
def Set | ( | self, | |
reqDef = None , |
|||
attrs = None , |
|||
value = None , |
|||
id = None , |
|||
priority = None , |
|||
t0 = None , |
|||
t1 = None , |
|||
repeat = None , |
|||
hysteresis = None |
|||
) |
Versatile setter.
Set value and/or selected request attributes. This method allows to set any subset of attributes in a flexible way, either by (named) function arguments or by a textual description as accepted by the Home2L Shell or CRcRequest::SetFromStr(). See RcSetRequest() for a detailed explanation of the arguments and examples.