|
automotive-message-broker
0.14.803
|
registerProperty registers properties with the Vehicle Property system. Returns true if property has been registered successfully.
| name | - name of property. Name cannot match any existing property or it will be rejected and this method will return false. |
| factor | - callback function that returns an AbstractPropertyType representation of the value. custom properties will need to return a custom AbstractPropertyType based object. |
#include <vehicleproperty.h> #include <abstractpropertytype.h>
//Somewhere in a source plugin: ... Property VehicleJetEngineStatus = "VehicleJetEngineStatus"; VehicleProperty::registerProperty(VehicleJetEngineStatus, [](){return new BasicPropertyType<bool>(VehicleJetEngineStatus, false);}); ... //other initialization
1.8.2