Robox Library for Cpp: BCC/31 module 1.0.0
RLibCpp BCC/31 protocol implementation
Classes | Public Types | Public Member Functions | Static Public Member Functions | List of all members
UserOscilloscopeItem Class Reference

Oscilloscope items class: these are the oscilloscopes added by the user. More...

#include <oscilloscope.h>

Classes

class  PtrVector
 Class to handle with lists of UserOscilloscopeItem pointers. More...
 

Public Types

enum  DataTypes {
  dataTypeInvalid = 0 , dataTypeI8 = 1 , dataTypeU8 = 2 , dataTypeI16 = 3 ,
  dataTypeU16 = 4 , dataTypeI32 = 5 , dataTypeU32 = 6 , dataTypeI64 = 7 ,
  dataTypeU64 = 8 , dataTypeDouble = 9 , dataTypeFloat = 10 , dataTypeStringZ = 11 ,
  dataTypeBool = 12 , dataTypeBit = 13
}
 Data types list. More...
 
typedef UserOscilloscopeItempUserOscilloscopeItem
 

Public Member Functions

 UserOscilloscopeItem ()
 Default class constructor.
 
virtual ~UserOscilloscopeItem ()
 Detructor.
 
Message::VarTypes type () const
 Get the message type Message::VarTypes
 
void setType (Message::VarTypes value)
 Set the message type Message::VarTypes
 
uint32_t index () const
 Get the item index.
 
void setIndex (uint32_t value)
 Set the item index.
 
uint32_t aIndex () const
 Get the axis index.
 
void setAIndex (uint32_t value)
 Set the axis index.
 
uint32_t bit () const
 Get the bit index.
 
void setBit (uint32_t value)
 Set the bit index.
 
uint32_t repeat () const
 Get the repetitions number.
 
void setRepeat (uint32_t value)
 Set the repetitions number.
 
uint32_t size () const
 Get the size of single item (bytes)
 
void setSize (uint32_t value)
 Set the size of single item (bytes)
 
DataTypes dataType () const
 Get the data type (DataTypes)
 
void setDataType (DataTypes value)
 Set the data type (DataTypes)
 
String & name ()
 Get the variable name : meaningful only if type() is Message::varNamed
 
void setName (const String &value)
 Set the variable name : meaningful only if type() is Message::varNamed
 

Static Public Member Functions

static UserOscilloscopeItemfromVariable (const Variable &variable, Globals::Results &result)
 Factory helper method to create a UserOscilloscopeItem from a Variable
 
static DataTypes getDataTypeFromBase (int baseType)
 Get the DataTypes from RVar::Base::VarTypes
 

Detailed Description

Oscilloscope items class: these are the oscilloscopes added by the user.

Member Typedef Documentation

◆ pUserOscilloscopeItem

Member Enumeration Documentation

◆ DataTypes

enum DataTypes

Data types list.

Enumerator
dataTypeInvalid 

Not valid.

dataTypeI8 

8 bit signed integer

dataTypeU8 

8 bit unsigned integer

dataTypeI16 

16 bit signed integer

dataTypeU16 

16 bit unsigned integer

dataTypeI32 

32 bit signed integer

dataTypeU32 

32 bit unsigned integer

dataTypeI64 

64 bit signed integer

dataTypeU64 

64 bit unsigned integer

dataTypeDouble 

Double precision floating point.

dataTypeFloat 

Single precision floating point.

dataTypeStringZ 

Null terminated string.

dataTypeBool 

Boolean.

dataTypeBit 

Bit.

Constructor & Destructor Documentation

◆ UserOscilloscopeItem()

Default class constructor.

◆ ~UserOscilloscopeItem()

virtual ~UserOscilloscopeItem ( )
virtual

Detructor.

Member Function Documentation

◆ aIndex()

uint32_t aIndex ( ) const

Get the axis index.

Returns
The parameter value

◆ bit()

uint32_t bit ( ) const

Get the bit index.

Returns
The parameter value

◆ dataType()

DataTypes dataType ( ) const

Get the data type (DataTypes)

Returns
The parameter value

◆ fromVariable()

static UserOscilloscopeItem * fromVariable ( const Variable & variable,
Globals::Results & result )
static

Factory helper method to create a UserOscilloscopeItem from a Variable

Parameters
variableThe Variable from which the UserOscilloscopeItem will be initialized
resultThe operation result: if the value is different from Globals::resSuccess some error occurred and the returned item value will be null
Returns
Returns the initilaized UserOscilloscopeItem or null if some error occurred (see result for details)

◆ getDataTypeFromBase()

static DataTypes getDataTypeFromBase ( int baseType)
static

Get the DataTypes from RVar::Base::VarTypes

Parameters
baseTypeThe RVar::Base::VarTypes to convert
Returns
Returns the DataTypes matching the passed RVar::Base::VarTypes or DataTypes::dataTypeInvalid otherwise

◆ index()

uint32_t index ( ) const

Get the item index.

Returns
The parameter value

◆ name()

QString name ( )

Get the variable name : meaningful only if type() is Message::varNamed

Returns
The parameter value

◆ repeat()

uint32_t repeat ( ) const

Get the repetitions number.

Returns
The parameter value

◆ setAIndex()

void setAIndex ( uint32_t value)

Set the axis index.

Parameters
valueThe value to set

◆ setBit()

void setBit ( uint32_t value)

Set the bit index.

Parameters
valueThe value to set

◆ setDataType()

void setDataType ( DataTypes value)

Set the data type (DataTypes)

Parameters
valueThe value to set

◆ setIndex()

void setIndex ( uint32_t value)

Set the item index.

Parameters
valueThe value to set

◆ setName()

void setName ( const String & value)

Set the variable name : meaningful only if type() is Message::varNamed

Parameters
valueThe value to set

◆ setRepeat()

void setRepeat ( uint32_t value)

Set the repetitions number.

Parameters
valueThe value to set

◆ setSize()

void setSize ( uint32_t value)

Set the size of single item (bytes)

Parameters
valueThe value to set

◆ setType()

void setType ( Message::VarTypes value)

Set the message type Message::VarTypes

Parameters
valueThe value to set

◆ size()

uint32_t size ( ) const

Get the size of single item (bytes)

Returns
The parameter value

◆ type()

Message::VarTypes type ( ) const

Get the message type Message::VarTypes

Returns
The parameter value