AccelerometerResultSource Class¶
Description¶
加速度计结果输出端口。
用于暴露一个组件的输出端口。
本类的所有成员都是线程安全的。
setHandler¶
设置数据处理器。
- C
void easyar_AccelerometerResultSource_setHandler(easyar_AccelerometerResultSource * This, easyar_OptionalOfFunctorOfVoidFromAccelerometerResult handler)
- C++
void setHandler(std::optional<std::function<void(AccelerometerResult)>> handler)
- Java
public void setHandler(@Nullable FunctorOfVoidFromAccelerometerResult handler)
- Kotlin
fun setHandler(handler: FunctorOfVoidFromAccelerometerResult?): Unit
- Objective-C
- (void)setHandler:(void (^)(easyar_AccelerometerResult *))handler
- Swift
public func setHandler(_ handler: ((AccelerometerResult) -> Void)?) -> Void
- C#
public virtual void setHandler(Optional<Action<AccelerometerResult>> handler)
connect¶
连接输入端口。
- C
void easyar_AccelerometerResultSource_connect(easyar_AccelerometerResultSource * This, easyar_AccelerometerResultSink * sink)
- C++
void connect(std::shared_ptr<AccelerometerResultSink> sink)
- Java
public void connect(@Nonnull AccelerometerResultSink sink)
- Kotlin
fun connect(sink: AccelerometerResultSink): Unit
- Objective-C
- (void)connect:(easyar_AccelerometerResultSink *)sink
- Swift
public func connect(_ sink: AccelerometerResultSink) -> Void
- C#
public virtual void connect(AccelerometerResultSink sink)
disconnect¶
断开连接。
- C
void easyar_AccelerometerResultSource_disconnect(easyar_AccelerometerResultSource * This)
- C++
void disconnect()
- Java
public void disconnect()
- Kotlin
fun disconnect(): Unit
- Objective-C
- (void)disconnect
- Swift
public func disconnect() -> Void
- C#
public virtual void disconnect()