Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tlm-cmd-code-generator example settings & docs #117

Merged
merged 5 commits into from
Oct 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions tlm-cmd-code-generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ $ python GenerateC2ACode.py
```

## 設定
`settings.json` にて記述する
実行時のパスと同じディレクトリに `settings.json` を置いて設定する

`is_main_obc` は,MOBC(地上局と通信するOBC.2nd OBCのtlm/cmdを取りまとめる)かそれ以外のOBC(2nd OBC.MOBCと通信するOBC)かを制御する.
`1` とした場合,MOBCを意図したコードが生成され,加えて以下が生成される.
Expand All @@ -24,6 +24,7 @@ $ python GenerateC2ACode.py
- 2nd_obc_telemetry_buffer.h
- 2nd_obc_telemetry_data_definitions.h

設定の記述例(JSON としては invalid だがコメント付き)
```
{
# `src_core`, `src_user` のあるディレクトリへのパス
Expand Down Expand Up @@ -85,14 +86,6 @@ $ python GenerateC2ACode.py
}
```

## 開発方針
- `main`: リリース版
- `feature/*` : 開発ブランチ

というブランチを用いる.

[C2A Core](https://github.com/ut-issl/c2a-core) との互換性などは,[Releases](https://github.com/ut-issl/c2a-tlm-cmd-code-generator/releases) を参照すること([詳細](https://github.com/ut-issl/c2a-core/tree/develop/Docs/.General/release.md))

## 要求
- python 3.7 以上
- 必要ライブラリは `./requirements.txt` に記載.
Expand All @@ -103,4 +96,5 @@ $ pip install -r requirements.txt
```

## その他
- [settings_mobc.json](./settings_mobc.json), [settings_subobc.json](./settings_subobc.json) は c2a-core example user での設定
- MOBCと2nd OBCのC2A間通信の例は (TBA).
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"path_to_src" : "../../c2a/src/",
"path_to_db" : "../../c2a/database/",
"path_to_src" : "../examples/mobc/src/",
"path_to_db" : "../examples/mobc/src/src_user/Settings/tlm_cmd/data_base/",
"db_prefix" : "SAMPLE_MOBC",
"tlm_id_range" : ["0x00", "0x100"],
"is_cmd_prefixed_in_db" : 0,
Expand All @@ -15,26 +15,12 @@
"tlm_id_range" : ["0x90", "0xc0"],
"is_cmd_prefixed_in_db" : 0,
"input_file_encoding" : "utf-8",
"path_to_db" : "C:/c2a_sample_aobc/database/",
"path_to_db" : "../examples/subobc/src/src_user/Settings/tlm_cmd/data_base/",
"max_tlm_num" : 256,
"driver_path" : "Aocs/",
"driver_type" : "AOBC_Driver",
"driver_name" : "aobc_driver",
"code_when_tlm_not_found" : "aobc_driver->info.comm.rx_err_code = AOBC_RX_ERR_CODE_TLM_NOT_FOUND;"
},
{
"name" : "TOBC",
"is_enable" : 1,
"db_prefix" : "SAMPLE_TOBC",
"tlm_id_range" : ["0xc0", "0xf0"],
"is_cmd_prefixed_in_db" : 0,
"input_file_encoding" : "utf-8",
"path_to_db" : "C:/c2a_sample_tobc/database/",
"max_tlm_num" : 256,
"driver_path" : "Thermal/",
"driver_type" : "TOBC_Driver",
"driver_name" : "tobc_driver",
"code_when_tlm_not_found" : "tobc_driver->info.comm.rx_err_code = TOBC_RX_ERR_CODE_TLM_NOT_FOUND;"
}
]
}
12 changes: 12 additions & 0 deletions tlm-cmd-code-generator/settings_subobc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"path_to_src" : "../examples/subobc/src/",
"path_to_db" : "../examples/subobc/src/src_user/Settings/tlm_cmd/data_base/",
"db_prefix" : "SAMPLE_AOBC",
"tlm_id_range" : ["0x00", "0x100"],
"is_cmd_prefixed_in_db" : 0,
"input_file_encoding" : "utf-8",
"output_file_encoding" : "utf-8",
"is_main_obc" : 0,
"other_obc_data" : [
]
}
Loading