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

A BaosDatapointDescription contains information about a Datapoint Value. More...

#include <BaosDatapointDescriptions.h>

Public Types

enum  TransmitPriority { System = 0, Alarm, High, Low }
 Transmit priority. More...
 
enum  ValueTypes {
  Bit1 = 0, Bit2 = 1, Bit3 = 2, Bit4 = 3,
  Bit5 = 4, Bit6 = 5, Bit7 = 6, Byte1 = 7,
  Byte2 = 8, Byte3 = 9, Byte4 = 10, Byte6 = 11,
  Byte8 = 12, Byte10 = 13, Byte14 = 14
}
 BAOS datapoint value types. More...
 

Public Member Functions

 BaosDatapointDescription ()
 Default Constructor. More...
 
 BaosDatapointDescription (unsigned short id, unsigned char valueType, unsigned char configFlags, unsigned char datapointType)
 Constructor. More...
 
 ~BaosDatapointDescription ()
 Destroys the BaosDatapointDescription. More...
 
unsigned short getId () const
 Gets the datapoint id. More...
 
unsigned char getConfigFlags () const
 Gets the config flags. More...
 
unsigned char getTransmitPriority () const
 Gets the transmit priority. More...
 
bool isCommunication () const
 Returns true if the communication flag is set. More...
 
bool isReadFromBus () const
 Returns true if the read from bus flag is set. More...
 
bool isWriteFromBus () const
 Returns true if the write from bus flag is set. More...
 
bool isReadOnInit () const
 Returns true if the read on init flag is set. More...
 
bool isClientTransmitRequest () const
 Returns true if the transmit to bus flag is set. More...
 
bool isUpdateOnResponse () const
 Returns true if the update on response flag is set. More...
 
unsigned char getValueType () const
 Gets the value type. More...
 
unsigned char getValueTypeSizeBits () const
 Gets the value type in size in bits. More...
 
unsigned char getValueTypeSizeBytes () const
 Gets the value type in size in bytes. More...
 
bool isBitType () const
 Returns true if the value type is smaller than 1 byte. More...
 
bool isByteType () const
 Returns true if the value type is greater than 1 byte. More...
 
unsigned char getDatapointType () const
 Gets the datapoint type. More...
 

Detailed Description

A BaosDatapointDescription contains information about a Datapoint Value.

Interprets the datapoint description data. You can read a BaosDatapointDescription using the BaosDatapointDescriptions class.

A Datapoint Description has four attributes: datapoint id datapoint value type : indicates the datapoint value size datapoint config flags : indicate the communication flags set in the ETS project datapoint type : Protocol Version 1.2 does not support datapoint type (it will always be 0)

Examples:
BaosDatapointDescription.cpp, BaosMultiThreaded.cpp, BaosSerial.cpp, and BaosUsb.cpp.

Member Enumeration Documentation

Transmit priority.

Enumerator
System 
Alarm 
High 
Low 

BAOS datapoint value types.

Enumerator
Bit1 

1 bit

Bit2 

2 bit

Bit3 

3 bit

Bit4 

4 bit

Bit5 

5 bit

Bit6 

6 bit

Bit7 

7 bit

Byte1 

1 byte

Byte2 

2 bytes

Byte3 

3 bytes

Byte4 

4 bytes

Byte6 

6 bytes

Byte8 

8 bytes

Byte10 

10 bytes

Byte14 

14 bytes

Constructor & Destructor Documentation

BaosDatapointDescription::BaosDatapointDescription ( )

Default Constructor.

BaosDatapointDescription::BaosDatapointDescription ( unsigned short  id,
unsigned char  valueType,
unsigned char  configFlags,
unsigned char  datapointType 
)

Constructor.

BaosDatapointDescription::~BaosDatapointDescription ( )

Destroys the BaosDatapointDescription.

Member Function Documentation

unsigned char BaosDatapointDescription::getConfigFlags ( ) const
unsigned char BaosDatapointDescription::getDatapointType ( ) const
unsigned short BaosDatapointDescription::getId ( ) const
unsigned char BaosDatapointDescription::getTransmitPriority ( ) const

Gets the transmit priority.

See also
TransmitPriority
unsigned char BaosDatapointDescription::getValueType ( ) const

Gets the value type.

See also
ValueTypes
unsigned char BaosDatapointDescription::getValueTypeSizeBits ( ) const

Gets the value type in size in bits.

See also
getValueType
Examples:
BaosMultiThreaded.cpp, BaosSerial.cpp, and BaosUsb.cpp.
unsigned char BaosDatapointDescription::getValueTypeSizeBytes ( ) const

Gets the value type in size in bytes.

Values which are smaller than 1 byte e.g. 2 bits returns 1.

See also
getValueType
Examples:
BaosMultiThreaded.cpp, BaosSerial.cpp, and BaosUsb.cpp.
bool BaosDatapointDescription::isBitType ( ) const

Returns true if the value type is smaller than 1 byte.

Otherwise returns false.

See also
getValueType
Examples:
BaosMultiThreaded.cpp, BaosSerial.cpp, and BaosUsb.cpp.
bool BaosDatapointDescription::isByteType ( ) const

Returns true if the value type is greater than 1 byte.

Otherwise returns false.

See also
getValueType
bool BaosDatapointDescription::isClientTransmitRequest ( ) const

Returns true if the transmit to bus flag is set.

Otherwise returns false.

bool BaosDatapointDescription::isCommunication ( ) const

Returns true if the communication flag is set.

Otherwise returns false.

bool BaosDatapointDescription::isReadFromBus ( ) const

Returns true if the read from bus flag is set.

Otherwise returns false.

bool BaosDatapointDescription::isReadOnInit ( ) const

Returns true if the read on init flag is set.

Otherwise returns false.

bool BaosDatapointDescription::isUpdateOnResponse ( ) const

Returns true if the update on response flag is set.

Otherwise returns false.

bool BaosDatapointDescription::isWriteFromBus ( ) const

Returns true if the write from bus flag is set.

Otherwise returns false.


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