Skip to content

toppers/hakoniwa-core-cpp

Repository files navigation

hakoniwa-core-cpp

Hakoniwa-core-cpp

Hakoniwa-core-cpp は シミュレーションハブの本体 となるコアライブラリです。共有メモリを利用したスタック構造により、アセット間で高速な PDU データ通信と時刻同期を実現しています。

Documentation

Stack Overview

  1. Shared memory layer manages master data and PDU buffers.
  2. Controller interfaces (master / asset / event) provide the public API.
  3. Sample processes under sample/ demonstrate typical usage.

Simulation Flow

The following sequence diagram outlines how each component interacts during a typical run.

sequenceDiagram
    actor Cmd as HakoCommand
    participant Master as HakoMaster
    participant Asset as HakoAsset
    participant MasterData as "Master Data"
    participant PduData as "PDU Data"

    Cmd->>Master: hako::init()
    activate Master
    Master->>MasterData: create()
    activate MasterData
    note over Master,MasterData: Masterデータ領域を確保

    Asset->>Master: asset_register()
    Master->>MasterData: アセット情報を登録
    Asset->>MasterData: create_pdu_lchannel()
    note left of Asset: PDUチャネルを定義

    Cmd->>Master: start()
    note right of Master: シミュレーションをRunnable状態へ
    Master->>MasterData: create_pdu_data()
    MasterData->>PduData: create()
    activate PduData
    note over MasterData,PduData: PDUデータ領域を確保

    Master->>Asset: start_callback()
    Asset->>Master: start_feedback()

    loop シミュレーション実行中
        Asset-->>PduData: read_pdu() / write_pdu()
    end

    Cmd->>Master: stop()
    note right of Master: シミュレーションを停止
    Master->>Asset: stop_callback()
    Asset->>Master: stop_feedback()
Loading

Required

  • If Using Google Test
    • sudo apt-get install libgtest-dev

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •