Motion Master
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions | Variables
util.h File Reference
#include <chrono>
#include <cmath>
#include <deque>
#include <future>
#include <list>
#include <nlohmann/json.hpp>
#include <numeric>
#include <semver.hpp>
#include <string>
#include <thread>
#include <zmq.hpp>
#include "cia402_drive.h"
#include "motion-master.pb.h"
#include "notifier.h"
#include "standalone_autotuning.h"
#include "virtual_device.h"
Include dependency graph for util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PlantModel
 
struct  AutoTuningDriveConfigurationClass
 
struct  SystemParametersClass
 
struct  TuningParametersClass
 
class  LowPassFilter
 This filter is second order with binomial coefficients, damping ratio xi = 1. More...
 
class  HighPassFilter
 This is a fourth order filter with binomial coefficients. More...
 

Macros

#define JSON_TO_DOUBLE(jx)   jx.is_number() ? double(jx) : 0.0
 

Typedefs

typedef struct AutoTuningDriveConfigurationClass AutoTuningDriveConfiguration
 
typedef struct SystemParametersClass SystemParameters
 
typedef struct TuningParametersClass TuningParameters
 
typedef enum MotionMasterWarning MotionMasterWarning
 

Enumerations

enum class  ControllerType { kPiP , kPpi }
 
enum class  CirculoType {
  kUnspecified , kCirculo7 , kCirculo7Smm , kCirculo9 ,
  kCirculo9Smm
}
 
enum class  CirculoEncoderType {
  kUndefined = 0 , kCirculo7Inner , kCirculo7Outer , kCirculo9Inner ,
  kCirculo9Outer
}
 
enum class  EncoderLocation { kUnspecified , kMotorShaft , kDrivingShaft }
 
enum class  PositionControlStrategy { kNone = 0 , kSimple , kCascaded }
 
enum  MotionMasterWarning : unsigned int { WAR_NONE = 0 , WAR_PROFILE_TARGET_LIMITED , WAR_INTERNAL_LIMIT_REACHED }
 
enum class  EcatSlaveFoeError {
  kNotFound = 0x00008001 , kAccessDenied = 0x00008002 , kDiskFull = 0x00008003 , kIllegal = 0x00008004 ,
  kPacketNumberWrong = 0x00008005 , kAlreadyExists = 0x00008006 , kNoUser = 0x00008007 , kBootstrapOnly = 0x00008008 ,
  kNotBootstrap = 0x00008009 , kNoRights = 0x0000800a , kProgramError = 0x0000800b
}
 

Functions

std::string controllerTypeToString (ControllerType ct)
 
std::string get_master_warning_message (MotionMasterWarning warning)
 Return the appropriate warning message. More...
 
std::string get_slave_error_message (int32_t error_code)
 Return the appropriate error message. More...
 
void send (zmq::socket_t &socket, const std::string &connection_id, const motionmaster::MotionMasterMessage &message)
 Send regular Google Protocol Buffers message over ZeroMQ. More...
 
std::string etg1004_unit_string (uint32_t etg1004_unit_value)
 Convert ETG.1004 unit format to string. More...
 
int32_t get_pdo_id (uint16_t index, uint8_t subindex, std::map< int32_t, int32_t > &pdo_position_map)
 Uses a special map and its keys to get the PDO array positions. More...
 
const std::string current_date_time ()
 Get the current time and date as a custom string. More...
 
bool abs_compare (float a, float b)
 Compare absolute values of the input parameters. More...
 
template<typename T >
bool opposite_signs (const T &a, const T &b)
 Check if parameters have opposite signs. More...
 
void interruptable_wait (size_t seconds)
 Blocks for the set amount of time, but allows to be interrupted. More...
 
int32_t wrap_target_position (int32_t target, int32_t max_limit, int32_t min_limit)
 Wrap the target position over limit. More...
 
uint32_t register_sync_signal ()
 Register a thread sync signal. More...
 
void unregister_sync_signal (uint32_t signal_id)
 Unregister a thread sync signal. More...
 
uint64_t wait_for_sync_signal (uint32_t signal_id)
 Wait for the system sync signal. More...
 
uint64_t wait_for_signal (int signal_fd)
 Wait for the system signal. More...
 
uint64_t wait_for_signal (uint32_t signal_id)
 
std::vector< double > linspace (double lb, double ub, size_t n)
 Generate equally spaced points inside an interval. More...
 
ControllerGains get_position_controller_gains (Cia402Drive &cia402_drive)
 Get the current position controller gains of a drive. More...
 
bool set_position_controller_gains (Cia402Drive &cia402_drive, const ControllerGains &gains)
 Set the position controller gains. More...
 
bool set_velocity_controller_gains (Cia402Drive &cia402_drive, const ControllerGains &gains)
 Set the velocity controller gains. More...
 
bool check_gains (Cia402Drive &cia402_drive)
 Check if the required gains are properly set. More...
 
bool string_ends_with (const std::string &value, const std::string &ending)
 Check if a string ends with another string. More...
 
std::vector< uint8_t > read_file_content (const std::string &path)
 Read a file into a byte (uint8_t) vector. More...
 
void set_csv_configuration (VirtualDevice *virtual_device, const std::vector< uint8_t > &csv_data)
 Set the configuration parameter values from CSV data. More...
 
uint8_t calculate_crc (const std::vector< uint8_t > &data)
 
uint32_t random_uint32 (uint32_t min=0, uint32_t max=UINT32_MAX)
 Generate a random unsigned 32-bit integer in a certain range. More...
 
unsigned char random_char ()
 Generate a random character. More...
 
std::string generate_uuid (size_t length)
 Generate a UUID of a custom length. More...
 
int32_t limit_int32_target (int64_t target)
 Limit a target to integer 32 if necessary. More...
 
std::string run_env_info ()
 Get all sorts of run environment information. More...
 
bool validate_sii_data (const std::vector< uint8_t > &content, uint32_t device_id)
 Validate an SII data before writing. More...
 
bool file_exists (const std::string &path)
 Check if a file exists on the system where Motion Master is running. More...
 
std::string string_bytes_to_hex_array_string (const std::string &bytes)
 Convert bytes (as string) to a string of hex values. More...
 
std::string get_firmware_version_string (Cia402Drive &cia402_drive)
 Get the (string) version of the used firmware. More...
 
semver::version get_firmware_version (Cia402Drive &cia402_drive)
 Get the (semver) version of the used firmware. More...
 
bool get_plant_model_from_flash (Cia402Drive &cia402_drive, PlantModel *m)
 Get the plant model from the flash memory of the device. More...
 
AutoTuningDriveConfiguration get_auto_tuning_drive_configuration (Cia402Drive &cia402_drive)
 Get the configuration required for full auto-tuning. More...
 
ControllerGains convert_auto_tuning_controller_gains (ControllerGains gains, uint32_t singleturn_resolution)
 Convert gains to inc pos values and rpm velocity values. More...
 
CirculoType get_circulo_type (int32_t hardware_id)
 Get the Circulo type based on the hardware ID. More...
 
bool is_fw_based_on_v5 (Cia402Drive &cia402_drive)
 Check if the device requires the newer encoder configuration (FW >= v5 or FW >= v0.3.8-calibration), or the older encoder configuration (FW < v5 or FW < v0.3.8-calibration) More...
 
bool is_fw_at_least (Cia402Drive &cia402_drive, const std::string &version)
 Check if the drive uses at least a certain FW version. More...
 
std::vector< uint8_t > zip (const std::string &file_name, std::vector< uint8_t > data)
 Zip a single file. More...
 
std::vector< uint8_t > unzip (const std::vector< uint8_t > &data)
 Unzip data containing a single file. More...
 
uint32_t generate_od_entry_map_key (uint16_t index, uint8_t subindex)
 Generate a map key for an OD entry using index/subindex. More...
 
std::list< std::string > get_file_parts (std::list< std::string > file_list, const std::string &file_name)
 Process the provided file list and find the file or its parts. More...
 
EncoderLocation get_encoder_location (Cia402Drive &cia402_drive, uint8_t encoder_ordinal)
 Get the location of an encoder. More...
 
template<typename T >
int32_t find_local_min_index_from_right (std::vector< T > &x)
 Find a local minimum (from right) in the supplied vector. More...
 
template<typename T >
double compute_mean (const std::vector< T > &numbers)
 Compute mean given a vector of numbers. More...
 
template<typename T >
double compute_standard_deviation (const std::vector< T > &numbers)
 Compute the standard deviation given a vector of numbers. More...
 
template<typename T >
double compute_section_mean (const std::vector< T > &numbers, size_t start, size_t end)
 Compute the mean of a section of a given vector of integers. More...
 
template<typename T >
std::vector< T > erase_edge_elements (std::vector< T > v, size_t length)
 Remove a number of the first and last elements in the vector. More...
 
template<typename R >
bool is_future_done (std::future< R > const &f)
 Check if the future has finished executing. More...
 
template<typename T >
auto to_integral (T e)
 Return an integral type value of an enum class. More...
 
template<typename... Args>
std::string string_format (const std::string &format, Args... args)
 Format a string like printf() More...
 
int get_soem_slaves_responding ()
 
bool compareStringsCaseInsensitive (const std::string &s1, const std::string &s2)
 

Variables

const char *const HARDWARE_DESCRIPTION_FILENAME = ".hardware_description"
 
const char *const STACK_INFO_FILENAME = "stack_info.json"
 
const char *const STACK_IMAGE_FILENAME = "stack_image.svg"
 
const char *const ESI_FILENAME = "SOMANET_CiA_402.xml"
 
const char *const CONFIG_FILENAME = "config.csv"
 
const char *const PLANT_MODEL_FILENAME = "plant_model.csv"
 
const char *const VARIANT_FILENAME = ".variant"
 
const std::map< MotionMasterWarning, std::string > motion_master_warning_to_message_map_
 
const std::map< int32_t, std::string > slave_error_map_
 
const std::map< int32_t, std::map< int32_t, int32_t > > adc_current_ratio_fw_v4_4_1_map
 
const std::map< int32_t, std::map< int32_t, int32_t > > adc_current_ratio_fw_v4_4_2_map
 

Macro Definition Documentation

◆ JSON_TO_DOUBLE

#define JSON_TO_DOUBLE (   jx)    jx.is_number() ? double(jx) : 0.0

Typedef Documentation

◆ AutoTuningDriveConfiguration

◆ MotionMasterWarning

◆ SystemParameters

◆ TuningParameters

Enumeration Type Documentation

◆ CirculoEncoderType

enum class CirculoEncoderType
strong
Enumerator
kUndefined 
kCirculo7Inner 
kCirculo7Outer 
kCirculo9Inner 
kCirculo9Outer 

◆ CirculoType

enum class CirculoType
strong
Enumerator
kUnspecified 
kCirculo7 
kCirculo7Smm 
kCirculo9 
kCirculo9Smm 

◆ ControllerType

enum class ControllerType
strong
Enumerator
kPiP 
kPpi 

◆ EcatSlaveFoeError

enum class EcatSlaveFoeError
strong
Enumerator
kNotFound 
kAccessDenied 
kDiskFull 
kIllegal 
kPacketNumberWrong 
kAlreadyExists 
kNoUser 
kBootstrapOnly 
kNotBootstrap 
kNoRights 
kProgramError 

◆ EncoderLocation

enum class EncoderLocation
strong
Enumerator
kUnspecified 
kMotorShaft 
kDrivingShaft 

◆ MotionMasterWarning

enum MotionMasterWarning : unsigned int
Enumerator
WAR_NONE 
WAR_PROFILE_TARGET_LIMITED 
WAR_INTERNAL_LIMIT_REACHED 

◆ PositionControlStrategy

enum class PositionControlStrategy
strong
Enumerator
kNone 
kSimple 
kCascaded 

Function Documentation

◆ abs_compare()

bool abs_compare ( float  a,
float  b 
)

Compare absolute values of the input parameters.

Parameters
afirst parameter
bsecond parameter
Returns
a greater than b

◆ calculate_crc()

uint8_t calculate_crc ( const std::vector< uint8_t > &  data)

Calculates the SII checksum field.

The checksum is generated with the polynomial x^8+x^2+x+1 (0x07) and an initial value of 0xff (see IEC 61158-6-12 ch. 5.4).

Parameters
datavector of data
Returns
CRC8

◆ check_gains()

bool check_gains ( Cia402Drive cia402_drive)

Check if the required gains are properly set.

Given the set position control strategy check if the gains have been properly set (and the crucial gains are set to non-zero values)

Parameters
cia402_drive
Returns
true if the gains are correct, false otherwise

◆ compareStringsCaseInsensitive()

bool compareStringsCaseInsensitive ( const std::string &  s1,
const std::string &  s2 
)

◆ compute_mean()

template<typename T >
double compute_mean ( const std::vector< T > &  numbers)

Compute mean given a vector of numbers.

Parameters
numbersa vector of numbers
Returns
mean

◆ compute_section_mean()

template<typename T >
double compute_section_mean ( const std::vector< T > &  numbers,
size_t  start,
size_t  end 
)

Compute the mean of a section of a given vector of integers.

Parameters
numbersa vector of integers
startindex of the first element of the section
endindex of the last element of the section
Returns
mean

◆ compute_standard_deviation()

template<typename T >
double compute_standard_deviation ( const std::vector< T > &  numbers)

Compute the standard deviation given a vector of numbers.

Parameters
numbersa vector of numbers
Returns
mean

◆ controllerTypeToString()

std::string controllerTypeToString ( ControllerType  ct)

◆ convert_auto_tuning_controller_gains()

ControllerGains convert_auto_tuning_controller_gains ( ControllerGains  gains,
uint32_t  singleturn_resolution 
)

Convert gains to inc pos values and rpm velocity values.

Parameters
gainscontroller gains
singleturn_resolutionthe resolution of the used encoder
Returns
converted gains

◆ current_date_time()

const std::string current_date_time ( )

Get the current time and date as a custom string.

Returns
a custom current date and time string

◆ erase_edge_elements()

template<typename T >
std::vector< T > erase_edge_elements ( std::vector< T >  v,
size_t  length 
)

Remove a number of the first and last elements in the vector.

Parameters
vectorvector to shorted
lengththe number of elements to erase
Returns
the shortened vector

◆ etg1004_unit_string()

std::string etg1004_unit_string ( uint32_t  etg1004_unit_value)

Convert ETG.1004 unit format to string.

Parameters
etg1004_unit_value4 byte integer (prefix, numerator, denominator, reserved)
Returns
unit's string (e.g. mNm millinewton meter)

◆ file_exists()

bool file_exists ( const std::string &  path)

Check if a file exists on the system where Motion Master is running.

Parameters
pathpath to the file
Returns
true if exists, false otherwise

◆ find_local_min_index_from_right()

template<typename T >
int32_t find_local_min_index_from_right ( std::vector< T > &  x)

Find a local minimum (from right) in the supplied vector.

Parameters
xsupplied vector of values
Returns
the index of the local minimum

◆ generate_od_entry_map_key()

uint32_t generate_od_entry_map_key ( uint16_t  index,
uint8_t  subindex 
)

Generate a map key for an OD entry using index/subindex.

Parameters
indexOD entry index
subindexOD entry subindex
Returns
a uint32 map key for an OD entry

◆ generate_uuid()

std::string generate_uuid ( size_t  length)

Generate a UUID of a custom length.

Parameters
lengthlength of the generated UUID
Returns
a UUID string

◆ get_auto_tuning_drive_configuration()

AutoTuningDriveConfiguration get_auto_tuning_drive_configuration ( Cia402Drive cia402_drive)

Get the configuration required for full auto-tuning.

Fetch all of the parameters required by the full auto-tuning and return them as AutoTuningDriveConfiguration

Parameters
cia402_drive
Returns
AutoTuningDriveConfiguration
Exceptions
MotionMasterError

◆ get_circulo_type()

CirculoType get_circulo_type ( int32_t  hardware_id)

Get the Circulo type based on the hardware ID.

Parameters
hardware_id
Returns
the type of the Circulo device

◆ get_encoder_location()

EncoderLocation get_encoder_location ( Cia402Drive cia402_drive,
uint8_t  encoder_ordinal 
)

Get the location of an encoder.

Parameters
cia402_drivea reference to a drive
encoder_ordinalencoder ordinal
Returns
the encoder location
Attention
If the selected encoder is the one used for torque control, then it must be on the motor shaft. This case also covers when this encoder is also being used for position/velocity control.
If the other encoder is selected, the one NOT used for torque control, then it can only be in one of the following locations depending on the presence of a gearbox:
  • no gearbox (gear ratio == 1) - on the motor shaft
  • there is a gearbox present - on the driving shaft

◆ get_file_parts()

std::list< std::string > get_file_parts ( std::list< std::string >  file_list,
const std::string &  file_name 
)

Process the provided file list and find the file or its parts.

Parameters
file_listObtained via do_get_file_list()
file_nameFile name to be found (single file, or its parts)
Returns
a single file name, or its parts if present

◆ get_firmware_version()

semver::version get_firmware_version ( Cia402Drive cia402_drive)

Get the (semver) version of the used firmware.

Parameters
cia402_drive
Returns
semver version object
Exceptions
anexception if there are any errors

◆ get_firmware_version_string()

std::string get_firmware_version_string ( Cia402Drive cia402_drive)

Get the (string) version of the used firmware.

Parameters
cia402_drive
Returns
version as a string
Exceptions
anexception if there are any errors

◆ get_master_warning_message()

std::string get_master_warning_message ( MotionMasterWarning  warning)

Return the appropriate warning message.

Parameters
warningMotionMasterWarning
Returns
warning message

◆ get_pdo_id()

int32_t get_pdo_id ( uint16_t  index,
uint8_t  subindex,
std::map< int32_t, int32_t > &  pdo_position_map 
)

Uses a special map and its keys to get the PDO array positions.

Parameters
indexobject index
subindexobject subindex
Returns
the position of the searched PDO in the array

◆ get_plant_model_from_flash()

bool get_plant_model_from_flash ( Cia402Drive cia402_drive,
PlantModel m 
)

Get the plant model from the flash memory of the device.

Parameters
cia402_driveto get the plant model from
ma pointer to the fetched model if any
Returns
true if exists, false otherwise

◆ get_position_controller_gains()

ControllerGains get_position_controller_gains ( Cia402Drive cia402_drive)

Get the current position controller gains of a drive.

Parameters
cia402_drive
Returns
position controller gains
Exceptions
MotionMasterError(Error::kParameterNotFound);

◆ get_slave_error_message()

std::string get_slave_error_message ( int32_t  error_code)

Return the appropriate error message.

Parameters
error_code
Returns
error message

◆ get_soem_slaves_responding()

int get_soem_slaves_responding ( )

◆ interruptable_wait()

void interruptable_wait ( size_t  seconds)

Blocks for the set amount of time, but allows to be interrupted.

Parameters
secondsamount of time to block for

◆ is_future_done()

template<typename R >
bool is_future_done ( std::future< R > const &  f)

Check if the future has finished executing.

Parameters
ffuture
Returns
true if the future is done, false otherwise

◆ is_fw_at_least()

bool is_fw_at_least ( Cia402Drive cia402_drive,
const std::string &  version 
)

Check if the drive uses at least a certain FW version.

Parameters
cia402_drivedrive
versionversion as a string
Returns
true if the used FW version is equal or higher than the supplied one

◆ is_fw_based_on_v5()

bool is_fw_based_on_v5 ( Cia402Drive cia402_drive)

Check if the device requires the newer encoder configuration (FW >= v5 or FW >= v0.3.8-calibration), or the older encoder configuration (FW < v5 or FW < v0.3.8-calibration)

Parameters
cia402_drive
Returns
true if the newer encoder configuration is required, false otherwise

◆ limit_int32_target()

int32_t limit_int32_target ( int64_t  target)

Limit a target to integer 32 if necessary.

Parameters
target
Returns
return limited target if necessary

◆ linspace()

std::vector< double > linspace ( double  lb,
double  ub,
size_t  n 
)

Generate equally spaced points inside an interval.

Parameters
lblower boundary
ubupper boundary
nnumber of elements
Returns
a vector of equally spaced double numbers

◆ opposite_signs()

template<typename T >
bool opposite_signs ( const T &  a,
const T &  b 
)

Check if parameters have opposite signs.

Parameters
afirst number
bsecond number
Returns
true if signs are opposite, false if not

◆ random_char()

unsigned char random_char ( )

Generate a random character.

Returns
a random character

◆ random_uint32()

uint32_t random_uint32 ( uint32_t  min = 0,
uint32_t  max = UINT32_MAX 
)

Generate a random unsigned 32-bit integer in a certain range.

Parameters
minminimum value
maxmaximum value
Returns
a random unsigned 32-bit integer

◆ read_file_content()

std::vector< uint8_t > read_file_content ( const std::string &  path)

Read a file into a byte (uint8_t) vector.

Parameters
pathfile path
Returns
vector of bytes if successful, empty vector otherwise

◆ register_sync_signal()

uint32_t register_sync_signal ( )

Register a thread sync signal.

Returns
a unique signal ID

◆ run_env_info()

std::string run_env_info ( )

Get all sorts of run environment information.

Returns
a string with run environment information

◆ send()

void send ( zmq::socket_t &  socket,
const std::string &  connection_id,
const motionmaster::MotionMasterMessage &  message 
)

Send regular Google Protocol Buffers message over ZeroMQ.

Parameters
socketZeroMQ socket used for sending messages
connection_idconnection ID as a string
messageGoogle Protocol Buffers message to be sent

◆ set_csv_configuration()

void set_csv_configuration ( VirtualDevice virtual_device,
const std::vector< uint8_t > &  csv_data 
)

Set the configuration parameter values from CSV data.

Parameters
virtual_devicepointer to the device to set the configuration on
csv_dataCSV data

◆ set_position_controller_gains()

bool set_position_controller_gains ( Cia402Drive cia402_drive,
const ControllerGains gains 
)

Set the position controller gains.

Parameters
cia402_drive
gains
Returns
true if successful, false otherwise

◆ set_velocity_controller_gains()

bool set_velocity_controller_gains ( Cia402Drive cia402_drive,
const ControllerGains gains 
)

Set the velocity controller gains.

Parameters
cia402_drive
gains
Returns
true if successful, false otherwise

◆ string_bytes_to_hex_array_string()

std::string string_bytes_to_hex_array_string ( const std::string &  bytes)

Convert bytes (as string) to a string of hex values.

Parameters
bytesbytes as a string
Returns
string of hex bytes

◆ string_ends_with()

bool string_ends_with ( const std::string &  value,
const std::string &  ending 
)

Check if a string ends with another string.

Parameters
valuestring to check in
endingstring to check for
Returns
true if found, false otherwise

◆ string_format()

template<typename... Args>
std::string string_format ( const std::string &  format,
Args...  args 
)

Format a string like printf()

◆ to_integral()

template<typename T >
auto to_integral ( e)

Return an integral type value of an enum class.

Parameters
evalue of an enum class type
Returns
integral type value of an enum class

◆ unregister_sync_signal()

void unregister_sync_signal ( uint32_t  signal_id)

Unregister a thread sync signal.

Parameters
signal_id

◆ unzip()

std::vector< uint8_t > unzip ( const std::vector< uint8_t > &  data)

Unzip data containing a single file.

Parameters
data
Returns
unzipped data
Exceptions
std::runtime_error

◆ validate_sii_data()

bool validate_sii_data ( const std::vector< uint8_t > &  content,
uint32_t  device_id 
)

Validate an SII data before writing.

Parameters
contentfile content
device_idID of the device to validate the SII for (log only)
Returns
an error if any

◆ wait_for_signal() [1/2]

uint64_t wait_for_signal ( int  signal_fd)

Wait for the system signal.

Parameters
signal_fdthe file descriptor used for signaling
Returns
the number of pending signals (> 1 if there was a hold-up)

◆ wait_for_signal() [2/2]

uint64_t wait_for_signal ( uint32_t  signal_id)

◆ wait_for_sync_signal()

uint64_t wait_for_sync_signal ( uint32_t  signal_id)

Wait for the system sync signal.

Parameters
signal_idunique ID of the waited signal
Returns
the number of pending signals (> 1 if there was a hold-up)

◆ wrap_target_position()

int32_t wrap_target_position ( int32_t  target,
int32_t  max_limit,
int32_t  min_limit 
)

Wrap the target position over limit.

\parameter target position to wrap \parameter max_limit max limit to wrap the target position around \parameter min_limit min limit to wrap the target position around

Returns
wrapped target position

◆ zip()

std::vector< uint8_t > zip ( const std::string &  file_name,
std::vector< uint8_t >  data 
)

Zip a single file.

Parameters
file_name
data
Returns
zipped data

Variable Documentation

◆ adc_current_ratio_fw_v4_4_1_map

const std::map<int32_t, std::map<int32_t, int32_t> > adc_current_ratio_fw_v4_4_1_map
Initial value:
= {
{8500, {{01, 20480}, {02, 24576}, {03, 16384}}},
{8501, {{01, 8192}, {02, 8192}, {03, 16384}}},
{8502, {{01, 20480}, {02, 24576}, {03, 16384}}},
{8503, {{01, 8192}, {02, 8192}, {03, 16384}}},
{8504, {{01, 20480}, {02, 24576}, {03, 16384}}},
{8505, {{01, 8192}, {02, 8192}, {03, 16384}}},
{9500, {{00, 32768}, {01, 32768}, {02, 32768}}},
{9501, {{01, 81920}, {02, 81920}}},
{9502, {{01, 16384}}},
{9506, {{01, 32768}}},
{9507, {{01, 81920}}},
{9508, {{01, 16384}}},
{9600, {{01, 32768}}},
{9601, {{01, 81920}}},
{9602, {{01, 16384}}},
{9606, {{01, 32768}}},
{9607, {{01, 81920}}},
{9608, {{01, 16384}}}}

◆ adc_current_ratio_fw_v4_4_2_map

const std::map<int32_t, std::map<int32_t, int32_t> > adc_current_ratio_fw_v4_4_2_map
Initial value:
= {
{8500, {{01, 40960}, {02, 49152}, {03, 32768}}},
{8501, {{01, 16384}, {02, 16384}, {03, 16384}}},
{8502, {{01, 40960}, {02, 49152}, {03, 32768}}},
{8503, {{01, 16384}, {02, 16384}, {03, 16384}}},
{8504, {{01, 40960}, {02, 49152}, {03, 32768}}},
{8505, {{01, 16384}, {02, 16384}, {03, 16384}}},
{9500, {{00, 32768}, {01, 32768}, {02, 32768}}},
{9501, {{01, 81920}, {02, 81920}}},
{9502, {{01, 16384}}},
{9506, {{01, 32768}}},
{9507, {{01, 81920}}},
{9508, {{01, 16384}}},
{9600, {{01, 32768}}},
{9601, {{01, 81920}}},
{9602, {{01, 16384}}},
{9606, {{01, 32768}}},
{9607, {{01, 81920}}},
{9608, {{01, 16384}}}}

◆ CONFIG_FILENAME

const char* const CONFIG_FILENAME = "config.csv"

◆ ESI_FILENAME

const char* const ESI_FILENAME = "SOMANET_CiA_402.xml"

◆ HARDWARE_DESCRIPTION_FILENAME

const char* const HARDWARE_DESCRIPTION_FILENAME = ".hardware_description"

◆ motion_master_warning_to_message_map_

const std::map<MotionMasterWarning, std::string> motion_master_warning_to_message_map_
Initial value:
= {
{WAR_NONE, "No warning!"},
"Slave profile: The amplitude is outside of the configured limits - "
"using a limit value as the new amplitude!"},
{WAR_INTERNAL_LIMIT_REACHED, "Internal limit reached!"}}
@ WAR_PROFILE_TARGET_LIMITED
Definition: util.h:157
@ WAR_INTERNAL_LIMIT_REACHED
Definition: util.h:158
@ WAR_NONE
Definition: util.h:156

◆ PLANT_MODEL_FILENAME

const char* const PLANT_MODEL_FILENAME = "plant_model.csv"

◆ slave_error_map_

const std::map<int32_t, std::string> slave_error_map_

◆ STACK_IMAGE_FILENAME

const char* const STACK_IMAGE_FILENAME = "stack_image.svg"

◆ STACK_INFO_FILENAME

const char* const STACK_INFO_FILENAME = "stack_info.json"

◆ VARIANT_FILENAME

const char* const VARIANT_FILENAME = ".variant"