BAOS SDK  18.2.0
Public Types | Public Member Functions | List of all members
kdrive::baos::GetTimer Class Reference

#include <GetTimer.h>

Inheritance diagram for kdrive::baos::GetTimer:
kdrive::baos::ServiceRunner

Public Types

using Timers = std::vector< Timer >
 the list of timers received from the device More...
 
- Public Types inherited from kdrive::baos::ServiceRunner
enum  { Timeout = ProtocolConstants::Timeout }
 
typedef DataPacket::Buffer Buffer
 

Public Member Functions

 GetTimer (std::shared_ptr< BaosConnector > connector)
 Creates a GetTimer service bound to a connection. More...
 
virtual ~GetTimer ()
 Destroys the GetTimer service. More...
 
void rpc (unsigned short offset, unsigned short count, unsigned long timeout=ServiceRunner::Timeout)
 sends a GetTimer.Req and waits for a GetTimer.Res More...
 
const Timerat (int index) const
 Gets a Timer from the list Throws an exception if index is out of range. More...
 
const Timerfind (unsigned short id) const
 Finds a Timer in the list based on the id. More...
 
const TimersgetTimers () const
 
- Public Member Functions inherited from kdrive::baos::ServiceRunner
virtual ~ServiceRunner ()
 
unsigned short getOffset () const
 
unsigned short getCount () const
 
const BuffergetBuffer () const
 

Additional Inherited Members

- Protected Member Functions inherited from kdrive::baos::ServiceRunner
 ServiceRunner (std::shared_ptr< BaosConnector > connector)
 
std::shared_ptr< BaosConnectorgetConnector (bool validate=true) const
 
void rpc (unsigned char subService, unsigned short offset, unsigned short count, unsigned long timeout)
 
void setDataResponse (std::shared_ptr< DataResponse > dataResponse)
 
std::shared_ptr< DataResponsegetDataResponse (bool validate=true) const
 

Member Typedef Documentation

using kdrive::baos::GetTimer::Timers = std::vector<Timer>

the list of timers received from the device

Constructor & Destructor Documentation

GetTimer::GetTimer ( std::shared_ptr< BaosConnector connector)

Creates a GetTimer service bound to a connection.

GetTimer::~GetTimer ( )
virtual

Destroys the GetTimer service.

Member Function Documentation

const Timer & GetTimer::at ( int  index) const

Gets a Timer from the list Throws an exception if index is out of range.

Returns
Timer at index, index is the position in the list, not the id
See also
find
const Timer & GetTimer::find ( unsigned short  id) const

Finds a Timer in the list based on the id.

Returns
the timer if found, otherwise an exception is thrown
const GetTimer::Timers & GetTimer::getTimers ( ) const
Returns
the list of timers
void GetTimer::rpc ( unsigned short  offset,
unsigned short  count,
unsigned long  timeout = ServiceRunner::Timeout 
)

sends a GetTimer.Req and waits for a GetTimer.Res


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