From 8a7151a04479956bc4e8d56d0630447deea60a46 Mon Sep 17 00:00:00 2001 From: sksat Date: Thu, 5 Oct 2023 22:42:05 +0900 Subject: [PATCH 1/5] change code generator settings example for examples/mobc --- tlm-cmd-code-generator/settings.json | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/tlm-cmd-code-generator/settings.json b/tlm-cmd-code-generator/settings.json index 6ef5e13bf..77d219cbe 100644 --- a/tlm-cmd-code-generator/settings.json +++ b/tlm-cmd-code-generator/settings.json @@ -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, @@ -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;" } ] } From b5b598c84b4086a982f4edf18911348d86fbe662 Mon Sep 17 00:00:00 2001 From: sksat Date: Thu, 5 Oct 2023 22:44:31 +0900 Subject: [PATCH 2/5] add code generator settings for examples/subobc --- tlm-cmd-code-generator/settings_subobc.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tlm-cmd-code-generator/settings_subobc.json diff --git a/tlm-cmd-code-generator/settings_subobc.json b/tlm-cmd-code-generator/settings_subobc.json new file mode 100644 index 000000000..d1ec3f9c8 --- /dev/null +++ b/tlm-cmd-code-generator/settings_subobc.json @@ -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" : [ + ] +} From 9d0fd91f8ec3e08f1dc4b6d4f802f463d5a87d69 Mon Sep 17 00:00:00 2001 From: sksat Date: Wed, 11 Oct 2023 15:53:06 +0900 Subject: [PATCH 3/5] rename confusing settings.json to settings_mobc.json --- tlm-cmd-code-generator/{settings.json => settings_mobc.json} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tlm-cmd-code-generator/{settings.json => settings_mobc.json} (100%) diff --git a/tlm-cmd-code-generator/settings.json b/tlm-cmd-code-generator/settings_mobc.json similarity index 100% rename from tlm-cmd-code-generator/settings.json rename to tlm-cmd-code-generator/settings_mobc.json From 4c4aa0234ea7b54115de2262b9112775ab9125e3 Mon Sep 17 00:00:00 2001 From: sksat Date: Wed, 11 Oct 2023 15:58:34 +0900 Subject: [PATCH 4/5] update code-generator docs about settings --- tlm-cmd-code-generator/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tlm-cmd-code-generator/README.md b/tlm-cmd-code-generator/README.md index e1fc2452e..ea1391b38 100644 --- a/tlm-cmd-code-generator/README.md +++ b/tlm-cmd-code-generator/README.md @@ -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を意図したコードが生成され,加えて以下が生成される. @@ -24,6 +24,7 @@ $ python GenerateC2ACode.py - 2nd_obc_telemetry_buffer.h - 2nd_obc_telemetry_data_definitions.h +設定の記述例(JSON としては invalid だがコメント付き) ``` { # `src_core`, `src_user` のあるディレクトリへのパス @@ -103,4 +104,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). From 5c884551d8f5e13a75e403e6c1bb9aece4b40e90 Mon Sep 17 00:00:00 2001 From: sksat Date: Wed, 11 Oct 2023 16:00:02 +0900 Subject: [PATCH 5/5] remove c2a-core compatibility section in code-generator docs --- tlm-cmd-code-generator/README.md | 8 -------- 1 file changed, 8 deletions(-) diff --git a/tlm-cmd-code-generator/README.md b/tlm-cmd-code-generator/README.md index ea1391b38..c779baec9 100644 --- a/tlm-cmd-code-generator/README.md +++ b/tlm-cmd-code-generator/README.md @@ -86,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` に記載.