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

#include <GetDatapointValue.h>

Inheritance diagram for kdrive::baos::GetDatapointValue:
kdrive::baos::ServiceRunner

Public Types

enum  Filters { GetAll = 0x00, GetValid, GetUpdated }
 Filters are used to indicate which datapoint values to return as part of the GetDatapointValue request. More...
 
typedef ServerItem Value
 The GetDatapointValue return ServerItem formatted data. More...
 
typedef std::vector< ValueValues
 the list of server item values received from the device More...
 
- Public Types inherited from kdrive::baos::ServiceRunner
enum  { Timeout = ProtocolConstants::Timeout }
 
typedef DataPacket::Buffer Buffer
 

Public Member Functions

 GetDatapointValue (std::shared_ptr< BaosConnector > connector)
 Creates a GetDatapointValue service bound to a connection Sets the default filter to GetAll. More...
 
virtual ~GetDatapointValue ()
 Destroys the GetDatapointValue service. More...
 
void setFilter (unsigned char filter)
 set the filter value used in the get datapoint value request More...
 
unsigned char getFilter ()
 
void rpc (unsigned short offset, unsigned short count, unsigned long timeout=ServiceRunner::Timeout)
 sends a GetDatapointValue.Req and waits for a GetDatapointValue.Res More...
 
const Valueat (int index) const
 Gets a Datapoint Value from the list Throws an exception if index is out of range. More...
 
const Valuefind (unsigned short id) const
 Finds a Datapoint Value in the list based on the id. More...
 
const ValuesgetValues () 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
 

Detailed Description

Examples:
BaosMultiThreaded.cpp.

Member Typedef Documentation

The GetDatapointValue return ServerItem formatted data.

the list of server item values received from the device

Member Enumeration Documentation

Filters are used to indicate which datapoint values to return as part of the GetDatapointValue request.

Filters are only supported from version 2.0 of the BAOS protocol For 1.2 the request is equivalent to GetAll, irrespective of filter value

Enumerator
GetAll 

Get All Datapoint Values.

GetValid 

Get All Valid Datapoint Values.

GetUpdated 

Get All Updated Datapoint Values.

Constructor & Destructor Documentation

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

Creates a GetDatapointValue service bound to a connection Sets the default filter to GetAll.

GetDatapointValue::~GetDatapointValue ( )
virtual

Destroys the GetDatapointValue service.

Member Function Documentation

const GetDatapointValue::Value & GetDatapointValue::at ( int  index) const

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

Returns
Datapoint Value at index, index is the position in the list, not the id
See also
find
Examples:
BaosMultiThreaded.cpp.
const GetDatapointValue::Value & GetDatapointValue::find ( unsigned short  id) const

Finds a Datapoint Value in the list based on the id.

Returns
the datapoint value if found, otherwise an exception is thrown
unsigned char GetDatapointValue::getFilter ( )
Returns
the filter value
const GetDatapointValue::Values & GetDatapointValue::getValues ( ) const
Returns
the list of datapoint values
void GetDatapointValue::rpc ( unsigned short  offset,
unsigned short  count,
unsigned long  timeout = ServiceRunner::Timeout 
)

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

Examples:
BaosMultiThreaded.cpp.
void GetDatapointValue::setFilter ( unsigned char  filter)

set the filter value used in the get datapoint value request


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