BAOS .net SDK  18.2.0
Public Member Functions | Protected Member Functions | List of all members
kdrive::baos::bindings::BaosDatapointDescriptions Class Reference

Reads the data point descriptions from the baos server and stores the data point descriptions internally. More...

#include <BaosDatapointDescriptions.h>

Public Member Functions

 BaosDatapointDescriptions (Connector^connector)
 Creates a empty BaosDatapointDescriptions object. More...
 
 ~BaosDatapointDescriptions ()
 Destroys the Baos Datapoint Descriptions object. More...
 
void clear ()
 Clears the internally stored values More...
 
void erase (unsigned short startId, unsigned short count)
 Clears the internally stored values from data point ids between startId and (startId + count) - 1 More...
 
void readFromDevice ()
 Reads all data point descriptions from the baos server. More...
 
void readFromDevice (unsigned short startId, unsigned short count)
 Requests a range of data point descriptions from the baos server. More...
 
unsigned short getCount ()
 Returns the number of data point descriptors More...
 
BaosDatapointDescription get (unsigned int id)
 Returns a single data point description by id. More...
 
bool has (unsigned int id)
 Returns true if a data point description is found with this id More...
 
System::Collections::Generic::List< BaosDatapointDescription^> getDescriptions ()
 Returns the data point descriptions More...
 

Protected Member Functions

 !BaosDatapointDescriptions ()
 Finalizer (non-deterministic destructor) cleans up unmanaged resources. More...
 

Detailed Description

Reads the data point descriptions from the baos server and stores the data point descriptions internally.

This retrieval can be done with readFromDevice

// C# sample: Read datapoint descriptions
void readDatapointDescriptions(Connector connector)
{
try
{
BaosDatapointDescriptions baosDatapointDescriptions = new BaosDatapointDescriptions(connector);
baosDatapointDescriptions.readFromDevice();
List<BaosDatapointDescription> descriptions = baosDatapointDescriptions.getDescriptions();
Console.WriteLine("{0} items found", descriptions.Count);
foreach (BaosDatapointDescription desc in descriptions)
{
Console.WriteLine("");
Console.WriteLine("Datapoint id {0}", desc.getId());
Console.WriteLine("Datapoint type: {0}", desc.getDatapointType());
}
}
catch (kdrive.KdriveException exception)
{
Console.WriteLine(exception.Message);
}
}

Constructor & Destructor Documentation

kdrive::baos::bindings::BaosDatapointDescriptions::BaosDatapointDescriptions ( Connector connector)

Creates a empty BaosDatapointDescriptions object.

Note: The description will not read automatic in the constructor. You need call readFromDevice for initial reading.

kdrive::baos::bindings::BaosDatapointDescriptions::~BaosDatapointDescriptions ( )

Destroys the Baos Datapoint Descriptions object.

Destructor cleans up unmanaged and managed resources.

kdrive::baos::bindings::BaosDatapointDescriptions::!BaosDatapointDescriptions ( )
protected

Finalizer (non-deterministic destructor) cleans up unmanaged resources.

Member Function Documentation

void kdrive::baos::bindings::BaosDatapointDescriptions::clear ( )

Clears the internally stored values

void kdrive::baos::bindings::BaosDatapointDescriptions::erase ( unsigned short  startId,
unsigned short  count 
)

Clears the internally stored values from data point ids between startId and (startId + count) - 1

BaosDatapointDescription kdrive::baos::bindings::BaosDatapointDescriptions::get ( unsigned int  id)

Returns a single data point description by id.

If a corresponding description is not found with this id an exception is throw

unsigned short kdrive::baos::bindings::BaosDatapointDescriptions::getCount ( )

Returns the number of data point descriptors

System::Collections::Generic::List<BaosDatapointDescription^> kdrive::baos::bindings::BaosDatapointDescriptions::getDescriptions ( )

Returns the data point descriptions

bool kdrive::baos::bindings::BaosDatapointDescriptions::has ( unsigned int  id)

Returns true if a data point description is found with this id

void kdrive::baos::bindings::BaosDatapointDescriptions::readFromDevice ( )

Reads all data point descriptions from the baos server.

void kdrive::baos::bindings::BaosDatapointDescriptions::readFromDevice ( unsigned short  startId,
unsigned short  count 
)

Requests a range of data point descriptions from the baos server.

Before the new values are read the current values from the request range are erased.

Parameters
startIdThe id of the first data point.
countThe number of data points to read.

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