XORDE  v1.0
eXtensible Operational Robotic Development Environment
Public Types | Public Member Functions | List of all members
ObjectInfo Class Reference

ONB Object base interface. More...

#include <ObjectInfo.h>

Inheritance diagram for ObjectInfo:
ONBObject< T >

Public Types

enum  Flags
 Access flags of the Object. More...
 
enum  Type
 Supported types of the object. More...
 

Public Member Functions

 ObjectInfo ()
 Common constructor. Initializes unbound object.
 
 ObjectInfo (const ObjectDescription &desc)
 Construct Object with given description. More...
 
 ObjectInfo (const ObjectInfo &other)=delete
 no copy allowed!!
 
const ObjectDescriptiondescription () const
 Get description of the object. More...
 
QString name () const
 Get name of the object. More...
 
Flags flags () const
 Get access flags.
 
int RMIP () const
 Get default sampling interval.
 
unsigned long timestamp () const
 Get timestamp of the last received value.
 
QJsonObject createJsonInfo () const
 Create JSON object with info about the ONB Object. More...
 
bool isVolatile () const
 Test an access flag.
 
bool isReadable () const
 Test an access flag.
 
bool isWritable () const
 Test an access flag.
 
bool isStorable () const
 Test an access flag.
 
bool isDual () const
 Test an access flag.
 
bool isHidden () const
 Test an access flag.
 
bool isFunction () const
 Test an access flag.
 
bool isArray () const
 Test an access flag.
 
bool hasMinimum () const
 Test a meta-value flag.
 
bool hasMaximum () const
 Test a meta-value flag.
 
bool hasDefault () const
 Test a meta-value flag.
 
bool hasStep () const
 Test a meta-value flag.
 
bool hasMimeType () const
 Test a meta-value flag.
 
bool hasHint () const
 Test a meta-value flag.
 
bool hasUnit () const
 Test a meta-value flag.
 
bool hasOptions () const
 Test a meta-value flag.
 
bool hasExtInfo () const
 Test a meta-value flag.
 
bool isEnum () const
 Test a meta-value flag.
 

Detailed Description

ONB Object base interface.

This is fundamental entity in ONB protocol. Data exchange is carried out by means of Objects transfer. Do not create objects of this class. Use methods of ComponentBase instead.

See also
ONBObject, ComponentBase

Member Enumeration Documentation

Access flags of the Object.

Enumerator
Volatile 

Volatile Object is input or output, changes in real-time.

Read 

Object can be read.

Write 

Object can be written.

Save 

Object value is stored in NVM.

Hidden 

Object is hidden for users, may be considered for internal use.

Dual 

Object is read from one location, written to another.

Function 

Object is the function (now supported in devices only)

Array 

Object is array (now supported in devices only)

ReadOnly 

Alias for read-only access.

WriteOnly 

Alias for write-only access.

ReadWrite 

Alias for read-write access.

Constant 

Constant object is not volatile and can only be read.

Input 

Input is volatile object that can oly be written.

Output 

Output is volatile.

Variable 

Common object with read and write access.

Setting 

Object with read-write access, its value stored in NVM.

Exchange 

Special bi-directional Object (in-out)

SecretVar 

Common hidden object.

SecretSetting 

Hidden setting.

Supported types of the object.

Enumeration values are compatible to Qt's QVariant / QMetaType

Enumerator
Void 

empty type, size = 0

Bool 

boolean value, size = 1 byte, stored value can be 0 or 1

Int 

32-bit signed integer value

UInt 

32-bit unsigned integer value

LongLong 

64-bit signed integer value

ULongLong 

64-bit unsigned integer value

Double 

64-bit double precision floating-point value

Long 

32-bit signed integer value

Short 

16-bit signed integer value

Char 

8-bit signed integer value or character

ULong 

32-bit unsigned integer value

UShort 

16-bit unsigned integer value

UChar 

8-bit unsigned integer value

Float 

32-bit single precision floating-point value

SChar 

8-bit signed integer value

String 

string encoded in UTF-8 format

Common 

common value of arbitrary type, can be fixed-size or variable-size, represented as byte array

Variant 

any-type value (not supported yet)

Constructor & Destructor Documentation

ObjectInfo::ObjectInfo ( const ObjectDescription desc)

Construct Object with given description.

Parameters
descDescription received from component

Member Function Documentation

QJsonObject ObjectInfo::createJsonInfo ( ) const

Create JSON object with info about the ONB Object.

Returns
JSON object with key-value pairs containing Object info.
const ObjectDescription& ObjectInfo::description ( ) const
inline

Get description of the object.

Returns
The description.
QString ObjectInfo::name ( ) const
inline

Get name of the object.

Returns
String containing the name.