![]() |
Home2L - Python API v1.4-2-g83f4c (2025-08-23)
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 | |
Reset (self) | |
Set (self, *args) | |
SetValue (self, *args) | |
SetGid (self, _gid) | |
SetPriority (self, _priority) | |
SetTimeOn (self, _t0) | |
SetTimeOff (self, _t1) | |
SetRepeat (self, _repeat) | |
SetHysteresis (self, _hysteresis) | |
SetForTrigger (self) | |
Convert (self, rc, warn=True) | |
IsCompatible (self) | |
Gid (self) | |
Origin (self) | |
Type (self) | |
Value (self) | |
Priority (self) | |
TimeOn (self) | |
TimeOff (self) | |
Repeat (self) | |
Hysteresis (self) | |
SetFromStr (self, str) | |
SetAttrsFromStr (self, str) | |
ToStr (self, *args) | |
Set (self, reqDef=None, attrs=None, value=None, id=None, priority=None, t0=None, t1=None, repeat=None, hysteresis=None) | |
Versatile setter. | |
Reset | ( | self | ) |
Reset(CRcRequest self)
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)
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)
SetGid | ( | self, | |
_gid | |||
) |
SetGid(CRcRequest self, char const * _gid)
SetPriority | ( | self, | |
_priority | |||
) |
SetPriority(CRcRequest self, int _priority)
SetTimeOn | ( | self, | |
_t0 | |||
) |
SetTimeOn(CRcRequest self, TTicks _t0)
SetTimeOff | ( | self, | |
_t1 | |||
) |
SetTimeOff(CRcRequest self, TTicks _t1)
SetRepeat | ( | self, | |
_repeat | |||
) |
SetRepeat(CRcRequest self, TTicks _repeat)
SetHysteresis | ( | self, | |
_hysteresis | |||
) |
SetHysteresis(CRcRequest self, TTicks _hysteresis)
SetForTrigger | ( | self | ) |
SetForTrigger(CRcRequest self)
Convert | ( | self, | |
rc, | |||
warn = True |
|||
) |
Convert(CRcRequest self, CResource rc, bool warn=True)
IsCompatible | ( | self | ) |
IsCompatible(CRcRequest self) -> bool
Gid | ( | self | ) |
Gid(CRcRequest self) -> char const *
Origin | ( | self | ) |
Origin(CRcRequest self) -> char const *
Type | ( | self | ) |
Type(CRcRequest self) -> ERcType
Value | ( | self | ) |
Value(CRcRequest self) -> CRcValueState
Priority | ( | self | ) |
Priority(CRcRequest self) -> int
TimeOn | ( | self | ) |
TimeOn(CRcRequest self) -> TTicks
TimeOff | ( | self | ) |
TimeOff(CRcRequest self) -> TTicks
Repeat | ( | self | ) |
Repeat(CRcRequest self) -> TTicks
Hysteresis | ( | self | ) |
Hysteresis(CRcRequest self) -> TTicks
SetFromStr | ( | self, | |
str | |||
) |
SetFromStr(CRcRequest self, char const * str) -> bool
SetAttrsFromStr | ( | self, | |
str | |||
) |
SetAttrsFromStr(CRcRequest self, char const * str) -> bool
ToStr | ( | self, | |
* | args | ||
) |
ToStr(CRcRequest self, CString * ret, bool precise=True, bool tabular=False, TTicks relativeTimeThreshold=NEVER, char const * skipAttrs=CString::emptyStr) -> char const
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.