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

support linux for uart and ccsds on SILS #341

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

flap1
Copy link
Collaborator

@flap1 flap1 commented Jun 8, 2022

概要

  • linux環境でのport通信をサポート
  • Examples/minimum_user_for_s2e/src/src_user/IfWrapper/Sils/sils_sci_if.hppでport通信の基底クラスSCIComPortを定義

Issue

詳細

  • Linuxのnull modem emulator(tty0tty)を利用
  • 実行環境に合わせて実行される(WIN32を用いている)のでVSを用いた実行結果に影響はない
    • 地上局でもportを合わせる必要がある
  • sils_sci_if.hppでクラスSCIComPortを定義, ccsds_sils_sci_if.hppuart_sils_sci_if.hppのそれぞれで継承している(中身は同じなので継承させる必要はないかもしれない)

検証結果

  • Windows環境での動作には影響を与えない
  • Ubuntu22.04上で動作確認済み

影響範囲

  • 地上局でも対応が必要

補足

注意

@meltingrabbit meltingrabbit added this to In progress in C2A via automation Jun 8, 2022
@meltingrabbit meltingrabbit added enhancement New feature or request priority::medium priority medium labels Jun 8, 2022
@meltingrabbit
Copy link
Collaborator

C用のフォーマットチェックがC++に刺さっとるな

@sksat
Copy link
Collaborator

sksat commented Jun 8, 2022

あーそういうことか.普段ここでC++書かれることないから...

@meltingrabbit
Copy link
Collaborator

meltingrabbit commented Jun 8, 2022

Allmanスタイルの場合, SCIComPortUart(int port) : SCIComPort(port){} ってどうなるんだ?

流石に改行するか.

@meltingrabbit
Copy link
Collaborator

まあ,最悪

https://github.com/ut-issl/c2a-core/blob/develop/Script/CI/check_coding_rule.json

に追記してもらえれば大丈夫そう.

@meltingrabbit
Copy link
Collaborator

ロジック変わってなくても,コード自体は変わってるので,windowsでもpytestをぜんぶ走らせ直しておいてもらえると 🙏

@flap1 flap1 force-pushed the feature/support_linux branch 3 times, most recently from 400411a to c0ffc1e Compare June 8, 2022 11:46
@flap1
Copy link
Collaborator Author

flap1 commented Jun 8, 2022

該当ファイルをcheck_coding_rule.jsonに加えましたが弾かれました
原因がわかりません

@flap1 flap1 force-pushed the feature/support_linux branch 2 times, most recently from d01c6f4 to 7bddf76 Compare June 9, 2022 01:48
@flap1
Copy link
Collaborator Author

flap1 commented Jun 9, 2022

check_encodingを解決しました

@@ -3,116 +3,24 @@
* @file
* @brief ccsds_sils_sci_if
* @details WINGS TMTC IFとCCSDSのTransfer FrameをSCI COMでやりとりするIF
Windows上でcom0comを使うことを想定
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[IMO] これは残しておいた方がいい?

Windowsでは ,とか

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

残した上で一行追加しました

@flap1
Copy link
Collaborator Author

flap1 commented Oct 28, 2022

@chutaro @yngyu @meltingrabbit
レビューお願いしますー

Copy link
Contributor

@chutaro chutaro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

良さそうです.お疲れさまでした!

@chutaro
Copy link
Contributor

chutaro commented Oct 30, 2022

@meltingrabbit いちおう最後に見て approve お願いします

@meltingrabbit meltingrabbit changed the title support linux support linux for uart and ccsds on SILS Oct 30, 2022
@meltingrabbit
Copy link
Collaborator

これ,コード規約どうするか~

まあ, C++ のコードなので,無視してもいいんだけど,若干気になるよね.

C2A の規約に合わせるなら,

SCIComPort > SciComPort
myHComPort_ > com_port_handle_ とか?

なんだけど,どうしよう? @chutaro

int myHComPort_;
struct termios config_;
#endif
bool init_success;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[IMO] これも bool だし,
init_succeeded とかのほうが良さそう.

このコード,かなり古いコードなので,ついでに色々直したい)

まあ,上のコメントとあわせて,命名規則修正などは別 PR でやる,ってのも OK です.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このPR長引きすぎてるので、これは一回マージしてコード規約は別PR、でどうでしょう?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

じゃ,そうしましょうか.
issue立てとくね

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ありがとうございます

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#463 これで @flap1

@chutaro
Copy link
Contributor

chutaro commented Oct 30, 2022

@flap1 あと最新のdevelop からrebaseしといてください!

@meltingrabbit
Copy link
Collaborator

あ~,これ 2nd obc の方直ってないなぁ....直すか~

@meltingrabbit
Copy link
Collaborator

71c74dc で最低限の命名直してます.

@meltingrabbit
Copy link
Collaborator

meltingrabbit commented Oct 30, 2022

d8778b9 で 2nd obc 対応してます.

ざっと見てもらえると

@flap1
Copy link
Collaborator Author

flap1 commented Oct 31, 2022

最新のdevelopからrebaseしました。
@chutaro @meltingrabbit @yngyu
これ自分がmergeしちゃって大丈夫でしょうか。

@meltingrabbit
Copy link
Collaborator

2nd obcのテストって回してる?回してたらok!

@meltingrabbit meltingrabbit mentioned this pull request Nov 7, 2022
12 tasks
@yngyu
Copy link
Contributor

yngyu commented Nov 13, 2022

本当に遅くなってすいません、2nd obc の Test が Windows で通ることを確認しました、 Linux でのテストはまた時間がかかりそうなので別 issue 切るとして 一旦マージしてもよろしいでしょうか...?

@meltingrabbit
Copy link
Collaborator

@yngyu @flap1 よさそう.
rebase して CI とおしてからマージしてください!

@meltingrabbit meltingrabbit mentioned this pull request Mar 26, 2023
25 tasks
@meltingrabbit
Copy link
Collaborator

rebase してくれてそう?
ちょっとだいぶ古くなったので,再度チェックしましょうか?

@meltingrabbit meltingrabbit mentioned this pull request Jun 19, 2023
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority::medium priority medium
Projects
C2A
In progress
Development

Successfully merging this pull request may close these issues.

None yet

5 participants