From 8e0be734bb58e20b60b405848eb37fdf8c2d62fa Mon Sep 17 00:00:00 2001 From: meltingrabbit <39541984+meltingrabbit@users.noreply.github.com> Date: Wed, 8 Nov 2023 19:21:43 +0900 Subject: [PATCH] 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 4063eacf1..d1187abc5 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 40a9e6171..d4bda3267 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 448103eec..249783b5a 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 52bdcdb03..14a0bd867 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 614e3877e..fa4c7b697 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 f50924980..7d63e00af 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 701da1c4d..ae8be6332 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 2622c61c7..d2fccd9c9 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 6e275f424..225a128d0 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 766d8c619..13e4e7400 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 635ee25af..bded556cf 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 6419ed366..ea3410554 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 2794564b0..0118ee27d 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 5832bc674..621c136d1 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 f7a55853a..ab92656f4 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); }