Motion Master
Loading...
Searching...
No Matches
Public Member Functions | Friends | List of all members
SoemOdEntry Class Reference

#include <soem_od_entry.h>

Inheritance diagram for SoemOdEntry:
Inheritance graph
[legend]
Collaboration diagram for SoemOdEntry:
Collaboration graph
[legend]

Public Member Functions

Type get_parameter_type () override
 Get the type of the parameter. More...
 
uint16_t get_index () override
 Get the index of the parameter. More...
 
uint8_t get_subindex () override
 Get the subindex of the parameter. More...
 
bool is_pdo_mapped () override
 Check if the parameter is PDO mapped. More...
 
bool set_pdo_mapping (PdoMapping pdo_mapping)
 
uint64_t get_raw_value () override
 Get the raw (64-bit unsigned integer) value of the OD entry. More...
 
uint64_t get_raw_value (bool force_refresh) override
 Get the raw (64-bit unsigned integer) value of the OD entry. More...
 
int32_t get_int_value () override
 Get the integer value of the parameter. More...
 
int32_t get_int_value (bool force_refresh) override
 Get the integer value of the parameter. More...
 
float get_float_value () override
 Get the float value of the parameter. More...
 
float get_float_value (bool force_refresh) override
 Get the float value of the parameter. More...
 
std::string get_string_value () override
 Get the string value of the parameter. More...
 
std::string get_string_value (bool force_refresh) override
 Get the string value of the parameter. More...
 
bool get_value_status () override
 Check the current status of the parameter value. More...
 
int32_t set_raw_value (uint64_t value) override
 Set a raw (64-bit unsigned integer) value. More...
 
int32_t set_value (int32_t value) override
 Set an integer value. More...
 
int32_t set_value (float value) override
 Set a float value. More...
 
int32_t set_value (const std::string &value) override
 Set a string value. More...
 
ValueType get_value_type () override
 Get the parameter value type. More...
 
std::string get_name () override
 Get the name of the parameter. More...
 
std::string get_parent_name () override
 Get the parameter parent name. More...
 
bool is_read () override
 
bool is_write () override
 
std::string get_unit () override
 Get the defined unit of the parameter value. More...
 
int32_t get_min () override
 Get the minimum value the parameter should hold. More...
 
int32_t get_max () override
 Get the maximum value the parameter should hold. More...
 
bool is_value_fresh () override
 Check if the value is fresh. More...
 
- Public Member Functions inherited from VirtualParameter
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...
 

Friends

class Soem
 
class Soes
 
class SoemMaster
 
class SoemSlave
 
class ParameterValueRefresher
 

Additional Inherited Members

- Public Types inherited from VirtualParameter
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 }
 

Member Function Documentation

◆ get_float_value() [1/2]

float SoemOdEntry::get_float_value ( )
overridevirtual

Get the float value of the parameter.

Returns
the float value

Implements VirtualParameter.

◆ get_float_value() [2/2]

float SoemOdEntry::get_float_value ( bool  force_refresh)
overridevirtual

Get the float value of the parameter.

Parameters
force_refreshforce the value refresh
Returns
the float value

Implements VirtualParameter.

◆ get_index()

uint16_t SoemOdEntry::get_index ( )
overridevirtual

Get the index of the parameter.

Returns
index of the parameter

Implements VirtualParameter.

◆ get_int_value() [1/2]

int32_t SoemOdEntry::get_int_value ( )
overridevirtual

Get the integer value of the parameter.

Returns
the integer value

Implements VirtualParameter.

◆ get_int_value() [2/2]

int32_t SoemOdEntry::get_int_value ( bool  force_refresh)
overridevirtual

Get the integer value of the parameter.

Parameters
force_refreshforce the value refresh
Returns
the integer value

Implements VirtualParameter.

◆ get_max()

int32_t SoemOdEntry::get_max ( )
overridevirtual

Get the maximum value the parameter should hold.

IMPORTANT: Not being used currently

Returns
the maximum value

Reimplemented from VirtualParameter.

◆ get_min()

int32_t SoemOdEntry::get_min ( )
overridevirtual

Get the minimum value the parameter should hold.

IMPORTANT: Not being used currently

Returns
the minimum value

Reimplemented from VirtualParameter.

◆ get_name()

std::string SoemOdEntry::get_name ( )
overridevirtual

Get the name of the parameter.

Returns
name of the parameter

Implements VirtualParameter.

◆ get_parameter_type()

VirtualParameter::Type SoemOdEntry::get_parameter_type ( )
overridevirtual

Get the type of the parameter.

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

Reimplemented from VirtualParameter.

◆ get_parent_name()

std::string SoemOdEntry::get_parent_name ( )
overridevirtual

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

Implements VirtualParameter.

◆ get_raw_value() [1/2]

uint64_t SoemOdEntry::get_raw_value ( )
overridevirtual

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

Returns
the raw (64-bit unsigned integer) value

Implements VirtualParameter.

◆ get_raw_value() [2/2]

uint64_t SoemOdEntry::get_raw_value ( bool  force_refresh)
overridevirtual

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

Implements VirtualParameter.

◆ get_string_value() [1/2]

std::string SoemOdEntry::get_string_value ( )
overridevirtual

Get the string value of the parameter.

Parameters
force_refreshforce the value refresh
Returns
the string value

Implements VirtualParameter.

◆ get_string_value() [2/2]

std::string SoemOdEntry::get_string_value ( bool  force_refresh)
overridevirtual

Get the string value of the parameter.

Parameters
force_refreshforce the value refresh
Returns
the string value

Implements VirtualParameter.

◆ get_subindex()

uint8_t SoemOdEntry::get_subindex ( )
overridevirtual

Get the subindex of the parameter.

Returns
subindex of the parameter

Implements VirtualParameter.

◆ get_unit()

std::string SoemOdEntry::get_unit ( )
overridevirtual

Get the defined unit of the parameter value.

Returns
the unit as a string

Reimplemented from VirtualParameter.

◆ get_value_status()

bool SoemOdEntry::get_value_status ( )
overridevirtual

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

Implements VirtualParameter.

◆ get_value_type()

VirtualParameter::ValueType SoemOdEntry::get_value_type ( )
overridevirtual

Get the parameter value type.

Returns
the value type

Implements VirtualParameter.

◆ is_pdo_mapped()

bool SoemOdEntry::is_pdo_mapped ( )
overridevirtual

Check if the parameter is PDO mapped.

IMPORTANT: Not available for all types of parameters

Returns
true if PDO mapped, false otherwise

Implements VirtualParameter.

◆ is_read()

bool SoemOdEntry::is_read ( )
overridevirtual

Returns true if the Service Data Object (SDO) can be read in any of the following states:

  • Bit 0: read access in Pre-Operational state
  • Bit 1: read access in Safe-Operational state-
  • Bit 2: read access in Operational state

Reimplemented from VirtualParameter.

◆ is_value_fresh()

bool SoemOdEntry::is_value_fresh ( )
overridevirtual

Check if the value is fresh.

Returns
true if the value is fresh, false otherwise

Implements VirtualParameter.

◆ is_write()

bool SoemOdEntry::is_write ( )
overridevirtual

Returns true if the Service Data Object (SDO) can be written in any of the following states:

  • Bit 3: write access in Pre-Operational state
  • Bit 4: write access in Safe-Operational state
  • Bit 5: write access in Operational state

Reimplemented from VirtualParameter.

◆ set_pdo_mapping()

bool SoemOdEntry::set_pdo_mapping ( PdoMapping  pdo_mapping)

◆ set_raw_value()

int32_t SoemOdEntry::set_raw_value ( uint64_t  value)
overridevirtual

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

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

Implements VirtualParameter.

◆ set_value() [1/3]

int32_t SoemOdEntry::set_value ( const std::string &  value)
overridevirtual

Set a string value.

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

Implements VirtualParameter.

◆ set_value() [2/3]

int32_t SoemOdEntry::set_value ( float  value)
overridevirtual

Set a float value.

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

Implements VirtualParameter.

◆ set_value() [3/3]

int32_t SoemOdEntry::set_value ( int32_t  value)
overridevirtual

Set an integer value.

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

Implements VirtualParameter.

Friends And Related Function Documentation

◆ ParameterValueRefresher

friend class ParameterValueRefresher
friend

◆ Soem

friend class Soem
friend

◆ SoemMaster

friend class SoemMaster
friend

◆ SoemSlave

friend class SoemSlave
friend

◆ Soes

friend class Soes
friend

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