GKD.RoboCtrl
载入中...
搜索中...
未找到
roboctrl::utils::control_chain< Cs > 模板结构体 参考

控制链,将多个控制器串联组合。 更多...

详细描述

template<controller... Cs>
struct roboctrl::utils::control_chain< Cs >

控制链,将多个控制器串联组合。

模板参数
Cs控制器类型参数包

在文件 controller.hpp32 行定义.

#include <controller.hpp>

Public 类型

template<std::size_t N>
using state_type_n = typename std::tuple_element< N, std::tuple< typename Cs::state_type... > >::type
 
template<std::size_t N>
using input_type_n = typename std::tuple_element< N, std::tuple< typename Cs::input_type... > >::type
 
using state_type = state_type_n< sizeof...(Cs) - 1 >
 
using input_type = input_type_n< 0 >
 
using params_type = std::tuple< typename Cs::params_type... >
 

Public 成员函数

 control_chain (Cs &&... cs)
 直接以控制器实例初始化。
 
 control_chain (params_type &&params)
 使用各控制器的参数构造实例。
 
void update (const input_type &input)
 推动控制链一次,依次更新所有控制器。
 
const state_type & state () const
 读取链路末尾控制器的状态。
 

Public 属性

std::tuple< Cs... > controllers_
 

成员类型定义说明

◆ input_type

template<controller... Cs>
using roboctrl::utils::control_chain< Cs >::input_type = input_type_n<0>

在文件 controller.hpp42 行定义.

◆ input_type_n

template<controller... Cs>
template<std::size_t N>
using roboctrl::utils::control_chain< Cs >::input_type_n = typename std::tuple_element<N, std::tuple<typename Cs::input_type...> >::type

在文件 controller.hpp39 行定义.

◆ params_type

template<controller... Cs>
using roboctrl::utils::control_chain< Cs >::params_type = std::tuple<typename Cs::params_type...>

在文件 controller.hpp43 行定义.

◆ state_type

template<controller... Cs>
using roboctrl::utils::control_chain< Cs >::state_type = state_type_n<sizeof...(Cs) - 1>

在文件 controller.hpp41 行定义.

◆ state_type_n

template<controller... Cs>
template<std::size_t N>
using roboctrl::utils::control_chain< Cs >::state_type_n = typename std::tuple_element<N, std::tuple<typename Cs::state_type...> >::type

在文件 controller.hpp36 行定义.

构造及析构函数说明

◆ control_chain() [1/2]

template<controller... Cs>
roboctrl::utils::control_chain< Cs >::control_chain ( Cs &&...  cs)
inlineexplicit

直接以控制器实例初始化。

在文件 controller.hpp50 行定义.

◆ control_chain() [2/2]

template<controller... Cs>
roboctrl::utils::control_chain< Cs >::control_chain ( params_type &&  params)
inlineexplicit

使用各控制器的参数构造实例。

在文件 controller.hpp56 行定义.

成员函数说明

◆ state()

template<controller... Cs>
const state_type & roboctrl::utils::control_chain< Cs >::state ( ) const
inline

读取链路末尾控制器的状态。

在文件 controller.hpp78 行定义.

◆ update()

template<controller... Cs>
void roboctrl::utils::control_chain< Cs >::update ( const input_type &  input)
inline

推动控制链一次,依次更新所有控制器。

参数
input链的输入

在文件 controller.hpp67 行定义.

类成员变量说明

◆ controllers_

template<controller... Cs>
std::tuple<Cs...> roboctrl::utils::control_chain< Cs >::controllers_

在文件 controller.hpp45 行定义.


该结构体的文档由以下文件生成: