Skip to content

Commit

Permalink
Merge pull request #225 from arkedge/feature/move_space_packet_dir
Browse files Browse the repository at this point in the history
Space Packet 関連ファイルのディレクトリを変更
  • Loading branch information
meltingrabbit committed Nov 30, 2023
2 parents 1b737cc + 66f91ef commit c179702
Show file tree
Hide file tree
Showing 27 changed files with 33 additions and 26 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
- [#193](https://github.com/arkedge/c2a-core/pull/193): VCDU を AOS transfer frame に rename する
- [#197](https://github.com/arkedge/c2a-core/pull/197): M_PDU をコード規約に合わせるなどのリファクタ
- [#222](https://github.com/arkedge/c2a-core/pull/222): Add Section 漏れの修正
- [#225](https://github.com/arkedge/c2a-core/pull/225): CCSDS の Space Packet Protocol に関連するコードのディレクトリを移動

### Migration Guide
- [#193](https://github.com/arkedge/c2a-core/pull/193): 影響範囲は MOBC のみ
Expand All @@ -23,6 +24,12 @@
1. `m_pdu.h``multiplexing_protocol_data_unit.h` に置換する(include の修正).
1. コンパイルが通らないところを直す.想定されるものは以下.
- `M_PDU` 構造体 が `MultiplexingProtocolDataUnit` 構造体に変わったので,変数定義の型名が変わっているはず.
- [#225](https://github.com/arkedge/c2a-core/pull/225)
1. コンパイルが通るように,以下の include の修正を行う.
- `#include <src_core/tlm_cmd/ccsds/space_packet.h>` -> `#include <src_core/tlm_cmd/ccsds/space_packet_protocol/space_packet.h>`
- `#include <src_core/tlm_cmd/ccsds/space_packet_typedef.h>` -> `#include <src_core/tlm_cmd/ccsds/space_packet_protocol/space_packet_typedef.h>`
- `#include <src_core/tlm_cmd/ccsds/tlm_space_packet.h>` -> `#include <src_core/tlm_cmd/ccsds/space_packet_protocol/tlm_space_packet.h>`
- `#include <src_core/tlm_cmd/ccsds/cmd_space_packet.h>` -> `#include <src_core/tlm_cmd/ccsds/space_packet_protocol/cmd_space_packet.h>`

## v4.0.1 (2023-11-09)

Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ set(C2A_SRCS
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
tlm_cmd/ccsds/space_packet_protocol/cmd_space_packet.c
tlm_cmd/ccsds/space_packet_protocol/space_packet.c
tlm_cmd/ccsds/space_packet_protocol/tlm_space_packet.c
)

if(C2A_USE_STDINT_WRAPPER)
Expand Down
2 changes: 1 addition & 1 deletion examples/mobc/src/src_user/component_driver/com/gs.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "../../tlm_cmd/ccsds/tc_transfer_frame.h"
#include <src_core/component_driver/driver_super.h>
#include <src_core/tlm_cmd/packet_handler.h>
#include <src_core/tlm_cmd/ccsds/space_packet_typedef.h>
#include <src_core/tlm_cmd/ccsds/space_packet_protocol/space_packet_typedef.h>


#define GS_RX_HEADER_SIZE (2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "gs_validate.h"
#include "../../tlm_cmd/ccsds/tc_segment.h"
#include <src_core/tlm_cmd/ccsds/space_packet_typedef.h>
#include <src_core/tlm_cmd/ccsds/space_packet_protocol/space_packet_typedef.h>

#define GS_RECEIVE_WINDOW (256)
#define GS_POSITIVE_WINDOW_WIDTH_DEFAULT (64) // FIXME: 要検討
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef COMMON_CMD_PACKET_DEFINE_H_
#define COMMON_CMD_PACKET_DEFINE_H_

#include <src_core/tlm_cmd/ccsds/space_packet_typedef.h>
#include <src_core/tlm_cmd/ccsds/space_packet_protocol/space_packet_typedef.h>
#include "./ccsds/apid_define.h"

// CommonCmdPacket として CmdSpacePacket をつかう
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef COMMON_TLM_CMD_PACKET_DEFINE_H_
#define COMMON_TLM_CMD_PACKET_DEFINE_H_

#include <src_core/tlm_cmd/ccsds/space_packet_typedef.h>
#include <src_core/tlm_cmd/ccsds/space_packet_protocol/space_packet_typedef.h>

// CommonTlmCmdPacket として SpacePacket をつかう
typedef SpacePacket CommonTlmCmdPacket;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef COMMON_TLM_PACKET_DEFINE_H_
#define COMMON_TLM_PACKET_DEFINE_H_

#include <src_core/tlm_cmd/ccsds/space_packet_typedef.h>
#include <src_core/tlm_cmd/ccsds/space_packet_protocol/space_packet_typedef.h>
#include "./ccsds/apid_define.h"

// CommonTlmPacket として TlmSpacePacket をつかう
Expand Down
2 changes: 1 addition & 1 deletion examples/mobc/src/src_user/tlm_cmd/ccsds/tc_segment.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define TC_SEGMENT_H_

#include <stdint.h>
#include <src_core/tlm_cmd/ccsds/cmd_space_packet.h>
#include <src_core/tlm_cmd/ccsds/space_packet_protocol/cmd_space_packet.h>
#include <src_user/settings/tlm_cmd/ccsds/space_packet_typedef_params.h>

#define TCS_HEADER_SIZE (1)
Expand Down
2 changes: 1 addition & 1 deletion examples/mobc/src/src_user/tlm_cmd/ccsds/tcp_to_m_pdu.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "tcp_to_m_pdu.h"
// FIXME: CTP ではなく TSP を使ってしまっている.できれば抽象化するべき
#include <src_core/tlm_cmd/ccsds/tlm_space_packet.h>
#include <src_core/tlm_cmd/ccsds/space_packet_protocol/tlm_space_packet.h>

void T2M_initialize(TcpToMPdu* tcp_to_m_pdu)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/mobc/src/src_user/tlm_cmd/common_cmd_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @note CCP: CommonCmdPacket
*/
#include <src_core/tlm_cmd/common_cmd_packet.h>
#include <src_core/tlm_cmd/ccsds/cmd_space_packet.h>
#include <src_core/tlm_cmd/ccsds/space_packet_protocol/cmd_space_packet.h>
#include <string.h>


Expand Down
2 changes: 1 addition & 1 deletion examples/mobc/src/src_user/tlm_cmd/common_tlm_cmd_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @note CCP: CommonCmdPacket
*/
#include <src_core/tlm_cmd/common_tlm_cmd_packet.h>
#include <src_core/tlm_cmd/ccsds/space_packet.h>
#include <src_core/tlm_cmd/ccsds/space_packet_protocol/space_packet.h>
#include <string.h>


Expand Down
2 changes: 1 addition & 1 deletion examples/mobc/src/src_user/tlm_cmd/common_tlm_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @note CTP: CommonTlmPacket
*/
#include <src_core/tlm_cmd/common_tlm_packet.h>
#include <src_core/tlm_cmd/ccsds/tlm_space_packet.h>
#include <src_core/tlm_cmd/ccsds/space_packet_protocol/tlm_space_packet.h>
#include <src_core/system/time_manager/time_manager.h>
#include <string.h>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef COMMON_CMD_PACKET_DEFINE_H_
#define COMMON_CMD_PACKET_DEFINE_H_

#include <src_core/tlm_cmd/ccsds/space_packet_typedef.h>
#include <src_core/tlm_cmd/ccsds/space_packet_protocol/space_packet_typedef.h>
#include "./ccsds/apid_define.h"

// CommonCmdPacket として CmdSpacePacket をつかう
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef COMMON_TLM_CMD_PACKET_DEFINE_H_
#define COMMON_TLM_CMD_PACKET_DEFINE_H_

#include <src_core/tlm_cmd/ccsds/space_packet_typedef.h>
#include <src_core/tlm_cmd/ccsds/space_packet_protocol/space_packet_typedef.h>

// CommonTlmCmdPacket として SpacePacket をつかう
typedef SpacePacket CommonTlmCmdPacket;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#ifndef COMMON_TLM_PACKET_DEFINE_H_
#define COMMON_TLM_PACKET_DEFINE_H_

#include <src_core/tlm_cmd/ccsds/space_packet_typedef.h>
#include <src_core/tlm_cmd/ccsds/space_packet_protocol/space_packet_typedef.h>
#include "./ccsds/apid_define.h"

// CommonTlmPacket として TlmSpacePacket をつかう
Expand Down
2 changes: 1 addition & 1 deletion examples/subobc/src/src_user/tlm_cmd/common_cmd_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @note CCP: CommonCmdPacket
*/
#include <src_core/tlm_cmd/common_cmd_packet.h>
#include <src_core/tlm_cmd/ccsds/cmd_space_packet.h>
#include <src_core/tlm_cmd/ccsds/space_packet_protocol/cmd_space_packet.h>
#include <string.h>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @note CCP: CommonCmdPacket
*/
#include <src_core/tlm_cmd/common_tlm_cmd_packet.h>
#include <src_core/tlm_cmd/ccsds/space_packet.h>
#include <src_core/tlm_cmd/ccsds/space_packet_protocol/space_packet.h>
#include <string.h>


Expand Down
2 changes: 1 addition & 1 deletion examples/subobc/src/src_user/tlm_cmd/common_tlm_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @note CTP: CommonTlmPacket
*/
#include <src_core/tlm_cmd/common_tlm_packet.h>
#include <src_core/tlm_cmd/ccsds/tlm_space_packet.h>
#include <src_core/tlm_cmd/ccsds/space_packet_protocol/tlm_space_packet.h>
#include <string.h>


Expand Down
4 changes: 2 additions & 2 deletions tlm_cmd/block_command_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#include "common_cmd_packet_util.h"

// FIXME: この include は依存的にダメなので, TCP → Space Packet 大工事が終わったら直す
#include "./ccsds/space_packet.h"
#include "./ccsds/cmd_space_packet.h"
#include "./ccsds/space_packet_protocol/space_packet.h"
#include "./ccsds/space_packet_protocol/cmd_space_packet.h"

static BlockCommandTable block_command_table_;
const BlockCommandTable* const block_command_table = &block_command_table_;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ typedef enum
#include <stdint.h>
#include "space_packet_typedef.h"
#include "space_packet.h"
#include "../common_cmd_packet.h"
#include "../../common_cmd_packet.h"

#if CSP_MAX_LEN <= SP_PRM_HDR_LEN
#error CSP_MAX_LEN is too small
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* @note 詳細は space_packet.h を参照
*/
#include "space_packet.h"
#include "../../library/endian.h"
#include "../../../library/endian.h"
#include <string.h>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

#include <stdint.h>
#include "space_packet_typedef.h"
#include "../common_tlm_cmd_packet.h"
#include "../../common_tlm_cmd_packet.h"

#define SP_PRM_HDR_LEN (6) //!< Packet Primary Header 長

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ typedef enum
#include <stdint.h>
#include "space_packet_typedef.h"
#include "space_packet.h"
#include "../common_tlm_packet.h"
#include "../../common_tlm_packet.h"

#if TSP_MAX_LEN <= SP_PRM_HDR_LEN
#error TSP_MAX_LEN is too small
Expand Down
2 changes: 1 addition & 1 deletion tlm_cmd/telemetry_generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include <src_user/tlm_cmd/telemetry_definitions.h>
#include <src_user/tlm_cmd/user_packet_handler.h>
#include <src_user/settings/tlm_cmd/common_tlm_packet_define.h>
#include "./ccsds/tlm_space_packet.h" // FIXME: TSP 依存性はNGなので, TCP → SP 大工事終わったら直す
#include "./ccsds/space_packet_protocol/tlm_space_packet.h" // FIXME: TSP 依存性はNGなので, TCP → SP 大工事終わったら直す


/**
Expand Down

0 comments on commit c179702

Please sign in to comment.