#include <ambplugin.h>
|
|
| | AmbPlugin (AbstractRoutingEngine *re, const std::map< std::string, std::string > &config) |
| |
| virtual void | getPropertyAsync (AsyncPropertyReply *reply) |
| | getPropertyAsync is called when a sink requests the value for given property. This is only called if the source supports the Get operation.
|
| |
| virtual void | getRangePropertyAsync (AsyncRangePropertyReply *reply) |
| | getRangePropertyAsync is called when a sink requests a series of values for a given property within a specified time or sequencial range. This will only be called if the source support the Ranged Operation.
|
| |
| virtual AsyncPropertyReply * | setProperty (AsyncSetPropertyRequest request) |
| | setProperty is called when a sink requests to set a value for a given property. This is only called if the source supports the Set Operation.
|
| |
| virtual void | subscribeToPropertyChanges (VehicleProperty::Property property) |
| | subscribeToPropertyChanges is called when a sink requests a subscription. Source plugins can keep track of subscriptions and may wish to sleep if there are no subscriptions.
|
| |
| virtual void | unsubscribeToPropertyChanges (VehicleProperty::Property property) |
| | unsubscribeToPropertyChanges is called when a sink requests to unsubscribe from a given property's changes.
|
| |
| virtual PropertyList | supported () |
| | supported is called by the routingEngine to understand what properties this source supports
|
| |
| virtual int | supportedOperations () |
| | supportedOperations
|
| |
| virtual PropertyInfo | getPropertyInfo (const VehicleProperty::Property &property) |
| | getPropertyInfo used to return specific information about a property. The source should override this otherwise a PropertyInfo::invalid() will be returned for the property.
|
| |
| virtual const string | uuid () |
| |
| virtual void | propertyChanged (AbstractPropertyType *value) |
| |
| virtual void | supportedChanged (const PropertyList &supportedProperties) |
| |
| void | init () |
| |
|
| AbstractSource (AbstractRoutingEngine *engine, map< string, string > config) |
| |
|
| AbstractSink (AbstractRoutingEngine *engine, map< string, string > config) |
| |
|
| enum | Operations { Get = 0x01,
Set = 0x02,
GetRanged = 0x04
} |
| | The Operations enum is a bitmask flag used to specify which operations are supported by the source plugin.
|
| |
| AbstractRoutingEngine * | routingEngine |
| | routingEngine the core routing engine used to send property updates to sink plugins.
|
| |
template<class T>
class AmbPlugin< T >
AmbPlugin class contains common code used in all IviPoC II plugins for Automotive message broker(AMB). For the AMB library API please visit Automotive message broker web page.
Example of the minimal code to write a new plugin using AmbPlugin:
#include "ambpluginimpl.h"
public:
~MyPlugin();
const std::string
uuid()
const {
return "plugin_uuid"; }
};
{
}
Compile time check
- Parameters
-
| re | AbstractRoutingEngine |
| config | Map of the configuration string values loaded on startup from AMB configuration file |
getPropertyAsync is called when a sink requests the value for given property. This is only called if the source supports the Get operation.
- Parameters
-
- See Also
- AsyncPropertyReply
Implements AbstractSource.
getPropertyInfo used to return specific information about a property. The source should override this otherwise a PropertyInfo::invalid() will be returned for the property.
- Parameters
-
| property | the property to get info for. |
- Returns
- a PropertyInfo object.
Implements AbstractSource.
getRangePropertyAsync is called when a sink requests a series of values for a given property within a specified time or sequencial range. This will only be called if the source support the Ranged Operation.
- Parameters
-
| reply | is the reply variable. |
- See Also
- AsyncRangePropertyReply
Implements AbstractSource.
Second phase of the plugin initialization.
propertyChanged is called when a subscribed to property changes.
- Parameters
-
| value | value of the property that changed. this is a temporary pointer that will be destroyed. Do not destroy it. If you need to store the value use value.anyValue(), value.value<T>() or value->copy() to copy. |
Reimplemented from AbstractSink.
setProperty is called when a sink requests to set a value for a given property. This is only called if the source supports the Set Operation.
- Parameters
-
| request | the requested property to set. |
- Returns
- returns a pointer to the new value for the property.
Implements AbstractSource.
template<typename T >
| void AmbPlugin< T >::subscribeToPropertyChanges |
( |
VehicleProperty::Property |
property | ) |
|
|
virtual |
subscribeToPropertyChanges is called when a sink requests a subscription. Source plugins can keep track of subscriptions and may wish to sleep if there are no subscriptions.
- Parameters
-
| property | the property that is being subscribed. |
Implements AbstractSource.
supported is called by the routingEngine to understand what properties this source supports
- Returns
- returns a list of supported properties. If the the supported properties changed, the source should call AbstractRoutingEngine::setSupported.
Implements AbstractSource.
template<typename T >
| void AmbPlugin< T >::supportedChanged |
( |
const PropertyList & |
supportedProperties | ) |
|
|
virtual |
supportedChanged() is called when the supported properties changes
- Parameters
-
| supportedProperties | the new list of supported properties. |
Implements AbstractSink.
supportedOperations
- Returns
- returns the supported operations.
Implements AbstractSource.
template<typename T >
| void AmbPlugin< T >::unsubscribeToPropertyChanges |
( |
VehicleProperty::Property |
property | ) |
|
|
virtual |
unsubscribeToPropertyChanges is called when a sink requests to unsubscribe from a given property's changes.
- Parameters
-
| property | the property to unsubscribe to |
Implements AbstractSource.
uuid() is a unique identifier
- Returns
- A guid-style unique identifier
Implements AbstractSink.
The documentation for this class was generated from the following file:
- /home/abuild/rpmbuild/BUILD/automotive-message-broker-0.13/lib/ambplugin.h