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

Rename & Refactor IF list to CDS handler registry #165

Merged
merged 7 commits into from
Oct 26, 2023

Conversation

sksat
Copy link
Member

@sksat sksat commented Oct 25, 2023

概要

src/src_user/hal/if_list.c (旧 src/src_user/IfWrapper/if_list.c)周りを rename する

Issue

詳細

  • 各 HAL が提供し CDS から呼ばれる関数群を「HAL handler」と呼称するように変更
    • IF_REOPEN_REASON -> HAL_HANDLER_REOPEN_REASON
  • CDS の HAL handler 関係の設定・メンバの rename
    • CDS_IF_RX_BUFFER_SIZE -> CDS_HAL_RX_BUFFER_SIZE
    • CDS_RecStatus->ret_from_if_rx -> CDS_RecStatus->ret_from_hal_rx
    • CDS_StreamSendStatus->ret_from_if_tx -> CDS_StreamSendStatus->ret_from_hal_tx
    • CDS_Config->settings->rx_buffer_size_in_if_rx_ -> CDS_Config->settings->hal_rx_buffer_size_
    • ComponentDriverSuper->interface -> ComponentDriverSuper->hal_handler_id
    • ComponentDriverSuper->if_config -> ComponentDriverSuper->hal_config
  • 各 HAL handler を登録する関数ポインタ配列を「HAL handler registry」と呼称するように変更
    • src/src_user/hal/if_list.c(旧 src/src_user/IfWrapper/if_list.c) -> src/src_user/Settings/component_driver_super /hal_handler_registry.c
    • IF_LIST_ENUM -> HAL_HANDLER_ID
    • IF_init[] -> HAL_init_handlers[]
    • IF_RX[] -> HAL_rx_handlers[]
    • IF_TX[] -> HAL_tx_handlers[]
    • IF_reopen[] -> HAL_reopen_handlers[]

検証結果

#166 で CI が通ったらよし

影響範囲

src/src_user/hal/if_list.h

@sksat sksat added the priority::high priorityg high label Oct 25, 2023
@sksat sksat self-assigned this Oct 25, 2023
@sksat sksat changed the title Rename IF list Rename & Refactor IF list to CDS handler registry Oct 26, 2023
@meltingrabbit
Copy link
Member

uint16_t CDSC_get_rx_buffer_size_in_if_rx(const ComponentDriverSuper* p_super);
CDS_ERR_CODE CDSC_set_rx_buffer_size_in_if_rx(ComponentDriverSuper* p_super,
                                              const uint16_t rx_buffer_size_in_if_rx);

@meltingrabbit
Copy link
Member

これ変える必要がありそう

Copy link
Member

@meltingrabbit meltingrabbit left a comment

Choose a reason for hiding this comment

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

#166 とともに

@sksat sksat merged commit 778a8a8 into develop Oct 26, 2023
9 of 34 checks passed
@sksat sksat deleted the feature/rename-if-list branch October 26, 2023 15:29
@sksat sksat mentioned this pull request Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority::high priorityg high
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

rename & refactor: IF list -> DS handler registry
2 participants