automotive-message-broker  0.14.803
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Public Attributes | List of all members
WebSocketSource Class Reference
Inheritance diagram for WebSocketSource:
AbstractSource AbstractSink

Public Member Functions

 WebSocketSource (AbstractRoutingEngine *re, std::map< std::string, std::string > config)
 
const std::string uuid ()
 Pure virtual methods:
 
void getPropertyAsync (AsyncPropertyReply *reply)
 pure virtual methods:
 
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 (
 
AsyncPropertyReplysetProperty (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 (
 
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.
 
void unsubscribeToPropertyChanges (VehicleProperty::Property property)
 unsubscribeToPropertyChanges is called when a sink requests to unsubscribe from a given property's changes.
 
PropertyList supported ()
 supported
 
int supportedOperations ()
 supportedOperations
 
void checkSubscriptions ()
 
void updateSupported ()
 
void supportedChanged (const PropertyList &)
 
void setConfiguration (std::map< std::string, std::string > config)
 
PropertyInfo getPropertyInfo (const VehicleProperty::Property &property)
 getPropertyInfo used to return specific information about a property
 
- Public Member Functions inherited from AbstractSource
 AbstractSource (AbstractRoutingEngine *engine, map< string, string > config)
 
- Public Member Functions inherited from AbstractSink
 AbstractSink (AbstractRoutingEngine *engine, map< string, string > config)
 
virtual void propertyChanged (AbstractPropertyType *value)
 propertyChanged is called when a subscribed to property changes.
 

Public Attributes

bool m_sslEnabled
 
lws * clientsocket
 
PropertyList queuedRequests
 
bool clientConnected
 
PropertyList activeRequests
 
PropertyList removeRequests
 
std::map< std::string,
AsyncPropertyReply * > 
uuidReplyMap
 
std::map< std::string, double > uuidTimeoutMap
 
std::map< std::string,
AsyncRangePropertyReply * > 
uuidRangedReplyMap
 
std::map< std::string,
AsyncPropertyReply * > 
setReplyMap
 
int partialMessageIndex
 
QByteArray incompleteMessage
 
int expectedMessageFrames
 
double serverTimeOffset
 serverTimeOffset offset between server time and local time
 

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.
 
- Protected Attributes inherited from AbstractSource
AbstractRoutingEngineroutingEngine
 routingEngine the core routing engine used to send property updates to sink plugins.
 

Member Function Documentation

void WebSocketSource::getPropertyAsync ( AsyncPropertyReply reply)
virtual

pure virtual methods:

getPropertyAsync is called when a sink requests the value for given property. This is only called if the source supports the Get operation (

See Also
Operation)
Parameters
replythe reply variable.
See Also
AsyncPropertyReply

Implements AbstractSource.

PropertyInfo WebSocketSource::getPropertyInfo ( const VehicleProperty::Property &  property)
virtual

getPropertyInfo used to return specific information about a property

See Also
PropertyInfo the source should override this otherwise a PropertyInfo::invalid() will be returned for the property
Parameters
propertythe property to get info for.
Returns
a PropertyInfo object.

Implements AbstractSource.

void WebSocketSource::getRangePropertyAsync ( AsyncRangePropertyReply reply)
virtual

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 (

See Also
Operations)
Parameters
replyis the reply variable.
See Also
AsyncRangePropertyReply

Implements AbstractSource.

AsyncPropertyReply* WebSocketSource::setProperty ( AsyncSetPropertyRequest  request)
virtual

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 (

See Also
Operation)
Parameters
requestthe requested property to set.
Returns
returns a pointer to the new value for the property.
See Also
AsyncPropertyReply

Implements AbstractSource.

void WebSocketSource::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
propertythe property that is being subscribed.
See Also
unsubscribeToPropertyChanges

Implements AbstractSource.

PropertyList WebSocketSource::supported ( )
virtual

supported

Returns
returns the supported properties.

Implements AbstractSource.

void WebSocketSource::supportedChanged ( const PropertyList &  supportedProperties)
inlinevirtual

supportedChanged() is called when the supported properties changes

  • supportedProperties the new list of supported properties.

Implements AbstractSink.

int WebSocketSource::supportedOperations ( )
virtual

supportedOperations

Returns
returns the supported operations.
See Also
Operations

Implements AbstractSource.

void WebSocketSource::unsubscribeToPropertyChanges ( VehicleProperty::Property  property)
virtual

unsubscribeToPropertyChanges is called when a sink requests to unsubscribe from a given property's changes.

Parameters
propertythe property to unsubscribe to
See Also
subscribeToPropertyChanges

Implements AbstractSource.

const std::string WebSocketSource::uuid ( )
virtual

Pure virtual methods:

uuid() is a unique identifier

Returns
a guid-style unique identifier

Implements AbstractSink.


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