TnEHProvider
Public Member Functions | List of all members
tn::ehp::TnEHProvider Class Referenceabstract

Telenav electronic horizontal provider library. More...

#include <tn_ehp.h>

Public Member Functions

virtual ~TnEHProvider ()
 
virtual void updatePosition (const VehicleLocationInfo &vehicle_location)=0
 update the latest vehicle location. More...
 
virtual void getEHMapVersion (std::string &streaming_data_version, std::string &onboard_data_version)=0
 get electronic horizon map data version. More...
 
virtual tn::foundation::ServiceStatus shutdown ()=0
 The shutdown() will stop the running service and release all resources owned by it. More...
 
virtual tn::foundation::ServiceStatus pause ()=0
 The pause() will force service to stop running until resume() is called. More...
 
virtual tn::foundation::ServiceStatus resume ()=0
 The resume() will resume paused service. More...
 
virtual void setMMFeedbackCallback (MapMatchingFeedbackUpdate_cb mm_cb)=0
 set mapmatching result callback, set function pointer to ehprovider, we can use it to return MM feedback More...
 
virtual void setAdasCallback (ADASMessagesUpdate_cb mm_cb)=0
 set adas messgae callback, set function pointer to ehprovider, we can use it to return adas message More...
 
virtual void setAnalyticsCallback (AnalyticsEventUpdate_cb analytics_cb)=0
 set analytcis callback, set function pointer to ehprovider, we can use it to return analytics More...
 
virtual void setDiagnosticsCallback (DiagnosticsEventUpdate_cb diagnostics_cb)=0
 set diagnostics callback, set function pointer to ehprovider, we can use it to return diagnostics More...
 
virtual void setLogCallback (LogMessageUpdate_cb log_meesage_cb)=0
 set log messgae callback, set function pointer to ehprovider, we can use it to return log message More...
 
virtual std::string getEhpVersion ()=0
 get Ehp version More...
 

Detailed Description

Telenav electronic horizontal provider library.

Definition at line 53 of file tn_ehp.h.

Constructor & Destructor Documentation

◆ ~TnEHProvider()

virtual tn::ehp::TnEHProvider::~TnEHProvider ( )
inlinevirtual

Definition at line 56 of file tn_ehp.h.

Member Function Documentation

◆ getEHMapVersion()

virtual void tn::ehp::TnEHProvider::getEHMapVersion ( std::string &  streaming_data_version,
std::string &  onboard_data_version 
)
pure virtual

get electronic horizon map data version.

Note
it will return the versions of onboard data and streaming data.
Parameters
[out]streaming_data_version,streamingdata version, "" means no streaming data,valid value example: "NA-2.1.1212"
[out]onboard_data_version,onboarddata version,"" means no onboard data, example: "NA-2.1.1212"
Returns
N/A

◆ getEhpVersion()

virtual std::string tn::ehp::TnEHProvider::getEhpVersion ( )
pure virtual

get Ehp version

Note
it will return Ehp version .
Parameters
N/A
Returns
string

◆ pause()

virtual tn::foundation::ServiceStatus tn::ehp::TnEHProvider::pause ( )
pure virtual

The pause() will force service to stop running until resume() is called.

Note
If service has already been paused, it will do nothing and return directly
This method is thread safe
Returns
isOK() if service has successfully been paused.
isInvalidCallState() if service is already paused before calling or in a state not able to pause

◆ resume()

virtual tn::foundation::ServiceStatus tn::ehp::TnEHProvider::resume ( )
pure virtual

The resume() will resume paused service.

Note
If service hasn't been paused, it will do nothing and return directly
This method is thread safe
Returns
isOK() if service has successfully been resumed.
isInvalidCallState() if service is already running before calling or in a state not able to resume

◆ setAdasCallback()

virtual void tn::ehp::TnEHProvider::setAdasCallback ( ADASMessagesUpdate_cb  mm_cb)
pure virtual

set adas messgae callback, set function pointer to ehprovider, we can use it to return adas message

Note
user of ehprovider set the adas message callback function pointer, it should be set in init.
example:setAdasCallback(std::bind(&ADASConsumer::onAdasMessageUpdate, adasMessageConsumer,
std::placeholders::_1))
This method is thread safe
Parameters
[in]ADASMessagesUpdate_cb,userof ehprovider implement adas message update callback and set it as function pointer.
Returns
N/A.

◆ setAnalyticsCallback()

virtual void tn::ehp::TnEHProvider::setAnalyticsCallback ( AnalyticsEventUpdate_cb  analytics_cb)
pure virtual

set analytcis callback, set function pointer to ehprovider, we can use it to return analytics

Note
user of ehprovider set the analytics callback function pointer,it should be set in init.
example:setAnalyticsCallback(std::bind(&ADASConsumer::onAnalyticsUpdate, analyticsConsumer,
std::placeholders::_1))
This method is thread safe
Parameters
[in]AnalyticsEventUpdate_cb,userof ehprovider implement Analytics update callback and set it as function pointer.
Returns
N/A.

◆ setDiagnosticsCallback()

virtual void tn::ehp::TnEHProvider::setDiagnosticsCallback ( DiagnosticsEventUpdate_cb  diagnostics_cb)
pure virtual

set diagnostics callback, set function pointer to ehprovider, we can use it to return diagnostics

Note
user of ehprovider set the diagnostics callback function pointer,it should be set in init.
example:setDiagnosticsCallback(std::bind(&ADASConsumer::onDiagnosticsUpdate, diagnosticsConsumer,
std::placeholders::_1))
This method is thread safe
Parameters
[in]DiagnosticsEventUpdate_cb,userof ehprovider implement Analytics update callback and set it as function pointer.
Returns
N/A.

◆ setLogCallback()

virtual void tn::ehp::TnEHProvider::setLogCallback ( LogMessageUpdate_cb  log_meesage_cb)
pure virtual

set log messgae callback, set function pointer to ehprovider, we can use it to return log message

Note
user of ehprovider set the log message callback function pointer,it should be set in init.
example:setLogCallback(std::bind(&ADASConsumer::onLogMessageUpdate, logMessageConsumer,
std::placeholders::_1))
This method is thread safe
Parameters
[in]LogMessageUpdate_cb,userof ehprovider implement adas message update callback and set it as function pointer.
Returns
N/A.

◆ setMMFeedbackCallback()

virtual void tn::ehp::TnEHProvider::setMMFeedbackCallback ( MapMatchingFeedbackUpdate_cb  mm_cb)
pure virtual

set mapmatching result callback, set function pointer to ehprovider, we can use it to return MM feedback

Note
user of ehprovider set the MM feedback callback function pointer,it should be set in init.
example:setMMFeedbackCallback(std::bind(&ADASConsumer::onMMFeedbackUpdate, mmFeedbackConsumer,
std::placeholders::_1))
This method is thread safe
Parameters
[in]MapMatchingFeedbackUpdate_cb,userof ehprovider implement adas message update callback and set it as function pointer.
Returns
N/A.

◆ shutdown()

virtual tn::foundation::ServiceStatus tn::ehp::TnEHProvider::shutdown ( )
pure virtual

The shutdown() will stop the running service and release all resources owned by it.

Note
If shutdown() hasn't been called before destroying service object, the service implementation is responsible for calling it internally
After shutdown() is called, the service object stops functioning and must be destroyed. Continuing to use any of its APIs will result in undefined behavior
This method is thread safe
Returns
isOK() if service has successfully been shutdown.
isInvalidCallState() if service is already shutdown before calling

◆ updatePosition()

virtual void tn::ehp::TnEHProvider::updatePosition ( const VehicleLocationInfo vehicle_location)
pure virtual

update the latest vehicle location.

Note
if location's coordinates are invalid (latitude is out of range [-85.0, 85.0] or longitude is out of range [-180.0, 180.0] ), position engine will ignore it.
a notification OnUpdateMapMatchingStatus would be sent after the location is updated.
Parameters
[in]vehicle_location: latest vehicle location
Returns
N/A

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