|
|
| AbstractPropertyType (std::string property) |
| |
| virtual const picojson::value | toJson () |
| | toJson convert this type to json representation. The json typically looks something like this:
|
| |
| virtual void | fromJson (const picojson::value &json) |
| | fromJson instantiate this type from json
|
| |
| virtual std::string | toString () const =0 |
| | toString
|
| |
|
virtual void | fromString (std::string)=0 |
| | fromString converts from string value
|
| |
| virtual GVariant * | toVariant ()=0 |
| | toVariant
|
| |
|
virtual void | fromVariant (GVariant *)=0 |
| | fromVariant converts GVariant value into compatible native value. Caller owns GVariant argument.
|
| |
| virtual AbstractPropertyType * | copy ()=0 |
| | copy
|
| |
| virtual void | quickCopy (AbstractPropertyType *other) |
| | quickCopy is intended as a way to quickly copy the often changing bits from one abstract property to another It assumes that the properties are almost identical in name, source, and zone.
|
| |
|
bool | operator== (AbstractPropertyType &other) |
| |
|
bool | operator!= (AbstractPropertyType &other) |
| |
| const std::string | alias () |
| | alias for the property name
|
| |
| void | setAlias (const std::string &a) |
| | setAlias sets the alias name for a property This may be useful for implementing standards where the standard name differs from the internal AMB name
|
| |
| virtual void | setValue (boost::any val) |
| | setValue
|
| |
|
template<typename T > |
| T | value () const |
| | value() native value. Does not use type coercion. Will throw if types do not match.
|
| |
| boost::any | anyValue () |
| | anyValue
|
| |
| virtual const string | signature () |
| | signature
|
| |
|
| std::string | name |
| | name Property name.
|
| |
| double | timestamp |
| | timestamp. Timestamp when the value was last updated by the system. This is updated automatically any time setValue() is called
|
| |
|
int32_t | sequence |
| | sequence internal counter. Useful as a unique indentifier. values is -1 if not used (default).
|
| |
|
std::string | sourceUuid |
| | sourceUuid uuid of the source that produced this property. This is set by the routingengine if left unmodified.
|
| |
|
Zone::Type | zone |
| | zone that the property is situated in.
|
| |
|
Priority | priority |
| | priority is used to tell the routing engine how to prioritize routing the value to plugins. setting this value to AbstractPropertyType::Instant will tell the routing engine to immedietly route the value without any reliance on the mainloop. Instant priority is NOT thread safe. Default priority is AbstractPropertyType::Normal.
|
| |
|
bool | internalUpdate |
| | internalUpdate is used to update the property value of AMB internally without calling its related callback functions. Default value is false.
|
| |
| amb::Quality::ValueQuality | valueQuality |
| | valueQuality is used to indicate the quality of the value Each AMB property is given a default value. valueQuality is a way to describe whether the value is the default one and the system has not yet provided a valid value, bad if an error occured, or good.
|
| |
std::vector< std::function
< void(AbstractPropertyType *)> > | destroyed |
| | destroyed is called if this property is destroyed.
|
| |
|
|
boost::any | mValue |
| |
|
std::string | mAlias |
| |
The Priority enum describes prority of the property type.
- Enumerator:
| Normal |
normal priority. This is default Low priority.
|
| Low |
High priority
|
| High |
Instant. Using this priority is not thread safe. This is typically used for Properties that need to be deterministic.
|
| const std::string AbstractPropertyType::alias |
( |
| ) |
|
|
inline |
alias for the property name
- Returns
- alias or name if alias has not been set
| boost::any AbstractPropertyType::anyValue |
( |
| ) |
|
|
inline |
anyValue
- Returns
- boost::any value
| virtual void AbstractPropertyType::fromJson |
( |
const picojson::value & |
json | ) |
|
|
virtual |
quickCopy is intended as a way to quickly copy the often changing bits from one abstract property to another It assumes that the properties are almost identical in name, source, and zone.
- Parameters
-
| other | the property to copy from |
Reimplemented in ListPropertyType< T >.
| void AbstractPropertyType::setAlias |
( |
const std::string & |
a | ) |
|
|
inline |
setAlias sets the alias name for a property This may be useful for implementing standards where the standard name differs from the internal AMB name
- Parameters
-
| virtual void AbstractPropertyType::setValue |
( |
boost::any |
val | ) |
|
|
inlinevirtual |
setValue
- Parameters
-
| val | boost::any value. NOTE: boost::any does not accept type coercion. Types must match exactly with native type. (ie, don't use "int" if the native type is "uint") |
Reimplemented in BasicPropertyType< T >, and BasicPropertyType< bool >.
| virtual const string AbstractPropertyType::signature |
( |
| ) |
|
|
inlinevirtual |
signature
- Returns
- gvariant signature
toJson convert this type to json representation. The json typically looks something like this:
{
"name" : "VehicleSpeed",
"type" : "UInt16",
"source" : "daf23v32342ddsdffafaeefe",
"zone" : 0,
"value" : 25
}
- Returns
- json value representing the type
Reimplemented in StringPropertyType, BasicPropertyType< T >, and BasicPropertyType< bool >.
| virtual std::string AbstractPropertyType::toString |
( |
| ) |
const |
|
pure virtual |
| virtual GVariant* AbstractPropertyType::toVariant |
( |
| ) |
|
|
pure virtual |
| std::string AbstractPropertyType::name |
| double AbstractPropertyType::timestamp |
timestamp. Timestamp when the value was last updated by the system. This is updated automatically any time setValue() is called
- See Also
- amb::currentTime()
-
setValue()
| amb::Quality::ValueQuality AbstractPropertyType::valueQuality |
valueQuality is used to indicate the quality of the value Each AMB property is given a default value. valueQuality is a way to describe whether the value is the default one and the system has not yet provided a valid value, bad if an error occured, or good.
The default value for this is amb::Quality::UncertainInitialValue indicating that the amb property value is the default value. When AbastractPropertyType::setValue is called, valueQuality is set to "Good" automatically.
TODO: this may be able to provide a replacement for set and get error codes: AsyncPropertyReply::Error
The documentation for this class was generated from the following file: