From 206966b36d2d8b3cae1244cd44ba88f6ba15890e Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Wed, 8 Nov 2023 19:12:00 +0900 Subject: [PATCH 1/9] rename filename from vcdu to aos_transfer_frame --- examples/mobc/src/src_user/tlm_cmd/CMakeLists.txt | 2 +- .../src/src_user/tlm_cmd/ccsds/{vcdu.c => aos_transfer_frame.c} | 0 .../src/src_user/tlm_cmd/ccsds/{vcdu.h => aos_transfer_frame.h} | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename examples/mobc/src/src_user/tlm_cmd/ccsds/{vcdu.c => aos_transfer_frame.c} (100%) rename examples/mobc/src/src_user/tlm_cmd/ccsds/{vcdu.h => aos_transfer_frame.h} (100%) diff --git a/examples/mobc/src/src_user/tlm_cmd/CMakeLists.txt b/examples/mobc/src/src_user/tlm_cmd/CMakeLists.txt index c7cd1b93..a88e26e8 100644 --- a/examples/mobc/src/src_user/tlm_cmd/CMakeLists.txt +++ b/examples/mobc/src/src_user/tlm_cmd/CMakeLists.txt @@ -14,11 +14,11 @@ set(C2A_SRCS normal_block_command_definition/nbc_start_hk_tlm.c normal_block_command_definition/nbc_respond_eh_for_test.c normal_block_command_definition/nbc_test_bcl.c + ccsds/aos_transfer_frame.c ccsds/m_pdu.c ccsds/tc_transfer_frame.c ccsds/tcp_to_m_pdu.c ccsds/tc_segment.c - ccsds/vcdu.c ) if(C2A_BUILD_AS_CXX) diff --git a/examples/mobc/src/src_user/tlm_cmd/ccsds/vcdu.c b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c similarity index 100% rename from examples/mobc/src/src_user/tlm_cmd/ccsds/vcdu.c rename to examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c diff --git a/examples/mobc/src/src_user/tlm_cmd/ccsds/vcdu.h b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h similarity index 100% rename from examples/mobc/src/src_user/tlm_cmd/ccsds/vcdu.h rename to examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h From 2ea7e2f268e04608c8e03a44347b5e741d91b5e6 Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Wed, 8 Nov 2023 19:22:46 +0900 Subject: [PATCH 2/9] sed VCDU to AOSTF --- applications/memory_dump.c | 6 +- .../applications/component_service/csrv_gs.c | 20 ++-- .../applications/component_service/csrv_gs.h | 4 +- .../src/src_user/component_driver/com/gs.c | 22 ++-- .../src/src_user/component_driver/com/gs.h | 12 +- .../tlm_cmd/ccsds/aos_transfer_frame.c | 110 +++++++++--------- .../tlm_cmd/ccsds/aos_transfer_frame.h | 92 +++++++-------- .../src/src_user/tlm_cmd/ccsds/tcp_to_m_pdu.c | 2 +- .../CMD_DB/SAMPLE_MOBC_CMD_DB_CMD_DB.csv | 4 +- .../TLM_DB/SAMPLE_MOBC_TLM_DB_GS.csv | 16 +-- .../TLM_DB/SAMPLE_MOBC_TLM_DB_MOBC.csv | 4 +- .../calced_data/SAMPLE_MOBC_TLM_DB_GS.csv | 16 +-- .../calced_data/SAMPLE_MOBC_TLM_DB_MOBC.csv | 4 +- tlm_cmd/ccsds/space_packet_typedef.h | 2 +- tlm_cmd/telemetry_generator.c | 4 +- 15 files changed, 159 insertions(+), 159 deletions(-) diff --git a/applications/memory_dump.c b/applications/memory_dump.c index 4063eacf..d1187abc 100644 --- a/applications/memory_dump.c +++ b/applications/memory_dump.c @@ -110,7 +110,7 @@ CCP_CmdRet Cmd_MEM_DUMP_REGION_SEQ(const CommonCmdPacket* packet) if (num_dumps >= 8) { // パケット生成回数の上限は8回とする。 - // 32kbpsでのDL時に8VCDU/secで1秒分の通信量。 + // 32kbpsでのDL時に8AOSTF/secで1秒分の通信量。 // これを超える場合は複数回コマンドを送信して対応する。 return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } @@ -132,7 +132,7 @@ CCP_CmdRet Cmd_MEM_DUMP_REGION_RND(const CommonCmdPacket* packet) if (num_dumps >= 8) { // パケット生成回数の上限は8回とする。 - // 32kbpsでのDL時に8VCDU/secで1秒分の通信量。 + // 32kbpsでのDL時に8AOSTF/secで1秒分の通信量。 // これを超える場合は複数回コマンドを送信して対応する。 return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } @@ -170,7 +170,7 @@ CCP_CmdRet Cmd_MEM_DUMP_SINGLE(const CommonCmdPacket* packet) if (num_dumps >= 8) { // パケット生成回数の上限は8回とする。 - // 32kbpsでのDL時に8VCDU/secで1秒分の通信量。 + // 32kbpsでのDL時に8AOSTF/secで1秒分の通信量。 // これを超える場合は複数回コマンドを送信して対応する。 return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } diff --git a/examples/mobc/src/src_user/applications/component_service/csrv_gs.c b/examples/mobc/src/src_user/applications/component_service/csrv_gs.c index 40a9e617..d4bda326 100644 --- a/examples/mobc/src/src_user/applications/component_service/csrv_gs.c +++ b/examples/mobc/src/src_user/applications/component_service/csrv_gs.c @@ -126,17 +126,17 @@ static RESULT CSRV_GS_rt_tlm_packet_handler_app_(void) &CSRV_GS_rt_tlm_packet_handler_.vcdu.m_pdu); if (ack != T2M_SUCCESS) return RESULT_OK; - // Realtime VCDU カウンタの設定 - VCDU_setup_realtime_vcdu_hdr(&CSRV_GS_rt_tlm_packet_handler_.vcdu, CSRV_GS_rt_tlm_packet_handler_.vcdu_counter); - CSRV_GS_rt_tlm_packet_handler_.vcdu_counter = VCDU_calc_next_counter(CSRV_GS_rt_tlm_packet_handler_.vcdu_counter); + // Realtime AOSTF カウンタの設定 + AOSTF_setup_realtime_vcdu_hdr(&CSRV_GS_rt_tlm_packet_handler_.vcdu, CSRV_GS_rt_tlm_packet_handler_.vcdu_counter); + CSRV_GS_rt_tlm_packet_handler_.vcdu_counter = AOSTF_calc_next_counter(CSRV_GS_rt_tlm_packet_handler_.vcdu_counter); // CLCW の設定 // CMD の VCID と TLM の VCID は独立で関係がない // TLM の VCID 種別(Realtime, Replay)によらず CLCW を設定して良い // CLCW が対応する CMD の VCID は CLCW の内部で指定される - VCDU_set_clcw(&CSRV_GS_rt_tlm_packet_handler_.vcdu, GS_form_clcw()); + AOSTF_set_clcw(&CSRV_GS_rt_tlm_packet_handler_.vcdu, GS_form_clcw()); - // 完成した VCDU を RT VCDU として送出 + // 完成した AOSTF を RT AOSTF として送出 GS_send_vcdu(&gs_driver_, &CSRV_GS_rt_tlm_packet_handler_.vcdu); } @@ -161,17 +161,17 @@ static RESULT CSRV_GS_rp_tlm_packet_handler_app_(void) &CSRV_GS_rp_tlm_packet_handler_.vcdu.m_pdu); if (ack != T2M_SUCCESS) return RESULT_OK; - // Replay VCDU カウンタの設定 - VCDU_setup_replay_vcdu_hdr(&CSRV_GS_rp_tlm_packet_handler_.vcdu, CSRV_GS_rp_tlm_packet_handler_.vcdu_counter); - CSRV_GS_rp_tlm_packet_handler_.vcdu_counter = VCDU_calc_next_counter(CSRV_GS_rp_tlm_packet_handler_.vcdu_counter); + // Replay AOSTF カウンタの設定 + AOSTF_setup_replay_vcdu_hdr(&CSRV_GS_rp_tlm_packet_handler_.vcdu, CSRV_GS_rp_tlm_packet_handler_.vcdu_counter); + CSRV_GS_rp_tlm_packet_handler_.vcdu_counter = AOSTF_calc_next_counter(CSRV_GS_rp_tlm_packet_handler_.vcdu_counter); // CLCW の設定 // CMD の VCIDと TLM の VCID は独立で関係がない // TLM の VCID 種別(Realtime, Replay) によらず CLCW を設定して良い // CLCW が対応する CMD の VCID は CLCW の内部で指定される - VCDU_set_clcw(&CSRV_GS_rp_tlm_packet_handler_.vcdu, GS_form_clcw()); + AOSTF_set_clcw(&CSRV_GS_rp_tlm_packet_handler_.vcdu, GS_form_clcw()); - // 完成した VCDU を RP VCDU として送出 + // 完成した AOSTF を RP AOSTF として送出 GS_send_vcdu(&gs_driver_, &CSRV_GS_rp_tlm_packet_handler_.vcdu); } diff --git a/examples/mobc/src/src_user/applications/component_service/csrv_gs.h b/examples/mobc/src/src_user/applications/component_service/csrv_gs.h index 448103ee..249783b5 100644 --- a/examples/mobc/src/src_user/applications/component_service/csrv_gs.h +++ b/examples/mobc/src/src_user/applications/component_service/csrv_gs.h @@ -19,8 +19,8 @@ typedef struct { TcpToMPdu tc_packet_to_m_pdu; //!< PL から取り出した tc_packet を M_PDU に変換する - VCDU vcdu; //!< 送信するVCDU - uint32_t vcdu_counter; //!< VCDU counter + AOSTF vcdu; //!< 送信するAOSTF + uint32_t vcdu_counter; //!< AOSTF counter } CSRV_GS_TlmPacketHandler; extern const GS_Driver* const gs_driver; diff --git a/examples/mobc/src/src_user/component_driver/com/gs.c b/examples/mobc/src/src_user/component_driver/com/gs.c index 52bdcdb0..14a0bd86 100644 --- a/examples/mobc/src/src_user/component_driver/com/gs.c +++ b/examples/mobc/src/src_user/component_driver/com/gs.c @@ -26,7 +26,7 @@ // それぞれ AD, BD, BC static uint8_t GS_rx_header_[GS_RX_HEADER_NUM][GS_RX_HEADER_SIZE]; -static uint8_t GS_tx_frame_[VCDU_LEN]; +static uint8_t GS_tx_frame_[AOSTF_LEN]; /** * @brief CCSDS 側 Driver の DS 上での初期化設定 @@ -114,7 +114,7 @@ CDS_INIT_ERR_CODE GS_init(GS_Driver* gs_driver, gs_driver->info[i].rx.tctf.bd_rec_status = GS_VALIDATE_ERR_OK; gs_driver->info[i].tx.send_cycle = 0; - gs_driver->info[i].tx.vcid = VCDU_VCID_UNKNOWN; + gs_driver->info[i].tx.vcid = AOSTF_VCID_UNKNOWN; gs_driver->info[i].tx.vcdu_counter = 0; } @@ -152,7 +152,7 @@ static void GS_load_default_driver_super_init_settings_(ComponentDriverSuper* p_ CDSSC_enable_strict_frame_search(p_stream_config); // 複数ストリームがあり,かつ論理的な受信漏れを0にするため. CDSSC_set_tx_frame(p_stream_config, GS_tx_frame_); // 全 stream, uart, ccsds に関わらず共通 - CDSSC_set_tx_frame_size(p_stream_config, VCDU_LEN); // VCDU を送信 + CDSSC_set_tx_frame_size(p_stream_config, AOSTF_LEN); // AOSTF を送信 CDSSC_set_rx_header(p_stream_config, GS_rx_header_[stream], GS_RX_HEADER_SIZE); CDSSC_set_rx_frame_size(p_stream_config, -1); // 可変長 @@ -254,21 +254,21 @@ static CDS_ERR_CODE GS_analyze_rec_data_(CDS_StreamConfig* p_stream_config, void return CDS_ERR_CODE_OK; } -CDS_CMD_ERR_CODE GS_send_vcdu(GS_Driver* gs_driver, const VCDU* vcdu) +CDS_CMD_ERR_CODE GS_send_vcdu(GS_Driver* gs_driver, const AOSTF* vcdu) { CDS_ERR_CODE ret_ccsds = CDS_ERR_CODE_OK; CDS_ERR_CODE ret_uart = CDS_ERR_CODE_OK; - size_t vcdu_size = sizeof(VCDU); + size_t vcdu_size = sizeof(AOSTF); // パディングが無ければ元を GS_tx_frame_ にコピーさせる (444Byte) のコピーが無駄 - if (vcdu_size == VCDU_LEN) + if (vcdu_size == AOSTF_LEN) { CDSSC_set_tx_frame(&gs_driver->driver_ccsds.super.stream_config[GS_TX_STREAM], (uint8_t*)vcdu); CDSSC_set_tx_frame(&gs_driver->driver_uart.super.stream_config[GS_TX_STREAM], (uint8_t*)vcdu); } else { - VCDU_generate_byte_stream(vcdu, GS_tx_frame_); // 送信元にセット 消したいなぁ... + AOSTF_generate_byte_stream(vcdu, GS_tx_frame_); // 送信元にセット 消したいなぁ... CDSSC_set_tx_frame(&gs_driver->driver_ccsds.super.stream_config[GS_TX_STREAM], GS_tx_frame_); CDSSC_set_tx_frame(&gs_driver->driver_uart.super.stream_config[GS_TX_STREAM], GS_tx_frame_); } @@ -278,8 +278,8 @@ CDS_CMD_ERR_CODE GS_send_vcdu(GS_Driver* gs_driver, const VCDU* vcdu) if (gs_driver->ccsds_info.buffer_num) { gs_driver->info[GS_PORT_TYPE_CCSDS].tx.send_cycle = TMGR_get_master_total_cycle(); - gs_driver->info[GS_PORT_TYPE_CCSDS].tx.vcid = VCDU_get_vcid(vcdu); - gs_driver->info[GS_PORT_TYPE_CCSDS].tx.vcdu_counter = VCDU_get_vcdu_counter(vcdu); + gs_driver->info[GS_PORT_TYPE_CCSDS].tx.vcid = AOSTF_get_vcid(vcdu); + gs_driver->info[GS_PORT_TYPE_CCSDS].tx.vcdu_counter = AOSTF_get_vcdu_counter(vcdu); // DS 側の名称が cmd なだけで送信しているのは TLM ret_ccsds = CDS_send_general_cmd(&gs_driver->driver_ccsds.super, GS_TX_STREAM); @@ -289,8 +289,8 @@ CDS_CMD_ERR_CODE GS_send_vcdu(GS_Driver* gs_driver, const VCDU* vcdu) if (gs_driver->driver_uart.is_tlm_on) { gs_driver->info[GS_PORT_TYPE_UART].tx.send_cycle = TMGR_get_master_total_cycle(); - gs_driver->info[GS_PORT_TYPE_UART].tx.vcid = VCDU_get_vcid(vcdu); - gs_driver->info[GS_PORT_TYPE_UART].tx.vcdu_counter = VCDU_get_vcdu_counter(vcdu); + gs_driver->info[GS_PORT_TYPE_UART].tx.vcid = AOSTF_get_vcid(vcdu); + gs_driver->info[GS_PORT_TYPE_UART].tx.vcdu_counter = AOSTF_get_vcdu_counter(vcdu); // DS 側の名称が cmd なだけで送信しているのは TLM ret_uart = CDS_send_general_cmd(&gs_driver->driver_uart.super, GS_TX_STREAM); diff --git a/examples/mobc/src/src_user/component_driver/com/gs.h b/examples/mobc/src/src_user/component_driver/com/gs.h index 614e3877..fa4c7b69 100644 --- a/examples/mobc/src/src_user/component_driver/com/gs.h +++ b/examples/mobc/src/src_user/component_driver/com/gs.h @@ -53,8 +53,8 @@ typedef struct struct { cycle_t send_cycle; //!< 最後に送信したときの時刻 - VCDU_VCID vcid; //!< 送信した TLM のタイプ - uint32_t vcdu_counter; //!< VCDU counter + AOSTF_VCID vcid; //!< 送信した TLM のタイプ + uint32_t vcdu_counter; //!< AOSTF counter } tx; } GS_Info; @@ -106,13 +106,13 @@ CDS_INIT_ERR_CODE GS_init(GS_Driver* gs_driver, CDS_REC_ERR_CODE GS_rec_tctf(GS_Driver* gs_driver); /** - * @brief 地上に向けて TLM を送信. 形式は VCDU + * @brief 地上に向けて TLM を送信. 形式は AOSTF * @note CDS_send_general_cmd が使われているが, これは DS は MOBC コンポ間を想定しているため, MOBC から見るとコンポに cmd を送信している様に見える, が 今回は MOBC から地上に TLM を送信している - * @note TLM 送信, 形式は VCDU + * @note TLM 送信, 形式は AOSTF * @param[in] gs_driver: ドライバー - * @param[in] vcdu: 送信する VCDU. 場合によってはそのまま DS に渡すので, local変数ではなくstaticな変数を渡すこと + * @param[in] vcdu: 送信する AOSTF. 場合によってはそのまま DS に渡すので, local変数ではなくstaticな変数を渡すこと * @return CDS_CMD_ERR_CODE: 送信結果 */ -CDS_CMD_ERR_CODE GS_send_vcdu(GS_Driver* gs_driver, const VCDU* vcdu); +CDS_CMD_ERR_CODE GS_send_vcdu(GS_Driver* gs_driver, const AOSTF* vcdu); #endif diff --git a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c index f5092498..7d63e00a 100644 --- a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c +++ b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c @@ -3,54 +3,54 @@ #include // for memcpy -static void VCDU_set_common_hdr_(VCDU* vcdu); -static void VCDU_clear_spare_(VCDU* vcdu); +static void AOSTF_set_common_hdr_(AOSTF* vcdu); +static void AOSTF_clear_spare_(AOSTF* vcdu); -void VCDU_generate_byte_stream(const VCDU* vcdu, - uint8_t byte_stream[VCDU_LEN]) +void AOSTF_generate_byte_stream(const AOSTF* vcdu, + uint8_t byte_stream[AOSTF_LEN]) { - memcpy(byte_stream, vcdu->header, VCDU_HEADER_SIZE); - byte_stream += VCDU_HEADER_SIZE; + memcpy(byte_stream, vcdu->header, AOSTF_HEADER_SIZE); + byte_stream += AOSTF_HEADER_SIZE; M_PDU_generate_byte_stream(&(vcdu->m_pdu), byte_stream); byte_stream += M_PDU_LEN; - memcpy(byte_stream, vcdu->trailer, VCDU_TRAILER_SIZE); + memcpy(byte_stream, vcdu->trailer, AOSTF_TRAILER_SIZE); } -void VCDU_setup_fill_vcdu(VCDU* vcdu) +void AOSTF_setup_fill_vcdu(AOSTF* vcdu) { - VCDU_set_common_hdr_(vcdu); - VCDU_set_vcid(vcdu, VCDU_VCID_FILL); + AOSTF_set_common_hdr_(vcdu); + AOSTF_set_vcid(vcdu, AOSTF_VCID_FILL); M_PDU_setup_idle_m_pdu(&(vcdu->m_pdu)); } -void VCDU_setup_realtime_vcdu_hdr(VCDU* vcdu, +void AOSTF_setup_realtime_vcdu_hdr(AOSTF* vcdu, uint32_t counter) { - VCDU_set_common_hdr_(vcdu); - VCDU_set_vcid(vcdu, VCDU_VCID_REALTIME); - VCDU_set_vcdu_counter(vcdu, counter); + AOSTF_set_common_hdr_(vcdu); + AOSTF_set_vcid(vcdu, AOSTF_VCID_REALTIME); + AOSTF_set_vcdu_counter(vcdu, counter); } -void VCDU_setup_replay_vcdu_hdr(VCDU* vcdu, +void AOSTF_setup_replay_vcdu_hdr(AOSTF* vcdu, uint32_t counter) { - VCDU_set_common_hdr_(vcdu); - VCDU_set_replay_flag(vcdu, VCDU_REPLAY_TRUE); - VCDU_set_vcid(vcdu, VCDU_VCID_REPLAY); - VCDU_set_vcdu_counter(vcdu, counter); + AOSTF_set_common_hdr_(vcdu); + AOSTF_set_replay_flag(vcdu, AOSTF_REPLAY_TRUE); + AOSTF_set_vcid(vcdu, AOSTF_VCID_REPLAY); + AOSTF_set_vcdu_counter(vcdu, counter); } -static void VCDU_set_common_hdr_(VCDU* vcdu) +static void AOSTF_set_common_hdr_(AOSTF* vcdu) { - VCDU_set_ver(vcdu, VCDU_VER_2); - VCDU_set_scid(vcdu, VCDU_SCID_SAMPLE_SATELLITE); // FIXME: 仮 - VCDU_set_replay_flag(vcdu, VCDU_REPLAY_FALSE); - VCDU_clear_spare_(vcdu); + AOSTF_set_ver(vcdu, AOSTF_VER_2); + AOSTF_set_scid(vcdu, AOSTF_SCID_SAMPLE_SATELLITE); // FIXME: 仮 + AOSTF_set_replay_flag(vcdu, AOSTF_REPLAY_FALSE); + AOSTF_clear_spare_(vcdu); } -static void VCDU_clear_spare_(VCDU* vcdu) +static void AOSTF_clear_spare_(AOSTF* vcdu) { unsigned int pos = 5; uint8_t mask = 0x7f; // 01111111b @@ -58,25 +58,25 @@ static void VCDU_clear_spare_(VCDU* vcdu) vcdu->header[pos] &= (uint8_t)(~mask); } -VCDU_VER VCDU_get_ver(const VCDU* vcdu) +AOSTF_VER AOSTF_get_ver(const AOSTF* vcdu) { unsigned int pos = 0; uint8_t mask = 0xc0; // 11000000b - VCDU_VER ver = (VCDU_VER)((vcdu->header[pos] & mask) >> 6); + AOSTF_VER ver = (AOSTF_VER)((vcdu->header[pos] & mask) >> 6); switch (ver) { - case VCDU_VER_2: + case AOSTF_VER_2: return ver; default: - return VCDU_VER_UNKNOWN; + return AOSTF_VER_UNKNOWN; } } -void VCDU_set_ver(VCDU* vcdu, - VCDU_VER ver) +void AOSTF_set_ver(AOSTF* vcdu, + AOSTF_VER ver) { unsigned int pos = 0; uint8_t mask = 0xc0; // 11000000b @@ -86,7 +86,7 @@ void VCDU_set_ver(VCDU* vcdu, vcdu->header[pos] |= val; } -VCDU_SCID VCDU_get_scdi(const VCDU* vcdu) +AOSTF_SCID AOSTF_get_scdi(const AOSTF* vcdu) { unsigned int pos = 0; uint8_t mask1 = 0x3f; // 00111111b @@ -98,16 +98,16 @@ VCDU_SCID VCDU_get_scdi(const VCDU* vcdu) switch (scid) { - case VCDU_SCID_SAMPLE_SATELLITE: - return (VCDU_SCID)scid; + case AOSTF_SCID_SAMPLE_SATELLITE: + return (AOSTF_SCID)scid; default: - return VCDU_SCID_UNKNOWN; + return AOSTF_SCID_UNKNOWN; } } -void VCDU_set_scid(VCDU* vcdu, - VCDU_SCID scid) +void AOSTF_set_scid(AOSTF* vcdu, + AOSTF_SCID scid) { unsigned int pos = 0; uint8_t mask1 = 0x3f; // 00111111b @@ -119,27 +119,27 @@ void VCDU_set_scid(VCDU* vcdu, vcdu->header[pos + 1] |= (uint8_t)((scid << 6) & mask2); } -VCDU_VCID VCDU_get_vcid(const VCDU* vcdu) +AOSTF_VCID AOSTF_get_vcid(const AOSTF* vcdu) { unsigned int pos = 1; uint8_t mask = 0x3f; // 00111111b - VCDU_VCID vcid = (VCDU_VCID)(vcdu->header[pos] & mask); + AOSTF_VCID vcid = (AOSTF_VCID)(vcdu->header[pos] & mask); switch (vcid) { - case VCDU_VCID_REALTIME: // FALLTHROUGH - case VCDU_VCID_REPLAY: // FALLTHROUGH - case VCDU_VCID_FILL: // FALLTHROUGH + case AOSTF_VCID_REALTIME: // FALLTHROUGH + case AOSTF_VCID_REPLAY: // FALLTHROUGH + case AOSTF_VCID_FILL: // FALLTHROUGH return vcid; default: - return VCDU_VCID_UNKNOWN; + return AOSTF_VCID_UNKNOWN; } } -void VCDU_set_vcid(VCDU* vcdu, - VCDU_VCID vcid) +void AOSTF_set_vcid(AOSTF* vcdu, + AOSTF_VCID vcid) { unsigned int pos = 1; uint8_t mask = 0x3f; // 00111111b @@ -148,7 +148,7 @@ void VCDU_set_vcid(VCDU* vcdu, vcdu->header[pos] |= (uint8_t)(vcid & mask); } -uint32_t VCDU_get_vcdu_counter(const VCDU* vcdu) +uint32_t AOSTF_get_vcdu_counter(const AOSTF* vcdu) { unsigned int pos = 2; @@ -161,7 +161,7 @@ uint32_t VCDU_get_vcdu_counter(const VCDU* vcdu) return counter; } -void VCDU_set_vcdu_counter(VCDU* vcdu, +void AOSTF_set_vcdu_counter(AOSTF* vcdu, uint32_t counter) { unsigned int pos = 2; @@ -171,16 +171,16 @@ void VCDU_set_vcdu_counter(VCDU* vcdu, vcdu->header[pos + 2] = (uint8_t)(counter & 0xff); } -VCDU_REPLAY_FLAG VCDU_get_replay_flag(const VCDU* vcdu) +AOSTF_REPLAY_FLAG AOSTF_get_replay_flag(const AOSTF* vcdu) { unsigned int pos = 5; uint8_t mask = 0x80; // 10000000b - return (VCDU_REPLAY_FLAG)((vcdu->header[pos] & mask) >> 7); + return (AOSTF_REPLAY_FLAG)((vcdu->header[pos] & mask) >> 7); } -void VCDU_set_replay_flag(VCDU* vcdu, - VCDU_REPLAY_FLAG flag) +void AOSTF_set_replay_flag(AOSTF* vcdu, + AOSTF_REPLAY_FLAG flag) { unsigned int pos = 5; uint8_t mask = 0x80; // 10000000b @@ -189,7 +189,7 @@ void VCDU_set_replay_flag(VCDU* vcdu, vcdu->header[pos] |= (uint8_t)((flag << 7) & mask); } -uint32_t VCDU_get_clcw(const VCDU* vcdu) +uint32_t AOSTF_get_clcw(const AOSTF* vcdu) { unsigned int pos = 0; @@ -204,7 +204,7 @@ uint32_t VCDU_get_clcw(const VCDU* vcdu) return clcw; } -void VCDU_set_clcw(VCDU* vcdu, +void AOSTF_set_clcw(AOSTF* vcdu, uint32_t clcw) { unsigned int pos = 0; @@ -215,8 +215,8 @@ void VCDU_set_clcw(VCDU* vcdu, vcdu->trailer[pos + 3] = (uint8_t)(clcw & 0xff); } -uint32_t VCDU_calc_next_counter(uint32_t prev) +uint32_t AOSTF_calc_next_counter(uint32_t prev) { - return (prev + 1) % VCDU_COUNTER_MAX; + return (prev + 1) % AOSTF_COUNTER_MAX; } #pragma section diff --git a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h index 701da1c4..ae8be633 100644 --- a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h +++ b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h @@ -1,87 +1,87 @@ -#ifndef VCDU_H_ -#define VCDU_H_ +#ifndef AOSTF_H_ +#define AOSTF_H_ #include "m_pdu.h" -#define VCDU_HEADER_SIZE (6u) -#define VCDU_TRAILER_SIZE (4u) -#define VCDU_LEN (VCDU_HEADER_SIZE + M_PDU_LEN + VCDU_TRAILER_SIZE) -#define VCDU_COUNTER_MAX (0x01000000) // 24bit長 +#define AOSTF_HEADER_SIZE (6u) +#define AOSTF_TRAILER_SIZE (4u) +#define AOSTF_LEN (AOSTF_HEADER_SIZE + M_PDU_LEN + AOSTF_TRAILER_SIZE) +#define AOSTF_COUNTER_MAX (0x01000000) // 24bit長 typedef struct { - uint8_t header[VCDU_HEADER_SIZE]; + uint8_t header[AOSTF_HEADER_SIZE]; M_PDU m_pdu; - uint8_t trailer[VCDU_TRAILER_SIZE]; -} VCDU; + uint8_t trailer[AOSTF_TRAILER_SIZE]; +} AOSTF; typedef enum { - VCDU_VER_2 = 1, // 01b: Version2 - VCDU_VER_UNKNOWN -} VCDU_VER; + AOSTF_VER_2 = 1, // 01b: Version2 + AOSTF_VER_UNKNOWN +} AOSTF_VER; typedef enum { - VCDU_SCID_SAMPLE_SATELLITE = 0x00, - VCDU_SCID_UNKNOWN -} VCDU_SCID; + AOSTF_SCID_SAMPLE_SATELLITE = 0x00, + AOSTF_SCID_UNKNOWN +} AOSTF_SCID; typedef enum { - VCDU_VCID_REALTIME = 0x01, // 000001b: Realtime Transfer Frame - VCDU_VCID_REPLAY = 0x02, // 000010b: Stored Transfer Frame - VCDU_VCID_FILL = 0x3f, // 111111b: Fill Transfer Frame - VCDU_VCID_UNKNOWN -} VCDU_VCID; + AOSTF_VCID_REALTIME = 0x01, // 000001b: Realtime Transfer Frame + AOSTF_VCID_REPLAY = 0x02, // 000010b: Stored Transfer Frame + AOSTF_VCID_FILL = 0x3f, // 111111b: Fill Transfer Frame + AOSTF_VCID_UNKNOWN +} AOSTF_VCID; typedef enum { - VCDU_REPLAY_FALSE = 0, // 0b: Realtime Transfer Frame - VCDU_REPLAY_TRUE = 1 // 1b: Replay Transfer Frame -} VCDU_REPLAY_FLAG; + AOSTF_REPLAY_FALSE = 0, // 0b: Realtime Transfer Frame + AOSTF_REPLAY_TRUE = 1 // 1b: Replay Transfer Frame +} AOSTF_REPLAY_FLAG; -void VCDU_generate_byte_stream(const VCDU* vcdu, - uint8_t byte_stream[VCDU_LEN]); +void AOSTF_generate_byte_stream(const AOSTF* vcdu, + uint8_t byte_stream[AOSTF_LEN]); -void VCDU_setup_fill_vcdu(VCDU* vcdu); +void AOSTF_setup_fill_vcdu(AOSTF* vcdu); -void VCDU_setup_realtime_vcdu_hdr(VCDU* vcdu, +void AOSTF_setup_realtime_vcdu_hdr(AOSTF* vcdu, uint32_t counter); -void VCDU_setup_replay_vcdu_hdr(VCDU* vcdu, +void AOSTF_setup_replay_vcdu_hdr(AOSTF* vcdu, uint32_t counter); -VCDU_VER VCDU_get_ver(const VCDU* vcdu); +AOSTF_VER AOSTF_get_ver(const AOSTF* vcdu); -void VCDU_set_ver(VCDU* vcdu, - VCDU_VER ver); +void AOSTF_set_ver(AOSTF* vcdu, + AOSTF_VER ver); -VCDU_SCID VCDU_get_scdi(const VCDU* vcdu); +AOSTF_SCID AOSTF_get_scdi(const AOSTF* vcdu); -void VCDU_set_scid(VCDU* vcdu, - VCDU_SCID scid); +void AOSTF_set_scid(AOSTF* vcdu, + AOSTF_SCID scid); -VCDU_VCID VCDU_get_vcid(const VCDU* vcdu); +AOSTF_VCID AOSTF_get_vcid(const AOSTF* vcdu); -void VCDU_set_vcid(VCDU* vcdu, - VCDU_VCID vcid); +void AOSTF_set_vcid(AOSTF* vcdu, + AOSTF_VCID vcid); -uint32_t VCDU_get_vcdu_counter(const VCDU* vcdu); +uint32_t AOSTF_get_vcdu_counter(const AOSTF* vcdu); -void VCDU_set_vcdu_counter(VCDU* vcdu, +void AOSTF_set_vcdu_counter(AOSTF* vcdu, uint32_t counter); -VCDU_REPLAY_FLAG VCDU_get_replay_flag(const VCDU* vcdu); +AOSTF_REPLAY_FLAG AOSTF_get_replay_flag(const AOSTF* vcdu); -void VCDU_set_replay_flag(VCDU* vcdu, - VCDU_REPLAY_FLAG flag); +void AOSTF_set_replay_flag(AOSTF* vcdu, + AOSTF_REPLAY_FLAG flag); -uint32_t VCDU_get_clcw(const VCDU* vcdu); +uint32_t AOSTF_get_clcw(const AOSTF* vcdu); -void VCDU_set_clcw(VCDU* vcdu, +void AOSTF_set_clcw(AOSTF* vcdu, uint32_t clcw); -uint32_t VCDU_calc_next_counter(uint32_t prev); +uint32_t AOSTF_calc_next_counter(uint32_t prev); -#endif // VCDU_H_ +#endif // AOSTF_H_ diff --git a/examples/mobc/src/src_user/tlm_cmd/ccsds/tcp_to_m_pdu.c b/examples/mobc/src/src_user/tlm_cmd/ccsds/tcp_to_m_pdu.c index 2622c61c..d2fccd9c 100644 --- a/examples/mobc/src/src_user/tlm_cmd/ccsds/tcp_to_m_pdu.c +++ b/examples/mobc/src/src_user/tlm_cmd/ccsds/tcp_to_m_pdu.c @@ -15,7 +15,7 @@ void T2M_initialize(TcpToMPdu* tcp_to_m_pdu) tcp_to_m_pdu->m_pdu_wp = 0; tcp_to_m_pdu->fhp_valid = 0; // 強制送出待ち時間の初期値は10秒 - // 32kbpsなら8VCDU/secの送信能力 + // 32kbpsなら8AOSTF/secの送信能力 tcp_to_m_pdu->flush_interval = OBCT_sec2cycle(10); // 最終更新時刻は現在時刻に設定 tcp_to_m_pdu->last_updated = TMGR_get_master_total_cycle(); diff --git a/examples/mobc/tlm-cmd-db/CMD_DB/SAMPLE_MOBC_CMD_DB_CMD_DB.csv b/examples/mobc/tlm-cmd-db/CMD_DB/SAMPLE_MOBC_CMD_DB_CMD_DB.csv index 6e275f42..225a128d 100644 --- a/examples/mobc/tlm-cmd-db/CMD_DB/SAMPLE_MOBC_CMD_DB_CMD_DB.csv +++ b/examples/mobc/tlm-cmd-db/CMD_DB/SAMPLE_MOBC_CMD_DB_CMD_DB.csv @@ -160,8 +160,8 @@ Comment,,,,,Type,Description,Type,Description,Type,Description,Type,Description, **,,,,,,,,,,,,,,,,,,,, * CDH,GS用,,,,,,,,,,,,,,,,,,, ,CSRV_GS_DRIVER_RESET,OBC,0x0100,0,,,,,,,,,,,,,,,GS ドライバの初期化, -,CSRV_GS_SET_RT_FLUSH_INTERVAL,OBC,0x0101,1,uint32_t,排出間隔,,,,,,,,,,,,,RT VCDUの排出間隔設定, -,CSRV_GS_SET_RP_FLUSH_INTERVAL,OBC,0x0102,1,uint32_t,排出間隔,,,,,,,,,,,,,RP VCDUの排出間隔設定, +,CSRV_GS_SET_RT_FLUSH_INTERVAL,OBC,0x0101,1,uint32_t,排出間隔,,,,,,,,,,,,,RT AOSTFの排出間隔設定, +,CSRV_GS_SET_RP_FLUSH_INTERVAL,OBC,0x0102,1,uint32_t,排出間隔,,,,,,,,,,,,,RP AOSTFの排出間隔設定, ,CSRV_GS_SET_FARM_PW,OBC,0x0103,1,uint8_t,positive_window_width,,,,,,,,,,,,,FARM-1のPositive Window Width設定, ,CSRV_GS_SET_INFO,OBC,0x0104,1,uint8_t,TLM選択,,,,,,,,,,,,,GS送信TLMが0ならCCSDSに@@ 1ならUARTの情報が出てくる, ,CSRV_GS_CCSDS_GET_BUFFER,OBC,0x0105,0,,,,,,,,,,,,,,,, diff --git a/examples/mobc/tlm-cmd-db/TLM_DB/SAMPLE_MOBC_TLM_DB_GS.csv b/examples/mobc/tlm-cmd-db/TLM_DB/SAMPLE_MOBC_TLM_DB_GS.csv index 766d8c61..13e4e740 100644 --- a/examples/mobc/tlm-cmd-db/TLM_DB/SAMPLE_MOBC_TLM_DB_GS.csv +++ b/examples/mobc/tlm-cmd-db/TLM_DB/SAMPLE_MOBC_TLM_DB_GS.csv @@ -31,7 +31,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,CCSDS.TCTF.BD_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[0].rx.tctf.bd_rec_status,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=SUCCESS@@ 1=TCTF_VER@@ 2=TCTF_SCID@@ 3=TCTF_VCID@@ 4=TCTF_TYPE@@ 5=LOCKOUT@@ 6=TCTF_SEQ_FLAG@@ 7=TCP_VER@@ 8=TCP_2ND_HDR_FLAG@@ 9=APID@@ 10=TCP_TYPE_IS_NOT_CMD@@ 11=TCP_SEQ_IS_NOTE_SINGLE@@ 12=FECW_MISSMATCH@@ 13=FARM1_PWA@@ 14=FARM1_NWA@@ 15=FARM1_LOCKOUT_AREA@@ 16=FARM1_SAME_NUMBER@@ 17=INVALID_BC_CMD,, ,CCSDS.TX.SEND_CYCLE,uint32_t,(uint32_t)gs_driver->info[0].tx.send_cycle,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,CCSDS.TX.VCID,uint8_t,(uint8_t)gs_driver->info[0].tx.vcid,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,1=REALTIME@@2=REPLAY@@63=FILL@@*=UNKNOWN,, -,CCSDS.TX.VCDU_COUNTER,uint32_t,gs_driver->info[0].tx.vcdu_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,CCSDS.TX.AOSTF_COUNTER,uint32_t,gs_driver->info[0].tx.vcdu_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,CCSDS.TX.BUFFER_NUM,uint8_t,gs_driver->ccsds_info.buffer_num,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,UART.CH,uint8_t,gs_driver->driver_uart.uart_config.ch,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,UART.BAUDRATE,uint32_t,gs_driver->driver_uart.uart_config.baudrate,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, @@ -49,19 +49,19 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,UART.TCTF.BD_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[1].rx.tctf.bd_rec_status,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=SUCCESS@@ 1=TCTF_VER@@ 2=TCTF_SCID@@ 3=TCTF_VCID@@ 4=TCTF_TYPE@@ 5=LOCKOUT@@ 6=TCTF_SEQ_FLAG@@ 7=TCP_VER@@ 8=TCP_2ND_HDR_FLAG@@ 9=APID@@ 10=TCP_TYPE_IS_NOT_CMD@@ 11=TCP_SEQ_IS_NOTE_SINGLE@@ 12=FECW_MISSMATCH@@ 13=FARM1_PWA@@ 14=FARM1_NWA@@ 15=FARM1_LOCKOUT_AREA@@ 16=FARM1_SAME_NUMBER@@ 17=INVALID_BC_CMD,, ,UART.TX.SEND_CYCLE,uint32_t,(uint32_t)gs_driver->info[1].tx.send_cycle,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,UART.TX.VCID,uint8_t,(uint8_t)gs_driver->info[1].tx.vcid,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,1=REALTIME@@2=REPLAY@@63=FILL@@*=UNKNOWN,, -,UART.TX.VCDU_COUNTER,uint32_t,gs_driver->info[1].tx.vcdu_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,UART.TX.AOSTF_COUNTER,uint32_t,gs_driver->info[1].tx.vcdu_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,UART.IS_TLM_ON,uint8_t,gs_driver->driver_uart.is_tlm_on,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=OFF@@ 1=ON,, ,COP-1.TYPE_A_COUNTER,uint8_t,gs_validate_info->type_a_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,COP-1.TYPE_B_COUNTER,uint8_t,gs_validate_info->type_b_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,COP-1.LOCKOUT_FLAG,uint8_t,gs_validate_info->lockout_flag,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,COP-1.RETRANSMIT_FLAG,uint8_t,gs_validate_info->retransmit_flag,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,COP-1.POSITIVE_WINDOW_WIDTH,uint8_t,gs_validate_info->positive_window_width,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, -,RT_TLM.VCDU.FLUSH_INTERVAL,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, -,RT_TLM.VCDU.LAST_UPDATED,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->tc_packet_to_m_pdu.last_updated,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, -,RT_TLM.VCDU.COUNTER,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->vcdu_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, -,RP_TLM.VCDU.FLUSH_INTERVAL,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, -,RP_TLM.VCDU.LAST_UPDATED,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.last_updated,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, -,RP_TLM.VCDU.COUNTER,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->vcdu_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RT_TLM.AOSTF.FLUSH_INTERVAL,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RT_TLM.AOSTF.LAST_UPDATED,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->tc_packet_to_m_pdu.last_updated,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RT_TLM.AOSTF.COUNTER,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->vcdu_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RP_TLM.AOSTF.FLUSH_INTERVAL,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RP_TLM.AOSTF.LAST_UPDATED,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.last_updated,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RP_TLM.AOSTF.COUNTER,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->vcdu_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, diff --git a/examples/mobc/tlm-cmd-db/TLM_DB/SAMPLE_MOBC_TLM_DB_MOBC.csv b/examples/mobc/tlm-cmd-db/TLM_DB/SAMPLE_MOBC_TLM_DB_MOBC.csv index 635ee25a..bded556c 100644 --- a/examples/mobc/tlm-cmd-db/TLM_DB/SAMPLE_MOBC_TLM_DB_MOBC.csv +++ b/examples/mobc/tlm-cmd-db/TLM_DB/SAMPLE_MOBC_TLM_DB_MOBC.csv @@ -122,7 +122,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,BCT_CMD_PTR,uint8_t,(uint8_t)(block_command_table->pos.cmd),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,BCT コマンドポインタ, ,BCT_REGD_TIME,uint32_t,((block_command_table->pos.cmd == 0) ? 0 : (uint32_t)BCT_get_ti(block_command_table->pos.block@@ (uint8_t)(block_command_table->pos.cmd-1))),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,BCT 登録コマンド時刻,変数指定が大変なことに… ,BCT_REGD_ID,uint16_t,(uint16_t)((block_command_table->pos.cmd == 0) ? 0 : BCT_get_id(block_command_table->pos.block@@ (uint8_t)(block_command_table->pos.cmd-1))),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,BCT 登録コマンドID,変数指定が大変なことに… -,RT_BUFFER_AVAILABLE,uint8_t,gs_driver->ccsds_info.buffer_num,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,CCSDS RT VCDU 使用量, +,RT_BUFFER_AVAILABLE,uint8_t,gs_driver->ccsds_info.buffer_num,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,CCSDS RT AOSTF 使用量, ,RT_T2M_FLUSH_INTERVAL,uint32_t,(uint32_t)(CSRV_GS_rt_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,TL0コマンドカウンタ, ,RP_T2M_FLUSH_INTERVAL,uint32_t,(uint32_t)(CSRV_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,TL0コマンドカウンタ, ,RT_TLM_COUNTER,uint32_t,PL_count_executed_nodes(&PH_rt_tlm_list),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,TL0コマンドカウンタ, @@ -134,7 +134,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,TCI_TX_CYCLE,uint32_t,(uint32_t)gs_driver->latest_info->tx.send_cycle,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,時刻校正情報::送出サイクル, ,TCI_TX_BITRATE,uint32_t,gs_driver->driver_ccsds.ccsds_config.bitrate,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,時刻校正情報::送出ビットレート, ,TCI_VCID,uint8_t,(uint8_t)gs_driver->latest_info->tx.vcid,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,時刻構成情報::送出VCID, -,TCI_VCDU_COUNTER,uint32_t,gs_driver->latest_info->tx.vcdu_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,時刻校正情報::送出VCDUカウンタ, +,TCI_AOSTF_COUNTER,uint32_t,gs_driver->latest_info->tx.vcdu_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,時刻校正情報::送出AOSTFカウンタ, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, diff --git a/examples/mobc/tlm-cmd-db/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_GS.csv b/examples/mobc/tlm-cmd-db/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_GS.csv index 6419ed36..ea341055 100644 --- a/examples/mobc/tlm-cmd-db/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_GS.csv +++ b/examples/mobc/tlm-cmd-db/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_GS.csv @@ -31,7 +31,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,CCSDS.TCTF.BD_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[0].rx.tctf.bd_rec_status,PACKET,40,0,8,STATUS,,,,,,,0=SUCCESS@@ 1=TCTF_VER@@ 2=TCTF_SCID@@ 3=TCTF_VCID@@ 4=TCTF_TYPE@@ 5=LOCKOUT@@ 6=TCTF_SEQ_FLAG@@ 7=TCP_VER@@ 8=TCP_2ND_HDR_FLAG@@ 9=APID@@ 10=TCP_TYPE_IS_NOT_CMD@@ 11=TCP_SEQ_IS_NOTE_SINGLE@@ 12=FECW_MISSMATCH@@ 13=FARM1_PWA@@ 14=FARM1_NWA@@ 15=FARM1_LOCKOUT_AREA@@ 16=FARM1_SAME_NUMBER@@ 17=INVALID_BC_CMD,, ,CCSDS.TX.SEND_CYCLE,uint32_t,(uint32_t)gs_driver->info[0].tx.send_cycle,PACKET,41,0,32,NONE,,,,,,,,, ,CCSDS.TX.VCID,uint8_t,(uint8_t)gs_driver->info[0].tx.vcid,PACKET,45,0,8,STATUS,,,,,,,1=REALTIME@@2=REPLAY@@63=FILL@@*=UNKNOWN,, -,CCSDS.TX.VCDU_COUNTER,uint32_t,gs_driver->info[0].tx.vcdu_counter,PACKET,46,0,32,NONE,,,,,,,,, +,CCSDS.TX.AOSTF_COUNTER,uint32_t,gs_driver->info[0].tx.vcdu_counter,PACKET,46,0,32,NONE,,,,,,,,, ,CCSDS.TX.BUFFER_NUM,uint8_t,gs_driver->ccsds_info.buffer_num,PACKET,50,0,8,NONE,,,,,,,,, ,UART.CH,uint8_t,gs_driver->driver_uart.uart_config.ch,PACKET,51,0,8,NONE,,,,,,,,, ,UART.BAUDRATE,uint32_t,gs_driver->driver_uart.uart_config.baudrate,PACKET,52,0,32,NONE,,,,,,,,, @@ -49,19 +49,19 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,UART.TCTF.BD_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[1].rx.tctf.bd_rec_status,PACKET,73,0,8,STATUS,,,,,,,0=SUCCESS@@ 1=TCTF_VER@@ 2=TCTF_SCID@@ 3=TCTF_VCID@@ 4=TCTF_TYPE@@ 5=LOCKOUT@@ 6=TCTF_SEQ_FLAG@@ 7=TCP_VER@@ 8=TCP_2ND_HDR_FLAG@@ 9=APID@@ 10=TCP_TYPE_IS_NOT_CMD@@ 11=TCP_SEQ_IS_NOTE_SINGLE@@ 12=FECW_MISSMATCH@@ 13=FARM1_PWA@@ 14=FARM1_NWA@@ 15=FARM1_LOCKOUT_AREA@@ 16=FARM1_SAME_NUMBER@@ 17=INVALID_BC_CMD,, ,UART.TX.SEND_CYCLE,uint32_t,(uint32_t)gs_driver->info[1].tx.send_cycle,PACKET,74,0,32,NONE,,,,,,,,, ,UART.TX.VCID,uint8_t,(uint8_t)gs_driver->info[1].tx.vcid,PACKET,78,0,8,STATUS,,,,,,,1=REALTIME@@2=REPLAY@@63=FILL@@*=UNKNOWN,, -,UART.TX.VCDU_COUNTER,uint32_t,gs_driver->info[1].tx.vcdu_counter,PACKET,79,0,32,NONE,,,,,,,,, +,UART.TX.AOSTF_COUNTER,uint32_t,gs_driver->info[1].tx.vcdu_counter,PACKET,79,0,32,NONE,,,,,,,,, ,UART.IS_TLM_ON,uint8_t,gs_driver->driver_uart.is_tlm_on,PACKET,83,0,8,STATUS,,,,,,,0=OFF@@ 1=ON,, ,COP-1.TYPE_A_COUNTER,uint8_t,gs_validate_info->type_a_counter,PACKET,84,0,8,NONE,,,,,,,,, ,COP-1.TYPE_B_COUNTER,uint8_t,gs_validate_info->type_b_counter,PACKET,85,0,8,NONE,,,,,,,,, ,COP-1.LOCKOUT_FLAG,uint8_t,gs_validate_info->lockout_flag,PACKET,86,0,8,NONE,,,,,,,,, ,COP-1.RETRANSMIT_FLAG,uint8_t,gs_validate_info->retransmit_flag,PACKET,87,0,8,NONE,,,,,,,,, ,COP-1.POSITIVE_WINDOW_WIDTH,uint8_t,gs_validate_info->positive_window_width,PACKET,88,0,8,NONE,,,,,,,,, -,RT_TLM.VCDU.FLUSH_INTERVAL,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval,PACKET,89,0,32,NONE,,,,,,,,, -,RT_TLM.VCDU.LAST_UPDATED,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->tc_packet_to_m_pdu.last_updated,PACKET,93,0,32,NONE,,,,,,,,, -,RT_TLM.VCDU.COUNTER,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->vcdu_counter,PACKET,97,0,32,NONE,,,,,,,,, -,RP_TLM.VCDU.FLUSH_INTERVAL,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval,PACKET,101,0,32,NONE,,,,,,,,, -,RP_TLM.VCDU.LAST_UPDATED,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.last_updated,PACKET,105,0,32,NONE,,,,,,,,, -,RP_TLM.VCDU.COUNTER,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->vcdu_counter,PACKET,109,0,32,NONE,,,,,,,,, +,RT_TLM.AOSTF.FLUSH_INTERVAL,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval,PACKET,89,0,32,NONE,,,,,,,,, +,RT_TLM.AOSTF.LAST_UPDATED,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->tc_packet_to_m_pdu.last_updated,PACKET,93,0,32,NONE,,,,,,,,, +,RT_TLM.AOSTF.COUNTER,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->vcdu_counter,PACKET,97,0,32,NONE,,,,,,,,, +,RP_TLM.AOSTF.FLUSH_INTERVAL,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval,PACKET,101,0,32,NONE,,,,,,,,, +,RP_TLM.AOSTF.LAST_UPDATED,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.last_updated,PACKET,105,0,32,NONE,,,,,,,,, +,RP_TLM.AOSTF.COUNTER,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->vcdu_counter,PACKET,109,0,32,NONE,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, diff --git a/examples/mobc/tlm-cmd-db/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MOBC.csv b/examples/mobc/tlm-cmd-db/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MOBC.csv index 2794564b..0118ee27 100644 --- a/examples/mobc/tlm-cmd-db/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MOBC.csv +++ b/examples/mobc/tlm-cmd-db/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MOBC.csv @@ -122,7 +122,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,BCT_CMD_PTR,uint8_t,(uint8_t)(block_command_table->pos.cmd),PACKET,291,0,8,NONE,,,,,,,,BCT コマンドポインタ, ,BCT_REGD_TIME,uint32_t,((block_command_table->pos.cmd == 0) ? 0 : (uint32_t)BCT_get_ti(block_command_table->pos.block@@ (uint8_t)(block_command_table->pos.cmd-1))),PACKET,292,0,32,NONE,,,,,,,,BCT 登録コマンド時刻,変数指定が大変なことに… ,BCT_REGD_ID,uint16_t,(uint16_t)((block_command_table->pos.cmd == 0) ? 0 : BCT_get_id(block_command_table->pos.block@@ (uint8_t)(block_command_table->pos.cmd-1))),PACKET,296,0,16,NONE,,,,,,,,BCT 登録コマンドID,変数指定が大変なことに… -,RT_BUFFER_AVAILABLE,uint8_t,gs_driver->ccsds_info.buffer_num,PACKET,298,0,8,NONE,,,,,,,,CCSDS RT VCDU 使用量, +,RT_BUFFER_AVAILABLE,uint8_t,gs_driver->ccsds_info.buffer_num,PACKET,298,0,8,NONE,,,,,,,,CCSDS RT AOSTF 使用量, ,RT_T2M_FLUSH_INTERVAL,uint32_t,(uint32_t)(CSRV_GS_rt_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval),PACKET,299,0,32,NONE,,,,,,,,TL0コマンドカウンタ, ,RP_T2M_FLUSH_INTERVAL,uint32_t,(uint32_t)(CSRV_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval),PACKET,303,0,32,NONE,,,,,,,,TL0コマンドカウンタ, ,RT_TLM_COUNTER,uint32_t,PL_count_executed_nodes(&PH_rt_tlm_list),PACKET,307,0,32,NONE,,,,,,,,TL0コマンドカウンタ, @@ -134,7 +134,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,TCI_TX_CYCLE,uint32_t,(uint32_t)gs_driver->latest_info->tx.send_cycle,PACKET,322,0,32,NONE,,,,,,,,時刻校正情報::送出サイクル, ,TCI_TX_BITRATE,uint32_t,gs_driver->driver_ccsds.ccsds_config.bitrate,PACKET,326,0,32,NONE,,,,,,,,時刻校正情報::送出ビットレート, ,TCI_VCID,uint8_t,(uint8_t)gs_driver->latest_info->tx.vcid,PACKET,330,0,8,NONE,,,,,,,,時刻構成情報::送出VCID, -,TCI_VCDU_COUNTER,uint32_t,gs_driver->latest_info->tx.vcdu_counter,PACKET,331,0,32,NONE,,,,,,,,時刻校正情報::送出VCDUカウンタ, +,TCI_AOSTF_COUNTER,uint32_t,gs_driver->latest_info->tx.vcdu_counter,PACKET,331,0,32,NONE,,,,,,,,時刻校正情報::送出AOSTFカウンタ, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, diff --git a/tlm_cmd/ccsds/space_packet_typedef.h b/tlm_cmd/ccsds/space_packet_typedef.h index 5832bc67..621c136d 100644 --- a/tlm_cmd/ccsds/space_packet_typedef.h +++ b/tlm_cmd/ccsds/space_packet_typedef.h @@ -8,7 +8,7 @@ #include -#define TSP_MAX_LEN (432) //!< TlmSpacePacket の最大パケット長.VCDU 分割しないならこれが最大値 +#define TSP_MAX_LEN (432) //!< TlmSpacePacket の最大パケット長.AOSTF 分割しないならこれが最大値 #define CSP_MAX_LEN (128) //!< CmdSpacePacket の最大パケット長.値は適当においている // TSP_MAX_LEN, CSP_MAX_LEN を再定義 diff --git a/tlm_cmd/telemetry_generator.c b/tlm_cmd/telemetry_generator.c index f7a55853..ab92656f 100644 --- a/tlm_cmd/telemetry_generator.c +++ b/tlm_cmd/telemetry_generator.c @@ -72,7 +72,7 @@ CCP_CmdRet Cmd_GENERATE_TLM(const CommonCmdPacket* packet) if (num_dumps >= 8) { // パケット生成回数の上限は8回とする。 - // 32kbpsでのDL時に8VCDU/secで1秒分の通信量。 + // 32kbpsでのDL時に8AOSTF/secで1秒分の通信量。 // これを超える場合は複数回コマンドを送信して対応する。 return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } @@ -224,7 +224,7 @@ static CCP_CmdRet TG_generate_tlm_(TLM_CODE tlm_id, { // FIXME: 要検討? // パケット生成回数の上限は 8 回とする。 - // 32 kbpsでの DL 時に 8 VCDU / sec で 1 秒分の通信量。 + // 32 kbpsでの DL 時に 8 AOSTF / sec で 1 秒分の通信量。 // これを超える場合は複数回コマンドを送信して対応する。 return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_PARAMETER, TLM_CODE_MAX); } From 56c0502ad54caac8d6a9065dcb6fdbd6e913f3e9 Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Wed, 8 Nov 2023 21:51:30 +0900 Subject: [PATCH 3/9] sed vcdu to aostf --- .../applications/component_service/csrv_gs.c | 20 +-- .../applications/component_service/csrv_gs.h | 6 +- .../src/src_user/component_driver/com/gs.c | 22 +-- .../src/src_user/component_driver/com/gs.h | 8 +- .../tlm_cmd/ccsds/aos_transfer_frame.c | 136 +++++++++--------- .../tlm_cmd/ccsds/aos_transfer_frame.h | 32 ++--- .../mobc/src/src_user/tlm_cmd/ccsds/m_pdu.c | 4 +- .../src_user/tlm_cmd/telemetry_definitions.c | 10 +- .../TLM_DB/SAMPLE_MOBC_TLM_DB_GS.csv | 8 +- .../TLM_DB/SAMPLE_MOBC_TLM_DB_MOBC.csv | 2 +- .../calced_data/SAMPLE_MOBC_TLM_DB_GS.csv | 8 +- .../calced_data/SAMPLE_MOBC_TLM_DB_MOBC.csv | 2 +- 12 files changed, 129 insertions(+), 129 deletions(-) diff --git a/examples/mobc/src/src_user/applications/component_service/csrv_gs.c b/examples/mobc/src/src_user/applications/component_service/csrv_gs.c index d4bda326..1b06015e 100644 --- a/examples/mobc/src/src_user/applications/component_service/csrv_gs.c +++ b/examples/mobc/src/src_user/applications/component_service/csrv_gs.c @@ -123,21 +123,21 @@ static RESULT CSRV_GS_rt_tlm_packet_handler_app_(void) { T2M_ACK ack = T2M_form_m_pdu(&CSRV_GS_rt_tlm_packet_handler_.tc_packet_to_m_pdu, &PH_rt_tlm_list, - &CSRV_GS_rt_tlm_packet_handler_.vcdu.m_pdu); + &CSRV_GS_rt_tlm_packet_handler_.aostf.m_pdu); if (ack != T2M_SUCCESS) return RESULT_OK; // Realtime AOSTF カウンタの設定 - AOSTF_setup_realtime_vcdu_hdr(&CSRV_GS_rt_tlm_packet_handler_.vcdu, CSRV_GS_rt_tlm_packet_handler_.vcdu_counter); - CSRV_GS_rt_tlm_packet_handler_.vcdu_counter = AOSTF_calc_next_counter(CSRV_GS_rt_tlm_packet_handler_.vcdu_counter); + AOSTF_setup_realtime_aostf_hdr(&CSRV_GS_rt_tlm_packet_handler_.aostf, CSRV_GS_rt_tlm_packet_handler_.aostf_counter); + CSRV_GS_rt_tlm_packet_handler_.aostf_counter = AOSTF_calc_next_counter(CSRV_GS_rt_tlm_packet_handler_.aostf_counter); // CLCW の設定 // CMD の VCID と TLM の VCID は独立で関係がない // TLM の VCID 種別(Realtime, Replay)によらず CLCW を設定して良い // CLCW が対応する CMD の VCID は CLCW の内部で指定される - AOSTF_set_clcw(&CSRV_GS_rt_tlm_packet_handler_.vcdu, GS_form_clcw()); + AOSTF_set_clcw(&CSRV_GS_rt_tlm_packet_handler_.aostf, GS_form_clcw()); // 完成した AOSTF を RT AOSTF として送出 - GS_send_vcdu(&gs_driver_, &CSRV_GS_rt_tlm_packet_handler_.vcdu); + GS_send_aostf(&gs_driver_, &CSRV_GS_rt_tlm_packet_handler_.aostf); } return RESULT_OK; @@ -158,21 +158,21 @@ static RESULT CSRV_GS_rp_tlm_packet_handler_app_(void) { T2M_ACK ack = T2M_form_m_pdu(&CSRV_GS_rp_tlm_packet_handler_.tc_packet_to_m_pdu, &PH_rp_tlm_list, - &CSRV_GS_rp_tlm_packet_handler_.vcdu.m_pdu); + &CSRV_GS_rp_tlm_packet_handler_.aostf.m_pdu); if (ack != T2M_SUCCESS) return RESULT_OK; // Replay AOSTF カウンタの設定 - AOSTF_setup_replay_vcdu_hdr(&CSRV_GS_rp_tlm_packet_handler_.vcdu, CSRV_GS_rp_tlm_packet_handler_.vcdu_counter); - CSRV_GS_rp_tlm_packet_handler_.vcdu_counter = AOSTF_calc_next_counter(CSRV_GS_rp_tlm_packet_handler_.vcdu_counter); + AOSTF_setup_replay_aostf_hdr(&CSRV_GS_rp_tlm_packet_handler_.aostf, CSRV_GS_rp_tlm_packet_handler_.aostf_counter); + CSRV_GS_rp_tlm_packet_handler_.aostf_counter = AOSTF_calc_next_counter(CSRV_GS_rp_tlm_packet_handler_.aostf_counter); // CLCW の設定 // CMD の VCIDと TLM の VCID は独立で関係がない // TLM の VCID 種別(Realtime, Replay) によらず CLCW を設定して良い // CLCW が対応する CMD の VCID は CLCW の内部で指定される - AOSTF_set_clcw(&CSRV_GS_rp_tlm_packet_handler_.vcdu, GS_form_clcw()); + AOSTF_set_clcw(&CSRV_GS_rp_tlm_packet_handler_.aostf, GS_form_clcw()); // 完成した AOSTF を RP AOSTF として送出 - GS_send_vcdu(&gs_driver_, &CSRV_GS_rp_tlm_packet_handler_.vcdu); + GS_send_aostf(&gs_driver_, &CSRV_GS_rp_tlm_packet_handler_.aostf); } return RESULT_OK; diff --git a/examples/mobc/src/src_user/applications/component_service/csrv_gs.h b/examples/mobc/src/src_user/applications/component_service/csrv_gs.h index 249783b5..c1b684bd 100644 --- a/examples/mobc/src/src_user/applications/component_service/csrv_gs.h +++ b/examples/mobc/src/src_user/applications/component_service/csrv_gs.h @@ -9,7 +9,7 @@ #include "../../component_driver/com/gs.h" #include "../../tlm_cmd/ccsds/tcp_to_m_pdu.h" -#include "../../tlm_cmd/ccsds/vcdu.h" +#include "../../tlm_cmd/ccsds/aostf.h" #include /** @@ -19,8 +19,8 @@ typedef struct { TcpToMPdu tc_packet_to_m_pdu; //!< PL から取り出した tc_packet を M_PDU に変換する - AOSTF vcdu; //!< 送信するAOSTF - uint32_t vcdu_counter; //!< AOSTF counter + AOSTF aostf; //!< 送信するAOSTF + uint32_t aostf_counter; //!< AOSTF counter } CSRV_GS_TlmPacketHandler; extern const GS_Driver* const gs_driver; diff --git a/examples/mobc/src/src_user/component_driver/com/gs.c b/examples/mobc/src/src_user/component_driver/com/gs.c index 14a0bd86..ede3aeba 100644 --- a/examples/mobc/src/src_user/component_driver/com/gs.c +++ b/examples/mobc/src/src_user/component_driver/com/gs.c @@ -115,7 +115,7 @@ CDS_INIT_ERR_CODE GS_init(GS_Driver* gs_driver, gs_driver->info[i].tx.send_cycle = 0; gs_driver->info[i].tx.vcid = AOSTF_VCID_UNKNOWN; - gs_driver->info[i].tx.vcdu_counter = 0; + gs_driver->info[i].tx.aostf_counter = 0; } gs_driver->ccsds_info.buffer_num = 8; @@ -254,21 +254,21 @@ static CDS_ERR_CODE GS_analyze_rec_data_(CDS_StreamConfig* p_stream_config, void return CDS_ERR_CODE_OK; } -CDS_CMD_ERR_CODE GS_send_vcdu(GS_Driver* gs_driver, const AOSTF* vcdu) +CDS_CMD_ERR_CODE GS_send_aostf(GS_Driver* gs_driver, const AOSTF* aostf) { CDS_ERR_CODE ret_ccsds = CDS_ERR_CODE_OK; CDS_ERR_CODE ret_uart = CDS_ERR_CODE_OK; - size_t vcdu_size = sizeof(AOSTF); + size_t aostf_size = sizeof(AOSTF); // パディングが無ければ元を GS_tx_frame_ にコピーさせる (444Byte) のコピーが無駄 - if (vcdu_size == AOSTF_LEN) + if (aostf_size == AOSTF_LEN) { - CDSSC_set_tx_frame(&gs_driver->driver_ccsds.super.stream_config[GS_TX_STREAM], (uint8_t*)vcdu); - CDSSC_set_tx_frame(&gs_driver->driver_uart.super.stream_config[GS_TX_STREAM], (uint8_t*)vcdu); + CDSSC_set_tx_frame(&gs_driver->driver_ccsds.super.stream_config[GS_TX_STREAM], (uint8_t*)aostf); + CDSSC_set_tx_frame(&gs_driver->driver_uart.super.stream_config[GS_TX_STREAM], (uint8_t*)aostf); } else { - AOSTF_generate_byte_stream(vcdu, GS_tx_frame_); // 送信元にセット 消したいなぁ... + AOSTF_generate_byte_stream(aostf, GS_tx_frame_); // 送信元にセット 消したいなぁ... CDSSC_set_tx_frame(&gs_driver->driver_ccsds.super.stream_config[GS_TX_STREAM], GS_tx_frame_); CDSSC_set_tx_frame(&gs_driver->driver_uart.super.stream_config[GS_TX_STREAM], GS_tx_frame_); } @@ -278,8 +278,8 @@ CDS_CMD_ERR_CODE GS_send_vcdu(GS_Driver* gs_driver, const AOSTF* vcdu) if (gs_driver->ccsds_info.buffer_num) { gs_driver->info[GS_PORT_TYPE_CCSDS].tx.send_cycle = TMGR_get_master_total_cycle(); - gs_driver->info[GS_PORT_TYPE_CCSDS].tx.vcid = AOSTF_get_vcid(vcdu); - gs_driver->info[GS_PORT_TYPE_CCSDS].tx.vcdu_counter = AOSTF_get_vcdu_counter(vcdu); + gs_driver->info[GS_PORT_TYPE_CCSDS].tx.vcid = AOSTF_get_vcid(aostf); + gs_driver->info[GS_PORT_TYPE_CCSDS].tx.aostf_counter = AOSTF_get_aostf_counter(aostf); // DS 側の名称が cmd なだけで送信しているのは TLM ret_ccsds = CDS_send_general_cmd(&gs_driver->driver_ccsds.super, GS_TX_STREAM); @@ -289,8 +289,8 @@ CDS_CMD_ERR_CODE GS_send_vcdu(GS_Driver* gs_driver, const AOSTF* vcdu) if (gs_driver->driver_uart.is_tlm_on) { gs_driver->info[GS_PORT_TYPE_UART].tx.send_cycle = TMGR_get_master_total_cycle(); - gs_driver->info[GS_PORT_TYPE_UART].tx.vcid = AOSTF_get_vcid(vcdu); - gs_driver->info[GS_PORT_TYPE_UART].tx.vcdu_counter = AOSTF_get_vcdu_counter(vcdu); + gs_driver->info[GS_PORT_TYPE_UART].tx.vcid = AOSTF_get_vcid(aostf); + gs_driver->info[GS_PORT_TYPE_UART].tx.aostf_counter = AOSTF_get_aostf_counter(aostf); // DS 側の名称が cmd なだけで送信しているのは TLM ret_uart = CDS_send_general_cmd(&gs_driver->driver_uart.super, GS_TX_STREAM); diff --git a/examples/mobc/src/src_user/component_driver/com/gs.h b/examples/mobc/src/src_user/component_driver/com/gs.h index fa4c7b69..c5892924 100644 --- a/examples/mobc/src/src_user/component_driver/com/gs.h +++ b/examples/mobc/src/src_user/component_driver/com/gs.h @@ -10,7 +10,7 @@ #include #include #include "../../hal/ccsds_user.h" -#include "../../tlm_cmd/ccsds/vcdu.h" +#include "../../tlm_cmd/ccsds/aostf.h" #include "gs_validate.h" #define GS_RX_HEADER_NUM (3) @@ -54,7 +54,7 @@ typedef struct { cycle_t send_cycle; //!< 最後に送信したときの時刻 AOSTF_VCID vcid; //!< 送信した TLM のタイプ - uint32_t vcdu_counter; //!< AOSTF counter + uint32_t aostf_counter; //!< AOSTF counter } tx; } GS_Info; @@ -110,9 +110,9 @@ CDS_REC_ERR_CODE GS_rec_tctf(GS_Driver* gs_driver); * @note CDS_send_general_cmd が使われているが, これは DS は MOBC コンポ間を想定しているため, MOBC から見るとコンポに cmd を送信している様に見える, が 今回は MOBC から地上に TLM を送信している * @note TLM 送信, 形式は AOSTF * @param[in] gs_driver: ドライバー - * @param[in] vcdu: 送信する AOSTF. 場合によってはそのまま DS に渡すので, local変数ではなくstaticな変数を渡すこと + * @param[in] aostf: 送信する AOSTF. 場合によってはそのまま DS に渡すので, local変数ではなくstaticな変数を渡すこと * @return CDS_CMD_ERR_CODE: 送信結果 */ -CDS_CMD_ERR_CODE GS_send_vcdu(GS_Driver* gs_driver, const AOSTF* vcdu); +CDS_CMD_ERR_CODE GS_send_aostf(GS_Driver* gs_driver, const AOSTF* aostf); #endif diff --git a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c index 7d63e00a..47900154 100644 --- a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c +++ b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c @@ -1,69 +1,69 @@ #pragma section REPRO -#include "vcdu.h" +#include "aostf.h" #include // for memcpy -static void AOSTF_set_common_hdr_(AOSTF* vcdu); -static void AOSTF_clear_spare_(AOSTF* vcdu); +static void AOSTF_set_common_hdr_(AOSTF* aostf); +static void AOSTF_clear_spare_(AOSTF* aostf); -void AOSTF_generate_byte_stream(const AOSTF* vcdu, +void AOSTF_generate_byte_stream(const AOSTF* aostf, uint8_t byte_stream[AOSTF_LEN]) { - memcpy(byte_stream, vcdu->header, AOSTF_HEADER_SIZE); + memcpy(byte_stream, aostf->header, AOSTF_HEADER_SIZE); byte_stream += AOSTF_HEADER_SIZE; - M_PDU_generate_byte_stream(&(vcdu->m_pdu), byte_stream); + M_PDU_generate_byte_stream(&(aostf->m_pdu), byte_stream); byte_stream += M_PDU_LEN; - memcpy(byte_stream, vcdu->trailer, AOSTF_TRAILER_SIZE); + memcpy(byte_stream, aostf->trailer, AOSTF_TRAILER_SIZE); } -void AOSTF_setup_fill_vcdu(AOSTF* vcdu) +void AOSTF_setup_fill_aostf(AOSTF* aostf) { - AOSTF_set_common_hdr_(vcdu); - AOSTF_set_vcid(vcdu, AOSTF_VCID_FILL); - M_PDU_setup_idle_m_pdu(&(vcdu->m_pdu)); + AOSTF_set_common_hdr_(aostf); + AOSTF_set_vcid(aostf, AOSTF_VCID_FILL); + M_PDU_setup_idle_m_pdu(&(aostf->m_pdu)); } -void AOSTF_setup_realtime_vcdu_hdr(AOSTF* vcdu, +void AOSTF_setup_realtime_aostf_hdr(AOSTF* aostf, uint32_t counter) { - AOSTF_set_common_hdr_(vcdu); - AOSTF_set_vcid(vcdu, AOSTF_VCID_REALTIME); - AOSTF_set_vcdu_counter(vcdu, counter); + AOSTF_set_common_hdr_(aostf); + AOSTF_set_vcid(aostf, AOSTF_VCID_REALTIME); + AOSTF_set_aostf_counter(aostf, counter); } -void AOSTF_setup_replay_vcdu_hdr(AOSTF* vcdu, +void AOSTF_setup_replay_aostf_hdr(AOSTF* aostf, uint32_t counter) { - AOSTF_set_common_hdr_(vcdu); - AOSTF_set_replay_flag(vcdu, AOSTF_REPLAY_TRUE); - AOSTF_set_vcid(vcdu, AOSTF_VCID_REPLAY); - AOSTF_set_vcdu_counter(vcdu, counter); + AOSTF_set_common_hdr_(aostf); + AOSTF_set_replay_flag(aostf, AOSTF_REPLAY_TRUE); + AOSTF_set_vcid(aostf, AOSTF_VCID_REPLAY); + AOSTF_set_aostf_counter(aostf, counter); } -static void AOSTF_set_common_hdr_(AOSTF* vcdu) +static void AOSTF_set_common_hdr_(AOSTF* aostf) { - AOSTF_set_ver(vcdu, AOSTF_VER_2); - AOSTF_set_scid(vcdu, AOSTF_SCID_SAMPLE_SATELLITE); // FIXME: 仮 - AOSTF_set_replay_flag(vcdu, AOSTF_REPLAY_FALSE); - AOSTF_clear_spare_(vcdu); + AOSTF_set_ver(aostf, AOSTF_VER_2); + AOSTF_set_scid(aostf, AOSTF_SCID_SAMPLE_SATELLITE); // FIXME: 仮 + AOSTF_set_replay_flag(aostf, AOSTF_REPLAY_FALSE); + AOSTF_clear_spare_(aostf); } -static void AOSTF_clear_spare_(AOSTF* vcdu) +static void AOSTF_clear_spare_(AOSTF* aostf) { unsigned int pos = 5; uint8_t mask = 0x7f; // 01111111b - vcdu->header[pos] &= (uint8_t)(~mask); + aostf->header[pos] &= (uint8_t)(~mask); } -AOSTF_VER AOSTF_get_ver(const AOSTF* vcdu) +AOSTF_VER AOSTF_get_ver(const AOSTF* aostf) { unsigned int pos = 0; uint8_t mask = 0xc0; // 11000000b - AOSTF_VER ver = (AOSTF_VER)((vcdu->header[pos] & mask) >> 6); + AOSTF_VER ver = (AOSTF_VER)((aostf->header[pos] & mask) >> 6); switch (ver) { @@ -75,26 +75,26 @@ AOSTF_VER AOSTF_get_ver(const AOSTF* vcdu) } } -void AOSTF_set_ver(AOSTF* vcdu, +void AOSTF_set_ver(AOSTF* aostf, AOSTF_VER ver) { unsigned int pos = 0; uint8_t mask = 0xc0; // 11000000b uint8_t val = (uint8_t)((ver << 6) & mask); - vcdu->header[pos] &= (uint8_t)(~mask); - vcdu->header[pos] |= val; + aostf->header[pos] &= (uint8_t)(~mask); + aostf->header[pos] |= val; } -AOSTF_SCID AOSTF_get_scdi(const AOSTF* vcdu) +AOSTF_SCID AOSTF_get_scdi(const AOSTF* aostf) { unsigned int pos = 0; uint8_t mask1 = 0x3f; // 00111111b uint8_t mask2 = 0xc0; // 11000000b - int scid = (vcdu->header[pos] & mask1); + int scid = (aostf->header[pos] & mask1); scid <<= 2; - scid |= ((vcdu->header[pos + 1] & mask2) >> 6); + scid |= ((aostf->header[pos + 1] & mask2) >> 6); switch (scid) { @@ -106,25 +106,25 @@ AOSTF_SCID AOSTF_get_scdi(const AOSTF* vcdu) } } -void AOSTF_set_scid(AOSTF* vcdu, +void AOSTF_set_scid(AOSTF* aostf, AOSTF_SCID scid) { unsigned int pos = 0; uint8_t mask1 = 0x3f; // 00111111b uint8_t mask2 = 0xc0; // 11000000b - vcdu->header[pos] &= (uint8_t)(~mask1); - vcdu->header[pos] |= (uint8_t)((scid >> 2) & mask1); - vcdu->header[pos + 1] &= (uint8_t)(~mask2); - vcdu->header[pos + 1] |= (uint8_t)((scid << 6) & mask2); + aostf->header[pos] &= (uint8_t)(~mask1); + aostf->header[pos] |= (uint8_t)((scid >> 2) & mask1); + aostf->header[pos + 1] &= (uint8_t)(~mask2); + aostf->header[pos + 1] |= (uint8_t)((scid << 6) & mask2); } -AOSTF_VCID AOSTF_get_vcid(const AOSTF* vcdu) +AOSTF_VCID AOSTF_get_vcid(const AOSTF* aostf) { unsigned int pos = 1; uint8_t mask = 0x3f; // 00111111b - AOSTF_VCID vcid = (AOSTF_VCID)(vcdu->header[pos] & mask); + AOSTF_VCID vcid = (AOSTF_VCID)(aostf->header[pos] & mask); switch (vcid) { @@ -138,81 +138,81 @@ AOSTF_VCID AOSTF_get_vcid(const AOSTF* vcdu) } } -void AOSTF_set_vcid(AOSTF* vcdu, +void AOSTF_set_vcid(AOSTF* aostf, AOSTF_VCID vcid) { unsigned int pos = 1; uint8_t mask = 0x3f; // 00111111b - vcdu->header[pos] &= (uint8_t)(~mask); - vcdu->header[pos] |= (uint8_t)(vcid & mask); + aostf->header[pos] &= (uint8_t)(~mask); + aostf->header[pos] |= (uint8_t)(vcid & mask); } -uint32_t AOSTF_get_vcdu_counter(const AOSTF* vcdu) +uint32_t AOSTF_get_aostf_counter(const AOSTF* aostf) { unsigned int pos = 2; - uint32_t counter = vcdu->header[pos]; + uint32_t counter = aostf->header[pos]; counter <<= 8; - counter |= vcdu->header[pos + 1]; + counter |= aostf->header[pos + 1]; counter <<= 8; - counter |= vcdu->header[pos + 2]; + counter |= aostf->header[pos + 2]; return counter; } -void AOSTF_set_vcdu_counter(AOSTF* vcdu, +void AOSTF_set_aostf_counter(AOSTF* aostf, uint32_t counter) { unsigned int pos = 2; - vcdu->header[pos] = (uint8_t)((counter >> 16) & 0xff); - vcdu->header[pos + 1] = (uint8_t)((counter >> 8) & 0xff); - vcdu->header[pos + 2] = (uint8_t)(counter & 0xff); + aostf->header[pos] = (uint8_t)((counter >> 16) & 0xff); + aostf->header[pos + 1] = (uint8_t)((counter >> 8) & 0xff); + aostf->header[pos + 2] = (uint8_t)(counter & 0xff); } -AOSTF_REPLAY_FLAG AOSTF_get_replay_flag(const AOSTF* vcdu) +AOSTF_REPLAY_FLAG AOSTF_get_replay_flag(const AOSTF* aostf) { unsigned int pos = 5; uint8_t mask = 0x80; // 10000000b - return (AOSTF_REPLAY_FLAG)((vcdu->header[pos] & mask) >> 7); + return (AOSTF_REPLAY_FLAG)((aostf->header[pos] & mask) >> 7); } -void AOSTF_set_replay_flag(AOSTF* vcdu, +void AOSTF_set_replay_flag(AOSTF* aostf, AOSTF_REPLAY_FLAG flag) { unsigned int pos = 5; uint8_t mask = 0x80; // 10000000b - vcdu->header[pos] &= (uint8_t)(~mask); - vcdu->header[pos] |= (uint8_t)((flag << 7) & mask); + aostf->header[pos] &= (uint8_t)(~mask); + aostf->header[pos] |= (uint8_t)((flag << 7) & mask); } -uint32_t AOSTF_get_clcw(const AOSTF* vcdu) +uint32_t AOSTF_get_clcw(const AOSTF* aostf) { unsigned int pos = 0; - uint32_t clcw = vcdu->trailer[pos]; + uint32_t clcw = aostf->trailer[pos]; clcw <<= 8; - clcw |= vcdu->trailer[pos + 1]; + clcw |= aostf->trailer[pos + 1]; clcw <<= 8; - clcw |= vcdu->trailer[pos + 2]; + clcw |= aostf->trailer[pos + 2]; clcw <<= 8; - clcw |= vcdu->trailer[pos + 3]; + clcw |= aostf->trailer[pos + 3]; return clcw; } -void AOSTF_set_clcw(AOSTF* vcdu, +void AOSTF_set_clcw(AOSTF* aostf, uint32_t clcw) { unsigned int pos = 0; - vcdu->trailer[pos] = (uint8_t)((clcw >> 24) & 0xff); - vcdu->trailer[pos + 1] = (uint8_t)((clcw >> 16) & 0xff); - vcdu->trailer[pos + 2] = (uint8_t)((clcw >> 8) & 0xff); - vcdu->trailer[pos + 3] = (uint8_t)(clcw & 0xff); + aostf->trailer[pos] = (uint8_t)((clcw >> 24) & 0xff); + aostf->trailer[pos + 1] = (uint8_t)((clcw >> 16) & 0xff); + aostf->trailer[pos + 2] = (uint8_t)((clcw >> 8) & 0xff); + aostf->trailer[pos + 3] = (uint8_t)(clcw & 0xff); } uint32_t AOSTF_calc_next_counter(uint32_t prev) diff --git a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h index ae8be633..6b00b261 100644 --- a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h +++ b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h @@ -41,45 +41,45 @@ typedef enum AOSTF_REPLAY_TRUE = 1 // 1b: Replay Transfer Frame } AOSTF_REPLAY_FLAG; -void AOSTF_generate_byte_stream(const AOSTF* vcdu, +void AOSTF_generate_byte_stream(const AOSTF* aostf, uint8_t byte_stream[AOSTF_LEN]); -void AOSTF_setup_fill_vcdu(AOSTF* vcdu); +void AOSTF_setup_fill_aostf(AOSTF* aostf); -void AOSTF_setup_realtime_vcdu_hdr(AOSTF* vcdu, +void AOSTF_setup_realtime_aostf_hdr(AOSTF* aostf, uint32_t counter); -void AOSTF_setup_replay_vcdu_hdr(AOSTF* vcdu, +void AOSTF_setup_replay_aostf_hdr(AOSTF* aostf, uint32_t counter); -AOSTF_VER AOSTF_get_ver(const AOSTF* vcdu); +AOSTF_VER AOSTF_get_ver(const AOSTF* aostf); -void AOSTF_set_ver(AOSTF* vcdu, +void AOSTF_set_ver(AOSTF* aostf, AOSTF_VER ver); -AOSTF_SCID AOSTF_get_scdi(const AOSTF* vcdu); +AOSTF_SCID AOSTF_get_scdi(const AOSTF* aostf); -void AOSTF_set_scid(AOSTF* vcdu, +void AOSTF_set_scid(AOSTF* aostf, AOSTF_SCID scid); -AOSTF_VCID AOSTF_get_vcid(const AOSTF* vcdu); +AOSTF_VCID AOSTF_get_vcid(const AOSTF* aostf); -void AOSTF_set_vcid(AOSTF* vcdu, +void AOSTF_set_vcid(AOSTF* aostf, AOSTF_VCID vcid); -uint32_t AOSTF_get_vcdu_counter(const AOSTF* vcdu); +uint32_t AOSTF_get_aostf_counter(const AOSTF* aostf); -void AOSTF_set_vcdu_counter(AOSTF* vcdu, +void AOSTF_set_aostf_counter(AOSTF* aostf, uint32_t counter); -AOSTF_REPLAY_FLAG AOSTF_get_replay_flag(const AOSTF* vcdu); +AOSTF_REPLAY_FLAG AOSTF_get_replay_flag(const AOSTF* aostf); -void AOSTF_set_replay_flag(AOSTF* vcdu, +void AOSTF_set_replay_flag(AOSTF* aostf, AOSTF_REPLAY_FLAG flag); -uint32_t AOSTF_get_clcw(const AOSTF* vcdu); +uint32_t AOSTF_get_clcw(const AOSTF* aostf); -void AOSTF_set_clcw(AOSTF* vcdu, +void AOSTF_set_clcw(AOSTF* aostf, uint32_t clcw); uint32_t AOSTF_calc_next_counter(uint32_t prev); diff --git a/examples/mobc/src/src_user/tlm_cmd/ccsds/m_pdu.c b/examples/mobc/src/src_user/tlm_cmd/ccsds/m_pdu.c index 2d809741..348c7749 100644 --- a/examples/mobc/src/src_user/tlm_cmd/ccsds/m_pdu.c +++ b/examples/mobc/src/src_user/tlm_cmd/ccsds/m_pdu.c @@ -16,7 +16,7 @@ void M_PDU_generate_byte_stream(const M_PDU* m_pdu, void M_PDU_setup_idle_m_pdu(M_PDU* m_pdu) { - static uint8_t temp_fill_vcdu_data[432] = { + static uint8_t temp_fill_aostf_data[432] = { 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -47,7 +47,7 @@ void M_PDU_setup_idle_m_pdu(M_PDU* m_pdu) M_PDU_clear_spare_(m_pdu); M_PDU_set_1st_hdr_ptr(m_pdu, M_PDU_PTR_IDLE); - memcpy(&m_pdu->data[0], &temp_fill_vcdu_data[0], 432); + memcpy(&m_pdu->data[0], &temp_fill_aostf_data[0], 432); } static void M_PDU_clear_spare_(M_PDU* m_pdu) diff --git a/examples/mobc/src/src_user/tlm_cmd/telemetry_definitions.c b/examples/mobc/src/src_user/tlm_cmd/telemetry_definitions.c index 9eda2f3e..d5e1c3b9 100644 --- a/examples/mobc/src/src_user/tlm_cmd/telemetry_definitions.c +++ b/examples/mobc/src/src_user/tlm_cmd/telemetry_definitions.c @@ -180,7 +180,7 @@ static TF_TLM_FUNC_ACK Tlm_MOBC_(uint8_t* packet, uint16_t* len, uint16_t max_le TF_copy_u32(&packet[322], (uint32_t)gs_driver->latest_info->tx.send_cycle); TF_copy_u32(&packet[326], gs_driver->driver_ccsds.ccsds_config.bitrate); TF_copy_u8(&packet[330], (uint8_t)gs_driver->latest_info->tx.vcid); - TF_copy_u32(&packet[331], gs_driver->latest_info->tx.vcdu_counter); + TF_copy_u32(&packet[331], gs_driver->latest_info->tx.aostf_counter); #endif *len = 335; @@ -3564,7 +3564,7 @@ static TF_TLM_FUNC_ACK Tlm_GS_(uint8_t* packet, uint16_t* len, uint16_t max_len) TF_copy_u8(&packet[40], (uint8_t)gs_driver->info[0].rx.tctf.bd_rec_status); TF_copy_u32(&packet[41], (uint32_t)gs_driver->info[0].tx.send_cycle); TF_copy_u8(&packet[45], (uint8_t)gs_driver->info[0].tx.vcid); - TF_copy_u32(&packet[46], gs_driver->info[0].tx.vcdu_counter); + TF_copy_u32(&packet[46], gs_driver->info[0].tx.aostf_counter); TF_copy_u8(&packet[50], gs_driver->ccsds_info.buffer_num); TF_copy_u8(&packet[51], gs_driver->driver_uart.uart_config.ch); TF_copy_u32(&packet[52], gs_driver->driver_uart.uart_config.baudrate); @@ -3582,7 +3582,7 @@ static TF_TLM_FUNC_ACK Tlm_GS_(uint8_t* packet, uint16_t* len, uint16_t max_len) TF_copy_u8(&packet[73], (uint8_t)gs_driver->info[1].rx.tctf.bd_rec_status); TF_copy_u32(&packet[74], (uint32_t)gs_driver->info[1].tx.send_cycle); TF_copy_u8(&packet[78], (uint8_t)gs_driver->info[1].tx.vcid); - TF_copy_u32(&packet[79], gs_driver->info[1].tx.vcdu_counter); + TF_copy_u32(&packet[79], gs_driver->info[1].tx.aostf_counter); TF_copy_u8(&packet[83], gs_driver->driver_uart.is_tlm_on); TF_copy_u8(&packet[84], gs_validate_info->type_a_counter); TF_copy_u8(&packet[85], gs_validate_info->type_b_counter); @@ -3591,10 +3591,10 @@ static TF_TLM_FUNC_ACK Tlm_GS_(uint8_t* packet, uint16_t* len, uint16_t max_len) TF_copy_u8(&packet[88], gs_validate_info->positive_window_width); TF_copy_u32(&packet[89], (uint32_t)CSRV_GS_rt_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval); TF_copy_u32(&packet[93], (uint32_t)CSRV_GS_rt_tlm_packet_handler->tc_packet_to_m_pdu.last_updated); - TF_copy_u32(&packet[97], (uint32_t)CSRV_GS_rt_tlm_packet_handler->vcdu_counter); + TF_copy_u32(&packet[97], (uint32_t)CSRV_GS_rt_tlm_packet_handler->aostf_counter); TF_copy_u32(&packet[101], (uint32_t)CSRV_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval); TF_copy_u32(&packet[105], (uint32_t)CSRV_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.last_updated); - TF_copy_u32(&packet[109], (uint32_t)CSRV_GS_rp_tlm_packet_handler->vcdu_counter); + TF_copy_u32(&packet[109], (uint32_t)CSRV_GS_rp_tlm_packet_handler->aostf_counter); #endif *len = 113; diff --git a/examples/mobc/tlm-cmd-db/TLM_DB/SAMPLE_MOBC_TLM_DB_GS.csv b/examples/mobc/tlm-cmd-db/TLM_DB/SAMPLE_MOBC_TLM_DB_GS.csv index 13e4e740..c4ab7b15 100644 --- a/examples/mobc/tlm-cmd-db/TLM_DB/SAMPLE_MOBC_TLM_DB_GS.csv +++ b/examples/mobc/tlm-cmd-db/TLM_DB/SAMPLE_MOBC_TLM_DB_GS.csv @@ -31,7 +31,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,CCSDS.TCTF.BD_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[0].rx.tctf.bd_rec_status,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=SUCCESS@@ 1=TCTF_VER@@ 2=TCTF_SCID@@ 3=TCTF_VCID@@ 4=TCTF_TYPE@@ 5=LOCKOUT@@ 6=TCTF_SEQ_FLAG@@ 7=TCP_VER@@ 8=TCP_2ND_HDR_FLAG@@ 9=APID@@ 10=TCP_TYPE_IS_NOT_CMD@@ 11=TCP_SEQ_IS_NOTE_SINGLE@@ 12=FECW_MISSMATCH@@ 13=FARM1_PWA@@ 14=FARM1_NWA@@ 15=FARM1_LOCKOUT_AREA@@ 16=FARM1_SAME_NUMBER@@ 17=INVALID_BC_CMD,, ,CCSDS.TX.SEND_CYCLE,uint32_t,(uint32_t)gs_driver->info[0].tx.send_cycle,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,CCSDS.TX.VCID,uint8_t,(uint8_t)gs_driver->info[0].tx.vcid,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,1=REALTIME@@2=REPLAY@@63=FILL@@*=UNKNOWN,, -,CCSDS.TX.AOSTF_COUNTER,uint32_t,gs_driver->info[0].tx.vcdu_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,CCSDS.TX.AOSTF_COUNTER,uint32_t,gs_driver->info[0].tx.aostf_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,CCSDS.TX.BUFFER_NUM,uint8_t,gs_driver->ccsds_info.buffer_num,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,UART.CH,uint8_t,gs_driver->driver_uart.uart_config.ch,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,UART.BAUDRATE,uint32_t,gs_driver->driver_uart.uart_config.baudrate,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, @@ -49,7 +49,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,UART.TCTF.BD_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[1].rx.tctf.bd_rec_status,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=SUCCESS@@ 1=TCTF_VER@@ 2=TCTF_SCID@@ 3=TCTF_VCID@@ 4=TCTF_TYPE@@ 5=LOCKOUT@@ 6=TCTF_SEQ_FLAG@@ 7=TCP_VER@@ 8=TCP_2ND_HDR_FLAG@@ 9=APID@@ 10=TCP_TYPE_IS_NOT_CMD@@ 11=TCP_SEQ_IS_NOTE_SINGLE@@ 12=FECW_MISSMATCH@@ 13=FARM1_PWA@@ 14=FARM1_NWA@@ 15=FARM1_LOCKOUT_AREA@@ 16=FARM1_SAME_NUMBER@@ 17=INVALID_BC_CMD,, ,UART.TX.SEND_CYCLE,uint32_t,(uint32_t)gs_driver->info[1].tx.send_cycle,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,UART.TX.VCID,uint8_t,(uint8_t)gs_driver->info[1].tx.vcid,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,1=REALTIME@@2=REPLAY@@63=FILL@@*=UNKNOWN,, -,UART.TX.AOSTF_COUNTER,uint32_t,gs_driver->info[1].tx.vcdu_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,UART.TX.AOSTF_COUNTER,uint32_t,gs_driver->info[1].tx.aostf_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,UART.IS_TLM_ON,uint8_t,gs_driver->driver_uart.is_tlm_on,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),STATUS,,,,,,,0=OFF@@ 1=ON,, ,COP-1.TYPE_A_COUNTER,uint8_t,gs_validate_info->type_a_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,COP-1.TYPE_B_COUNTER,uint8_t,gs_validate_info->type_b_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, @@ -58,10 +58,10 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,COP-1.POSITIVE_WINDOW_WIDTH,uint8_t,gs_validate_info->positive_window_width,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RT_TLM.AOSTF.FLUSH_INTERVAL,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RT_TLM.AOSTF.LAST_UPDATED,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->tc_packet_to_m_pdu.last_updated,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, -,RT_TLM.AOSTF.COUNTER,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->vcdu_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RT_TLM.AOSTF.COUNTER,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->aostf_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RP_TLM.AOSTF.FLUSH_INTERVAL,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,RP_TLM.AOSTF.LAST_UPDATED,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.last_updated,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, -,RP_TLM.AOSTF.COUNTER,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->vcdu_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, +,RP_TLM.AOSTF.COUNTER,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->aostf_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, diff --git a/examples/mobc/tlm-cmd-db/TLM_DB/SAMPLE_MOBC_TLM_DB_MOBC.csv b/examples/mobc/tlm-cmd-db/TLM_DB/SAMPLE_MOBC_TLM_DB_MOBC.csv index bded556c..b337f273 100644 --- a/examples/mobc/tlm-cmd-db/TLM_DB/SAMPLE_MOBC_TLM_DB_MOBC.csv +++ b/examples/mobc/tlm-cmd-db/TLM_DB/SAMPLE_MOBC_TLM_DB_MOBC.csv @@ -134,7 +134,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,TCI_TX_CYCLE,uint32_t,(uint32_t)gs_driver->latest_info->tx.send_cycle,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,時刻校正情報::送出サイクル, ,TCI_TX_BITRATE,uint32_t,gs_driver->driver_ccsds.ccsds_config.bitrate,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,時刻校正情報::送出ビットレート, ,TCI_VCID,uint8_t,(uint8_t)gs_driver->latest_info->tx.vcid,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,時刻構成情報::送出VCID, -,TCI_AOSTF_COUNTER,uint32_t,gs_driver->latest_info->tx.vcdu_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,時刻校正情報::送出AOSTFカウンタ, +,TCI_AOSTF_COUNTER,uint32_t,gs_driver->latest_info->tx.aostf_counter,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),=IF(OR(EXACT(RC[-5]@@"uint8_t")@@EXACT(RC[-5]@@"int8_t"))@@8@@IF(OR(EXACT(RC[-5]@@"uint16_t")@@EXACT(RC[-5]@@"int16_t"))@@16@@IF(OR(EXACT(RC[-5]@@"uint32_t")@@EXACT(RC[-5]@@"int32_t")@@EXACT(RC[-5]@@"float"))@@32@@IF(EXACT(RC[-5]@@"double")@@64)))),NONE,,,,,,,,時刻校正情報::送出AOSTFカウンタ, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, diff --git a/examples/mobc/tlm-cmd-db/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_GS.csv b/examples/mobc/tlm-cmd-db/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_GS.csv index ea341055..69424a6a 100644 --- a/examples/mobc/tlm-cmd-db/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_GS.csv +++ b/examples/mobc/tlm-cmd-db/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_GS.csv @@ -31,7 +31,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,CCSDS.TCTF.BD_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[0].rx.tctf.bd_rec_status,PACKET,40,0,8,STATUS,,,,,,,0=SUCCESS@@ 1=TCTF_VER@@ 2=TCTF_SCID@@ 3=TCTF_VCID@@ 4=TCTF_TYPE@@ 5=LOCKOUT@@ 6=TCTF_SEQ_FLAG@@ 7=TCP_VER@@ 8=TCP_2ND_HDR_FLAG@@ 9=APID@@ 10=TCP_TYPE_IS_NOT_CMD@@ 11=TCP_SEQ_IS_NOTE_SINGLE@@ 12=FECW_MISSMATCH@@ 13=FARM1_PWA@@ 14=FARM1_NWA@@ 15=FARM1_LOCKOUT_AREA@@ 16=FARM1_SAME_NUMBER@@ 17=INVALID_BC_CMD,, ,CCSDS.TX.SEND_CYCLE,uint32_t,(uint32_t)gs_driver->info[0].tx.send_cycle,PACKET,41,0,32,NONE,,,,,,,,, ,CCSDS.TX.VCID,uint8_t,(uint8_t)gs_driver->info[0].tx.vcid,PACKET,45,0,8,STATUS,,,,,,,1=REALTIME@@2=REPLAY@@63=FILL@@*=UNKNOWN,, -,CCSDS.TX.AOSTF_COUNTER,uint32_t,gs_driver->info[0].tx.vcdu_counter,PACKET,46,0,32,NONE,,,,,,,,, +,CCSDS.TX.AOSTF_COUNTER,uint32_t,gs_driver->info[0].tx.aostf_counter,PACKET,46,0,32,NONE,,,,,,,,, ,CCSDS.TX.BUFFER_NUM,uint8_t,gs_driver->ccsds_info.buffer_num,PACKET,50,0,8,NONE,,,,,,,,, ,UART.CH,uint8_t,gs_driver->driver_uart.uart_config.ch,PACKET,51,0,8,NONE,,,,,,,,, ,UART.BAUDRATE,uint32_t,gs_driver->driver_uart.uart_config.baudrate,PACKET,52,0,32,NONE,,,,,,,,, @@ -49,7 +49,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,UART.TCTF.BD_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[1].rx.tctf.bd_rec_status,PACKET,73,0,8,STATUS,,,,,,,0=SUCCESS@@ 1=TCTF_VER@@ 2=TCTF_SCID@@ 3=TCTF_VCID@@ 4=TCTF_TYPE@@ 5=LOCKOUT@@ 6=TCTF_SEQ_FLAG@@ 7=TCP_VER@@ 8=TCP_2ND_HDR_FLAG@@ 9=APID@@ 10=TCP_TYPE_IS_NOT_CMD@@ 11=TCP_SEQ_IS_NOTE_SINGLE@@ 12=FECW_MISSMATCH@@ 13=FARM1_PWA@@ 14=FARM1_NWA@@ 15=FARM1_LOCKOUT_AREA@@ 16=FARM1_SAME_NUMBER@@ 17=INVALID_BC_CMD,, ,UART.TX.SEND_CYCLE,uint32_t,(uint32_t)gs_driver->info[1].tx.send_cycle,PACKET,74,0,32,NONE,,,,,,,,, ,UART.TX.VCID,uint8_t,(uint8_t)gs_driver->info[1].tx.vcid,PACKET,78,0,8,STATUS,,,,,,,1=REALTIME@@2=REPLAY@@63=FILL@@*=UNKNOWN,, -,UART.TX.AOSTF_COUNTER,uint32_t,gs_driver->info[1].tx.vcdu_counter,PACKET,79,0,32,NONE,,,,,,,,, +,UART.TX.AOSTF_COUNTER,uint32_t,gs_driver->info[1].tx.aostf_counter,PACKET,79,0,32,NONE,,,,,,,,, ,UART.IS_TLM_ON,uint8_t,gs_driver->driver_uart.is_tlm_on,PACKET,83,0,8,STATUS,,,,,,,0=OFF@@ 1=ON,, ,COP-1.TYPE_A_COUNTER,uint8_t,gs_validate_info->type_a_counter,PACKET,84,0,8,NONE,,,,,,,,, ,COP-1.TYPE_B_COUNTER,uint8_t,gs_validate_info->type_b_counter,PACKET,85,0,8,NONE,,,,,,,,, @@ -58,10 +58,10 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,COP-1.POSITIVE_WINDOW_WIDTH,uint8_t,gs_validate_info->positive_window_width,PACKET,88,0,8,NONE,,,,,,,,, ,RT_TLM.AOSTF.FLUSH_INTERVAL,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval,PACKET,89,0,32,NONE,,,,,,,,, ,RT_TLM.AOSTF.LAST_UPDATED,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->tc_packet_to_m_pdu.last_updated,PACKET,93,0,32,NONE,,,,,,,,, -,RT_TLM.AOSTF.COUNTER,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->vcdu_counter,PACKET,97,0,32,NONE,,,,,,,,, +,RT_TLM.AOSTF.COUNTER,uint32_t,(uint32_t)CSRV_GS_rt_tlm_packet_handler->aostf_counter,PACKET,97,0,32,NONE,,,,,,,,, ,RP_TLM.AOSTF.FLUSH_INTERVAL,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval,PACKET,101,0,32,NONE,,,,,,,,, ,RP_TLM.AOSTF.LAST_UPDATED,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.last_updated,PACKET,105,0,32,NONE,,,,,,,,, -,RP_TLM.AOSTF.COUNTER,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->vcdu_counter,PACKET,109,0,32,NONE,,,,,,,,, +,RP_TLM.AOSTF.COUNTER,uint32_t,(uint32_t)CSRV_GS_rp_tlm_packet_handler->aostf_counter,PACKET,109,0,32,NONE,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, diff --git a/examples/mobc/tlm-cmd-db/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MOBC.csv b/examples/mobc/tlm-cmd-db/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MOBC.csv index 0118ee27..5a42da58 100644 --- a/examples/mobc/tlm-cmd-db/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MOBC.csv +++ b/examples/mobc/tlm-cmd-db/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MOBC.csv @@ -134,7 +134,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,TCI_TX_CYCLE,uint32_t,(uint32_t)gs_driver->latest_info->tx.send_cycle,PACKET,322,0,32,NONE,,,,,,,,時刻校正情報::送出サイクル, ,TCI_TX_BITRATE,uint32_t,gs_driver->driver_ccsds.ccsds_config.bitrate,PACKET,326,0,32,NONE,,,,,,,,時刻校正情報::送出ビットレート, ,TCI_VCID,uint8_t,(uint8_t)gs_driver->latest_info->tx.vcid,PACKET,330,0,8,NONE,,,,,,,,時刻構成情報::送出VCID, -,TCI_AOSTF_COUNTER,uint32_t,gs_driver->latest_info->tx.vcdu_counter,PACKET,331,0,32,NONE,,,,,,,,時刻校正情報::送出AOSTFカウンタ, +,TCI_AOSTF_COUNTER,uint32_t,gs_driver->latest_info->tx.aostf_counter,PACKET,331,0,32,NONE,,,,,,,,時刻校正情報::送出AOSTFカウンタ, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, From ba28311f9ce41a4ebd121a3959d9cd556709bcc8 Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Wed, 8 Nov 2023 21:56:02 +0900 Subject: [PATCH 4/9] aos_transfer_frame --- .../applications/component_service/csrv_gs.h | 2 +- .../src/src_user/component_driver/com/gs.h | 2 +- .../tlm_cmd/ccsds/aos_transfer_frame.c | 30 +++++--------- .../tlm_cmd/ccsds/aos_transfer_frame.h | 41 ++++++++----------- 4 files changed, 29 insertions(+), 46 deletions(-) diff --git a/examples/mobc/src/src_user/applications/component_service/csrv_gs.h b/examples/mobc/src/src_user/applications/component_service/csrv_gs.h index c1b684bd..bde51b4d 100644 --- a/examples/mobc/src/src_user/applications/component_service/csrv_gs.h +++ b/examples/mobc/src/src_user/applications/component_service/csrv_gs.h @@ -9,7 +9,7 @@ #include "../../component_driver/com/gs.h" #include "../../tlm_cmd/ccsds/tcp_to_m_pdu.h" -#include "../../tlm_cmd/ccsds/aostf.h" +#include "../../tlm_cmd/ccsds/aos_transfer_frame.h" #include /** diff --git a/examples/mobc/src/src_user/component_driver/com/gs.h b/examples/mobc/src/src_user/component_driver/com/gs.h index c5892924..73a29375 100644 --- a/examples/mobc/src/src_user/component_driver/com/gs.h +++ b/examples/mobc/src/src_user/component_driver/com/gs.h @@ -10,7 +10,7 @@ #include #include #include "../../hal/ccsds_user.h" -#include "../../tlm_cmd/ccsds/aostf.h" +#include "../../tlm_cmd/ccsds/aos_transfer_frame.h" #include "gs_validate.h" #define GS_RX_HEADER_NUM (3) diff --git a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c index 47900154..1183ad34 100644 --- a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c +++ b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c @@ -1,13 +1,12 @@ #pragma section REPRO -#include "aostf.h" +#include "aos_transfer_frame.h" #include // for memcpy static void AOSTF_set_common_hdr_(AOSTF* aostf); static void AOSTF_clear_spare_(AOSTF* aostf); -void AOSTF_generate_byte_stream(const AOSTF* aostf, - uint8_t byte_stream[AOSTF_LEN]) +void AOSTF_generate_byte_stream(const AOSTF* aostf, uint8_t byte_stream[AOSTF_LEN]) { memcpy(byte_stream, aostf->header, AOSTF_HEADER_SIZE); byte_stream += AOSTF_HEADER_SIZE; @@ -25,16 +24,14 @@ void AOSTF_setup_fill_aostf(AOSTF* aostf) M_PDU_setup_idle_m_pdu(&(aostf->m_pdu)); } -void AOSTF_setup_realtime_aostf_hdr(AOSTF* aostf, - uint32_t counter) +void AOSTF_setup_realtime_aostf_hdr(AOSTF* aostf, uint32_t counter) { AOSTF_set_common_hdr_(aostf); AOSTF_set_vcid(aostf, AOSTF_VCID_REALTIME); AOSTF_set_aostf_counter(aostf, counter); } -void AOSTF_setup_replay_aostf_hdr(AOSTF* aostf, - uint32_t counter) +void AOSTF_setup_replay_aostf_hdr(AOSTF* aostf, uint32_t counter) { AOSTF_set_common_hdr_(aostf); AOSTF_set_replay_flag(aostf, AOSTF_REPLAY_TRUE); @@ -75,8 +72,7 @@ AOSTF_VER AOSTF_get_ver(const AOSTF* aostf) } } -void AOSTF_set_ver(AOSTF* aostf, - AOSTF_VER ver) +void AOSTF_set_ver(AOSTF* aostf, AOSTF_VER ver) { unsigned int pos = 0; uint8_t mask = 0xc0; // 11000000b @@ -106,8 +102,7 @@ AOSTF_SCID AOSTF_get_scdi(const AOSTF* aostf) } } -void AOSTF_set_scid(AOSTF* aostf, - AOSTF_SCID scid) +void AOSTF_set_scid(AOSTF* aostf, AOSTF_SCID scid) { unsigned int pos = 0; uint8_t mask1 = 0x3f; // 00111111b @@ -138,8 +133,7 @@ AOSTF_VCID AOSTF_get_vcid(const AOSTF* aostf) } } -void AOSTF_set_vcid(AOSTF* aostf, - AOSTF_VCID vcid) +void AOSTF_set_vcid(AOSTF* aostf, AOSTF_VCID vcid) { unsigned int pos = 1; uint8_t mask = 0x3f; // 00111111b @@ -161,8 +155,7 @@ uint32_t AOSTF_get_aostf_counter(const AOSTF* aostf) return counter; } -void AOSTF_set_aostf_counter(AOSTF* aostf, - uint32_t counter) +void AOSTF_set_aostf_counter(AOSTF* aostf, uint32_t counter) { unsigned int pos = 2; @@ -179,8 +172,7 @@ AOSTF_REPLAY_FLAG AOSTF_get_replay_flag(const AOSTF* aostf) return (AOSTF_REPLAY_FLAG)((aostf->header[pos] & mask) >> 7); } -void AOSTF_set_replay_flag(AOSTF* aostf, - AOSTF_REPLAY_FLAG flag) +void AOSTF_set_replay_flag(AOSTF* aostf, AOSTF_REPLAY_FLAG flag) { unsigned int pos = 5; uint8_t mask = 0x80; // 10000000b @@ -204,8 +196,7 @@ uint32_t AOSTF_get_clcw(const AOSTF* aostf) return clcw; } -void AOSTF_set_clcw(AOSTF* aostf, - uint32_t clcw) +void AOSTF_set_clcw(AOSTF* aostf, uint32_t clcw) { unsigned int pos = 0; @@ -219,4 +210,5 @@ uint32_t AOSTF_calc_next_counter(uint32_t prev) { return (prev + 1) % AOSTF_COUNTER_MAX; } + #pragma section diff --git a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h index 6b00b261..d491a9b8 100644 --- a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h +++ b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h @@ -1,12 +1,12 @@ -#ifndef AOSTF_H_ -#define AOSTF_H_ +#ifndef AOS_TRANSFER_FRAME_H_ +#define AOS_TRANSFER_FRAME_H_ #include "m_pdu.h" -#define AOSTF_HEADER_SIZE (6u) -#define AOSTF_TRAILER_SIZE (4u) -#define AOSTF_LEN (AOSTF_HEADER_SIZE + M_PDU_LEN + AOSTF_TRAILER_SIZE) -#define AOSTF_COUNTER_MAX (0x01000000) // 24bit長 +#define AOSTF_HEADER_SIZE (6u) +#define AOSTF_TRAILER_SIZE (4u) +#define AOSTF_LEN (AOSTF_HEADER_SIZE + M_PDU_LEN + AOSTF_TRAILER_SIZE) +#define AOSTF_COUNTER_MAX (0x01000000) // 24bit長 typedef struct { @@ -41,47 +41,38 @@ typedef enum AOSTF_REPLAY_TRUE = 1 // 1b: Replay Transfer Frame } AOSTF_REPLAY_FLAG; -void AOSTF_generate_byte_stream(const AOSTF* aostf, - uint8_t byte_stream[AOSTF_LEN]); +void AOSTF_generate_byte_stream(const AOSTF* aostf, uint8_t byte_stream[AOSTF_LEN]); void AOSTF_setup_fill_aostf(AOSTF* aostf); -void AOSTF_setup_realtime_aostf_hdr(AOSTF* aostf, - uint32_t counter); +void AOSTF_setup_realtime_aostf_hdr(AOSTF* aostf, uint32_t counter); -void AOSTF_setup_replay_aostf_hdr(AOSTF* aostf, - uint32_t counter); +void AOSTF_setup_replay_aostf_hdr(AOSTF* aostf, uint32_t counter); AOSTF_VER AOSTF_get_ver(const AOSTF* aostf); -void AOSTF_set_ver(AOSTF* aostf, - AOSTF_VER ver); +void AOSTF_set_ver(AOSTF* aostf, AOSTF_VER ver); AOSTF_SCID AOSTF_get_scdi(const AOSTF* aostf); -void AOSTF_set_scid(AOSTF* aostf, - AOSTF_SCID scid); +void AOSTF_set_scid(AOSTF* aostf, AOSTF_SCID scid); AOSTF_VCID AOSTF_get_vcid(const AOSTF* aostf); -void AOSTF_set_vcid(AOSTF* aostf, - AOSTF_VCID vcid); +void AOSTF_set_vcid(AOSTF* aostf, AOSTF_VCID vcid); uint32_t AOSTF_get_aostf_counter(const AOSTF* aostf); -void AOSTF_set_aostf_counter(AOSTF* aostf, - uint32_t counter); +void AOSTF_set_aostf_counter(AOSTF* aostf, uint32_t counter); AOSTF_REPLAY_FLAG AOSTF_get_replay_flag(const AOSTF* aostf); -void AOSTF_set_replay_flag(AOSTF* aostf, - AOSTF_REPLAY_FLAG flag); +void AOSTF_set_replay_flag(AOSTF* aostf, AOSTF_REPLAY_FLAG flag); uint32_t AOSTF_get_clcw(const AOSTF* aostf); -void AOSTF_set_clcw(AOSTF* aostf, - uint32_t clcw); +void AOSTF_set_clcw(AOSTF* aostf, uint32_t clcw); uint32_t AOSTF_calc_next_counter(uint32_t prev); -#endif // AOSTF_H_ +#endif From 5600f60bdd998f6f5602ecffa3d7a7e008b2d519 Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Wed, 8 Nov 2023 22:01:56 +0900 Subject: [PATCH 5/9] sed AOSTF to AosTransferFrame --- .../applications/component_service/csrv_gs.h | 2 +- .../src/src_user/component_driver/com/gs.c | 4 +- .../src/src_user/component_driver/com/gs.h | 2 +- .../tlm_cmd/ccsds/aos_transfer_frame.c | 40 +++++++++---------- .../tlm_cmd/ccsds/aos_transfer_frame.h | 34 ++++++++-------- 5 files changed, 41 insertions(+), 41 deletions(-) diff --git a/examples/mobc/src/src_user/applications/component_service/csrv_gs.h b/examples/mobc/src/src_user/applications/component_service/csrv_gs.h index bde51b4d..6886cef1 100644 --- a/examples/mobc/src/src_user/applications/component_service/csrv_gs.h +++ b/examples/mobc/src/src_user/applications/component_service/csrv_gs.h @@ -19,7 +19,7 @@ typedef struct { TcpToMPdu tc_packet_to_m_pdu; //!< PL から取り出した tc_packet を M_PDU に変換する - AOSTF aostf; //!< 送信するAOSTF + AosTransferFrame aostf; //!< 送信するAOSTF uint32_t aostf_counter; //!< AOSTF counter } CSRV_GS_TlmPacketHandler; diff --git a/examples/mobc/src/src_user/component_driver/com/gs.c b/examples/mobc/src/src_user/component_driver/com/gs.c index ede3aeba..084c13fa 100644 --- a/examples/mobc/src/src_user/component_driver/com/gs.c +++ b/examples/mobc/src/src_user/component_driver/com/gs.c @@ -254,11 +254,11 @@ static CDS_ERR_CODE GS_analyze_rec_data_(CDS_StreamConfig* p_stream_config, void return CDS_ERR_CODE_OK; } -CDS_CMD_ERR_CODE GS_send_aostf(GS_Driver* gs_driver, const AOSTF* aostf) +CDS_CMD_ERR_CODE GS_send_aostf(GS_Driver* gs_driver, const AosTransferFrame* aostf) { CDS_ERR_CODE ret_ccsds = CDS_ERR_CODE_OK; CDS_ERR_CODE ret_uart = CDS_ERR_CODE_OK; - size_t aostf_size = sizeof(AOSTF); + size_t aostf_size = sizeof(AosTransferFrame); // パディングが無ければ元を GS_tx_frame_ にコピーさせる (444Byte) のコピーが無駄 if (aostf_size == AOSTF_LEN) diff --git a/examples/mobc/src/src_user/component_driver/com/gs.h b/examples/mobc/src/src_user/component_driver/com/gs.h index 73a29375..b35a0e2b 100644 --- a/examples/mobc/src/src_user/component_driver/com/gs.h +++ b/examples/mobc/src/src_user/component_driver/com/gs.h @@ -113,6 +113,6 @@ CDS_REC_ERR_CODE GS_rec_tctf(GS_Driver* gs_driver); * @param[in] aostf: 送信する AOSTF. 場合によってはそのまま DS に渡すので, local変数ではなくstaticな変数を渡すこと * @return CDS_CMD_ERR_CODE: 送信結果 */ -CDS_CMD_ERR_CODE GS_send_aostf(GS_Driver* gs_driver, const AOSTF* aostf); +CDS_CMD_ERR_CODE GS_send_aostf(GS_Driver* gs_driver, const AosTransferFrame* aostf); #endif diff --git a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c index 1183ad34..57810ad8 100644 --- a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c +++ b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c @@ -3,10 +3,10 @@ #include // for memcpy -static void AOSTF_set_common_hdr_(AOSTF* aostf); -static void AOSTF_clear_spare_(AOSTF* aostf); +static void AOSTF_set_common_hdr_(AosTransferFrame* aostf); +static void AOSTF_clear_spare_(AosTransferFrame* aostf); -void AOSTF_generate_byte_stream(const AOSTF* aostf, uint8_t byte_stream[AOSTF_LEN]) +void AOSTF_generate_byte_stream(const AosTransferFrame* aostf, uint8_t byte_stream[AOSTF_LEN]) { memcpy(byte_stream, aostf->header, AOSTF_HEADER_SIZE); byte_stream += AOSTF_HEADER_SIZE; @@ -17,21 +17,21 @@ void AOSTF_generate_byte_stream(const AOSTF* aostf, uint8_t byte_stream[AOSTF_LE memcpy(byte_stream, aostf->trailer, AOSTF_TRAILER_SIZE); } -void AOSTF_setup_fill_aostf(AOSTF* aostf) +void AOSTF_setup_fill_aostf(AosTransferFrame* aostf) { AOSTF_set_common_hdr_(aostf); AOSTF_set_vcid(aostf, AOSTF_VCID_FILL); M_PDU_setup_idle_m_pdu(&(aostf->m_pdu)); } -void AOSTF_setup_realtime_aostf_hdr(AOSTF* aostf, uint32_t counter) +void AOSTF_setup_realtime_aostf_hdr(AosTransferFrame* aostf, uint32_t counter) { AOSTF_set_common_hdr_(aostf); AOSTF_set_vcid(aostf, AOSTF_VCID_REALTIME); AOSTF_set_aostf_counter(aostf, counter); } -void AOSTF_setup_replay_aostf_hdr(AOSTF* aostf, uint32_t counter) +void AOSTF_setup_replay_aostf_hdr(AosTransferFrame* aostf, uint32_t counter) { AOSTF_set_common_hdr_(aostf); AOSTF_set_replay_flag(aostf, AOSTF_REPLAY_TRUE); @@ -39,7 +39,7 @@ void AOSTF_setup_replay_aostf_hdr(AOSTF* aostf, uint32_t counter) AOSTF_set_aostf_counter(aostf, counter); } -static void AOSTF_set_common_hdr_(AOSTF* aostf) +static void AOSTF_set_common_hdr_(AosTransferFrame* aostf) { AOSTF_set_ver(aostf, AOSTF_VER_2); AOSTF_set_scid(aostf, AOSTF_SCID_SAMPLE_SATELLITE); // FIXME: 仮 @@ -47,7 +47,7 @@ static void AOSTF_set_common_hdr_(AOSTF* aostf) AOSTF_clear_spare_(aostf); } -static void AOSTF_clear_spare_(AOSTF* aostf) +static void AOSTF_clear_spare_(AosTransferFrame* aostf) { unsigned int pos = 5; uint8_t mask = 0x7f; // 01111111b @@ -55,7 +55,7 @@ static void AOSTF_clear_spare_(AOSTF* aostf) aostf->header[pos] &= (uint8_t)(~mask); } -AOSTF_VER AOSTF_get_ver(const AOSTF* aostf) +AOSTF_VER AOSTF_get_ver(const AosTransferFrame* aostf) { unsigned int pos = 0; uint8_t mask = 0xc0; // 11000000b @@ -72,7 +72,7 @@ AOSTF_VER AOSTF_get_ver(const AOSTF* aostf) } } -void AOSTF_set_ver(AOSTF* aostf, AOSTF_VER ver) +void AOSTF_set_ver(AosTransferFrame* aostf, AOSTF_VER ver) { unsigned int pos = 0; uint8_t mask = 0xc0; // 11000000b @@ -82,7 +82,7 @@ void AOSTF_set_ver(AOSTF* aostf, AOSTF_VER ver) aostf->header[pos] |= val; } -AOSTF_SCID AOSTF_get_scdi(const AOSTF* aostf) +AOSTF_SCID AOSTF_get_scdi(const AosTransferFrame* aostf) { unsigned int pos = 0; uint8_t mask1 = 0x3f; // 00111111b @@ -102,7 +102,7 @@ AOSTF_SCID AOSTF_get_scdi(const AOSTF* aostf) } } -void AOSTF_set_scid(AOSTF* aostf, AOSTF_SCID scid) +void AOSTF_set_scid(AosTransferFrame* aostf, AOSTF_SCID scid) { unsigned int pos = 0; uint8_t mask1 = 0x3f; // 00111111b @@ -114,7 +114,7 @@ void AOSTF_set_scid(AOSTF* aostf, AOSTF_SCID scid) aostf->header[pos + 1] |= (uint8_t)((scid << 6) & mask2); } -AOSTF_VCID AOSTF_get_vcid(const AOSTF* aostf) +AOSTF_VCID AOSTF_get_vcid(const AosTransferFrame* aostf) { unsigned int pos = 1; uint8_t mask = 0x3f; // 00111111b @@ -133,7 +133,7 @@ AOSTF_VCID AOSTF_get_vcid(const AOSTF* aostf) } } -void AOSTF_set_vcid(AOSTF* aostf, AOSTF_VCID vcid) +void AOSTF_set_vcid(AosTransferFrame* aostf, AOSTF_VCID vcid) { unsigned int pos = 1; uint8_t mask = 0x3f; // 00111111b @@ -142,7 +142,7 @@ void AOSTF_set_vcid(AOSTF* aostf, AOSTF_VCID vcid) aostf->header[pos] |= (uint8_t)(vcid & mask); } -uint32_t AOSTF_get_aostf_counter(const AOSTF* aostf) +uint32_t AOSTF_get_aostf_counter(const AosTransferFrame* aostf) { unsigned int pos = 2; @@ -155,7 +155,7 @@ uint32_t AOSTF_get_aostf_counter(const AOSTF* aostf) return counter; } -void AOSTF_set_aostf_counter(AOSTF* aostf, uint32_t counter) +void AOSTF_set_aostf_counter(AosTransferFrame* aostf, uint32_t counter) { unsigned int pos = 2; @@ -164,7 +164,7 @@ void AOSTF_set_aostf_counter(AOSTF* aostf, uint32_t counter) aostf->header[pos + 2] = (uint8_t)(counter & 0xff); } -AOSTF_REPLAY_FLAG AOSTF_get_replay_flag(const AOSTF* aostf) +AOSTF_REPLAY_FLAG AOSTF_get_replay_flag(const AosTransferFrame* aostf) { unsigned int pos = 5; uint8_t mask = 0x80; // 10000000b @@ -172,7 +172,7 @@ AOSTF_REPLAY_FLAG AOSTF_get_replay_flag(const AOSTF* aostf) return (AOSTF_REPLAY_FLAG)((aostf->header[pos] & mask) >> 7); } -void AOSTF_set_replay_flag(AOSTF* aostf, AOSTF_REPLAY_FLAG flag) +void AOSTF_set_replay_flag(AosTransferFrame* aostf, AOSTF_REPLAY_FLAG flag) { unsigned int pos = 5; uint8_t mask = 0x80; // 10000000b @@ -181,7 +181,7 @@ void AOSTF_set_replay_flag(AOSTF* aostf, AOSTF_REPLAY_FLAG flag) aostf->header[pos] |= (uint8_t)((flag << 7) & mask); } -uint32_t AOSTF_get_clcw(const AOSTF* aostf) +uint32_t AOSTF_get_clcw(const AosTransferFrame* aostf) { unsigned int pos = 0; @@ -196,7 +196,7 @@ uint32_t AOSTF_get_clcw(const AOSTF* aostf) return clcw; } -void AOSTF_set_clcw(AOSTF* aostf, uint32_t clcw) +void AOSTF_set_clcw(AosTransferFrame* aostf, uint32_t clcw) { unsigned int pos = 0; diff --git a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h index d491a9b8..24eddefa 100644 --- a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h +++ b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h @@ -13,7 +13,7 @@ typedef struct uint8_t header[AOSTF_HEADER_SIZE]; M_PDU m_pdu; uint8_t trailer[AOSTF_TRAILER_SIZE]; -} AOSTF; +} AosTransferFrame; typedef enum { @@ -41,37 +41,37 @@ typedef enum AOSTF_REPLAY_TRUE = 1 // 1b: Replay Transfer Frame } AOSTF_REPLAY_FLAG; -void AOSTF_generate_byte_stream(const AOSTF* aostf, uint8_t byte_stream[AOSTF_LEN]); +void AOSTF_generate_byte_stream(const AosTransferFrame* aostf, uint8_t byte_stream[AOSTF_LEN]); -void AOSTF_setup_fill_aostf(AOSTF* aostf); +void AOSTF_setup_fill_aostf(AosTransferFrame* aostf); -void AOSTF_setup_realtime_aostf_hdr(AOSTF* aostf, uint32_t counter); +void AOSTF_setup_realtime_aostf_hdr(AosTransferFrame* aostf, uint32_t counter); -void AOSTF_setup_replay_aostf_hdr(AOSTF* aostf, uint32_t counter); +void AOSTF_setup_replay_aostf_hdr(AosTransferFrame* aostf, uint32_t counter); -AOSTF_VER AOSTF_get_ver(const AOSTF* aostf); +AOSTF_VER AOSTF_get_ver(const AosTransferFrame* aostf); -void AOSTF_set_ver(AOSTF* aostf, AOSTF_VER ver); +void AOSTF_set_ver(AosTransferFrame* aostf, AOSTF_VER ver); -AOSTF_SCID AOSTF_get_scdi(const AOSTF* aostf); +AOSTF_SCID AOSTF_get_scdi(const AosTransferFrame* aostf); -void AOSTF_set_scid(AOSTF* aostf, AOSTF_SCID scid); +void AOSTF_set_scid(AosTransferFrame* aostf, AOSTF_SCID scid); -AOSTF_VCID AOSTF_get_vcid(const AOSTF* aostf); +AOSTF_VCID AOSTF_get_vcid(const AosTransferFrame* aostf); -void AOSTF_set_vcid(AOSTF* aostf, AOSTF_VCID vcid); +void AOSTF_set_vcid(AosTransferFrame* aostf, AOSTF_VCID vcid); -uint32_t AOSTF_get_aostf_counter(const AOSTF* aostf); +uint32_t AOSTF_get_aostf_counter(const AosTransferFrame* aostf); -void AOSTF_set_aostf_counter(AOSTF* aostf, uint32_t counter); +void AOSTF_set_aostf_counter(AosTransferFrame* aostf, uint32_t counter); -AOSTF_REPLAY_FLAG AOSTF_get_replay_flag(const AOSTF* aostf); +AOSTF_REPLAY_FLAG AOSTF_get_replay_flag(const AosTransferFrame* aostf); -void AOSTF_set_replay_flag(AOSTF* aostf, AOSTF_REPLAY_FLAG flag); +void AOSTF_set_replay_flag(AosTransferFrame* aostf, AOSTF_REPLAY_FLAG flag); -uint32_t AOSTF_get_clcw(const AOSTF* aostf); +uint32_t AOSTF_get_clcw(const AosTransferFrame* aostf); -void AOSTF_set_clcw(AOSTF* aostf, uint32_t clcw); +void AOSTF_set_clcw(AosTransferFrame* aostf, uint32_t clcw); uint32_t AOSTF_calc_next_counter(uint32_t prev); From 6c90fc24bcd8545cfb45c47d6a242dc4860543cc Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Wed, 8 Nov 2023 22:35:30 +0900 Subject: [PATCH 6/9] add definition of AOS TF --- .../tlm_cmd/ccsds/aos_transfer_frame.c | 12 +++-- .../tlm_cmd/ccsds/aos_transfer_frame.h | 47 +++++++++++++++++-- 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c index 57810ad8..f177e422 100644 --- a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c +++ b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c @@ -1,4 +1,9 @@ #pragma section REPRO +/** + * @file + * @brief CCSDS で規定される AOS Transfer Frame の実装 + * @note 詳細は aos_transfer_frame.h を参照 + */ #include "aos_transfer_frame.h" #include // for memcpy @@ -66,7 +71,6 @@ AOSTF_VER AOSTF_get_ver(const AosTransferFrame* aostf) { case AOSTF_VER_2: return ver; - default: return AOSTF_VER_UNKNOWN; } @@ -96,7 +100,6 @@ AOSTF_SCID AOSTF_get_scdi(const AosTransferFrame* aostf) { case AOSTF_SCID_SAMPLE_SATELLITE: return (AOSTF_SCID)scid; - default: return AOSTF_SCID_UNKNOWN; } @@ -124,10 +127,9 @@ AOSTF_VCID AOSTF_get_vcid(const AosTransferFrame* aostf) switch (vcid) { case AOSTF_VCID_REALTIME: // FALLTHROUGH - case AOSTF_VCID_REPLAY: // FALLTHROUGH - case AOSTF_VCID_FILL: // FALLTHROUGH + case AOSTF_VCID_REPLAY: // FALLTHROUGH + case AOSTF_VCID_FILL: // FALLTHROUGH return vcid; - default: return AOSTF_VCID_UNKNOWN; } diff --git a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h index 24eddefa..6fd03cee 100644 --- a/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h +++ b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h @@ -1,3 +1,42 @@ +/** + * @file + * @brief CCSDS で規定される AOS Transfer Frame の実装 + * @note packet 構造 + * |---------+-------+-------+--------------------------| + * | Pos | Pos | Size | Name | + * | [octet] | [bit] | [bit] | | + * |---------+-------+-------+--------------------------| + * | === Primary Header ================================| + * |---------+-------+-------+--------------------------| + * | 0 | 0 | 2 | Version Number | + * | 0 | 2 | 8 | Spacecraft ID | + * | 1 | 2 | 6 | Virtual Channel ID | + * | 2 | 0 | 24 | Virtual Channel | + * | | | | Frame Count | + * | 5 | 0 | 1 | Replay Flag | + * | 5 | 1 | 1 | VC Frame Count | + * | | | | Usage Flag | + * | 5 | 2 | 2 | Reserved Spare | + * | 5 | 4 | 4 | VC Frame Count Cycle | + * |---------+-------+-------+--------------------------| + * | === User Data Field ===============================| + * |---------+-------+-------+--------------------------| + * | 6 | 0 | * | M_PDU など | + * |---------+-------+-------+--------------------------| + * | === Trailer =======================================| + * |---------+-------+-------+--------------------------| + * | N - 4 | 0 | 32 | CLCW | + * |---------+-------+-------+--------------------------| + * + * Primary Header: + * Version Number と Spacecraft ID をまとめて Master Channel ID と呼ぶ + * 以下をまとめて Signaling Field と呼ぶ + * Frame Header Error Control がある Option もある + * Transfer Frame Insert Zone: + * Primary Header の後に Transfer Frame Insert Zone がある Option もある + * Trailer: + * ここでの定義以外にさまざまな Option がある + */ #ifndef AOS_TRANSFER_FRAME_H_ #define AOS_TRANSFER_FRAME_H_ @@ -11,7 +50,7 @@ typedef struct { uint8_t header[AOSTF_HEADER_SIZE]; - M_PDU m_pdu; + M_PDU m_pdu; uint8_t trailer[AOSTF_TRAILER_SIZE]; } AosTransferFrame; @@ -30,15 +69,15 @@ typedef enum typedef enum { AOSTF_VCID_REALTIME = 0x01, // 000001b: Realtime Transfer Frame - AOSTF_VCID_REPLAY = 0x02, // 000010b: Stored Transfer Frame - AOSTF_VCID_FILL = 0x3f, // 111111b: Fill Transfer Frame + AOSTF_VCID_REPLAY = 0x02, // 000010b: Stored Transfer Frame + AOSTF_VCID_FILL = 0x3f, // 111111b: Fill Transfer Frame AOSTF_VCID_UNKNOWN } AOSTF_VCID; typedef enum { AOSTF_REPLAY_FALSE = 0, // 0b: Realtime Transfer Frame - AOSTF_REPLAY_TRUE = 1 // 1b: Replay Transfer Frame + AOSTF_REPLAY_TRUE = 1 // 1b: Replay Transfer Frame } AOSTF_REPLAY_FLAG; void AOSTF_generate_byte_stream(const AosTransferFrame* aostf, uint8_t byte_stream[AOSTF_LEN]); From aaee9f4ff89e9953ebdaa8c1cafc1f5b997b791c Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Wed, 8 Nov 2023 22:49:42 +0900 Subject: [PATCH 7/9] fix small --- .../src/src_user/applications/component_service/csrv_gs.h | 4 ++-- examples/mobc/src/src_user/tlm_cmd/ccsds/m_pdu.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/mobc/src/src_user/applications/component_service/csrv_gs.h b/examples/mobc/src/src_user/applications/component_service/csrv_gs.h index 6886cef1..594e2900 100644 --- a/examples/mobc/src/src_user/applications/component_service/csrv_gs.h +++ b/examples/mobc/src/src_user/applications/component_service/csrv_gs.h @@ -19,8 +19,8 @@ typedef struct { TcpToMPdu tc_packet_to_m_pdu; //!< PL から取り出した tc_packet を M_PDU に変換する - AosTransferFrame aostf; //!< 送信するAOSTF - uint32_t aostf_counter; //!< AOSTF counter + AosTransferFrame aostf; //!< 送信するAOSTF + uint32_t aostf_counter; //!< AOSTF counter } CSRV_GS_TlmPacketHandler; extern const GS_Driver* const gs_driver; diff --git a/examples/mobc/src/src_user/tlm_cmd/ccsds/m_pdu.c b/examples/mobc/src/src_user/tlm_cmd/ccsds/m_pdu.c index 348c7749..da6fe013 100644 --- a/examples/mobc/src/src_user/tlm_cmd/ccsds/m_pdu.c +++ b/examples/mobc/src/src_user/tlm_cmd/ccsds/m_pdu.c @@ -16,7 +16,7 @@ void M_PDU_generate_byte_stream(const M_PDU* m_pdu, void M_PDU_setup_idle_m_pdu(M_PDU* m_pdu) { - static uint8_t temp_fill_aostf_data[432] = { + static uint8_t temp_fill_aostf_data_[432] = { 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -47,7 +47,7 @@ void M_PDU_setup_idle_m_pdu(M_PDU* m_pdu) M_PDU_clear_spare_(m_pdu); M_PDU_set_1st_hdr_ptr(m_pdu, M_PDU_PTR_IDLE); - memcpy(&m_pdu->data[0], &temp_fill_aostf_data[0], 432); + memcpy(&m_pdu->data[0], &temp_fill_aostf_data_[0], 432); } static void M_PDU_clear_spare_(M_PDU* m_pdu) From 26cad74158c4d7f882441081a1f82a198c787151 Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Thu, 9 Nov 2023 18:19:16 +0900 Subject: [PATCH 8/9] Update CHANGELOG.md --- CHANGELOG.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca2fbc43..c8ccbd72 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,21 @@ 注意: これは既存の C2A core update の「リリースの間の Pull Request を眺めてなんとなく察する」という曖昧な操作を緩和していくための試みであり,C2A user に対するお知らせを行う場として使っていくことを意図しています.初めから c2a-core の全変更を取り扱うと不必要に煩雑になるだけになってしまうため,完全な変更内容の一覧についてはこれまで通り [GitHub Releases](https://github.com/arkedge/c2a-core/releases) などから参照してください. +## v4.1.0 (Unreleased) + +### Fixed + +- [#193](https://github.com/arkedge/c2a-core/pull/193): VCDU を AOS transfer frame に rename する + +### Migration Guide +- [#193](https://github.com/arkedge/c2a-core/pull/193): 影響範囲は MOBC のみ + 1. vcdu.c/h を消し,aos_transfer_frame.c/h をコピーする.CMakeLists.txt も修正する + 1. `VCDU` を `AOSTF` に置換する(TLM DB の csv なども) + 1. `vcdu` を `aostf` に置換する(TLM DB の csv なども) + 1. `vcdu.h` を `aos_transfer_frame.h` に置換する(include の修正) + 1. コンパイルが通らないところを直す.想定されるものは以下 + - VCDU 構造体 が AosTransferFrame 構造体に変わったので,変数定義の型名が変わっているはず + ## v4.0.1 (2023-11-09) ### Fixed From 1de745ef74c63d19a1f658fc70d375067afefefc Mon Sep 17 00:00:00 2001 From: Ryo Suzumoto Date: Thu, 9 Nov 2023 18:30:21 +0900 Subject: [PATCH 9/9] Update CHANGELOG.md --- CHANGELOG.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8ccbd72..338b1093 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,12 +10,12 @@ ### Migration Guide - [#193](https://github.com/arkedge/c2a-core/pull/193): 影響範囲は MOBC のみ - 1. vcdu.c/h を消し,aos_transfer_frame.c/h をコピーする.CMakeLists.txt も修正する - 1. `VCDU` を `AOSTF` に置換する(TLM DB の csv なども) - 1. `vcdu` を `aostf` に置換する(TLM DB の csv なども) - 1. `vcdu.h` を `aos_transfer_frame.h` に置換する(include の修正) - 1. コンパイルが通らないところを直す.想定されるものは以下 - - VCDU 構造体 が AosTransferFrame 構造体に変わったので,変数定義の型名が変わっているはず + 1. `src_user/tlm_cmd/ccsds/vcdu.{c,h}` を消し,`src_user/tlm_cmd/ccsds/aos_transfer_frame.{c,h}` を `examples/mobc` からコピーする.CMakeLists.txt も修正する. + 1. `VCDU` を `AOSTF` に置換する(TLM DB の csv なども). + 1. `vcdu` を `aostf` に置換する(TLM DB の csv なども). + 1. `vcdu.h` を `aos_transfer_frame.h` に置換する(include の修正). + 1. コンパイルが通らないところを直す.想定されるものは以下. + - `VCDU` 構造体 が `AosTransferFrame` 構造体に変わったので,変数定義の型名が変わっているはず. ## v4.0.1 (2023-11-09)