Home2L - Python API v1.4-0-g38cc (2024-05-25)
Smart Tools for a Private Home
Public Member Functions | List of all members
CRcRequest Class Reference

Description

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...
 

Member Function Documentation

◆ Reset()

def Reset (   self)
Reset(CRcRequest self)

◆ Set() [1/2]

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)

◆ SetValue()

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)

◆ SetGid()

def SetGid (   self,
  _gid 
)
SetGid(CRcRequest self, char const * _gid)

◆ SetPriority()

def SetPriority (   self,
  _priority 
)
SetPriority(CRcRequest self, int _priority)

◆ SetTimeOn()

def SetTimeOn (   self,
  _t0 
)
SetTimeOn(CRcRequest self, TTicks _t0)

◆ SetTimeOff()

def SetTimeOff (   self,
  _t1 
)
SetTimeOff(CRcRequest self, TTicks _t1)

◆ SetRepeat()

def SetRepeat (   self,
  _repeat 
)
SetRepeat(CRcRequest self, TTicks _repeat)

◆ SetHysteresis()

def SetHysteresis (   self,
  _hysteresis 
)
SetHysteresis(CRcRequest self, TTicks _hysteresis)

◆ SetForTrigger()

def SetForTrigger (   self)
SetForTrigger(CRcRequest self)

◆ Convert()

def Convert (   self,
  rc,
  warn = True 
)
Convert(CRcRequest self, CResource rc, bool warn=True)

◆ IsCompatible()

def IsCompatible (   self)
IsCompatible(CRcRequest self) -> bool

◆ Gid()

def Gid (   self)
Gid(CRcRequest self) -> char const *

◆ Origin()

def Origin (   self)
Origin(CRcRequest self) -> char const *

◆ Type()

def Type (   self)
Type(CRcRequest self) -> ERcType

◆ Value()

def Value (   self)
Value(CRcRequest self) -> CRcValueState

◆ Priority()

def Priority (   self)
Priority(CRcRequest self) -> int

◆ TimeOn()

def TimeOn (   self)
TimeOn(CRcRequest self) -> TTicks

◆ TimeOff()

def TimeOff (   self)
TimeOff(CRcRequest self) -> TTicks

◆ Repeat()

def Repeat (   self)
Repeat(CRcRequest self) -> TTicks

◆ Hysteresis()

def Hysteresis (   self)
Hysteresis(CRcRequest self) -> TTicks

◆ SetFromStr()

def SetFromStr (   self,
  str 
)
SetFromStr(CRcRequest self, char const * str) -> bool

◆ SetAttrsFromStr()

def SetAttrsFromStr (   self,
  str 
)
SetAttrsFromStr(CRcRequest self, char const * str) -> bool

◆ ToStr()

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

◆ Set() [2/2]

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.