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 TlmCmd dir to snake case #79

Merged
merged 15 commits into from
Sep 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- c2a_user: mobc
test_dir: src_core/system/time_manager
- c2a_user: mobc
test_dir: src_core/TlmCmd
test_dir: src_core/tlm_cmd
# 2nd_obc_user
- c2a_user: subobc
test_dir: .
Expand Down
30 changes: 15 additions & 15 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ set(C2A_SRCS
system/time_manager/obc_time.c
system/time_manager/time_manager.c
system/watchdog_timer/watchdog_timer.c
TlmCmd/block_command_loader.c
TlmCmd/block_command_table.c
TlmCmd/block_command_executor.c
TlmCmd/command_analyze.c
TlmCmd/command_dispatcher.c
TlmCmd/command_dispatcher_manager.c
TlmCmd/common_cmd_packet_util.c
TlmCmd/packet_handler.c
TlmCmd/packet_list_util.c
TlmCmd/packet_list.c
TlmCmd/telemetry_frame.c
TlmCmd/telemetry_generator.c
TlmCmd/Ccsds/cmd_space_packet.c
TlmCmd/Ccsds/space_packet.c
TlmCmd/Ccsds/tlm_space_packet.c
tlm_cmd/block_command_loader.c
tlm_cmd/block_command_table.c
tlm_cmd/block_command_executor.c
tlm_cmd/command_analyze.c
tlm_cmd/command_dispatcher.c
tlm_cmd/command_dispatcher_manager.c
tlm_cmd/common_cmd_packet_util.c
tlm_cmd/packet_handler.c
tlm_cmd/packet_list_util.c
tlm_cmd/packet_list.c
tlm_cmd/telemetry_frame.c
tlm_cmd/telemetry_generator.c
tlm_cmd/ccsds/cmd_space_packet.c
tlm_cmd/ccsds/space_packet.c
tlm_cmd/ccsds/tlm_space_packet.c
)

if(NOT C2A_USE_C99_STDINT)
Expand Down
2 changes: 1 addition & 1 deletion Drivers/Protocol/common_tlm_cmd_packet_for_driver_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @brief コンポ間通信などで標準的に使う ネットワーク層 の Common Tlm Cmd Packet (概ね Space Packet)
* @note ここでは,データリンク層は CCSDS ではなく EB90 Frame を使うことを想定 (TODO: 今後拡張予定)
* @note データリンク層は DS_StreamConfig.data_link_layer_ で規定する
* @note packet 構造 などは TlmCmd/common_tlm_cmd_packet.h を参照のこと
* @note packet 構造 などは tlm_cmd/common_tlm_cmd_packet.h を参照のこと
*/
#include "common_tlm_cmd_packet_for_driver_super.h"
#include "eb90_frame_for_driver_super.h"
Expand Down
4 changes: 2 additions & 2 deletions Drivers/Protocol/common_tlm_cmd_packet_for_driver_super.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
* @brief コンポ間通信などで標準的に使う ネットワーク層 の Common Tlm Cmd Packet (概ね Space Packet)
* @note ここでは,データリンク層は CCSDS ではなく EB90 Frame を使うことを想定 (TODO: 今後拡張予定)
* @note データリンク層は DS_StreamConfig.data_link_layer_ で規定する
* @note packet 構造 などは TlmCmd/common_tlm_cmd_packet.h を参照のこと
* @note packet 構造 などは tlm_cmd/common_tlm_cmd_packet.h を参照のこと
*/
#ifndef COMMON_TLM_CMD_PACKET_FOR_DRIVER_SUPER_H_
#define COMMON_TLM_CMD_PACKET_FOR_DRIVER_SUPER_H_

#include <stdint.h>
#include "../Super/driver_super.h"
#include "../../TlmCmd/common_tlm_cmd_packet.h"
#include "../../tlm_cmd/common_tlm_cmd_packet.h"

/**
* @brief CommonTlmCmdPacket を受信データからコピーして取得する
Expand Down
2 changes: 1 addition & 1 deletion Drivers/Super/driver_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "../../library/print.h"
#include <string.h> // for memset などの mem 系
#include <stddef.h> // for NULL
#include "../../TlmCmd/common_cmd_packet_util.h"
#include "../../tlm_cmd/common_cmd_packet_util.h"

// #define DS_DEBUG // 適切なときにコメントアウトする
// #define DS_DEBUG_SHOW_REC_DATA // 適切なときにコメントアウトする
Expand Down
4 changes: 2 additions & 2 deletions applications/divided_cmd_utility.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
* @note telemetry_manager などで使っているので,それを参照のこと
*/
#include "divided_cmd_utility.h"
#include "../TlmCmd/packet_handler.h"
#include "../TlmCmd/common_cmd_packet_util.h"
#include "../tlm_cmd/packet_handler.h"
#include "../tlm_cmd/common_cmd_packet_util.h"
#include "../system/time_manager/time_manager.h"
#include "../system/event_manager/event_logger.h"
#include "../library/result.h"
Expand Down
4 changes: 2 additions & 2 deletions applications/divided_cmd_utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
#define DIVIDED_CMD_UTILITY_H_

#include "../system/application_manager/app_info.h"
#include "../TlmCmd/common_cmd_packet.h"
#include "../tlm_cmd/common_cmd_packet.h"
#include "../system/time_manager/obc_time.h"
#include <src_user/TlmCmd/command_definitions.h>
#include <src_user/tlm_cmd/command_definitions.h>

#define DCU_LOG_MAX (16) //!< 保存するログの最大数

Expand Down
2 changes: 1 addition & 1 deletion applications/event_utility.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
#include "event_utility.h"
#include "../system/event_manager/event_handler.h"
#include "../TlmCmd/common_cmd_packet_util.h"
#include "../tlm_cmd/common_cmd_packet_util.h"
#include "../library/result.h"

#include <stddef.h> // for NULL
Expand Down
2 changes: 1 addition & 1 deletion applications/event_utility.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define EVENT_UTILITY_H_

#include "../system/application_manager/app_info.h"
#include "../TlmCmd/common_cmd_packet.h"
#include "../tlm_cmd/common_cmd_packet.h"

AppInfo EVENT_UTIL_create_app(void);

Expand Down
4 changes: 2 additions & 2 deletions applications/gs_command_dispatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

#include "gs_command_dispatcher.h"
#include "../TlmCmd/packet_handler.h"
#include "../TlmCmd/common_cmd_packet_util.h"
#include "../tlm_cmd/packet_handler.h"
#include "../tlm_cmd/common_cmd_packet_util.h"
#include "../library/result.h"

static CommandDispatcher gs_command_dispatcher_;
Expand Down
2 changes: 1 addition & 1 deletion applications/gs_command_dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef GS_COMMAND_DISPATCHER_H_
#define GS_COMMAND_DISPATCHER_H_

#include "../TlmCmd/command_dispatcher.h"
#include "../tlm_cmd/command_dispatcher.h"
#include "../system/application_manager/app_info.h"

extern const CommandDispatcher* const gs_command_dispatcher;
Expand Down
4 changes: 2 additions & 2 deletions applications/memory_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
#include <string.h> // for memcpy

#include "../system/time_manager/time_manager.h"
#include "../TlmCmd/packet_handler.h"
#include "../tlm_cmd/packet_handler.h"
#include "../library/endian.h"
#include "../TlmCmd/common_cmd_packet_util.h"
#include "../tlm_cmd/common_cmd_packet_util.h"
#include "../library/result.h"

static MemoryDump memory_dump_;
Expand Down
2 changes: 1 addition & 1 deletion applications/memory_dump.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define MEMORY_DUMP_H_

#include "../system/application_manager/app_info.h"
#include "../TlmCmd/common_cmd_packet.h"
#include "../tlm_cmd/common_cmd_packet.h"

#define MEM_TLM_ID (0xff)
#define MEM_DUMP_WIDTH (CTCP_MAX_LEN - 18) // テレメパケット最大長 - ヘッダ長
Expand Down
2 changes: 1 addition & 1 deletion applications/nop.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
#include "nop.h"
#include <stddef.h>
#include "../TlmCmd/common_cmd_packet_util.h"
#include "../tlm_cmd/common_cmd_packet_util.h"
#include "../library/result.h"

static RESULT NOP_nop_(void);
Expand Down
2 changes: 1 addition & 1 deletion applications/nop.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#define NOP_H_

#include "../system/application_manager/app_info.h"
#include "../TlmCmd/common_cmd_packet.h"
#include "../tlm_cmd/common_cmd_packet.h"

AppInfo NOP_create_app(void);

Expand Down
4 changes: 2 additions & 2 deletions applications/realtime_command_dispatcher.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma section REPRO
#include "realtime_command_dispatcher.h"
#include "../TlmCmd/packet_handler.h"
#include "../TlmCmd/common_cmd_packet_util.h"
#include "../tlm_cmd/packet_handler.h"
#include "../tlm_cmd/common_cmd_packet_util.h"
#include "../library/result.h"

static CommandDispatcher realtime_command_dispatcher_;
Expand Down
4 changes: 2 additions & 2 deletions applications/realtime_command_dispatcher.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#ifndef REALTIME_COMMAND_DISPATCHER_H_
#define REALTIME_COMMAND_DISPATCHER_H_

#include "../TlmCmd/command_dispatcher.h"
#include "../tlm_cmd/command_dispatcher.h"
#include "../system/application_manager/app_info.h"
#include "../TlmCmd/common_cmd_packet.h"
#include "../tlm_cmd/common_cmd_packet.h"

extern const CommandDispatcher* const realtime_command_dispatcher;

Expand Down
14 changes: 7 additions & 7 deletions applications/telemetry_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@
#include <string.h> // for memsetなどのmem系

#include "./divided_cmd_utility.h"
#include "../TlmCmd/block_command_loader.h"
#include "../TlmCmd/block_command_executor.h"
#include "../TlmCmd/command_analyze.h"
#include "../tlm_cmd/block_command_loader.h"
#include "../tlm_cmd/block_command_executor.h"
#include "../tlm_cmd/command_analyze.h"
#include "../library/print.h"
#include "../library/endian.h"
#include "../library/result.h"
#include "../TlmCmd/common_cmd_packet_util.h"
#include <src_user/TlmCmd/block_command_definitions.h>
#include <src_user/TlmCmd/command_definitions.h>
#include <src_user/TlmCmd/telemetry_definitions.h>
#include "../tlm_cmd/common_cmd_packet_util.h"
#include <src_user/tlm_cmd/block_command_definitions.h>
#include <src_user/tlm_cmd/command_definitions.h>
#include <src_user/tlm_cmd/telemetry_definitions.h>

// default 設定
// BC にどの TLM_MGR_BC_ROLE を割り当てるか
Expand Down
10 changes: 5 additions & 5 deletions applications/telemetry_manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#define TELEMETRY_MANAGER_H_

#include "../system/application_manager/app_info.h"
#include "../TlmCmd/common_cmd_packet.h"
#include "../TlmCmd/common_cmd_packet_util.h"
#include "../TlmCmd/block_command_table.h"
#include <src_user/TlmCmd/telemetry_definitions.h>
#include <src_user/Settings/TlmCmd/Ccsds/apid_define.h>
#include "../tlm_cmd/common_cmd_packet.h"
#include "../tlm_cmd/common_cmd_packet_util.h"
#include "../tlm_cmd/block_command_table.h"
#include <src_user/tlm_cmd/telemetry_definitions.h>
#include <src_user/Settings/tlm_cmd/ccsds/apid_define.h>


// 以下がともに 10 であることで, 10 x 10 x cycle で 10 秒周期に最大 100 個の tlm を登録できる.
Expand Down
4 changes: 2 additions & 2 deletions applications/test_app/test_ccp_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

#include "test_ccp_util.h"
#include "../../TlmCmd/common_cmd_packet_util.h"
#include <src_user/TlmCmd/command_definitions.h>
#include "../../tlm_cmd/common_cmd_packet_util.h"
#include <src_user/tlm_cmd/command_definitions.h>

CCP_CmdRet Cmd_TEST_CCP_REGISTER_TLC_ASAP(const CommonCmdPacket* packet)
{
Expand Down
2 changes: 1 addition & 1 deletion applications/test_app/test_ccp_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef TEST_CCP_UTIL_H_
#define TEST_CCP_UTIL_H_

#include "../../TlmCmd/common_cmd_packet.h"
#include "../../tlm_cmd/common_cmd_packet.h"

CCP_CmdRet Cmd_TEST_CCP_REGISTER_TLC_ASAP(const CommonCmdPacket* packet);
CCP_CmdRet Cmd_TEST_CCP_GET_RAW_PARAM_INFO(const CommonCmdPacket* packet);
Expand Down
4 changes: 2 additions & 2 deletions applications/timeline_command_dispatcher.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#pragma section REPRO
#include "timeline_command_dispatcher.h"
#include "../TlmCmd/packet_handler.h"
#include "../tlm_cmd/packet_handler.h"
#include "../system/time_manager/time_manager.h"
#include "../system/event_manager/event_logger.h"
#include "../TlmCmd/common_cmd_packet_util.h"
#include "../tlm_cmd/common_cmd_packet_util.h"
#include "../library/result.h"

#include <string.h> // for memset
Expand Down
6 changes: 3 additions & 3 deletions applications/timeline_command_dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#define TIMELINE_COMMAND_DISPATCHER_H_

#include "timeline_command_dispatcher_id_define.h"
#include "../TlmCmd/command_dispatcher.h"
#include "../TlmCmd/common_cmd_packet.h"
#include "../TlmCmd/packet_handler.h"
#include "../tlm_cmd/command_dispatcher.h"
#include "../tlm_cmd/common_cmd_packet.h"
#include "../tlm_cmd/packet_handler.h"
#include "../system/application_manager/app_info.h"

/**
Expand Down
2 changes: 1 addition & 1 deletion applications/utility_command.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "../hal/uart.h"
#include <src_user/Settings/port_config.h>
#include <string.h> // for memcpy
#include "../TlmCmd/common_cmd_packet_util.h"
#include "../tlm_cmd/common_cmd_packet_util.h"
#include "../library/result.h"


Expand Down
2 changes: 1 addition & 1 deletion applications/utility_command.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// FIXME: このAppは現在管理されていない!
// 使用する前に確認すること

#include "../TlmCmd/common_cmd_packet.h"
#include "../tlm_cmd/common_cmd_packet.h"
#include "../hal/uart.h"
#include "../system/application_manager/app_info.h"

Expand Down
4 changes: 2 additions & 2 deletions applications/utility_counter.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ int UTIL_COUNTER_dummy(void)
}
#if 0

#include "../TlmCmd/packet_handler.h"
#include "../tlm_cmd/packet_handler.h"
#include "../System/AnomalyLogger/anomaly_logger.h"
#include <string.h> // for memcpy
#include "../TlmCmd/common_cmd_packet_util.h"
#include "../tlm_cmd/common_cmd_packet_util.h"
#include "../library/result.h"

static UtilityCounter utility_counter_;
Expand Down
2 changes: 1 addition & 1 deletion applications/utility_counter.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

#include "../system/application_manager/app_info.h"
#include "../System/AnomalyLogger/anomaly_logger.h"
#include "../TlmCmd/common_cmd_packet.h"
#include "../tlm_cmd/common_cmd_packet.h"

// 汎用カウンタ用構造体
typedef enum
Expand Down
8 changes: 4 additions & 4 deletions c2a_core_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
#include "./system/time_manager/time_manager.h"
#include "./system/mode_manager/mode_manager.h"
#include "./system/watchdog_timer/watchdog_timer.h"
#include "./TlmCmd/packet_handler.h"
#include "./TlmCmd/block_command_table.h"
#include "./TlmCmd/command_analyze.h"
#include "./TlmCmd/telemetry_frame.h"
#include "./tlm_cmd/packet_handler.h"
#include "./tlm_cmd/block_command_table.h"
#include "./tlm_cmd/command_analyze.h"
#include "./tlm_cmd/telemetry_frame.h"

#include <src_user/applications/app_registry.h>

Expand Down
4 changes: 2 additions & 2 deletions docs/general/coding_rule.md
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ TlmCmd/NormalBlockCommandDefinition


### Block Command のロード関数の命名
基本的には, [Block Command Loade](https://github.com/arkedge/c2a-core/blob/develop/TlmCmd/block_command_loader.h) を使って定義する.
基本的には, [Block Command Loade](https://github.com/arkedge/c2a-core/blob/develop/tlm_cmd/block_command_loader.h) を使って定義する.
そして,関数名は `BCL_load_hoge(void)' を基本とする.

Block Command は各所で定義されるため, TL, SL に関しては以下のようにする.
Expand All @@ -431,7 +431,7 @@ Settings/Modes/Transitions
-> void BCL_load_sl_hoge(void);
```

例として [Block Command Definitions](https://github.com/arkedge/c2a-core/blob/develop/examples/mobc/src/src_user/TlmCmd/block_command_definitions.c) を参考にすること.
例として [Block Command Definitions](https://github.com/arkedge/c2a-core/blob/develop/examples/mobc/src/src_user/tlm_cmd/block_command_definitions.c) を参考にすること.


## 細かな記法 [M]
Expand Down
Loading