+
Skip to content

tmori/hakoniwa-core-pro-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hakoniwa Core Pro Tutorial Examples

このリポジトリには、Hakoniwa Core Proの機能を示すサンプルプログラムが含まれています。

概要

各サンプルはexamplesディレクトリ以下に格納されています。

  • hello_world: Hakoniwaアセットの基本的な作成方法とライフサイクルを示します。
  • pdu_communication: 2つのアセット(コントローラとプラント)がPDU(Protocol Data Unit)を介して通信する方法を示します。
  • service: アセットがクライアント・サーバーモデルでサービスを提供・利用する方法を示します。

前提環境

  • OS: Ubuntu 24.04 LTS 以上
  • Python: 3.12
    • hakoniwa-pduのインストール:
      pip install hakoniwa-pdu
  • その他: git, cmake, build-essential

環境構築

以下のコマンドを実行して、必要なパッケージをインストールしてください。

echo "deb [trusted=yes] https://hakoniwalab.github.io/apt stable main" \
 | sudo tee /etc/apt/sources.list.d/hakoniwa.list
sudo apt update
sudo apt install -y git cmake build-essential
sudo apt install -y hakoniwa-core-full
sudo usermod -aG hakoniwa <your-username>
newgrp hakoniwa

ビルド方法

  1. ビルド用のディレクトリを作成します。
    mkdir build
    cd build
  2. CMakeを実行してビルドファイルを生成します。examplesディレクトリを指定してください。
    cmake ../examples
  3. makeコマンドでビルドを実行します。
    make
  4. ビルドが成功すると、buildディレクトリ以下に各サンプルの実行ファイルが生成されます。
    • hello_world/hello_world
    • pdu_communication/asset_controller
    • pdu_communication/asset_plant
    • service/asset_client
    • service/asset_server

各サンプルの実行方法

各サンプルの詳細な実行手順については、それぞれのディレクトリにあるREADME.mdファイルを参照してください。

About

hakoniwa core pro tutorial

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载