BusBricks: ServiceClusterBase Class Reference
BusBricks  0.1
Customize bus-communication
Loading...
Searching...
No Matches
ServiceClusterBase Class Referenceabstract

ServiceCluster-base-class to add class-functions to vtable. More...

#include <ServiceCluster.h>

Inheritance diagram for ServiceClusterBase:
[legend]
Collaboration diagram for ServiceClusterBase:
[legend]

Public Member Functions

virtual ServiceBasegetService_byID (uint8_t ServiceID)=0
 Get pointer to the service with the given service-ID by iterating through the associated services and calling their get_ServiceID-function.
 
virtual ServiceBasegetService_byPos (uint8_t ServicePosition)=0
 Get pointer to the service at a specific position in the cluster (positions starting by zero)
 
virtual uint8_t getNumberOfServices () const =0
 Get the total Number Of Services-objects associated to the cluster.
 
virtual errorCodes impartPdu (Frame *FrameToAdd)=0
 Add the payload of the referenced Frame to the belonging Service.
 
virtual ~ServiceClusterBase ()
 Destroy the Service Cluster Base object.
 
- Public Member Functions inherited from ErrorState
 ErrorState ()
 Default constructor for ErrorState.
 
 ~ErrorState ()
 Destroy the ErrorState object.
 
void raiseError (errorCodes code)
 raises a new error by setting the given error-code as errorState
 
errorCodes getErrorState ()
 Get the currently active error-code.
 
void clearErrorState ()
 sets the current error-state to "no Error"
 

Detailed Description

ServiceCluster-base-class to add class-functions to vtable.

Member Function Documentation

◆ getNumberOfServices()

virtual uint8_t ServiceClusterBase::getNumberOfServices ( ) const
pure virtual

Get the total Number Of Services-objects associated to the cluster.

Returns
uint8_t total Number Of Services-objects associated to the cluster

Implemented in ServiceCluster< number_of_services >.

Here is the caller graph for this function:

◆ getService_byID()

virtual ServiceBase * ServiceClusterBase::getService_byID ( uint8_t ServiceID)
pure virtual

Get pointer to the service with the given service-ID by iterating through the associated services and calling their get_ServiceID-function.

Parameters
ServiceID1-byte service-ID (unique for service-class)
Returns
ServiceBase* pointer to the service with the given ID

Implemented in ServiceCluster< number_of_services >.

Here is the caller graph for this function:

◆ getService_byPos()

virtual ServiceBase * ServiceClusterBase::getService_byPos ( uint8_t ServicePosition)
pure virtual

Get pointer to the service at a specific position in the cluster (positions starting by zero)

Parameters
ServicePositionposition of the service in the cluster (0-based)
Returns
ServiceBase* pointer to the service at the given position

Implemented in ServiceCluster< number_of_services >.

Here is the caller graph for this function:

◆ impartPdu()

virtual errorCodes ServiceClusterBase::impartPdu ( Frame * FrameToAdd)
pure virtual

Add the payload of the referenced Frame to the belonging Service.

Parameters
FrameToAddFrame, thats PDU has to be added to the Service
Returns
true PDU added successfully
false failed to add PDU

Implemented in ServiceCluster< number_of_services >.

Here is the caller graph for this function:

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