mcx::ecat::ModuleExtSim
4 minute read
mcx::ecat::ModuleExtSim
Inherits from mcx::ecat::Module, mcx::container::Module
Public Functions
Name | |
---|---|
ModuleExtSim() =delete | |
ModuleExtSim(std::shared_ptr< EthercatBase > master, const std::vector< Domain > & domain_list) | |
virtual std::string | getInfo() const override |
void | addSimDomain(const std::vector< Domain > & domain_list) |
Public Attributes
Name | |
---|---|
std::unique_ptr< EthercatBase > | master |
std::vector< ecat::Module::DomainData > | domains |
Additional inherited members
Public Classes inherited from mcx::ecat::Module
Name | |
---|---|
struct | DomainData |
Public Functions inherited from mcx::ecat::Module
Name | |
---|---|
Module() =delete | |
Module(std::shared_ptr< EthercatBase > master, const std::vector< Domain > & domain_list) | |
Module(std::shared_ptr< EthercatBase > master, const Domain & domain) |
Public Attributes inherited from mcx::ecat::Module
Name | |
---|---|
bool | read_sdo |
SdoState | sdo_state |
Protected Attributes inherited from mcx::ecat::Module
Name | |
---|---|
std::shared_ptr< EthercatBase > | master_ |
std::vector< DomainData > | domains_ |
bool | error_ |
unsigned long | counter_ |
unsigned int | master_id_ |
int | cpu_affinity_ |
parameter_server::ParamHandle | sync_factor_handle_ |
parameter_server::ParamHandle | cpu_affinity_handle_ |
unsigned int | sync_factor_ |
struct mcx::ecat::Module::@10 | sdo_state_ |
Public Types inherited from mcx::container::Module
Name | |
---|---|
enum class | ModuleStates { NOT_INITIALIZED, PHASE_0, PHASE0, PHASE0_1, PHASE1, PHASE1_2, PHASE2, PHASE2_OP, OP, OP_PHASE2, PHASE2_NOT_INIT} |
enum class | ModuleErrors { NO_ERROR, NO_CALLBACK_DEFINED, CALLBACK_FAILED, WRONG_STATE} |
enum class | ModuleEvents { EMPTY, STOP, START, PAUSE, ACK} |
Public Functions inherited from mcx::container::Module
Name | |
---|---|
Module() Default constructor. |
|
virtual | ~Module() =default Default destructor. |
Module(const Module & orig) =delete Copy constructors are deleted. |
|
Module & | operator=(const Module & ) =delete Copy constructors are deleted. |
void | create(const char * name, parameter_server::Parameter * parameter_server, uint64_t dt_micro_s =0) Executes ‘Create’ phase of initialization. |
void | create(const char * name, parameter_server::Parameter * parameter_server, uint64_t dt_micro_s, parameter_server::UserGroup owner_group, uint32_t permissions =parameter_server::default_permissions) Extended interface with access permissions. |
bool | initPhase1() Executes initialization of the parameter tree phase. |
bool | initPhase2() Initialization, which require parameter tree to be complete and loaded. |
bool | startOp() Final initialization before entering Operation mode. |
bool | stopOp() Stops Operation mode, switches back to PHASE2. |
bool | iterate(const TaskTime & task_time, UserTime * user_time) Iterates an execution cycle of the module. |
void | setName(const char * name) Sets the name of the module. |
const char * | getName() const Returns the name of the module. |
void | setDtMicroSec(uint64_t micro_sec) Sets a cycle time of module and its submodules in microseconds. |
uint64_t | getDtMicroSec() const Returns a cycle time as an integer in microseconds. |
void | setDtSec(double sec) Sets a cycle time of module and its submodules in seconds. |
double | getDtSec() const |
ModuleStates | getState() const Returns an actual state. |
void | setEvent(ModuleEvents event) Command an event. |
ModuleErrors | getError() const Returns active error code. |
Protected Functions inherited from mcx::container::Module
Name | |
---|---|
virtual bool | iteratePreOp_(const TaskTime & system_time, UserTime * user_time) User-defined callback which is called during Phase 2. |
void | createSubmodule(Module * module, const char * name) Creates and registers submodule. |
template <typename T > void |
createSubmodules(utils::span< T > module_array, const char * basename) Creates and registers an array of submodules. |
void | setType(const char * name) Sets a type of the module. |
template <size_t buffer_size =parameter_server::DEFAULT_INPUT_BUFFER_LENGTH> parameter_server::ParamHandle |
addParameter(const char * id, parameter_server::ParameterType param_type, char * str_ptr, size_t length) Helper function to register C-string member variable in the parameter tree. |
template <typename T ,size_t buffer_size =parameter_server::DEFAULT_INPUT_BUFFER_LENGTH,add_visitable::EnableIfNotVisitable< T > =true> parameter_server::ParamHandle |
addParameter(const char * id, parameter_server::ParameterType param_type, T * value_ptr, size_t length =1, parameter_server::Unit param_unit =parameter_server::Unit::undefined) Helper function to register member variable of in the parameter tree. |
template <typename T ,size_t buffer_size =parameter_server::DEFAULT_INPUT_BUFFER_LENGTH,add_visitable::EnableIfVisitable< T > =true> parameter_server::GroupHandle |
addParameter(const char * id, parameter_server::ParameterType param_type, T * value_ptr, size_t length =1, parameter_server::Unit param_unit =parameter_server::Unit::undefined) Helper function to register visitable PODs in the parameter tree. |
template <typename T ,size_t buffer_size =parameter_server::DEFAULT_INPUT_BUFFER_LENGTH> parameter_server::ParamHandle |
addParameter(const char * id, parameter_server::ParameterType param_type, parameter_server::DataType data_type, T * value_ptr, size_t length =1, parameter_server::Unit param_unit =parameter_server::Unit::undefined) Helper function to register types, which cannot be deduced. |
parameter_server::SubHandle | subscribe(const char * path) Helper function to subscribe for the parameter’s update. |
parameter_server::ReqHandle | request(const char * path) Helper function to request a parameter’s value. |
parameter_server::PubHandle | publish(const char * path) Helper function to update parameter’s value. |
parameter_server::Parameter * | getParameterRoot() Returns the root of the parameter tree. |
parameter_server::Parameter * | getLocalBranch() Returns the root of the local branch. |
Friends inherited from mcx::container::Module
Name | |
---|---|
class | Task |
Public Functions Documentation
function ModuleExtSim
ModuleExtSim() =delete
function ModuleExtSim
ModuleExtSim(
std::shared_ptr< EthercatBase > master,
const std::vector< Domain > & domain_list
)
function getInfo
virtual std::string getInfo() const override
Reimplements: mcx::ecat::Module::getInfo
function addSimDomain
void addSimDomain(
const std::vector< Domain > & domain_list
)
Public Attributes Documentation
variable master
std::unique_ptr< EthercatBase > master;
variable domains
std::vector< ecat::Module::DomainData > domains;
Updated on 2022-04-05 at 16:21:27 +0200