![]() |
Home2L - Python API v1.4-2-g83f4c (2025-08-23)
Smart Tools for a Private Home
|
Typed value tagged with a state and a time stamp. The constants for type 'ERcType' have the prefix 'rct*'.The state may be one of: 'rcsUnknown': The value is unknown. 'rcsBusy': The value is known, the underlying device is busy. 'rcsValid': The value is known and stable. The time stamp reflects the age of a value (last change/update). It is generally not valid to judge from the time stamp whether the value is outdated, since there are other mechanisms in the library setting the state to 'rcsUnknown' if, for example, the connection to a remote resource got lost.
Inherits object.
Public Member Functions | |
Clear (self, *args) | |
Set (self, vs2) | |
SetToReportBusy (self) | |
SetToReportBusyOldVal (self) | |
SetToReportBusyNewVal (self) | |
SetToReportNothing (self) | |
SetGenericInt (self, _val, _type, _state=rcsValid) | |
SetGenericFloat (self, _val, _type, _state=rcsValid) | |
SetGenericString (self, _val, _type, _state=rcsValid) | |
SetBool (self, _val, _state=rcsValid) | |
SetInt (self, _val, _state=rcsValid) | |
SetFloat (self, _val, _state=rcsValid) | |
SetString (self, _val, _state=rcsValid) | |
SetTime (self, _val, _state=rcsValid) | |
SetTrigger (self, _val=1, _state=rcsValid) | |
SetMutex (self, _val, _state=rcsValid) | |
SetUnitInt (self, type, _val, _state=rcsValid) | |
SetUnitFloat (self, type, _val, _state=rcsValid) | |
SetEnum (self, type, _val, _state=rcsValid) | |
GenericInt (self) | |
GenericFloat (self) | |
GenericString (self) | |
Bool (self) | |
Int (self) | |
Float (self) | |
String (self) | |
Time (self) | |
Trigger (self) | |
Mutex (self) | |
UnitInt (self, _type) | |
UnitFloat (self, _type) | |
EnumIdx (self) | |
ValidBool (self, defaultVal=False) | |
ValidInt (self, defaultVal=0) | |
ValidFloat (self, defaultVal=0.0) | |
ValidString (self, *args) | |
ValidTime (self, defaultVal=0) | |
ValidTrigger (self, defaultVal=0) | |
ValidMutex (self, *args) | |
ValidUnitInt (self, _type, defaultVal=0) | |
ValidUnitFloat (self, _type, defaultVal=0.0) | |
ValidEnumIdx (self, _type, defaultVal=0) | |
SetType (self, _type) | |
SetState (self, _state) | |
SetTimeStamp (self, _timeStamp) | |
Type (self) | |
State (self) | |
TimeStamp (self) | |
IsValid (self) | |
IsBusy (self) | |
IsKnown (self) | |
Equals (self, vs2) | |
ValueEquals (self, vs2) | |
Convert (self, _type) | |
ToStr (self, ret, withType=False, withTimeStamp=False, precise=False, stringChars=20) | |
SetFromStr (self, str) | |
SetFromStrFast (self, str, warn=True) | |
ToHuman (self, retBuf, retBufSize) | |
Value (self) | |
Return the value as a Python object. | |
ValidValue (self, defaultVal) | |
Return the most appropriate valid value as a Python object. | |
Clear | ( | self, | |
* | args | ||
) |
Clear(CRcValueState self) Clear(CRcValueState self, ERcType _type, ERcState _state=rcsUnknown)
Set | ( | self, | |
vs2 | |||
) |
Set(CRcValueState self, CRcValueState vs2)
SetToReportBusy | ( | self | ) |
SetToReportBusy(CRcValueState self)
SetToReportBusyOldVal | ( | self | ) |
SetToReportBusyOldVal(CRcValueState self)
SetToReportBusyNewVal | ( | self | ) |
SetToReportBusyNewVal(CRcValueState self)
SetToReportNothing | ( | self | ) |
SetToReportNothing(CRcValueState self)
SetGenericInt | ( | self, | |
_val, | |||
_type, | |||
_state = rcsValid |
|||
) |
SetGenericInt(CRcValueState self, int _val, ERcType _type, ERcState _state=rcsValid)
SetGenericFloat | ( | self, | |
_val, | |||
_type, | |||
_state = rcsValid |
|||
) |
SetGenericFloat(CRcValueState self, float _val, ERcType _type, ERcState _state=rcsValid)
SetGenericString | ( | self, | |
_val, | |||
_type, | |||
_state = rcsValid |
|||
) |
SetGenericString(CRcValueState self, char const * _val, ERcType _type, ERcState _state=rcsValid) -> bool
SetBool | ( | self, | |
_val, | |||
_state = rcsValid |
|||
) |
SetBool(CRcValueState self, bool _val, ERcState _state=rcsValid)
SetInt | ( | self, | |
_val, | |||
_state = rcsValid |
|||
) |
SetInt(CRcValueState self, int _val, ERcState _state=rcsValid)
SetFloat | ( | self, | |
_val, | |||
_state = rcsValid |
|||
) |
SetFloat(CRcValueState self, float _val, ERcState _state=rcsValid)
SetString | ( | self, | |
_val, | |||
_state = rcsValid |
|||
) |
SetString(CRcValueState self, char const * _val, ERcState _state=rcsValid) -> bool
SetTime | ( | self, | |
_val, | |||
_state = rcsValid |
|||
) |
SetTime(CRcValueState self, TTicks _val, ERcState _state=rcsValid)
SetTrigger | ( | self, | |
_val = 1 , |
|||
_state = rcsValid |
|||
) |
SetTrigger(CRcValueState self, int _val=1, ERcState _state=rcsValid)
SetMutex | ( | self, | |
_val, | |||
_state = rcsValid |
|||
) |
SetMutex(CRcValueState self, char const * _val, ERcState _state=rcsValid) -> bool
SetUnitInt | ( | self, | |
type, | |||
_val, | |||
_state = rcsValid |
|||
) |
SetUnitInt(CRcValueState self, ERcType type, int _val, ERcState _state=rcsValid)
SetUnitFloat | ( | self, | |
type, | |||
_val, | |||
_state = rcsValid |
|||
) |
SetUnitFloat(CRcValueState self, ERcType type, float _val, ERcState _state=rcsValid)
SetEnum | ( | self, | |
type, | |||
_val, | |||
_state = rcsValid |
|||
) |
SetEnum(CRcValueState self, ERcType type, int _val, ERcState _state=rcsValid)
GenericInt | ( | self | ) |
GenericInt(CRcValueState self) -> int
GenericFloat | ( | self | ) |
GenericFloat(CRcValueState self) -> float
GenericString | ( | self | ) |
GenericString(CRcValueState self) -> char const *
Bool | ( | self | ) |
Bool(CRcValueState self) -> bool
Int | ( | self | ) |
Int(CRcValueState self) -> int
Float | ( | self | ) |
Float(CRcValueState self) -> float
String | ( | self | ) |
String(CRcValueState self) -> char const *
Time | ( | self | ) |
Time(CRcValueState self) -> TTicks
Trigger | ( | self | ) |
Trigger(CRcValueState self) -> int
Mutex | ( | self | ) |
Mutex(CRcValueState self) -> char const *
UnitInt | ( | self, | |
_type | |||
) |
UnitInt(CRcValueState self, ERcType _type) -> int
UnitFloat | ( | self, | |
_type | |||
) |
UnitFloat(CRcValueState self, ERcType _type) -> float
EnumIdx | ( | self | ) |
EnumIdx(CRcValueState self) -> int
ValidBool | ( | self, | |
defaultVal = False |
|||
) |
ValidBool(CRcValueState self, bool defaultVal=False) -> bool
ValidInt | ( | self, | |
defaultVal = 0 |
|||
) |
ValidInt(CRcValueState self, int defaultVal=0) -> int
ValidFloat | ( | self, | |
defaultVal = 0.0 |
|||
) |
ValidFloat(CRcValueState self, float defaultVal=0.0) -> float
ValidString | ( | self, | |
* | args | ||
) |
ValidString(CRcValueState self, char const * defaultVal=CString::emptyStr) -> char const
ValidTime | ( | self, | |
defaultVal = 0 |
|||
) |
ValidTime(CRcValueState self, TTicks defaultVal=0) -> TTicks
ValidTrigger | ( | self, | |
defaultVal = 0 |
|||
) |
ValidTrigger(CRcValueState self, int defaultVal=0) -> int
ValidMutex | ( | self, | |
* | args | ||
) |
ValidMutex(CRcValueState self, char const * defaultVal=CString::emptyStr) -> char const
ValidUnitInt | ( | self, | |
_type, | |||
defaultVal = 0 |
|||
) |
ValidUnitInt(CRcValueState self, ERcType _type, int defaultVal=0) -> int
ValidUnitFloat | ( | self, | |
_type, | |||
defaultVal = 0.0 |
|||
) |
ValidUnitFloat(CRcValueState self, ERcType _type, float defaultVal=0.0) -> float
ValidEnumIdx | ( | self, | |
_type, | |||
defaultVal = 0 |
|||
) |
ValidEnumIdx(CRcValueState self, ERcType _type, int defaultVal=0) -> int
SetType | ( | self, | |
_type | |||
) |
SetType(CRcValueState self, ERcType _type)
SetState | ( | self, | |
_state | |||
) |
SetState(CRcValueState self, ERcState _state)
SetTimeStamp | ( | self, | |
_timeStamp | |||
) |
SetTimeStamp(CRcValueState self, TTicks _timeStamp)
Type | ( | self | ) |
Type(CRcValueState self) -> ERcType
State | ( | self | ) |
State(CRcValueState self) -> ERcState
TimeStamp | ( | self | ) |
TimeStamp(CRcValueState self) -> TTicks
IsValid | ( | self | ) |
IsValid(CRcValueState self) -> bool
IsBusy | ( | self | ) |
IsBusy(CRcValueState self) -> bool
IsKnown | ( | self | ) |
IsKnown(CRcValueState self) -> bool
Equals | ( | self, | |
vs2 | |||
) |
Equals(CRcValueState self, CRcValueState vs2) -> bool
ValueEquals | ( | self, | |
vs2 | |||
) |
ValueEquals(CRcValueState self, CRcValueState vs2) -> bool
Convert | ( | self, | |
_type | |||
) |
Convert(CRcValueState self, ERcType _type) -> bool
ToStr | ( | self, | |
ret, | |||
withType = False , |
|||
withTimeStamp = False , |
|||
precise = False , |
|||
stringChars = 20 |
|||
) |
ToStr(CRcValueState self, CString * ret, bool withType=False, bool withTimeStamp=False, bool precise=False, int stringChars=20) -> char const
SetFromStr | ( | self, | |
str | |||
) |
SetFromStr(CRcValueState self, char const * str) -> bool
SetFromStrFast | ( | self, | |
str, | |||
warn = True |
|||
) |
SetFromStrFast(CRcValueState self, char const * str, bool warn=True) -> bool
ToHuman | ( | self, | |
retBuf, | |||
retBufSize | |||
) |
ToHuman(CRcValueState self, char * retBuf, int retBufSize)
Value | ( | self | ) |
Return the value as a Python object.
Return the value as a Python object. In case of a state of 'rcsUnknown' or if 'self' is not defined, 'None' is returned. 'self == None' is allowed.
ValidValue | ( | self, | |
defaultVal | |||
) |
Return the most appropriate valid value as a Python object.
Return the value as a Python object. Unlike 'Value', this method never returns 'None', but reverts to the given default value, if 'self' does not transort a valid value. 'self == None' is tolerated