OPT 奥普特光源控制器
更多...
#include <rmvl/light/opt_light_control.h>
|
| | OPTLightController (const LightConfig &cfg, std::string_view id) |
| | 构造奥普特光源控制器对象,并使用建立连接
|
| bool | isOpened () const noexcept |
| | 光源控制器是否打开
|
| bool | open (const std::vector< int > &channels) noexcept |
| | 打开指定通道
|
| bool | open () noexcept |
| | 打开全部通道
|
| bool | close (const std::vector< int > &channels) noexcept |
| | 关闭指定通道
|
| bool | close () noexcept |
| | 关闭全部通道
|
| int | getIntensity (int channel) const noexcept |
| | 获取指定通道的光源亮度
|
| bool | setIntensity (int channel, int intensity) noexcept |
| | 设置指定通道的光源亮度
|
| bool | trigger (int channel, int time) const noexcept |
| | 光源控制器软触发指定通道
|
◆ OPTLightController()
| rm::OPTLightController::OPTLightController |
( |
const LightConfig & | cfg, |
|
|
std::string_view | id ) |
| Python: |
|---|
| rm.OPTLightController( | cfg, id | ) -> | <OPTLightController object> |
构造奥普特光源控制器对象,并使用建立连接
- 参数
-
| [in] | cfg | 光源控制器配置 |
| [in] | id | 光源控制器唯一标识,可以是 IP 地址或者唯一序列号 |
◆ close() [1/2]
| bool rm::OPTLightController::close |
( |
| ) |
|
|
noexcept |
| Python: |
|---|
| rm.OPTLightController.close( | chns | ) -> | <Success ?> |
| rm.OPTLightController.close( | | ) -> | <Success ?> |
◆ close() [2/2]
| bool rm::OPTLightController::close |
( |
const std::vector< int > & | channels | ) |
|
|
noexcept |
| Python: |
|---|
| rm.OPTLightController.close( | chns | ) -> | <Success ?> |
| rm.OPTLightController.close( | | ) -> | <Success ?> |
关闭指定通道
- 参数
-
| [in] | channels | 要关闭的通道的索引组成的 std::vector ,范围: [1 ~ 32](十进制格式) |
- 返回
- 指定通道是否关闭成功?
◆ getIntensity()
| int rm::OPTLightController::getIntensity |
( |
int | channel | ) |
const |
|
noexcept |
| Python: |
|---|
| rm.OPTLightController.getIntensity( | chn | ) -> | intensity |
获取指定通道的光源亮度
- 参数
-
- 返回
- 若读取成功,返回 \([0, 255]\) 的值,否则返回 \(-1\)
◆ isOpened()
| bool rm::OPTLightController::isOpened |
( |
| ) |
const |
|
noexcept |
| Python: |
|---|
| rm.OPTLightController.isOpened( | | ) -> | <opened ?> |
◆ open() [1/2]
| bool rm::OPTLightController::open |
( |
| ) |
|
|
noexcept |
| Python: |
|---|
| rm.OPTLightController.open( | chns | ) -> | <Success ?> |
| rm.OPTLightController.open( | | ) -> | <Success ?> |
◆ open() [2/2]
| bool rm::OPTLightController::open |
( |
const std::vector< int > & | channels | ) |
|
|
noexcept |
| Python: |
|---|
| rm.OPTLightController.open( | chns | ) -> | <Success ?> |
| rm.OPTLightController.open( | | ) -> | <Success ?> |
打开指定通道
- 参数
-
| [in] | channels | 要打开的通道的索引组成的 std::vector ,范围: [1 ~ 32](十进制格式) |
- 返回
- 指定通道是否打开成功?
◆ setIntensity()
| bool rm::OPTLightController::setIntensity |
( |
int | channel, |
|
|
int | intensity ) |
|
noexcept |
| Python: |
|---|
| rm.OPTLightController.setIntensity( | chn, val | ) -> | <Success ?> |
设置指定通道的光源亮度
- 参数
-
| [in] | channel | 指定通道 |
| [in] | intensity | 指定通道的光源亮度 |
- 返回
- 是否设置成功?
◆ trigger()
| bool rm::OPTLightController::trigger |
( |
int | channel, |
|
|
int | time ) const |
|
noexcept |
| Python: |
|---|
| rm.OPTLightController.trigger( | chn, time | ) -> | <Success ?> |
光源控制器软触发指定通道
- 参数
-
| [in] | channel | 指定通道,范围: [1 ~ 8](十进制格式) |
| [in] | time | 触发时间,单位: 10ms |
- 返回
- 是否成功触发?
该类的文档由以下文件生成: