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

Import c2a-tlm-cmd-code-generator #111

Merged
merged 199 commits into from
Oct 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
199 commits
Select commit Hold shift + click to select a range
39e91de
Initial commit
meltingrabbit Nov 10, 2020
7d2366c
add readme
meltingrabbit Nov 10, 2020
f6b6a65
add empty files
meltingrabbit Nov 10, 2020
2628fbb
add code of load csv and generate cmd def
meltingrabbit Nov 14, 2020
e2bc4d8
add code of bct def
meltingrabbit Nov 14, 2020
1983248
divide output source and code gen source
meltingrabbit Nov 14, 2020
984ae11
add code of tlm def
meltingrabbit Nov 14, 2020
7ab7e7b
fix
meltingrabbit Nov 14, 2020
3b7463e
add bct description
meltingrabbit Nov 14, 2020
52c3c18
add template
meltingrabbit Nov 14, 2020
dbe49b8
Merge branch 'develop' into 'master'
meltingrabbit Nov 14, 2020
064f8d9
add print at exit
meltingrabbit Nov 15, 2020
739ecb9
update for new naming policy
meltingrabbit Nov 15, 2020
9ddd1d9
Merge branch 'develop' into 'master'
meltingrabbit Nov 15, 2020
09cf017
update readme
meltingrabbit Nov 15, 2020
64b9493
Merge branch 'develop' into 'master'
meltingrabbit Nov 15, 2020
3911b56
add conv for gstos sib
meltingrabbit Dec 6, 2020
90abd9c
Merge branch 'develop' into 'master'
meltingrabbit Dec 6, 2020
cb293f3
fix for coding rule
meltingrabbit Jan 7, 2021
d258fcc
Merge branch 'develop' into 'master'
meltingrabbit Jan 7, 2021
336de60
fix comment
meltingrabbit Jan 21, 2021
02e8c18
Merge branch 'develop' into 'master'
meltingrabbit Jan 21, 2021
33c628d
add def for fast build
meltingrabbit Feb 4, 2021
7e50a4a
remove def
meltingrabbit Feb 5, 2021
3b6c190
Merge branch 'develop' into 'master'
meltingrabbit Feb 5, 2021
61d8598
disable gstos option on default settings
meltingrabbit Feb 13, 2021
33bd739
Merge branch 'develop' into 'master'
meltingrabbit Feb 13, 2021
0cac5c9
update for handle many obc
meltingrabbit Feb 13, 2021
8dcafa3
fix
meltingrabbit Feb 13, 2021
2fb3690
extract gstos code
meltingrabbit Feb 13, 2021
fad4861
divide src
meltingrabbit Feb 13, 2021
c13d2c8
update for tobc cmd code
meltingrabbit Feb 13, 2021
85e0c83
Update README.md
meltingrabbit Feb 13, 2021
b10d731
fix
meltingrabbit Feb 13, 2021
db0e900
update for tobc tlm code
meltingrabbit Feb 13, 2021
f09f4d5
fix settings and readme
meltingrabbit Feb 13, 2021
a9aded1
Merge branch 'develop' into 'master'
meltingrabbit Feb 13, 2021
9900d38
fix path
meltingrabbit Feb 13, 2021
43ea4d8
Merge branch 'develop' into 'master'
meltingrabbit Feb 13, 2021
6ad875e
add buffer template
meltingrabbit Feb 14, 2021
1ca3d83
first version of generate tlm buffer
meltingrabbit Feb 14, 2021
9281c60
fix to be able to build for c2a
meltingrabbit Feb 14, 2021
d7a27eb
add size information to tlm buffer
meltingrabbit Feb 14, 2021
d57d222
update for generating mobc tlm code
meltingrabbit Feb 14, 2021
e32706b
Update README.md
meltingrabbit Feb 14, 2021
7ebb5c2
Update README.md
meltingrabbit Feb 14, 2021
a8268eb
fix
meltingrabbit Feb 14, 2021
6102cb2
fix typo
meltingrabbit Feb 14, 2021
758a1ed
Update README.md
meltingrabbit Feb 15, 2021
6d71b38
fix style
meltingrabbit Feb 16, 2021
f5d137a
Update README.md
meltingrabbit Feb 22, 2021
ff8b009
fix
meltingrabbit Feb 22, 2021
43d08dd
del separator comment
meltingrabbit Feb 22, 2021
1ee1906
add tlm data struct gen code
meltingrabbit Feb 22, 2021
845ea55
change output file for tlm data struct
meltingrabbit Feb 22, 2021
db327a9
Update README.md
meltingrabbit Feb 22, 2021
8cea449
fix
meltingrabbit Feb 22, 2021
f62c559
add auto parse code
meltingrabbit Feb 22, 2021
1c62372
fix float, double init value
meltingrabbit Feb 25, 2021
803c26b
fix return code
meltingrabbit Feb 25, 2021
7b67b2f
Update README.md
meltingrabbit Feb 26, 2021
f145157
fix
meltingrabbit Feb 26, 2021
2e9dfee
Merge branch 'develop' into 'master'
meltingrabbit Feb 26, 2021
7a16f4e
fix for ds
meltingrabbit Mar 21, 2021
ffeaf86
add const
meltingrabbit Mar 21, 2021
1d2b3f9
Merge branch 'develop' into 'master'
meltingrabbit Mar 21, 2021
606a1e7
update
meltingrabbit Apr 13, 2021
cd96c87
Merge branch 'develop' into 'master'
meltingrabbit Apr 13, 2021
8359d4c
update for new naming rule
meltingrabbit Jun 2, 2021
4d1f5bb
fix
meltingrabbit Jun 2, 2021
144826b
Merge branch 'develop' into 'master'
meltingrabbit Jun 3, 2021
533d828
add cmd param len data
meltingrabbit Jun 15, 2021
551f0c1
Merge branch 'develop' into 'master'
meltingrabbit Jun 17, 2021
2459b43
fix include
meltingrabbit Jun 24, 2021
1cc82e6
fix copy func name
meltingrabbit Jun 24, 2021
978359f
fix struct name
meltingrabbit Jun 24, 2021
58018b6
fix prefix of DS
meltingrabbit Jun 24, 2021
ab98331
Merge branch 'develop' into 'master'
meltingrabbit Jun 25, 2021
515102d
fix for coding rule
meltingrabbit Jul 12, 2021
2e92028
Merge branch 'develop' into 'master'
meltingrabbit Jul 14, 2021
77df3d7
escape tlm elem name
meltingrabbit Aug 6, 2021
c801fe1
fix
meltingrabbit Aug 6, 2021
9965a4b
Merge branch 'develop' into 'master'
meltingrabbit Aug 6, 2021
9e47467
Update README.md
meltingrabbit Aug 18, 2021
7e76422
Merge branch 'develop' into 'master'
meltingrabbit Aug 18, 2021
d0e2414
Update README.md
meltingrabbit Aug 18, 2021
60197db
Merge branch 'develop' into 'master'
meltingrabbit Aug 18, 2021
e47301b
Update README.md
meltingrabbit Aug 18, 2021
d57021e
Merge branch 'develop' into 'master'
meltingrabbit Aug 18, 2021
a59746b
fix frame offset
meltingrabbit Sep 14, 2021
3ed493c
Merge branch 'develop' into 'master'
meltingrabbit Sep 14, 2021
1154af0
fix bug
meltingrabbit Sep 15, 2021
e23ae74
Merge branch 'develop' into 'master'
meltingrabbit Sep 15, 2021
78494e3
update
meltingrabbit Nov 3, 2021
8171ccb
fix for tlm
meltingrabbit Nov 3, 2021
c29f1a6
Update README.md
meltingrabbit Nov 3, 2021
0b69fcd
Merge branch 'develop' into 'master'
meltingrabbit Nov 4, 2021
2788f8c
delete gitlab files
meltingrabbit Nov 25, 2021
c3c6f0e
add repository template file
meltingrabbit Nov 25, 2021
e44f5cd
Create LICENSE
meltingrabbit Nov 25, 2021
bb06784
update readme
meltingrabbit Nov 25, 2021
30a9ec5
Merge branch 'develop'
meltingrabbit Nov 25, 2021
7673755
update for c2a core update
meltingrabbit Dec 2, 2021
9e617dd
Merge pull request #1 from ut-issl/develop
meltingrabbit Dec 4, 2021
efeed70
update cmd def for update ca
meltingrabbit Dec 5, 2021
d2fc23c
Merge pull request #2 from ut-issl/develop
meltingrabbit Dec 10, 2021
3a65dda
delete anonymous union
meltingrabbit Dec 10, 2021
eb36ce9
Merge pull request #3 from ut-issl/develop
meltingrabbit Dec 10, 2021
57817fc
support for c89
meltingrabbit Dec 14, 2021
fbffca8
Merge pull request #4 from ut-issl/feature/support_c89
meltingrabbit Dec 14, 2021
e6676b7
add local var for tlm def
meltingrabbit Dec 28, 2021
5d6c46d
add fixme
meltingrabbit Dec 28, 2021
1bd0035
Merge pull request #5 from ut-issl/feature/add_local_var_in_tlm_def
meltingrabbit Dec 28, 2021
cf25354
fix dogxgen
meltingrabbit Jan 3, 2022
d572374
fix for cmd db update
meltingrabbit Jan 3, 2022
2ad21dd
Merge pull request #7 from ut-issl/feature/fix_for_cmd_db_update
meltingrabbit Jan 4, 2022
402aadb
rename to TlmCmd from CmdTlm
meltingrabbit Jan 13, 2022
da47f6a
fix sample settings
meltingrabbit Jan 13, 2022
9a39889
Merge pull request #8 from ut-issl/feature/rename_tlmcmd
meltingrabbit Jan 13, 2022
75e1442
support utf-8
meltingrabbit Jan 16, 2022
dfdbb10
Merge pull request #9 from ut-issl/feature/support_utf-8
meltingrabbit Jan 16, 2022
9d92fc3
Update README.md
meltingrabbit Jan 17, 2022
003fa4d
Merge pull request #10 from ut-issl/feature/fix_docs
meltingrabbit Jan 17, 2022
8dc980f
check db range for single OBC
meltingrabbit Jan 19, 2022
cd0f519
Merge pull request #13 from ut-issl/feature/check_db_range_for_single…
meltingrabbit Jan 19, 2022
3fb49ad
fix for check tlm enable flag
meltingrabbit Jan 19, 2022
90d3eb3
Merge pull request #12 from ut-issl/feature/check_enable
meltingrabbit Jan 19, 2022
c6fd5ec
fix readme
meltingrabbit Jan 19, 2022
290dd85
del gstos
meltingrabbit Jan 20, 2022
f0a107b
fix readme and settings
meltingrabbit Jan 20, 2022
7802d59
Merge pull request #16 from ut-issl/feature/del_gstos
meltingrabbit Jan 20, 2022
43f9df4
Merge pull request #15 from ut-issl/feature/fix_readme
meltingrabbit Jan 20, 2022
61559fe
add flake8 and black
meltingrabbit Jan 19, 2022
547aebd
apply black
meltingrabbit Jan 19, 2022
a4cd987
fix E713
meltingrabbit Jan 19, 2022
5191b7c
add E501 to ignore for flake8
meltingrabbit Jan 21, 2022
d0a874c
fix F841
meltingrabbit Jan 21, 2022
98eb240
Merge pull request #14 from ut-issl/feature/add_black_and_flake8_ci
meltingrabbit Jan 21, 2022
7f5c636
fix disable flag check
meltingrabbit Feb 1, 2022
b8e2eef
Merge pull request #18 from ut-issl/feature/fix_check_disable
meltingrabbit Feb 1, 2022
da0c328
update for space packet and new c2a comm
meltingrabbit Jan 31, 2022
914d657
Update README.md
meltingrabbit Jan 31, 2022
f454133
fix small
meltingrabbit Jan 31, 2022
3973724
update for include header to tlm contents
meltingrabbit Jan 31, 2022
9794478
Update README.md
meltingrabbit Jan 31, 2022
644ae28
Update settings.json
meltingrabbit Jan 31, 2022
b2cb882
add validation
meltingrabbit Feb 1, 2022
51abdb2
fix define name
meltingrabbit Feb 1, 2022
60cf66b
Update settings.json
meltingrabbit Feb 1, 2022
27ad091
Merge pull request #17 from ut-issl/feature/space_packet
meltingrabbit Feb 2, 2022
6cc7dab
add replace @@ to ,
yngyu Feb 16, 2022
cfcc7b8
Merge pull request #19 from ut-issl/feature/fix_local_vars_comma
yngyu Feb 16, 2022
21e37a1
Add renovate.json
renovate-bot Feb 18, 2022
c702e8a
Merge pull request #20 from ut-issl/renovate/configure
meltingrabbit Mar 1, 2022
80190a7
Update actions/checkout action to v3
renovate-bot Mar 1, 2022
82faee6
Update actions/setup-python action to v3
renovate-bot Mar 1, 2022
ac7f193
Merge pull request #22 from ut-issl/renovate/actions-setup-python-3.x
meltingrabbit Mar 1, 2022
fd60615
Update reviewdog/action-black action to v3
renovate-bot Mar 1, 2022
72265df
Merge pull request #24 from ut-issl/renovate/reviewdog-action-black-3.x
meltingrabbit Mar 2, 2022
8a318e7
Merge pull request #21 from ut-issl/renovate/actions-checkout-3.x
meltingrabbit Mar 2, 2022
3c2f3ba
fix TF_ACK and tlm func
meltingrabbit Mar 8, 2022
3e78881
apply black
meltingrabbit Mar 8, 2022
158b9e3
Merge pull request #25 from ut-issl/feature/fix_tlm_func_ret
meltingrabbit Mar 12, 2022
c5f65c3
update renovate settings
meltingrabbit Mar 21, 2022
effd3d2
Merge pull request #26 from ut-issl/feature/update_renovate_settings
meltingrabbit Mar 24, 2022
c8ed4c1
Update actions/setup-python action to v4
renovate[bot] Jun 18, 2022
a48484c
Update crazy-max/ghaction-github-labeler action to v4
renovate[bot] Jun 18, 2022
3adb98e
Merge pull request #29 from ut-issl/renovate/crazy-max-ghaction-githu…
meltingrabbit Jul 3, 2022
ff79283
Merge pull request #28 from ut-issl/renovate/actions-setup-python-4.x
meltingrabbit Jul 3, 2022
5f19705
fix for eb90 frame
meltingrabbit Aug 23, 2022
0d9176c
Merge pull request #31 from ut-issl/feature/fix_for_eb90_frame
meltingrabbit Aug 23, 2022
bb1e310
Update README.md
meltingrabbit Aug 29, 2022
a906656
add option for input encoding
meltingrabbit Aug 29, 2022
57df373
apply black
meltingrabbit Aug 29, 2022
210a665
Update settings.json
meltingrabbit Aug 30, 2022
680c7f0
Merge pull request #32 from ut-issl/feature/add_option_for_db_encoding
meltingrabbit Aug 30, 2022
29aae8b
fix endian func
meltingrabbit Sep 29, 2022
34046f4
Merge pull request #33 from ut-issl/feature/endian
meltingrabbit Oct 1, 2022
4067e34
del unnecessary comment
meltingrabbit Apr 3, 2023
6358825
add option is_cmd_prefix_in_db
meltingrabbit Apr 3, 2023
433b213
apply black
meltingrabbit Apr 3, 2023
610f81f
update readme
meltingrabbit Apr 3, 2023
eee2d37
fix bug
meltingrabbit Apr 3, 2023
e0da8f6
sed is_cmd_prefixed_in_db
meltingrabbit Apr 9, 2023
fcb75bb
Merge pull request #35 from ut-issl/feature/del_Cmd_from_cmd_db
meltingrabbit Apr 9, 2023
6cb95d2
del 2nd obc tlm in mobc tlm def for foward tlm
meltingrabbit Apr 16, 2023
0a04630
Merge pull request #36 from ut-issl/feature/foward_tlm
meltingrabbit Apr 20, 2023
b1756b6
fix relative c2a-core header include
sksat Apr 19, 2023
bc90d33
Merge pull request #37 from sksat/feature/fix-relative-core-include
meltingrabbit May 11, 2023
f0b8263
add path to db settings
chutaro Jul 24, 2023
dad7078
微修正
chutaro Jul 24, 2023
5e8b525
改行戻す
Jul 25, 2023
e71c291
Merge pull request #45 from ut-issl/feature/set_db_path
chutaro Jul 25, 2023
98388c8
apply arkedge/c2a-core v4 rename TlmCmd -> tlm_cmd
sksat Sep 5, 2023
ea6c763
Merge remote-tracking branch 'ut-issl-ae-v4/ae-v4' into feature/impor…
sksat Oct 2, 2023
5546696
import ut-issl/c2a-tlm-cmd-code-generator ae-v2.0.0
sksat Oct 2, 2023
4a46efb
update docs from import ut-issl/c2a-tlm-cmd-code-generator
sksat Oct 2, 2023
a279443
remove unneeded ut-issl/c2a-tlm-cmd-code-generator repo files
sksat Oct 2, 2023
503e775
remove duplicated license file
sksat Oct 2, 2023
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
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
- 設定ファイル中のディレクトリの設定を C2A user のトップディレクトリからの相対パスに変更
- [ut-issl/c2a-enum-loader](https://github.com/ut-issl/c2a-enum-loader) を c2a-core リポジトリで管理するように変更: [#99](https://github.com/arkedge/c2a-core/pull/99)
- import したバージョン: [ut-issl/c2a-enum-loader ae-v2.0.0](https://github.com/ut-issl/c2a-enum-loader/releases/tag/ae-v2.0.0)
- [ut-issl/c2a-tlm-cmd-code-generator](https://github.com/ut-issl/c2a-tlm-cmd-code-generator) を c2a-core リポジトリで管理するように変更: [#111](https://github.com/arkedge/c2a-core/pull/111)
- import したバージョン: [ut-issl/c2a-tlm-cmd-code-generator ae-v2.0.0](https://github.com/ut-issl/c2a-tlm-cmd-code-generator/releases/tag/ae-v2.0.0)


### Enhancements
Expand Down Expand Up @@ -56,7 +58,6 @@

- [ut-issl/tlm-cmd-db v2.4.0](https://github.com/ut-issl/tlm-cmd-db/releases/tag/v2.4.0)
- [ut-issl/python-wings-interface v1.5.1](https://github.com/ut-issl/python-wings-interface/releases/tag/v1.5.1)
- [ut-issl/c2a-tlm-cmd-code-generator ae-v2.0.0](https://github.com/ut-issl/c2a-tlm-cmd-code-generator/releases/tag/ae-v2.0.0)
- [arkedge/gaia v0.5.0](https://github.com/arkedge/gaia/releases/tag/v0.5.0)
- [tlmcmddb-cli 0.2.0](https://crates.io/crates/tlmcmddb-cli/0.2.0)
- [kble 0.2.0](https://crates.io/crates/kble/0.2.0)
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ C2A Core の採用実績のある衛星 OBC や動作実績のあるボードの
## 関連リンク
### C2A 関連ツール
- https://github.com/ut-issl/tlm-cmd-db
- https://github.com/ut-issl/c2a-tlm-cmd-code-generator
- https://github.com/ut-issl/python-wings-interface
- https://github.com/ut-issl/s2e-user-for-c2a-core
- https://github.com/arkedge/c2a-tlmcmddb
Expand Down
2 changes: 1 addition & 1 deletion docs/driver/communication_with_components.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ https://github.com/arkedge/c2a-core/blob/45d78a05c339c285b5aa0c2fcbf57c1b105137e
C2A 間通信によって,以下のような機能が提供される.

- OBC 間の簡易な Driver 実装と自動コード生成
- [c2a-tlm-cmd-code-generator](https://github.com/ut-issl/c2a-tlm-cmd-code-generator) 参照.
- [c2a-tlm-cmd-code-generator](../../tlm-cmd-code-generator/) 参照.
- [`examples/mobc/src/src_user/Drivers/Aocs`](/examples/mobc/src/src_user/Drivers/Aocs/) などの多くのコードが自動生成される.
- OBC と地上局でネットワークを形成.
- 地上局から MOBC をルーターとして, sub OBC へコマンド配送.
Expand Down
1 change: 0 additions & 1 deletion docs/general/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,5 @@ Tool のリリースには,以下に注意する.

例:

- https://github.com/ut-issl/c2a-tlm-cmd-code-generator/releases
- https://github.com/ut-issl/python-wings-interface/releases
- https://github.com/ut-issl/tlm-cmd-db/releases
8 changes: 8 additions & 0 deletions tlm-cmd-code-generator/.flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[flake8]
max-line-length = 100
ignore =
# black と競合するので
E203,
E501,
W503,
W504
16 changes: 16 additions & 0 deletions tlm-cmd-code-generator/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# OSX
.DS_Store
.AppleDouble
.LSOverride
Icon

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

# others
*.pyc
gstos_files/*
53 changes: 53 additions & 0 deletions tlm-cmd-code-generator/GenerateC2ACode.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# coding: UTF-8
"""
python 3.7以上を要求
"""

import json
import sys

import my_mod.load_db
import my_mod.cmd_def
import my_mod.tlm_def
import my_mod.tlm_buffer


# import pprint
# import os.path
# import msvcrt # Enter不要な入力用
# import subprocess


# 環境変数
DEBUG = 0
# 0 : Release
# 1 : all
SETTING_FILE_PATH = "settings.json"


def main():
with open(SETTING_FILE_PATH, mode="r") as fh:
settings = json.load(fh)
# print(settings["path_to_src"]);

cmd_db = my_mod.load_db.LoadCmdDb(settings)
tlm_db = my_mod.load_db.LoadTlmDb(settings)
# pprint.pprint(cmd_db)
# pprint.pprint(tlm_db)
# print(tlm_db)

my_mod.cmd_def.GenerateCmdDef(settings, cmd_db["sgc"])
my_mod.cmd_def.GenerateBctDef(settings, cmd_db["bct"])
my_mod.tlm_def.GenerateTlmDef(settings, tlm_db["tlm"])

if settings["is_main_obc"]:
my_mod.cmd_def.GenerateOtherObcCmdDef(settings, cmd_db["other_obc"])
my_mod.tlm_def.GenerateOtherObcTlmDef(settings, tlm_db["other_obc"])
my_mod.tlm_buffer.GenerateTlmBuffer(settings, tlm_db["other_obc"])

print("Completed!")
sys.exit(0)


if __name__ == "__main__":
main()
106 changes: 106 additions & 0 deletions tlm-cmd-code-generator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# c2a-tlm-cmd-code-generator
[TlmCmd DB](https://github.com/ut-issl/tlm-cmd-db)からC2Aのコードを生成するためのスクリプト

以下が自動生成される.
- command_definitions.c
- command_definitions.h
- telemetry_definitions.c
- telemetry_definitions.h
- block_command_definitions.h

## 実行
```
$ python GenerateC2ACode.py
```

## 設定
`settings.json` にて記述する.

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

```
{
# `src_core`, `src_user` のあるディレクトリへのパス
"path_to_src" : "../../c2a/src/",
# テレコマ DB のあるディレクトリへのパス
"path_to_db" : "../../c2a/database/",
# TlmCmdDBのファイル名の接頭辞
"db_prefix" : "SAMPLE_MOBC",
# TLM ID の定義域
"tlm_id_range" : ["0x00", "0x100"],
# Cmd DB の Name に "Cmd_" の接頭辞が含まれるか?(今後は含まれないのが基本とする)
"is_cmd_prefixed_in_db" : 0,
# 入力 Tlm Cmd DB のエンコーディング
"input_file_encoding" : "utf-8",
# 出力ファイルのエンコーディング
"output_file_encoding" : "utf-8",
# MOBCか?(他のOBCのtlm/cmdを取りまとめるか?) 0/1
# 2nd OBCのコードを生成するときなどは 0 にする
# 0 の場合,以後のパラメタは無効
"is_main_obc" : 1,
"other_obc_data" : [
{
# OBC名
"name" : "AOBC",
# コードを生成するか?
"is_enable" : 1,
"db_prefix" : "SAMPLE_AOBC",
"tlm_id_range" : ["0x90", "0xc0"],
"is_cmd_prefixed_in_db" : 0,
"input_file_encoding" : "utf-8",
# DBがあるディレクトリへのパス(絶対でも相対でもOK)
"path_to_db" : "../../c2a_sample_aobc/database/",
# MOBC で保持するテレメの TLM ID の最大値(=テレメ種類数)
"max_tlm_num" : 256,
"driver_path" : "Aocs/",
"driver_type" : "AOBC_Driver",
"driver_name" : "aobc",
"code_when_tlm_not_found" : "aobc_driver->info.comm.rx_err_code = AOBC_RX_ERR_CODE_TLM_NOT_FOUND;"
},
{
# OBC名
"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",
# DBがあるディレクトリへのパス(絶対でも相対でもOK)
"path_to_db" : ""../../c2a_sample_tobc/database/",
# MOBC で保持するテレメの TLM ID の最大値(=テレメ種類数)
"max_tlm_num" : 256,
"driver_path" : "Thermal/",
"driver_type" : "TOBC_Driver",
"driver_name" : "tobc",
"code_when_tlm_not_found" : "tobc_driver->info.comm.rx_err_code = TOBC_RX_ERR_CODE_TLM_NOT_FOUND;"
}
]
}
```

## 開発方針
- `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` に記載.
- なお,現在は標準ライブラリのみしか使っていない
- 以下で一括インストール可能
```
$ pip install -r requirements.txt
```

## その他
- MOBCと2nd OBCのC2A間通信の例は (TBA).
Loading
Loading