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

Feat: biyooon, adding using zenohex #12

Merged
merged 13 commits into from
Dec 30, 2024
Merged

Feat: biyooon, adding using zenohex #12

merged 13 commits into from
Dec 30, 2024

Conversation

fomfom
Copy link

@fomfom fomfom commented Dec 18, 2024

一部の従来の機能に通信部分をZenohでおきかえたverを追加したものです

end

def handle_info(:loop_engine2relay, state) do
# subをループするhandle info
Copy link
Contributor

Choose a reason for hiding this comment

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

関数ドキュメントとする場合は、関数の上で定義してください。
https://elixirschool.com/ja/lessons/basics/documentation#%E9%96%A2%E6%95%B0%E3%81%AE%E3%83%89%E3%82%AD%E3%83%A5%E3%83%A1%E3%83%B3%E3%83%88%E5%8C%96-3
関数ドキュメントなのか、関数内のコメントなのか判別がつきにくい箇所が多いので、見直しをお願いします。本来は全部ドキュメントが付くのが望ましいですが、今回は一旦あるものだけでおkです。

Copy link
Contributor

@nishiuchikazuma nishiuchikazuma Dec 26, 2024

Choose a reason for hiding this comment

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

callbackな関数(handle_info, handle_call, handle_castなど)は関数ごとに@docおけなかったんじゃなかったかなぁと

おまいう案件ではあるかと

Copy link
Contributor

@takasehideki takasehideki left a comment

Choose a reason for hiding this comment

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

わしは LGTM

Comment on lines 21 to 32
@spec start_link(binary()) ::
{:ok,
%{
callback_client2relay: (any(), map() -> :ok | {any(), any()}),
callback_engine2relay: (any(), map() -> :ok | {any(), any()}),
id: atom(),
publisher_relay2client: reference(),
publisher_relay2engine: reference(),
session: reference(),
subscriber_client2relay: Zenohex.Subscriber.t(),
subscriber_engine2relay: Zenohex.Subscriber.t()
}}
Copy link
Contributor

Choose a reason for hiding this comment

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

@fomfom あえて記載してる(残してる)って理解でOKですか?

Copy link
Author

Choose a reason for hiding this comment

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

これは消しておきます

{:ok, state}
end

## Clientから送られたデータを解析して、やりたい動作ごとに割り振る予定
Copy link
Contributor

Choose a reason for hiding this comment

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

@fomfom 実装が完了してたらコメントとっちゃいましょう

end
end

## Engineから送られたメッセージを抽出し、Clientに返送
Copy link
Contributor

Choose a reason for hiding this comment

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

@fomfom 関数がどう動くかのコメントは @doc 使いましょう(他にも多数)

Copy link
Author

Choose a reason for hiding this comment

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

これはコールバック関数なので@docにしないものだと認識しています

Copy link
Contributor

Choose a reason for hiding this comment

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

@fomfom あーーー 自分で定義したコールバック関数だったんですね

コールバック関数だから @doc にしないのでなく、できるなら @doc にしてください

自分定義のコールバック関数したことないのでやってみないと分からんのですけど、きっと自分定義の一意の関数名だったら @doc 使えるんじゃないかと思ってます

@takasehideki takasehideki merged commit 0b3e6df into main Dec 30, 2024
3 checks passed
@takasehideki takasehideki deleted the biyooon-keiya branch December 30, 2024 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants