Motion Master
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
VirtualParameter Class Referenceabstract

#include <virtual_parameter.h>

Inheritance diagram for VirtualParameter:
Inheritance graph
[legend]

Public Types

enum class  Type { kNotDefined = 0 , kIghOdEntry , kSoemOdEntry , kMock }
 
enum class  ValueType {
  kUnspecified = 0 , kBoolean , kInteger8 , kInteger16 ,
  kInteger32 , kUnsignedInteger8 , kUnsignedInteger16 , kUnsignedInteger32 ,
  kFloat , kString , kOctetString , kUnicodeString ,
  kEnum , kOther
}
 
enum class  PdoMapping { kNotPdoMapped , kRxPdoMapped , kTxPdoMapped }
 

Public Member Functions

virtual ~VirtualParameter ()=default
 
virtual Type get_parameter_type ()
 Get the type of the parameter. More...
 
virtual uint16_t get_index ()=0
 Get the index of the parameter. More...
 
virtual uint8_t get_subindex ()=0
 Get the subindex of the parameter. More...
 
virtual bool is_pdo_mapped ()=0
 Check if the parameter is PDO mapped. More...
 
virtual uint64_t get_raw_value ()=0
 Get the raw (64-bit unsigned integer) value of the OD entry. More...
 
virtual uint64_t get_raw_value (bool force_refresh)=0
 Get the raw (64-bit unsigned integer) value of the OD entry. More...
 
virtual int32_t get_int_value ()=0
 Get the integer value of the parameter. More...
 
virtual int32_t get_int_value (bool force_refresh)=0
 Get the integer value of the parameter. More...
 
virtual float get_float_value ()=0
 Get the float value of the parameter. More...
 
virtual float get_float_value (bool force_refresh)=0
 Get the float value of the parameter. More...
 
virtual std::string get_string_value ()=0
 Get the string value of the parameter. More...
 
virtual std::string get_string_value (bool force_refresh)=0
 Get the string value of the parameter. More...
 
virtual bool get_value_status ()=0
 Check the current status of the parameter value. More...
 
virtual int32_t set_raw_value (uint64_t value)=0
 Set a raw (64-bit unsigned integer) value. More...
 
virtual int32_t set_value (int32_t value)=0
 Set an integer value. More...
 
virtual int32_t set_value (float value)=0
 Set a float value. More...
 
virtual int32_t set_value (const std::string &value)=0
 Set a string value. More...
 
virtual ValueType get_value_type ()=0
 Get the parameter value type. More...
 
virtual std::string get_name ()=0
 Get the name of the parameter. More...
 
virtual std::string get_parent_name ()=0
 Get the parameter parent name. More...
 
virtual bool is_read ()
 Check if the parameter can be read. More...
 
virtual bool is_write ()
 Check if the parameter can be written into. More...
 
virtual std::string get_unit ()
 Get the defined unit of the parameter value. More...
 
virtual int32_t get_min ()
 Get the minimum value the parameter should hold. More...
 
virtual int32_t get_max ()
 Get the maximum value the parameter should hold. More...
 
virtual bool is_value_fresh ()=0
 Check if the value is fresh. More...
 

Member Enumeration Documentation

◆ PdoMapping

enum class VirtualParameter::PdoMapping
strong
Enumerator
kNotPdoMapped 
kRxPdoMapped 
kTxPdoMapped 

◆ Type

enum class VirtualParameter::Type
strong
Enumerator
kNotDefined 
kIghOdEntry 
kSoemOdEntry 
kMock 

◆ ValueType

enum class VirtualParameter::ValueType
strong
Enumerator
kUnspecified 
kBoolean 
kInteger8 
kInteger16 
kInteger32 
kUnsignedInteger8 
kUnsignedInteger16 
kUnsignedInteger32 
kFloat 
kString 
kOctetString 
kUnicodeString 
kEnum 
kOther 

Constructor & Destructor Documentation

◆ ~VirtualParameter()

virtual VirtualParameter::~VirtualParameter ( )
virtualdefault

Member Function Documentation

◆ get_float_value() [1/2]

virtual float VirtualParameter::get_float_value ( )
pure virtual

Get the float value of the parameter.

Returns
the float value

Implemented in MockParameter, and SoemOdEntry.

◆ get_float_value() [2/2]

virtual float VirtualParameter::get_float_value ( bool  force_refresh)
pure virtual

Get the float value of the parameter.

Parameters
force_refreshforce the value refresh
Returns
the float value

Implemented in MockParameter, and SoemOdEntry.

◆ get_index()

virtual uint16_t VirtualParameter::get_index ( )
pure virtual

Get the index of the parameter.

Returns
index of the parameter

Implemented in MockParameter, and SoemOdEntry.

◆ get_int_value() [1/2]

virtual int32_t VirtualParameter::get_int_value ( )
pure virtual

Get the integer value of the parameter.

Returns
the integer value

Implemented in MockParameter, and SoemOdEntry.

◆ get_int_value() [2/2]

virtual int32_t VirtualParameter::get_int_value ( bool  force_refresh)
pure virtual

Get the integer value of the parameter.

Parameters
force_refreshforce the value refresh
Returns
the integer value

Implemented in MockParameter, and SoemOdEntry.

◆ get_max()

virtual int32_t VirtualParameter::get_max ( )
inlinevirtual

Get the maximum value the parameter should hold.

IMPORTANT: Not being used currently

Returns
the maximum value

Reimplemented in MockParameter, and SoemOdEntry.

◆ get_min()

virtual int32_t VirtualParameter::get_min ( )
inlinevirtual

Get the minimum value the parameter should hold.

IMPORTANT: Not being used currently

Returns
the minimum value

Reimplemented in MockParameter, and SoemOdEntry.

◆ get_name()

virtual std::string VirtualParameter::get_name ( )
pure virtual

Get the name of the parameter.

Returns
name of the parameter

Implemented in MockParameter, and SoemOdEntry.

◆ get_parameter_type()

virtual Type VirtualParameter::get_parameter_type ( )
inlinevirtual

Get the type of the parameter.

Returns
type of the parameter (OD entry, MOCK, etc.)

Reimplemented in MockParameter, and SoemOdEntry.

◆ get_parent_name()

virtual std::string VirtualParameter::get_parent_name ( )
pure virtual

Get the parameter parent name.

This is the name of the group a (sub-)parameter is a part of (the name of the parent parameter if it is an array or a record)

Returns
the parent name if any, otherwise empty

Implemented in MockParameter, and SoemOdEntry.

◆ get_raw_value() [1/2]

virtual uint64_t VirtualParameter::get_raw_value ( )
pure virtual

Get the raw (64-bit unsigned integer) value of the OD entry.

Returns
the raw (64-bit unsigned integer) value

Implemented in MockParameter, and SoemOdEntry.

◆ get_raw_value() [2/2]

virtual uint64_t VirtualParameter::get_raw_value ( bool  force_refresh)
pure virtual

Get the raw (64-bit unsigned integer) value of the OD entry.

Parameters
force_refreshforce the value refresh
Returns
the raw (64-bit unsigned integer) value

Implemented in MockParameter, and SoemOdEntry.

◆ get_string_value() [1/2]

virtual std::string VirtualParameter::get_string_value ( )
pure virtual

Get the string value of the parameter.

Parameters
force_refreshforce the value refresh
Returns
the string value

Implemented in MockParameter, and SoemOdEntry.

◆ get_string_value() [2/2]

virtual std::string VirtualParameter::get_string_value ( bool  force_refresh)
pure virtual

Get the string value of the parameter.

Parameters
force_refreshforce the value refresh
Returns
the string value

Implemented in MockParameter, and SoemOdEntry.

◆ get_subindex()

virtual uint8_t VirtualParameter::get_subindex ( )
pure virtual

Get the subindex of the parameter.

Returns
subindex of the parameter

Implemented in MockParameter, and SoemOdEntry.

◆ get_unit()

virtual std::string VirtualParameter::get_unit ( )
inlinevirtual

Get the defined unit of the parameter value.

Returns
the unit as a string

Reimplemented in MockParameter, and SoemOdEntry.

◆ get_value_status()

virtual bool VirtualParameter::get_value_status ( )
pure virtual

Check the current status of the parameter value.

For example, the value of the parameter can fail to refresh.

Returns
true if status normal, false otherwise

Implemented in MockParameter, and SoemOdEntry.

◆ get_value_type()

virtual ValueType VirtualParameter::get_value_type ( )
pure virtual

Get the parameter value type.

Returns
the value type

Implemented in MockParameter, and SoemOdEntry.

◆ is_pdo_mapped()

virtual bool VirtualParameter::is_pdo_mapped ( )
pure virtual

Check if the parameter is PDO mapped.

IMPORTANT: Not available for all types of parameters

Returns
true if PDO mapped, false otherwise

Implemented in MockParameter, and SoemOdEntry.

◆ is_read()

virtual bool VirtualParameter::is_read ( )
inlinevirtual

Check if the parameter can be read.

Returns
true is can be read, false otherwise

Reimplemented in MockParameter, and SoemOdEntry.

◆ is_value_fresh()

virtual bool VirtualParameter::is_value_fresh ( )
pure virtual

Check if the value is fresh.

Returns
true if the value is fresh, false otherwise

Implemented in MockParameter, and SoemOdEntry.

◆ is_write()

virtual bool VirtualParameter::is_write ( )
inlinevirtual

Check if the parameter can be written into.

Returns
true is can be written into, false otherwise

Reimplemented in MockParameter, and SoemOdEntry.

◆ set_raw_value()

virtual int32_t VirtualParameter::set_raw_value ( uint64_t  value)
pure virtual

Set a raw (64-bit unsigned integer) value.

Parameters
valuevalue to set
Returns
zero if successful, non-zero otherwise

Implemented in MockParameter, and SoemOdEntry.

◆ set_value() [1/3]

virtual int32_t VirtualParameter::set_value ( const std::string &  value)
pure virtual

Set a string value.

Parameters
valuevalue to set
Returns
zero if successful, non-zero otherwise

Implemented in MockParameter, and SoemOdEntry.

◆ set_value() [2/3]

virtual int32_t VirtualParameter::set_value ( float  value)
pure virtual

Set a float value.

Parameters
valuevalue to set
Returns
zero if successful, non-zero otherwise

Implemented in MockParameter, and SoemOdEntry.

◆ set_value() [3/3]

virtual int32_t VirtualParameter::set_value ( int32_t  value)
pure virtual

Set an integer value.

Parameters
valuevalue to set
Returns
zero if successful, non-zero otherwise

Implemented in MockParameter, and SoemOdEntry.


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