工業製造
産業用モノのインターネット | 工業材料 | 機器のメンテナンスと修理 | 産業プログラミング |
home  MfgRobots >> 工業製造 >  >> Industrial Internet of Things >> モノのインターネットテクノロジー

RTI ConnextモダンC++ DDS APIの主要な拡張機能

モダンC++ API for DDSを導入以来、お客様から大きな関心をいただいています。多くの方がC++11で新しいシステムを構築し始め、APIを多くの影響力のある拡張で継続的に改良してきました。

モダンC++へのIDLマッピング拡張

RTIのCode Generatorは、新しい-stlオプションを提供し、-language C++03または-language C++11と併用します。このオプションにより、いくつかのIDL型のマッピングが更新されます:

例えば、以下のIDL型があるとします:

struct MyType { sequence<long> my_unbounded_seq; sequence<long, 10> my_bounded_seq; @use_vector sequence<long, 10> my_other_bounded_seq string my_str; @external long my_external; };

コマンドrtiddsgen -language C++11 -stl -unboundedSupport MyType.idlを使用すると、生成されるC++11クラスは次のようになります:

class MyType { public: MyType(); ... MyType (MyType&&) = default; MyType& operator=(MyType&&) = default; MyType& operator=(const MyType&) = default; MyType(const MyType&) = default; std::vector<int32_t>& my_unbounded_seq() noexcept; const std::vector<int32_t>& my_unbounded_seq() const noexcept; void my_unbounded_seq(const std::vector<int32_t>& value); rti::core::bounded_sequence<int32_t, 10>& my_bounded_seq() noexcept; const rti::core::bounded_sequence<int32_t, 10>& my_bounded_seq() const noexcept; void my_bounded_seq(const rti::core::bounded_sequence<int32_t, 10>& value); std::vector<int32_t>& my_other_bounded_seq() noexcept; const std::vector<int32_t>& my_other_bounded_seq() const noexcept; void my_other_bounded_seq(const std::vector<int32_t>& value); std::string& my_str() noexcept; const std::string& my_str() const noexcept; void my_str(const std::string& value); dds::core::external<int32_t>& my_external() noexcept; const dds::core::external<int32_t>& my_external() const noexcept; void my_external(dds::core::external<int32_t> value); ... };

モダンC++向けRequest-Reply API

APIには2つの新しいエンティティが含まれます:rti::request::Requesterとrti::request::Replier。これらはネイティブなリクエスト・リプライ・パターンを提供し、他の言語ですでに利用可能で、バージョン5.3でプロトタイプとして導入され、5.3.0.7で本番対応となりました。

簡潔なコード例はこちらでご覧いただけます。

小さなAPI拡張

いくつかの一般的なタスクを簡素化しました:

condition.handler([]() { // 何かする }); // または、新しいシグネチャで condition.handler([](dds::core::cond::Condition c) { // 何かする (condition == c) });

オンデマンド履歴データのためのTopicQuery

5.3で導入されたTopicQueryにより、アプリケーションは履歴データをオンデマンドで取得できます。モダンC++ APIでは、DataReaderからTopicQueryを次のように作成できます:

rti::sub::TopicQuery my_topic_query( my_reader, rti::sub::TopicQuerySelection(dds::topic::Filter("x < 10")) );

フィルタに一致する履歴サンプルを取得しながら、ライブ・データを通常通り受信し続けられます。

今後の展望

C++17が承認され、C++20が控える中、RTI Connextはモダン言語機能とパフォーマンス改善でC++ APIを進化させ続けます。最新情報はRTIブログの購読でお見逃しなく。

モノのインターネットテクノロジー

  1. IoTがハイストリートのデジタルルネサンスを牽引
  2. 第3世代ストリーム処理:IoTデータをリアルタイムアクションへ変える
  3. 5G展開が遅れる理由:コスト、スペクトラム、カバレッジの課題
  4. エッジコンピューティング:リアルタイムデータを解き放ち、効率を高め、新たな収益を創出
  5. G.hn:コスト効率と信頼性で産業IoT革命を支える
  6. 「ニューノーマル」のためのスマート製造再考:レジリエンスへのデータ駆動戦略
  7. データは新しいオイル—精製所が生データをビジネス価値に変える方法
  8. IT/OTハイブリッドプロフェッショナルの台頭:データセンターと産業オートメーションの架け橋
  9. Microsoft、汎用人工知能に焦点を当てたAI研究インキュベーターを発表
  10. 農業革命:IoTが現代農業の効率と持続可能性を推進
  11. C++のstd::listをマスターする:構文、関数、実践例