VSM C++ SDK
Vehicle Specific Modules SDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ugcs::vsm::Property Class Reference
Inheritance diagram for ugcs::vsm::Property:

Public Types

enum  Value_type {
  VALUE_TYPE_INT = 1, VALUE_TYPE_FLOAT = 2, VALUE_TYPE_DOUBLE = 3, VALUE_TYPE_STRING = 4,
  VALUE_TYPE_BOOL = 5, VALUE_TYPE_LIST = 6, VALUE_TYPE_ENUM = 7, VALUE_TYPE_BINARY = 8,
  VALUE_TYPE_NONE = 9
}
 
enum  Value_spec { VALUE_SPEC_REGULAR = 1, VALUE_SPEC_NA = 2 }
 
typedef std::shared_ptr< PropertyPtr
 Pointer type.
 
typedef std::weak_ptr< PropertyWeak_ptr
 Pointer type.
 

Public Member Functions

 Property (int id, const std::string &name, proto::Field_semantic semantic)
 
 Property (int id, const std::string &name, Value_type type)
 
 Property (Property::Ptr)
 
template<typename Type >
 Property (const std::string &name, Type value, proto::Field_semantic sem=proto::FIELD_SEMANTIC_DEFAULT)
 
void Add_enum (const std::string &name, int value)
 
void Set_value (bool v)
 
void Set_value (double v)
 
void Set_value (const std::string &v)
 
void Set_value (const char *v)
 
void Set_value (int v)
 
void Set_value (unsigned int v)
 
void Set_value (const proto::List_value &v)
 
void Set_value_na ()
 
bool Set_value (const proto::Field_value &val)
 
void Register (proto::Register_field *field)
 
void Write_as_property (proto::Property_field *field)
 
void Write_as_parameter (proto::Parameter_field *field)
 
void Write_as_telemetry (proto::Telemetry_field *field)
 
void Set_timeout (int)
 
Property::Ptr Min_value ()
 
Property::Ptr Max_value ()
 
Property::Ptr Default_value ()
 
bool Get_value (bool &v)
 
bool Get_value (float &v)
 
bool Get_value (double &v)
 
bool Get_value (std::string &v)
 
bool Get_value (int &v)
 
bool Get_value (int64_t &v)
 
bool Get_value (proto::List_value &v)
 
bool Is_value_na ()
 
bool Is_changed ()
 
void Set_changed ()
 
int Get_id ()
 
std::string Get_name ()
 
proto::Field_semantic Get_semantic ()
 
std::chrono::time_point
< std::chrono::system_clock > 
Get_update_time ()
 
std::string Dump_value ()
 
bool Fields_are_equal (const proto::Field_value &val1, const proto::Field_value &val2)
 
bool Is_equal (const Property &)
 

Static Public Member Functions

template<typename... Args>
static Ptr Create (Args &&...args)
 Create an instance. More...
 

Member Function Documentation

template<typename... Args>
static Ptr ugcs::vsm::Property::Create ( Args &&...  args)
inlinestatic

Create an instance.


The documentation for this class was generated from the following file: