diff --git a/tlm-cmd-code-generator/README.md b/tlm-cmd-code-generator/README.md index e1fc2452e..c779baec9 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` のあるディレクトリへのパス @@ -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` に記載. @@ -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). diff --git a/tlm-cmd-code-generator/settings.json b/tlm-cmd-code-generator/settings_mobc.json similarity index 51% rename from tlm-cmd-code-generator/settings.json rename to tlm-cmd-code-generator/settings_mobc.json index 6ef5e13bf..77d219cbe 100644 --- a/tlm-cmd-code-generator/settings.json +++ b/tlm-cmd-code-generator/settings_mobc.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;" } ] } 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" : [ + ] +}