diff --git a/CHANGELOG.md b/CHANGELOG.md index ca2fbc43..338b1093 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. `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) ### Fixed 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..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 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_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 の内部で指定される - VCDU_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()); - // 完成した VCDU を RT VCDU として送出 - GS_send_vcdu(&gs_driver_, &CSRV_GS_rt_tlm_packet_handler_.vcdu); + // 完成した AOSTF を RT AOSTF として送出 + 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 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_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 の内部で指定される - VCDU_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()); - // 完成した VCDU を RP VCDU として送出 - GS_send_vcdu(&gs_driver_, &CSRV_GS_rp_tlm_packet_handler_.vcdu); + // 完成した AOSTF を RP AOSTF として送出 + 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 448103ee..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 @@ -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/aos_transfer_frame.h" #include /** @@ -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 + 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/component_driver/com/gs.c b/examples/mobc/src/src_user/component_driver/com/gs.c index 52bdcdb0..084c13fa 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,8 +114,8 @@ 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.vcdu_counter = 0; + gs_driver->info[i].tx.vcid = AOSTF_VCID_UNKNOWN; + gs_driver->info[i].tx.aostf_counter = 0; } gs_driver->ccsds_info.buffer_num = 8; @@ -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_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 vcdu_size = sizeof(VCDU); + size_t aostf_size = sizeof(AosTransferFrame); // パディングが無ければ元を GS_tx_frame_ にコピーさせる (444Byte) のコピーが無駄 - if (vcdu_size == VCDU_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 { - VCDU_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 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(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 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(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 614e3877..b35a0e2b 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/aos_transfer_frame.h" #include "gs_validate.h" #define GS_RX_HEADER_NUM (3) @@ -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 aostf_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] aostf: 送信する 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_aostf(GS_Driver* gs_driver, const AosTransferFrame* aostf); #endif 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/aos_transfer_frame.c b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c new file mode 100644 index 00000000..f177e422 --- /dev/null +++ b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.c @@ -0,0 +1,216 @@ +#pragma section REPRO +/** + * @file + * @brief CCSDS で規定される AOS Transfer Frame の実装 + * @note 詳細は aos_transfer_frame.h を参照 + */ +#include "aos_transfer_frame.h" + +#include // for memcpy + +static void AOSTF_set_common_hdr_(AosTransferFrame* aostf); +static void AOSTF_clear_spare_(AosTransferFrame* aostf); + +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; + + M_PDU_generate_byte_stream(&(aostf->m_pdu), byte_stream); + byte_stream += M_PDU_LEN; + + memcpy(byte_stream, aostf->trailer, AOSTF_TRAILER_SIZE); +} + +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(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(AosTransferFrame* aostf, uint32_t 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_(AosTransferFrame* aostf) +{ + 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_(AosTransferFrame* aostf) +{ + unsigned int pos = 5; + uint8_t mask = 0x7f; // 01111111b + + aostf->header[pos] &= (uint8_t)(~mask); +} + +AOSTF_VER AOSTF_get_ver(const AosTransferFrame* aostf) +{ + unsigned int pos = 0; + uint8_t mask = 0xc0; // 11000000b + + AOSTF_VER ver = (AOSTF_VER)((aostf->header[pos] & mask) >> 6); + + switch (ver) + { + case AOSTF_VER_2: + return ver; + default: + return AOSTF_VER_UNKNOWN; + } +} + +void AOSTF_set_ver(AosTransferFrame* aostf, AOSTF_VER ver) +{ + unsigned int pos = 0; + uint8_t mask = 0xc0; // 11000000b + uint8_t val = (uint8_t)((ver << 6) & mask); + + aostf->header[pos] &= (uint8_t)(~mask); + aostf->header[pos] |= val; +} + +AOSTF_SCID AOSTF_get_scdi(const AosTransferFrame* aostf) +{ + unsigned int pos = 0; + uint8_t mask1 = 0x3f; // 00111111b + uint8_t mask2 = 0xc0; // 11000000b + + int scid = (aostf->header[pos] & mask1); + scid <<= 2; + scid |= ((aostf->header[pos + 1] & mask2) >> 6); + + switch (scid) + { + case AOSTF_SCID_SAMPLE_SATELLITE: + return (AOSTF_SCID)scid; + default: + return AOSTF_SCID_UNKNOWN; + } +} + +void AOSTF_set_scid(AosTransferFrame* aostf, AOSTF_SCID scid) +{ + unsigned int pos = 0; + uint8_t mask1 = 0x3f; // 00111111b + uint8_t mask2 = 0xc0; // 11000000b + + 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 AosTransferFrame* aostf) +{ + unsigned int pos = 1; + uint8_t mask = 0x3f; // 00111111b + + AOSTF_VCID vcid = (AOSTF_VCID)(aostf->header[pos] & mask); + + switch (vcid) + { + case AOSTF_VCID_REALTIME: // FALLTHROUGH + case AOSTF_VCID_REPLAY: // FALLTHROUGH + case AOSTF_VCID_FILL: // FALLTHROUGH + return vcid; + default: + return AOSTF_VCID_UNKNOWN; + } +} + +void AOSTF_set_vcid(AosTransferFrame* aostf, AOSTF_VCID vcid) +{ + unsigned int pos = 1; + uint8_t mask = 0x3f; // 00111111b + + aostf->header[pos] &= (uint8_t)(~mask); + aostf->header[pos] |= (uint8_t)(vcid & mask); +} + +uint32_t AOSTF_get_aostf_counter(const AosTransferFrame* aostf) +{ + unsigned int pos = 2; + + uint32_t counter = aostf->header[pos]; + counter <<= 8; + counter |= aostf->header[pos + 1]; + counter <<= 8; + counter |= aostf->header[pos + 2]; + + return counter; +} + +void AOSTF_set_aostf_counter(AosTransferFrame* aostf, uint32_t counter) +{ + unsigned int pos = 2; + + 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 AosTransferFrame* aostf) +{ + unsigned int pos = 5; + uint8_t mask = 0x80; // 10000000b + + return (AOSTF_REPLAY_FLAG)((aostf->header[pos] & mask) >> 7); +} + +void AOSTF_set_replay_flag(AosTransferFrame* aostf, AOSTF_REPLAY_FLAG flag) +{ + unsigned int pos = 5; + uint8_t mask = 0x80; // 10000000b + + aostf->header[pos] &= (uint8_t)(~mask); + aostf->header[pos] |= (uint8_t)((flag << 7) & mask); +} + +uint32_t AOSTF_get_clcw(const AosTransferFrame* aostf) +{ + unsigned int pos = 0; + + uint32_t clcw = aostf->trailer[pos]; + clcw <<= 8; + clcw |= aostf->trailer[pos + 1]; + clcw <<= 8; + clcw |= aostf->trailer[pos + 2]; + clcw <<= 8; + clcw |= aostf->trailer[pos + 3]; + + return clcw; +} + +void AOSTF_set_clcw(AosTransferFrame* aostf, uint32_t clcw) +{ + unsigned int pos = 0; + + 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) +{ + 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 new file mode 100644 index 00000000..6fd03cee --- /dev/null +++ b/examples/mobc/src/src_user/tlm_cmd/ccsds/aos_transfer_frame.h @@ -0,0 +1,117 @@ +/** + * @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_ + +#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長 + +typedef struct +{ + uint8_t header[AOSTF_HEADER_SIZE]; + M_PDU m_pdu; + uint8_t trailer[AOSTF_TRAILER_SIZE]; +} AosTransferFrame; + +typedef enum +{ + AOSTF_VER_2 = 1, // 01b: Version2 + AOSTF_VER_UNKNOWN +} AOSTF_VER; + +typedef enum +{ + AOSTF_SCID_SAMPLE_SATELLITE = 0x00, + AOSTF_SCID_UNKNOWN +} AOSTF_SCID; + +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_UNKNOWN +} AOSTF_VCID; + +typedef enum +{ + AOSTF_REPLAY_FALSE = 0, // 0b: Realtime 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]); + +void AOSTF_setup_fill_aostf(AosTransferFrame* aostf); + +void AOSTF_setup_realtime_aostf_hdr(AosTransferFrame* aostf, uint32_t counter); + +void AOSTF_setup_replay_aostf_hdr(AosTransferFrame* aostf, uint32_t counter); + +AOSTF_VER AOSTF_get_ver(const AosTransferFrame* aostf); + +void AOSTF_set_ver(AosTransferFrame* aostf, AOSTF_VER ver); + +AOSTF_SCID AOSTF_get_scdi(const AosTransferFrame* aostf); + +void AOSTF_set_scid(AosTransferFrame* aostf, AOSTF_SCID scid); + +AOSTF_VCID AOSTF_get_vcid(const AosTransferFrame* aostf); + +void AOSTF_set_vcid(AosTransferFrame* aostf, AOSTF_VCID vcid); + +uint32_t AOSTF_get_aostf_counter(const AosTransferFrame* aostf); + +void AOSTF_set_aostf_counter(AosTransferFrame* aostf, uint32_t counter); + +AOSTF_REPLAY_FLAG AOSTF_get_replay_flag(const AosTransferFrame* aostf); + +void AOSTF_set_replay_flag(AosTransferFrame* aostf, AOSTF_REPLAY_FLAG flag); + +uint32_t AOSTF_get_clcw(const AosTransferFrame* aostf); + +void AOSTF_set_clcw(AosTransferFrame* aostf, uint32_t clcw); + +uint32_t AOSTF_calc_next_counter(uint32_t prev); + +#endif 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..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_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/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/src/src_user/tlm_cmd/ccsds/vcdu.c b/examples/mobc/src/src_user/tlm_cmd/ccsds/vcdu.c deleted file mode 100644 index f5092498..00000000 --- a/examples/mobc/src/src_user/tlm_cmd/ccsds/vcdu.c +++ /dev/null @@ -1,222 +0,0 @@ -#pragma section REPRO -#include "vcdu.h" - -#include // for memcpy - -static void VCDU_set_common_hdr_(VCDU* vcdu); -static void VCDU_clear_spare_(VCDU* vcdu); - -void VCDU_generate_byte_stream(const VCDU* vcdu, - uint8_t byte_stream[VCDU_LEN]) -{ - memcpy(byte_stream, vcdu->header, VCDU_HEADER_SIZE); - byte_stream += VCDU_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); -} - -void VCDU_setup_fill_vcdu(VCDU* vcdu) -{ - VCDU_set_common_hdr_(vcdu); - VCDU_set_vcid(vcdu, VCDU_VCID_FILL); - M_PDU_setup_idle_m_pdu(&(vcdu->m_pdu)); -} - -void VCDU_setup_realtime_vcdu_hdr(VCDU* vcdu, - uint32_t counter) -{ - VCDU_set_common_hdr_(vcdu); - VCDU_set_vcid(vcdu, VCDU_VCID_REALTIME); - VCDU_set_vcdu_counter(vcdu, counter); -} - -void VCDU_setup_replay_vcdu_hdr(VCDU* 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); -} - -static void VCDU_set_common_hdr_(VCDU* 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); -} - -static void VCDU_clear_spare_(VCDU* vcdu) -{ - unsigned int pos = 5; - uint8_t mask = 0x7f; // 01111111b - - vcdu->header[pos] &= (uint8_t)(~mask); -} - -VCDU_VER VCDU_get_ver(const VCDU* vcdu) -{ - unsigned int pos = 0; - uint8_t mask = 0xc0; // 11000000b - - VCDU_VER ver = (VCDU_VER)((vcdu->header[pos] & mask) >> 6); - - switch (ver) - { - case VCDU_VER_2: - return ver; - - default: - return VCDU_VER_UNKNOWN; - } -} - -void VCDU_set_ver(VCDU* vcdu, - VCDU_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; -} - -VCDU_SCID VCDU_get_scdi(const VCDU* vcdu) -{ - unsigned int pos = 0; - uint8_t mask1 = 0x3f; // 00111111b - uint8_t mask2 = 0xc0; // 11000000b - - int scid = (vcdu->header[pos] & mask1); - scid <<= 2; - scid |= ((vcdu->header[pos + 1] & mask2) >> 6); - - switch (scid) - { - case VCDU_SCID_SAMPLE_SATELLITE: - return (VCDU_SCID)scid; - - default: - return VCDU_SCID_UNKNOWN; - } -} - -void VCDU_set_scid(VCDU* vcdu, - VCDU_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); -} - -VCDU_VCID VCDU_get_vcid(const VCDU* vcdu) -{ - unsigned int pos = 1; - uint8_t mask = 0x3f; // 00111111b - - VCDU_VCID vcid = (VCDU_VCID)(vcdu->header[pos] & mask); - - switch (vcid) - { - case VCDU_VCID_REALTIME: // FALLTHROUGH - case VCDU_VCID_REPLAY: // FALLTHROUGH - case VCDU_VCID_FILL: // FALLTHROUGH - return vcid; - - default: - return VCDU_VCID_UNKNOWN; - } -} - -void VCDU_set_vcid(VCDU* vcdu, - VCDU_VCID vcid) -{ - unsigned int pos = 1; - uint8_t mask = 0x3f; // 00111111b - - vcdu->header[pos] &= (uint8_t)(~mask); - vcdu->header[pos] |= (uint8_t)(vcid & mask); -} - -uint32_t VCDU_get_vcdu_counter(const VCDU* vcdu) -{ - unsigned int pos = 2; - - uint32_t counter = vcdu->header[pos]; - counter <<= 8; - counter |= vcdu->header[pos + 1]; - counter <<= 8; - counter |= vcdu->header[pos + 2]; - - return counter; -} - -void VCDU_set_vcdu_counter(VCDU* vcdu, - 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); -} - -VCDU_REPLAY_FLAG VCDU_get_replay_flag(const VCDU* vcdu) -{ - unsigned int pos = 5; - uint8_t mask = 0x80; // 10000000b - - return (VCDU_REPLAY_FLAG)((vcdu->header[pos] & mask) >> 7); -} - -void VCDU_set_replay_flag(VCDU* vcdu, - VCDU_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); -} - -uint32_t VCDU_get_clcw(const VCDU* vcdu) -{ - unsigned int pos = 0; - - uint32_t clcw = vcdu->trailer[pos]; - clcw <<= 8; - clcw |= vcdu->trailer[pos + 1]; - clcw <<= 8; - clcw |= vcdu->trailer[pos + 2]; - clcw <<= 8; - clcw |= vcdu->trailer[pos + 3]; - - return clcw; -} - -void VCDU_set_clcw(VCDU* vcdu, - 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); -} - -uint32_t VCDU_calc_next_counter(uint32_t prev) -{ - return (prev + 1) % VCDU_COUNTER_MAX; -} -#pragma section diff --git a/examples/mobc/src/src_user/tlm_cmd/ccsds/vcdu.h b/examples/mobc/src/src_user/tlm_cmd/ccsds/vcdu.h deleted file mode 100644 index 701da1c4..00000000 --- a/examples/mobc/src/src_user/tlm_cmd/ccsds/vcdu.h +++ /dev/null @@ -1,87 +0,0 @@ -#ifndef VCDU_H_ -#define VCDU_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長 - -typedef struct -{ - uint8_t header[VCDU_HEADER_SIZE]; - M_PDU m_pdu; - uint8_t trailer[VCDU_TRAILER_SIZE]; -} VCDU; - -typedef enum -{ - VCDU_VER_2 = 1, // 01b: Version2 - VCDU_VER_UNKNOWN -} VCDU_VER; - -typedef enum -{ - VCDU_SCID_SAMPLE_SATELLITE = 0x00, - VCDU_SCID_UNKNOWN -} VCDU_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; - -typedef enum -{ - VCDU_REPLAY_FALSE = 0, // 0b: Realtime Transfer Frame - VCDU_REPLAY_TRUE = 1 // 1b: Replay Transfer Frame -} VCDU_REPLAY_FLAG; - -void VCDU_generate_byte_stream(const VCDU* vcdu, - uint8_t byte_stream[VCDU_LEN]); - -void VCDU_setup_fill_vcdu(VCDU* vcdu); - -void VCDU_setup_realtime_vcdu_hdr(VCDU* vcdu, - uint32_t counter); - -void VCDU_setup_replay_vcdu_hdr(VCDU* vcdu, - uint32_t counter); - -VCDU_VER VCDU_get_ver(const VCDU* vcdu); - -void VCDU_set_ver(VCDU* vcdu, - VCDU_VER ver); - -VCDU_SCID VCDU_get_scdi(const VCDU* vcdu); - -void VCDU_set_scid(VCDU* vcdu, - VCDU_SCID scid); - -VCDU_VCID VCDU_get_vcid(const VCDU* vcdu); - -void VCDU_set_vcid(VCDU* vcdu, - VCDU_VCID vcid); - -uint32_t VCDU_get_vcdu_counter(const VCDU* vcdu); - -void VCDU_set_vcdu_counter(VCDU* vcdu, - uint32_t counter); - -VCDU_REPLAY_FLAG VCDU_get_replay_flag(const VCDU* vcdu); - -void VCDU_set_replay_flag(VCDU* vcdu, - VCDU_REPLAY_FLAG flag); - -uint32_t VCDU_get_clcw(const VCDU* vcdu); - -void VCDU_set_clcw(VCDU* vcdu, - uint32_t clcw); - -uint32_t VCDU_calc_next_counter(uint32_t prev); - -#endif // VCDU_H_ 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/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..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.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.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,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.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,,,,,,,,, ,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->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->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 635ee25a..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 @@ -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.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 6419ed36..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.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.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,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.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,,,,,,,,, ,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->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->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 2794564b..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 @@ -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.aostf_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); }