Zao SDK for Jetson / libzao-endpoint API リファレンス 1.6.0.0 (2024-12-24)
Loading...
Searching...
No Matches
ClientInterface.hpp
1#ifndef ZAO_ENDPOINT_CLIENT_INTERFACE_HPP_
2#define ZAO_ENDPOINT_CLIENT_INTERFACE_HPP_
3
4#include <cstdint>
5#include <future>
6#include <memory>
7#include <string>
8
9#include "EventSourceInterface.hpp"
10#include "audio/FactoryInterface.hpp"
11#include "control/FactoryInterface.hpp"
12#include "ip/FactoryInterface.hpp"
13#include "monitor/FactoryInterface.hpp"
14#include "serial/FactoryInterface.hpp"
15#include "video/FactoryInterface.hpp"
16
17namespace spdlog {
18class logger;
19}
20
21namespace zao {
22namespace endpoint {
23
24class TimestampInterface;
25class ClientCallbackInterface;
26
31class ClientInterface : public EventSourceInterface<ClientCallbackInterface> {
32 public:
42 virtual void SetLinkPath(const std::string& link_path) = 0;
43
50 virtual const std::string& GetLinkPath() const noexcept = 0;
51
61 virtual void StartLink() = 0;
62
67 virtual void StopLink() = 0;
68
78 virtual bool IsLinked() const noexcept = 0;
79
92 virtual std::shared_future<std::string> GetLinkStatus() const = 0;
93
98 virtual std::unique_ptr<video::FactoryInterface> CreateVideoFactory() = 0;
99
104 virtual std::unique_ptr<audio::FactoryInterface> CreateAudioFactory() = 0;
105
110 virtual std::unique_ptr<serial::FactoryInterface> CreateSerialFactory() = 0;
111
116 virtual std::unique_ptr<ip::FactoryInterface> CreateIpFactory() = 0;
117
122 virtual std::unique_ptr<control::FactoryInterface> CreateControlFactory() = 0;
123
127 virtual std::unique_ptr<monitor::FactoryInterface> CreateMonitorFactory() = 0;
128
141 virtual std::shared_ptr<TimestampInterface> CreateTimestamp(
142 std::intmax_t numerator, std::intmax_t denominator) = 0;
143
156 template <class Ratio>
158 return CreateTimestamp(Ratio::num, Ratio::den);
159 }
160
165 virtual ~ClientInterface() noexcept = default;
166};
167
173 public:
180 virtual void OnLink() {}
181
194 virtual void OnUnlink(bool stopped) {}
195
200 virtual ~ClientCallbackInterface() noexcept = default;
201};
202
203} // namespace endpoint
204} // namespace zao
205
206#endif // ZAO_ENDPOINT_CLIENT_INTERFACE_HPP_
クライアント制御のコールバックインターフェース
Definition ClientInterface.hpp:172
virtual void OnUnlink(bool stopped)
クライアントプロセスとリンク(連携)が解除された時に 呼び出されるコールバック。
Definition ClientInterface.hpp:194
virtual ~ClientCallbackInterface() noexcept=default
ClientCallbackInterface オブジェクトを破棄する。
virtual void OnLink()
クライアントプロセスとリンク(連携)されたときに 呼び出されるコールバック。
Definition ClientInterface.hpp:180
エンドポイントのクライアント制御インターフェース
Definition ClientInterface.hpp:31
virtual void StopLink()=0
現在リンク(連携)しているクライアントと連携を解除する
virtual void StartLink()=0
クライアントとのリンク(連携)を開始する
virtual std::shared_future< std::string > GetLinkStatus() const =0
リンク(連携)の確立状態を返却するshared_futureを取得する。
virtual std::unique_ptr< monitor::FactoryInterface > CreateMonitorFactory()=0
このClientに紐付いたMonitorFactoryを生成する。
virtual std::unique_ptr< video::FactoryInterface > CreateVideoFactory()=0
このClientに紐付いたVideoFactoryを生成する。
virtual bool IsLinked() const noexcept=0
現在リンク(連携)が成立しているか確認する。
virtual void SetLinkPath(const std::string &link_path)=0
リンクに用いるパス文字列(プレフィックス付き)を設定する。
virtual std::unique_ptr< serial::FactoryInterface > CreateSerialFactory()=0
このClientに紐付いたSerialFactoryを生成する。
virtual std::unique_ptr< ip::FactoryInterface > CreateIpFactory()=0
このClientに紐付いたIpFactoryを生成する。
virtual std::unique_ptr< audio::FactoryInterface > CreateAudioFactory()=0
このClientに紐付いたAudioFactoryを生成する。
std::shared_ptr< TimestampInterface > CreateTimestamp()
タイムスタンプ管理オブジェクトを std::ratioによる比率指示で生成する。
Definition ClientInterface.hpp:157
virtual const std::string & GetLinkPath() const noexcept=0
リンクに用いるパス文字列(プレフィックス付き)を取得する。
virtual std::unique_ptr< control::FactoryInterface > CreateControlFactory()=0
このClientに紐付いたControlFactoryを生成する。
virtual ~ClientInterface() noexcept=default
ClientInterface オブジェクトを破棄する。
イベントを生成するクラスの共通インターフェース
Definition EventSourceInterface.hpp:31
タイムスタンプ管理機能のインターフェース
Definition TimestampInterface.hpp:13
Zao製品共通の名前空間
Definition FactoryInterface.hpp:11