BAOS SDK
18.2.0
|
#include <GetDatapointValue.h>
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< Value > | Values |
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 Value & | at (int index) const |
Gets a Datapoint Value from the list Throws an exception if index is out of range. More... | |
const Value & | find (unsigned short id) const |
Finds a Datapoint Value in the list based on the id. More... | |
const Values & | getValues () const |
Public Member Functions inherited from kdrive::baos::ServiceRunner | |
virtual | ~ServiceRunner () |
unsigned short | getOffset () const |
unsigned short | getCount () const |
const Buffer & | getBuffer () const |
Additional Inherited Members | |
Protected Member Functions inherited from kdrive::baos::ServiceRunner | |
ServiceRunner (std::shared_ptr< BaosConnector > connector) | |
std::shared_ptr< BaosConnector > | getConnector (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< DataResponse > | getDataResponse (bool validate=true) const |
The GetDatapointValue return ServerItem formatted data.
typedef std::vector<Value> kdrive::baos::GetDatapointValue::Values |
the list of server item values received from the device
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. |
GetDatapointValue::GetDatapointValue | ( | std::shared_ptr< BaosConnector > | connector | ) |
Creates a GetDatapointValue service bound to a connection Sets the default filter to GetAll.
|
virtual |
Destroys the GetDatapointValue service.
const GetDatapointValue::Value & GetDatapointValue::at | ( | int | index | ) | const |
Gets a Datapoint Value from the list Throws an exception if index is out of range.
const GetDatapointValue::Value & GetDatapointValue::find | ( | unsigned short | id | ) | const |
Finds a Datapoint Value in the list based on the id.
unsigned char GetDatapointValue::getFilter | ( | ) |
const GetDatapointValue::Values & GetDatapointValue::getValues | ( | ) | const |
void GetDatapointValue::rpc | ( | unsigned short | offset, |
unsigned short | count, | ||
unsigned long | timeout = ServiceRunner::Timeout |
||
) |
sends a GetDatapointValue.Req and waits for a GetDatapointValue.Res
void GetDatapointValue::setFilter | ( | unsigned char | filter | ) |
set the filter value used in the get datapoint value request