automotive-message-broker  0.13
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
List of all members
AmbPlugin< T > Class Template Reference

#include <ambplugin.h>

Inheritance diagram for AmbPlugin< T >:
Inheritance graph
[legend]
Collaboration diagram for AmbPlugin< T >:
Collaboration graph
[legend]

Additional Inherited Members

- Public Types inherited from AbstractSource
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.
 
- Public Member Functions inherited from AbstractSource
 AbstractSource (AbstractRoutingEngine *engine, map< string, string > config)
 
virtual void getPropertyAsync (AsyncPropertyReply *reply)=0
 pure virtual methods: More...
 
virtual void getRangePropertyAsync (AsyncRangePropertyReply *reply)=0
 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 ( More...
 
virtual AsyncPropertyReplysetProperty (AsyncSetPropertyRequest request)=0
 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 ( More...
 
virtual void subscribeToPropertyChanges (VehicleProperty::Property property)=0
 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. More...
 
virtual void unsubscribeToPropertyChanges (VehicleProperty::Property property)=0
 unsubscribeToPropertyChanges is called when a sink requests to unsubscribe from a given property's changes. More...
 
virtual int supportedOperations ()=0
 supportedOperations More...
 
virtual PropertyInfo getPropertyInfo (const VehicleProperty::Property &property)=0
 getPropertyInfo used to return specific information about a property More...
 
virtual PropertyList supported ()=0
 supported More...
 
- Public Member Functions inherited from AbstractSink
 AbstractSink (AbstractRoutingEngine *engine, map< string, string > config)
 
virtual const string uuid ()=0
 Pure virtual methods: More...
 
virtual void propertyChanged (AbstractPropertyType *value)
 propertyChanged is called when a subscribed to property changes. More...
 
virtual void supportedChanged (const PropertyList &supportedProperties)=0
 
- Protected Attributes inherited from AbstractSource
AbstractRoutingEngineroutingEngine
 routingEngine the core routing engine used to send property updates to sink plugins. More...
 
- Protected Attributes inherited from AbstractSink
AbstractRoutingEngineroutingEngine
 routingEngine is the core of AMB. It is used to pass plugin and property information to other plugins
 
map< string, string > configuration
 

Detailed Description

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"
class MyPlugin: public AmbPluginImpl {
public:
MyPlugin(AbstractRoutingEngine* re, const std::map<std::string, std::string>& config, AbstractSink& parent);
~MyPlugin();
const std::string uuid() const { return "plugin_uuid"; }
};
// library exported function for plugin loader
extern "C" AbstractSource* create(AbstractRoutingEngine* routingengine, std::map<std::string, std::string> config)
{
return new AmbPlugin<MyPlugin>(routingengine, config);
}

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