diff --git a/.github/workflows/.python-version b/.github/workflows/.python-version index c8cfe3959..2c0733315 100644 --- a/.github/workflows/.python-version +++ b/.github/workflows/.python-version @@ -1 +1 @@ -3.10 +3.11 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..e9cbc53c7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,43 @@ +name: Build + +on: + push: + branches: + - main + - develop + pull_request: + +jobs: + minimum_user: + name: minimum user + uses: arkedge/workflows-c2a/.github/workflows/c2a-build.yml@v1.0.0 + with: + c2a_dir: Examples/minimum_user + c2a_custom_setup: | + cd $GITHUB_WORKSPACE + ls -l + cd ./repo + pwd + ls -l + if [ $RUNNER_OS = 'Windows' ]; then + cmd "/C setup.bat" + else + ./setup.sh + fi + + second_obc_user: + name: 2nd obc user + uses: arkedge/workflows-c2a/.github/workflows/c2a-build.yml@v1.0.0 + with: + c2a_dir: Examples/2nd_obc_user + c2a_custom_setup: | + cd $GITHUB_WORKSPACE + ls -l + cd ./repo + pwd + ls -l + if [ $RUNNER_OS = 'Windows' ]; then + cmd "/C setup.bat" + else + ./setup.sh + fi diff --git a/.github/workflows/build_as_c89.yml b/.github/workflows/build_as_c89.yml deleted file mode 100644 index d3bc0fa18..000000000 --- a/.github/workflows/build_as_c89.yml +++ /dev/null @@ -1,179 +0,0 @@ -name: build as C89 using SILS Mockup - -on: - push: - branches: - - main - - develop - pull_request: - -jobs: - gen_build_matrix: - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.gen-matrix.outputs.matrix }} - steps: - - name: generate matrix json - id: gen-matrix - shell: bash - run: | - compiler=( - "gcc" - "clang" - ) - warning=( - "Werror" - "Wextra" - ) - examples=( - "minimum_user" - "2nd_obc_user" - ) - echo "[" > tmp - for e in "${examples[@]}"; do - for c in "${compiler[@]}"; do - for w in "${warning[@]}"; do - if [ "$c" == "gcc" ] && [ "$w" == "Werror" ]; then - continue - fi - echo "{ \"compiler\": \"${c}\", \"warning\": \"${w}\", \"example\": \"${e}\" }" >> tmp - echo "," >> tmp - done - done - done - sed -i -e '$d' tmp # remove final comma - echo "]" >> tmp - sed -i -z 's/\n//g' tmp # remove newline - jq < tmp - echo "::set-output name=matrix::{\"include\": $(cat tmp) }" - - build_examples_as_c89: - runs-on: ubuntu-latest - needs: gen_build_matrix - strategy: - fail-fast: false - matrix: ${{ fromJson(needs.gen_build_matrix.outputs.matrix) }} - - steps: - - uses: actions/checkout@v3 - - - name: install deps - run: | - sudo apt-get update - sudo apt-get install -y libc6-dev-i386 nkf - - # - name: convert Shift-JIS to UTF-8 - # if: matrix.compiler == 'clang' - # run: find -- . -type f \( -name '*.h' -or -name '*.c' \) -exec nkf --overwrite -S -w80 "{}" \; - - - name: setup - shell: bash - run: ./setup.sh - - - name: generate compile option - id: compile_flags - shell: bash - run: | - WERROR="OFF" - WEXTRA="OFF" - if ${{ contains(matrix.warning, 'Werror') }}; then - WERROR="ON" - fi - if ${{ contains(matrix.warning, 'Wextra') }}; then - WEXTRA="ON" - fi - echo "::set-output name=WERROR::${WERROR}" - echo "::set-output name=WEXTRA::${WEXTRA}" - - - name: cmake - working-directory: ./Examples/${{ matrix.example }} - env: - CC: ${{ matrix.compiler }} - run: | - mkdir build - cd build - cmake --version - cmake .. -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DUSE_SILS_MOCKUP=ON -DADD_WERROR_FLAGS=${{ steps.compile_flags.outputs.WERROR }} -DADD_WEXTRA_FLAGS=${{ steps.compile_flags.outputs.WEXTRA }} - - - name: build - id: build - continue-on-error: ${{ matrix.compiler == 'clang' }} - working-directory: ./Examples/${{ matrix.example }}/build - run: cmake --build . - - - name: run - if: steps.build.outcome == 'success' - working-directory: ./Examples/${{ matrix.example }}/build - shell: bash - run: timeout 3 ./C2A || exit 0 - - - - name: install reviewdog - if: matrix.compiler == 'clang' - uses: reviewdog/action-setup@v1.0.3 - - - name: install clang-tidy - if: matrix.compiler == 'clang' - run: sudo apt-get install -y clang-tidy-11 - - - name: clang-tidy - if: matrix.compiler == 'clang' - working-directory: ./Examples/${{ matrix.example }}/build - run: | - run-clang-tidy-11 \ - | sed 's/\/home\/runner\/work\/c2a-core\/c2a-core\///g' \ - | sed 's/Examples\/${{ matrix.example }}\/src\/src_core\///g' \ - > clang_tidy.log - - - name: clang-tidy result - if: matrix.compiler == 'clang' - working-directory: ./Examples/${{ matrix.example }}/build - run: cat clang_tidy.log - - - name: remove duplicate error - if: matrix.compiler == 'clang' - run: | - python Script/CI/remove_duplicate_error.py ./Examples/${{ matrix.example }}/build/clang_tidy.log "clang-tidy" | tee clang_tidy.log - - - name: reviewdog clang-tidy (github-pr-review) - if: matrix.compiler == 'clang' && matrix.warning == 'Werror' - env: - REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - reviewdog \ - -name 'clang-tidy(Werror)' \ - -level warning \ - -fail-on-error=true \ - -filter-mode=added \ - -diff="git diff FETCH_HEAD" \ - -reporter=github-pr-review \ - -efm="%-Gclang-tidy%s" \ - -efm="%-GError while processing%s" \ - -efm="%W%f:%l:%c: warning: %m" \ - -efm="%E%f:%l:%c: error: %m" \ - -efm="%C%m" \ - < clang_tidy.log - - - name: reviewdog clang-tidy (github-check) - if: matrix.compiler == 'clang' && matrix.warning == 'Wextra' - env: - REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - reviewdog \ - -name 'clang-tidy(Wextra)' \ - -level warning \ - -fail-on-error=true \ - -filter-mode=nofilter \ - -diff="git diff FETCH_HEAD" \ - -reporter=github-check \ - -efm="%-Gclang-tidy%s" \ - -efm="%-GError while processing%s" \ - -efm="%W%f:%l:%c: warning: %m" \ - -efm="%E%f:%l:%c: error: %m" \ - -efm="%C%m" \ - < clang_tidy.log - - - name: build failed - if: steps.build.outcome == 'failure' - shell: bash - run: exit 1 diff --git a/.github/workflows/build_as_cxx.yml b/.github/workflows/build_as_cxx.yml index 0519dcf0f..c2fde60af 100644 --- a/.github/workflows/build_as_cxx.yml +++ b/.github/workflows/build_as_cxx.yml @@ -8,34 +8,6 @@ on: pull_request: jobs: - build_example_user_as_cxx: - runs-on: windows-latest - strategy: - fail-fast: false - matrix: - example: - - minimum_user - - 2nd_obc_user - - steps: - - uses: actions/checkout@v3 - - - name: setup - shell: cmd - run: ./setup.bat - - - name: cmake - working-directory: ./Examples/${{ matrix.example }} - run: | - mkdir build - cd build - cmake --version - cmake .. -A Win32 - - - name: build - working-directory: ./Examples/${{ matrix.example }}/build - run: cmake --build . - build_s2e_mockup: runs-on: windows-latest strategy: diff --git a/.github/workflows/python_check_format.yml b/.github/workflows/python_check_format.yml index 8035bbe07..da132afaa 100644 --- a/.github/workflows/python_check_format.yml +++ b/.github/workflows/python_check_format.yml @@ -13,6 +13,9 @@ jobs: steps: - uses: actions/checkout@v3 + - name: install black formatter + run: pip install black==23.1.0 + # - name: check python format with black # uses: psf/black@stable diff --git a/.github/workflows/python_lint.yml b/.github/workflows/python_lint.yml index 7a6fba03d..569fff864 100644 --- a/.github/workflows/python_lint.yml +++ b/.github/workflows/python_lint.yml @@ -18,6 +18,9 @@ jobs: with: python-version-file: .github/workflows/.python-version + - name: install flake8 + run: pip install flake8==6.0.0 + - name: flake8 Lint uses: reviewdog/action-flake8@v3 with: diff --git a/.gitignore b/.gitignore index 0e0a2eca3..961b60df6 100644 --- a/.gitignore +++ b/.gitignore @@ -60,8 +60,6 @@ dkms.conf # for c2a user sample Examples/minimum_user/src/src_core Examples/minimum_user/build -Examples/minimum_user/src/src_user/Test/authorization.json Examples/2nd_obc_user/src/src_core Examples/2nd_obc_user/build -Examples/2nd_obc_user/src/src_user/Test/authorization.json *.pyc diff --git a/Applications/CMakeLists.txt b/Applications/CMakeLists.txt index 5a8b7fe5a..3aeadea94 100644 --- a/Applications/CMakeLists.txt +++ b/Applications/CMakeLists.txt @@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.13) project(C2A_CORE_APPS) set(C2A_SRCS - anomaly_handler.c divided_cmd_utility.c gs_command_dispatcher.c event_utility.c diff --git a/Applications/TestApp/test_ccp_util.c b/Applications/TestApp/test_ccp_util.c index 2660ef009..7aa56939e 100644 --- a/Applications/TestApp/test_ccp_util.c +++ b/Applications/TestApp/test_ccp_util.c @@ -8,16 +8,16 @@ #include "../../TlmCmd/common_cmd_packet_util.h" #include -CCP_EXEC_STS Cmd_TEST_CCP_REGISTER_TLC_ASAP(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TEST_CCP_REGISTER_TLC_ASAP(const CommonCmdPacket* packet) { cycle_t ti = CCP_get_param_from_packet(packet, 0, cycle_t); PH_ACK ack = CCP_register_tlc_asap(ti, TLCD_ID_FROM_GS, Cmd_CODE_NOP, NULL, 0); - if (ack != PH_ACK_TLC_SUCCESS) return CCP_EXEC_ILLEGAL_CONTEXT; + if (ack != PH_ACK_TLC_SUCCESS) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TEST_CCP_GET_RAW_PARAM_INFO(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TEST_CCP_GET_RAW_PARAM_INFO(const CommonCmdPacket* packet) { uint16_t len = CCP_get_param_from_packet(packet, 0, uint16_t); uint8_t first_data = CCP_get_param_from_packet(packet, 1, uint8_t); @@ -26,28 +26,28 @@ CCP_EXEC_STS Cmd_TEST_CCP_GET_RAW_PARAM_INFO(const CommonCmdPacket* packet) // CCP_get_raw_param_head の test if (CCP_get_raw_param_head(packet) != CCP_get_param_head(packet) + sizeof(uint16_t) + sizeof(uint8_t)) { - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } // len チェック if (CCP_get_raw_param_len(packet) != len) { - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } if (len == 0) { // raw param なし - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } data = CCP_get_raw_param_head(packet); if (data[0] != first_data) { - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/Applications/TestApp/test_ccp_util.h b/Applications/TestApp/test_ccp_util.h index 2b1db2e98..179a98ef0 100644 --- a/Applications/TestApp/test_ccp_util.h +++ b/Applications/TestApp/test_ccp_util.h @@ -7,7 +7,7 @@ #include "../../TlmCmd/common_cmd_packet.h" -CCP_EXEC_STS Cmd_TEST_CCP_REGISTER_TLC_ASAP(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_TEST_CCP_GET_RAW_PARAM_INFO(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TEST_CCP_REGISTER_TLC_ASAP(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TEST_CCP_GET_RAW_PARAM_INFO(const CommonCmdPacket* packet); #endif diff --git a/Applications/anomaly_handler.c b/Applications/anomaly_handler.c deleted file mode 100644 index 0a351824b..000000000 --- a/Applications/anomaly_handler.c +++ /dev/null @@ -1,433 +0,0 @@ -#pragma section REPRO -#include "anomaly_handler.h" -#ifdef AL_ENABLE - -#include "../Library/print.h" -#include -#include "../System/TimeManager/time_manager.h" -#include "../Library/endian_memcpy.h" -#include "../TlmCmd/common_cmd_packet_util.h" -#include "timeline_command_dispatcher.h" -// #include "../anomaly_logger_group.h" -// #include "../../TlmCmd/block_command_definitions.h" - -static void AH_init_(void); -static void AH_load_default_rules_(void); -static void AH_exec_(void); -static size_t AH_check_rules_(size_t record_id); -static int AH_is_equal_code_(const AL_AnomalyCode* a, - const AL_AnomalyCode* b); -static void AH_respond_to_anomaly_(size_t id); -static void AH_print_ah_status_(void); -static void AH_add_rule_(size_t id, const AH_Rule* ahr); -static void AH_clear_log_(void); -static void AH_respond_log_clear(void); - -static AnomalyHandler anomaly_handler_; -const AnomalyHandler* const anomaly_handler = &anomaly_handler_; - -static AH_AnomalyRespondLog AH_respond_log_; -const AH_AnomalyRespondLog* const AH_respond_log = &AH_respond_log_; - -static size_t AH_prev_pos_; -static size_t AH_prev_act_; - - -AppInfo AH_create_app(void) -{ - return AI_create_app_info("ah", AH_init_, AH_exec_); -} - - -static void AH_init_(void) -{ - int i; - - // 初期設定はすべてのルールを無効化する - for (i = 0; i < AH_MAX_RULES; ++i) - { - anomaly_handler_.elements[i].is_active = 0; - } - - // デフォルトのルール構成を読み込み - AH_load_default_rules_(); - // 対応時刻をゼロクリア - OBCT_clear(&(anomaly_handler_.respond_at)); - // 初期は範囲外に設定し該当なしを表現 - anomaly_handler_.latest_id = AH_MAX_RULES; - // 対応実行数をクリア - anomaly_handler_.action_counter = 0; - // アノマリ対応検知用の変数をクリア - AH_prev_act_ = 0; - // アノマリ処理状況を初期化 - AH_clear_log_(); - // テレトリ用ページ番号は0に初期化 - anomaly_handler_.page_no = 0; - - AH_respond_log_.pointer = 0; - - for (i = 0; i < AH_LOG_MAX; i++) - { - AH_respond_log_.log[i].respond_at_master = 0; - AH_respond_log_.log[i].rule_num = 0; - } - AH_respond_log_.page_no = 0; -} - - -static void AH_load_default_rules_(void) -{ - AH_Rule_default_load(); -} - - -static void AH_exec_(void) -{ - const AL_AnomalyRecord* ar = AL_get_record(anomaly_handler_.al_pointer.pos); // 初期値は走査開始位置 - - // アノマリ個数が変化していない場合 - if (anomaly_handler_.al_pointer.count == anomaly_logger->counter) return; - // 新たなアノマリが発生した場合 - else if (anomaly_handler_.al_pointer.count < anomaly_logger->counter) - { - size_t record_id; - - for (record_id = anomaly_handler_.al_pointer.pos; record_id < anomaly_logger->header; ++record_id) - { - size_t prev_id = AH_check_rules_(record_id); // 位置合わせのため.Reprog時の対症療法なので,修正したい - (void)prev_id; - ar = AL_get_record(record_id); - - // 最初の一つ目:前回最後に記録された部分.圧縮時はここに記録される - if (record_id == anomaly_handler_.al_pointer.pos) - { - // もしrun_lengthが増えていれば→新たにこのアノマリが発生していれば - if (ar->run_length > anomaly_handler_.latest_run_length) - { - // 対応をする - size_t id = AH_check_rules_(record_id); - - if (id != AH_MAX_RULES) - { - AH_respond_to_anomaly_(id); - } - } - } - else - { - // anomaly_logger->headerが1以上増えている→新たな種類のアノマリが発生している - size_t id = AH_check_rules_(record_id); - - if (id != AH_MAX_RULES) - { - AH_respond_to_anomaly_(id); - } - } - } - - // 処理終了後、最新位置・回数をAnomalyLogger側と同期 - anomaly_handler_.al_pointer.pos = anomaly_logger->header - 1; - anomaly_handler_.al_pointer.count = anomaly_logger->counter; - anomaly_handler_.latest_run_length = ar->run_length; - } - // 異常: AnomalyHandlerとAnomalyLoggerの関係が崩れている。 - else - { - // 仕方がないので、記録をリセットし強制同期する。 - AH_clear_log_(); - } -} - - -static size_t AH_check_rules_(size_t record_id) -{ - const AL_AnomalyRecord* ar = AL_get_record(record_id); - int is_latest = (record_id == anomaly_logger->header); - size_t id; - - // 全ルールを順次走査 - for (id = 0; id < AH_MAX_RULES; ++id) - { - AH_Element ahe = anomaly_handler_.elements[id]; - - // ルールが無効の場合はスキップ - if (!(ahe.is_active)) continue; - // コード不一致の場合はスキップ - else if (!AH_is_equal_code_(&(ahe.rule.code), &(ar->code))) continue; - - // コードに対応するルールが存在。判定条件を評価。 - switch (ahe.rule.cond) - { - case AH_SINGLE: - // コードが存在した時点で無条件合致。 - return id; - - case AH_CONTINUOUS: - - // 連続回数を超過した場合に条件合致。 - if (ahe.rule.threshold < ar->run_length) return id; - - break; - - case AH_CUMULATE: - - // 積算回数を超過した場合に条件合致。 - if (ahe.counter <= ar->run_length) - { - return id; - } - // 最新レコードに対する比較でない場合は積算数を更新する。 - else if (!is_latest) - { - ahe.counter -= ar->run_length; - } - - break; - } - } - - return AH_MAX_RULES; // 該当なしの場合は登録上限を返す。 -} - - -static int AH_is_equal_code_(const AL_AnomalyCode* a, - const AL_AnomalyCode* b) -{ - return ((a->group == b->group) && (a->local == b->local)); -} - - -static void AH_respond_to_anomaly_(size_t id) -{ - // これが呼ばれてるには,anomaly_handler_.elements[].is_active == 1は保証されている. - - // 対応ブロックコマンドをリアルタイムコマンドで展開 - // 通常BCなのでTLC1に展開 - CCP_form_and_exec_block_deploy_cmd(TLCD_ID_DEPLOY_BC, anomaly_handler_.elements[id].rule.bc_id); - - // 実行したルールを記録し回数を更新 - anomaly_handler_.respond_at = TMGR_get_master_clock(); - anomaly_handler_.latest_id = id; - ++anomaly_handler_.action_counter; - - if (AH_respond_log_.pointer < AH_LOG_MAX) - { - AH_respond_log_.log[AH_respond_log_.pointer].respond_at_master = TMGR_get_master_total_cycle(); - AH_respond_log_.log[AH_respond_log_.pointer].rule_num = id; - AH_respond_log_.pointer += 1; - } - - // 合致したルールは無効化する。 - anomaly_handler_.elements[id].is_active = 0; -} - - -AppInfo print_ah_status(void) -{ - return AI_create_app_info("ahs", NULL, AH_print_ah_status_); -} - - -static void AH_print_ah_status_(void) -{ - VT100_erase_line(); - Printf("AH: ID %d, ACT %d, AT <%d, %d, %d>, POS %d, CTR %d\n", - anomaly_handler_.latest_id, anomaly_handler_.action_counter, - anomaly_handler_.respond_at.total_cycle, anomaly_handler_.respond_at.mode_cycle, anomaly_handler_.respond_at.step, - anomaly_handler_.al_pointer.pos, anomaly_handler_.al_pointer.count); - - // 新種のアノマリが発生した場合警告音1回 - if (AH_prev_pos_ != anomaly_handler_.al_pointer.pos) - { - Printf("\a"); - AH_prev_pos_ = anomaly_handler_.al_pointer.pos; - } - - // アノマリ対応が発生した場合警告音2回 - if (AH_prev_act_ != anomaly_handler_.action_counter) - { - Printf("\a\a"); - AH_prev_act_ = anomaly_handler_.action_counter; - } -} - - -CCP_EXEC_STS Cmd_AH_REGISTER_RULE(const CommonCmdPacket* packet) -{ - enum - { - ID, GROUP, LOCAL, COND, THRESHOLD, BC - }; - const uint8_t* param = CCP_get_param_head(packet); - AH_Rule ahr; - - if (CCP_get_param_len(packet) != (5 + SIZE_OF_BCT_ID_T)) - { - // パラメータ長確認(6Bytes) - return CCP_EXEC_ILLEGAL_LENGTH; - } - else if (param[ID] >= AH_MAX_RULES) - { - // 登録指定位置が許容範囲外 - return CCP_EXEC_ILLEGAL_PARAMETER; - } - else if (param[COND] > AH_CUMULATE) - { - // 判定条件が定義されたものと一致しない - return CCP_EXEC_ILLEGAL_PARAMETER; - } - - ahr.code.group = (uint32_t)param[GROUP]; - ahr.code.local = (uint32_t)param[LOCAL]; - ahr.cond = (AH_CONDITION)param[COND]; - ahr.threshold = (size_t)param[THRESHOLD]; - endian_memcpy(&(ahr.bc_id), &(param[BC]), SIZE_OF_BCT_ID_T); - - AH_add_rule_((size_t)param[ID], &ahr); - - return CCP_EXEC_SUCCESS; -} - - -static void AH_add_rule_(size_t id, const AH_Rule* ahr) -{ - anomaly_handler_.elements[id].is_active = 0; // 登録時点では無効とする - anomaly_handler_.elements[id].rule = *ahr; - anomaly_handler_.elements[id].counter = ahr->threshold; -} - - -CCP_EXEC_STS Cmd_AH_ACTIVATE_RULE(const CommonCmdPacket* packet) -{ - const uint8_t* param = CCP_get_param_head(packet); - size_t id; - - id = param[0]; // 非明示的なcast - if (id >= AH_MAX_RULES) - { - // 指定位置が範囲外 - return CCP_EXEC_ILLEGAL_PARAMETER; - } - - AH_activate_rule(id); - return CCP_EXEC_SUCCESS; -} - - -void AH_activate_rule(size_t id) -{ - anomaly_handler_.elements[id].is_active = 1; - anomaly_handler_.elements[id].counter = anomaly_handler_.elements[id].rule.threshold; -} - - -CCP_EXEC_STS Cmd_AH_INACTIVATE_RULE(const CommonCmdPacket* packet) -{ - const uint8_t* param = CCP_get_param_head(packet); - size_t id; - - id = param[0]; // 非明示的なcast - if (id >= AH_MAX_RULES) - { - // 指定位置が範囲外 - return CCP_EXEC_ILLEGAL_PARAMETER; - } - - AH_inactivate_rule(id); - return CCP_EXEC_SUCCESS; -} - - -void AH_inactivate_rule(size_t id) -{ - anomaly_handler_.elements[id].is_active = 0; -} - - -CCP_EXEC_STS Cmd_AH_CLEAR_LOG(const CommonCmdPacket* packet) -{ - (void)packet; - AH_clear_log_(); - return CCP_EXEC_SUCCESS; -} - - -static void AH_clear_log_(void) -{ - // AnomalyHnadler内の保持情報を初期化 - anomaly_handler_.al_pointer.count = 0; - anomaly_handler_.al_pointer.pos = 0; - // 前回のrun_lengthを初期化 - anomaly_handler_.latest_run_length = 0; - // アノマリ発生検知用変数を初期化 - AH_prev_pos_ = 0; - // AnomalyLoggerのリストをクリア - AL_clear(); -} - - -CCP_EXEC_STS Cmd_AH_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) -{ - uint8_t page; - - page = CCP_get_param_head(packet)[0]; - - if (page >= AH_TLM_PAGE_MAX) - { - // ページ番号がコマンドテーブル範囲外 - return CCP_EXEC_ILLEGAL_PARAMETER; - } - - anomaly_handler_.page_no = page; - return CCP_EXEC_SUCCESS; -} - - -static void AH_respond_log_clear(void) -{ - int i = 0; - for (i = 0; i < AH_LOG_MAX; i++) - { - AH_respond_log_.log[i].respond_at_master = 0; - AH_respond_log_.log[i].rule_num = 0; - } - AH_respond_log_.pointer = 0; -} - - -CCP_EXEC_STS Cmd_AHRES_LOG_CLEAR(const CommonCmdPacket* packet) -{ - (void)packet; - AH_respond_log_clear(); - return CCP_EXEC_SUCCESS; -} - - -CCP_EXEC_STS Cmd_AHRES_LOG_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) -{ - uint8_t page; - - page = CCP_get_param_head(packet)[0]; - - if (page >= AH_LOG_TLM_PAGE_MAX) - { - // ページ番号がコマンドテーブル範囲外 - return CCP_EXEC_ILLEGAL_PARAMETER; - } - - AH_respond_log_.page_no = page; - return CCP_EXEC_SUCCESS; -} - - -// 2019-02-04 -// ユーザー定義部分離により,追加 -void AH_add_rule(size_t id, const AH_Rule* ahr, uint8_t is_active) -{ - AH_add_rule_(id, ahr); - anomaly_handler_.elements[id].is_active = is_active; -} - -#endif - -#pragma section diff --git a/Applications/anomaly_handler.h b/Applications/anomaly_handler.h deleted file mode 100644 index ebcad174e..000000000 --- a/Applications/anomaly_handler.h +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef ANOMALY_HANDLER_H_ -#define ANOMALY_HANDLER_H_ - -#include -#ifdef AL_ENABLE - -#include // for size_t - -#include "../System/AnomalyLogger/anomaly_logger.h" -#include "../System/ApplicationManager/app_info.h" -#include "../TlmCmd/common_cmd_packet.h" -#include -#include "../TlmCmd/block_command_table.h" -#include -#include - -#define AH_TLM_PAGE_SIZE (32) //!< AnomalyHandlerのルールテーブルの1テレメトリパケット(=1ページ)に格納されるルール数(ページネーション用) -#define AH_TLM_PAGE_MAX (4) //!< AnomalyHandlerのルールテーブルのページ数(ページネーション用) -#define AH_MAX_RULES (AH_TLM_PAGE_SIZE * AH_TLM_PAGE_MAX) //!< 最大何個のルール(アノマリ - イベント対応)を保持できるか - -#define AH_LOG_TLM_PAGE_SIZE (32) //!< AnomalyHandlerの発動イベントログテーブルの1テレメトリパケット(=1ページ)に格納される発動イベントログ数(ページネーション用) -#define AH_LOG_TLM_PAGE_MAX (4) //!< AnomalyHandlerの発動イベントログテーブルのページ数(ページネーション用) -#define AH_LOG_MAX (AH_LOG_TLM_PAGE_SIZE * AH_LOG_TLM_PAGE_MAX) //!< 最大何個のイベントログを保持できるか -// 2018-12-11 -// ↑これって, AL_RECORD_MAX とサイズ揃える必要ないの? -// なさそう? - -#include - -typedef enum -{ - AH_SINGLE, - AH_CONTINUOUS, - AH_CUMULATE -} AH_CONDITION; - -typedef struct -{ - AL_AnomalyCode code; - AH_CONDITION cond; - size_t threshold; // tlmではunit8_tだ.... AH_CUMULATE用のカウンタ - bct_id_t bc_id; // tlmではunit8_tだ.... // TODO 2019/08/30 BCTの形が変わったので,TLMも直す!!! -} AH_Rule; - -typedef struct -{ - int is_active; - AH_Rule rule; - size_t counter; // AH_CUMULATE用のカウンタ -} AH_Element; - -typedef struct -{ - size_t count; - size_t pos; -} AH_Pointer; - -typedef struct -{ - AH_Element elements[AH_MAX_RULES]; - AH_Pointer al_pointer; - ObcTime respond_at; - size_t latest_id; // tlmではunit8_tだ.... - size_t action_counter; // tlmではunit8_tだ.... - size_t latest_run_length; // tlmではunit8_tだ.... - uint8_t page_no; // tlmではunit8_tだ.... -} AnomalyHandler; - -typedef struct -{ - size_t respond_at_master; - size_t rule_num; -} AH_AnomalyRespond; - -typedef struct -{ - AH_AnomalyRespond log[AH_LOG_MAX]; - size_t pointer; - uint8_t page_no; -} AH_AnomalyRespondLog; - - -extern const AnomalyHandler* const anomaly_handler; -extern const AH_AnomalyRespondLog* const AH_respond_log; - -AppInfo AH_create_app(void); - -AppInfo print_ah_status(void); - -void AH_activate_rule(size_t id); - -void AH_inactivate_rule(size_t id); - -// staticな方はデフォルトでは無効だが, -// こいつは初期化時に使われるので,選択制にした -void AH_add_rule(size_t id, const AH_Rule* ahr, uint8_t is_active); - -CCP_EXEC_STS Cmd_AH_REGISTER_RULE(const CommonCmdPacket* packet); - -CCP_EXEC_STS Cmd_AH_ACTIVATE_RULE(const CommonCmdPacket* packet); - -CCP_EXEC_STS Cmd_AH_INACTIVATE_RULE(const CommonCmdPacket* packet); - -CCP_EXEC_STS Cmd_AH_CLEAR_LOG(const CommonCmdPacket* packet); - -CCP_EXEC_STS Cmd_AH_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet); - -CCP_EXEC_STS Cmd_AHRES_LOG_CLEAR(const CommonCmdPacket* packet); - -CCP_EXEC_STS Cmd_AHRES_LOG_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet); - -#endif -#endif diff --git a/Applications/divided_cmd_utility.c b/Applications/divided_cmd_utility.c index 33f46169e..2f8d4f943 100644 --- a/Applications/divided_cmd_utility.c +++ b/Applications/divided_cmd_utility.c @@ -284,35 +284,35 @@ DCU_LOG_ACK DCU_search_and_get_log(CMD_CODE cmd_code, const DCU_ExecStatus* exec } -CCP_EXEC_STS Cmd_DCU_ABORT_CMD(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_DCU_ABORT_CMD(const CommonCmdPacket* packet) { // CMD_CODE は u16 と想定する CMD_CODE target_cmd = (CMD_CODE)CCP_get_param_from_packet(packet, 0, uint16_t); DCU_abort_cmd(target_cmd); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_DCU_DOWN_ABORT_FLAG(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_DCU_DOWN_ABORT_FLAG(const CommonCmdPacket* packet) { // CMD_CODE は u16 と想定する CMD_CODE target_cmd = (CMD_CODE)CCP_get_param_from_packet(packet, 0, uint16_t); DCU_donw_abort_flag(target_cmd); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_DCU_CLEAR_LOG(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_DCU_CLEAR_LOG(const CommonCmdPacket* packet) { (void)packet; DCU_clear_log_(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/Applications/divided_cmd_utility.h b/Applications/divided_cmd_utility.h index 00655e2de..8dfadd2b1 100644 --- a/Applications/divided_cmd_utility.h +++ b/Applications/divided_cmd_utility.h @@ -161,17 +161,17 @@ DCU_LOG_ACK DCU_search_and_get_log(CMD_CODE cmd_code, const DCU_ExecStatus* exec * @brief 実行中の分割コマンドを停止する * @note もし,指定した Cmd が実行中ではなくても CCP_EXEC_SUCCESS を返す */ -CCP_EXEC_STS Cmd_DCU_ABORT_CMD(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DCU_ABORT_CMD(const CommonCmdPacket* packet); /** * @brief エラー,またはコマンドによって中断ステータスとなっているコマンドを,実行可能状態に戻す * @note もし,指定した Cmd が中断ステータスではなくても CCP_EXEC_SUCCESS を返す */ -CCP_EXEC_STS Cmd_DCU_DOWN_ABORT_FLAG(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DCU_DOWN_ABORT_FLAG(const CommonCmdPacket* packet); /** * @brief ログをクリアする */ -CCP_EXEC_STS Cmd_DCU_CLEAR_LOG(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DCU_CLEAR_LOG(const CommonCmdPacket* packet); #endif diff --git a/Applications/event_utility.c b/Applications/event_utility.c index cfd4ce290..0aa771bb0 100644 --- a/Applications/event_utility.c +++ b/Applications/event_utility.c @@ -6,6 +6,7 @@ */ #include "event_utility.h" #include "../System/EventManager/event_handler.h" +#include "../TlmCmd/common_cmd_packet_util.h" #include // for NULL @@ -33,25 +34,25 @@ static void EVENT_UTIL_update_() } } -CCP_EXEC_STS Cmd_EVENT_UTIL_ENABLE_EH_EXEC(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EVENT_UTIL_ENABLE_EH_EXEC(const CommonCmdPacket* packet) { (void)packet; event_utility_.is_enabled_eh_execution = 1; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EVENT_UTIL_DISABLE_EH_EXEC(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EVENT_UTIL_DISABLE_EH_EXEC(const CommonCmdPacket* packet) { (void)packet; event_utility_.is_enabled_eh_execution = 0; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EVENT_UTIL_EXEC_EH(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EVENT_UTIL_EXEC_EH(const CommonCmdPacket* packet) { (void)packet; EH_execute(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/Applications/event_utility.h b/Applications/event_utility.h index d31358098..e6dabfe6e 100644 --- a/Applications/event_utility.h +++ b/Applications/event_utility.h @@ -22,8 +22,8 @@ typedef struct extern const EventUtility* const event_utility; -CCP_EXEC_STS Cmd_EVENT_UTIL_ENABLE_EH_EXEC(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EVENT_UTIL_DISABLE_EH_EXEC(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EVENT_UTIL_EXEC_EH(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EVENT_UTIL_ENABLE_EH_EXEC(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EVENT_UTIL_DISABLE_EH_EXEC(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EVENT_UTIL_EXEC_EH(const CommonCmdPacket* packet); #endif diff --git a/Applications/gs_command_dispatcher.c b/Applications/gs_command_dispatcher.c index 42ef7811c..1bc87ebad 100644 --- a/Applications/gs_command_dispatcher.c +++ b/Applications/gs_command_dispatcher.c @@ -6,6 +6,7 @@ #include "gs_command_dispatcher.h" #include "../TlmCmd/packet_handler.h" +#include "../TlmCmd/common_cmd_packet_util.h" static CommandDispatcher gs_command_dispatcher_; const CommandDispatcher* const gs_command_dispatcher = &gs_command_dispatcher_; @@ -43,13 +44,13 @@ static void GSCD_dispatch_(void) CDIS_dispatch_command(&gs_command_dispatcher_); } -CCP_EXEC_STS Cmd_GSCD_CLEAR_ERR_LOG(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_GSCD_CLEAR_ERR_LOG(const CommonCmdPacket* packet) { (void)packet; // 記録されたエラー情報をクリア CDIS_clear_error_status(&gs_command_dispatcher_); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/Applications/gs_command_dispatcher.h b/Applications/gs_command_dispatcher.h index fb9a3d667..8269596b4 100644 --- a/Applications/gs_command_dispatcher.h +++ b/Applications/gs_command_dispatcher.h @@ -17,6 +17,6 @@ extern const CommandDispatcher* const gs_command_dispatcher; */ AppInfo GSCD_create_app(void); -CCP_EXEC_STS Cmd_GSCD_CLEAR_ERR_LOG(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_GSCD_CLEAR_ERR_LOG(const CommonCmdPacket* packet); #endif diff --git a/Applications/memory_dump.c b/Applications/memory_dump.c index 9ac25ae18..71fdfeb3a 100644 --- a/Applications/memory_dump.c +++ b/Applications/memory_dump.c @@ -5,7 +5,8 @@ #include "../System/TimeManager/time_manager.h" #include "../TlmCmd/packet_handler.h" -#include "../Library/endian_memcpy.h" +#include "../Library/endian.h" +#include "../TlmCmd/common_cmd_packet_util.h" static MemoryDump memory_dump_; const MemoryDump* const memory_dump = &memory_dump_; @@ -58,19 +59,19 @@ static void MEM_init_(void) memory_dump_.adu_counter = 0; } -CCP_EXEC_STS Cmd_MEM_SET_REGION(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_MEM_SET_REGION(const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); uint32_t begin, end, span; // パラメータを読み出し - endian_memcpy(&begin, param, 4); - endian_memcpy(&end, param + 4, 4); + ENDIAN_memcpy(&begin, param, 4); + ENDIAN_memcpy(&end, param + 4, 4); if (begin > end) { // 領域の開始と終了の大小関係が逆の場合は異常終了 - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } span = end - begin; @@ -78,7 +79,7 @@ CCP_EXEC_STS Cmd_MEM_SET_REGION(const CommonCmdPacket* packet) if (span > MEM_MAX_SPAN) { // 指定ダンプ幅が最大量を超えている場合は異常終了。 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } memory_dump_.begin = begin; @@ -89,13 +90,13 @@ CCP_EXEC_STS Cmd_MEM_SET_REGION(const CommonCmdPacket* packet) // 領域設定1回毎に独立したADUカウント値を割り当てる。 memory_dump_.adu_counter = MEM_get_next_adu_counter_(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } // FIXME: CTCP 大改修が終わったら直す // https://github.com/ut-issl/c2a-core/pull/217 #if 0 -CCP_EXEC_STS Cmd_MEM_DUMP_REGION_SEQ(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_MEM_DUMP_REGION_SEQ(const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); uint8_t category, num_dumps; @@ -109,13 +110,13 @@ CCP_EXEC_STS Cmd_MEM_DUMP_REGION_SEQ(const CommonCmdPacket* packet) // パケット生成回数の上限は8回とする。 // 32kbpsでのDL時に8VCDU/secで1秒分の通信量。 // これを超える場合は複数回コマンドを送信して対応する。 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } return MEM_dump_region_(category, num_dumps); } -CCP_EXEC_STS Cmd_MEM_DUMP_REGION_RND(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_MEM_DUMP_REGION_RND(const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); uint8_t category, num_dumps; @@ -131,10 +132,10 @@ CCP_EXEC_STS Cmd_MEM_DUMP_REGION_RND(const CommonCmdPacket* packet) // パケット生成回数の上限は8回とする。 // 32kbpsでのDL時に8VCDU/secで1秒分の通信量。 // これを超える場合は複数回コマンドを送信して対応する。 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } - endian_memcpy(&adu_seq, param + 2, 2); + ENDIAN_memcpy(&adu_seq, param + 2, 2); rp = memory_dump_.begin + (adu_seq * MEM_DUMP_WIDTH); @@ -149,11 +150,11 @@ CCP_EXEC_STS Cmd_MEM_DUMP_REGION_RND(const CommonCmdPacket* packet) else { // 指定されたADU Sequence Counterが領域外であれば異常終了 - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -CCP_EXEC_STS Cmd_MEM_DUMP_SINGLE(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_MEM_DUMP_SINGLE(const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); uint8_t category, num_dumps; @@ -169,10 +170,10 @@ CCP_EXEC_STS Cmd_MEM_DUMP_SINGLE(const CommonCmdPacket* packet) // パケット生成回数の上限は8回とする。 // 32kbpsでのDL時に8VCDU/secで1秒分の通信量。 // これを超える場合は複数回コマンドを送信して対応する。 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } - endian_memcpy(&start_addr, param + 2, 4); + ENDIAN_memcpy(&start_addr, param + 2, 4); // 要検討: 指定アドレス値が異常な場合の処理をすべきか? // Segmentation Faultとか起こる? @@ -197,11 +198,11 @@ CCP_EXEC_STS Cmd_MEM_DUMP_SINGLE(const CommonCmdPacket* packet) // 生成したパケットを送出 MEM_send_packet_(&MEM_ctp_, num_dumps); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #endif -CCP_EXEC_STS Cmd_MEM_LOAD(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_MEM_LOAD(const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); size_t param_len = CCP_get_param_len(packet); @@ -213,34 +214,34 @@ CCP_EXEC_STS Cmd_MEM_LOAD(const CommonCmdPacket* packet) data_len = param_len - 4; // 書き込みアドレス読み出し - endian_memcpy(&start_addr, param, 4); + ENDIAN_memcpy(&start_addr, param, 4); // 指定した開始アドレスから始まる領域にデータを書き込み memcpy((void*)start_addr, &(param[4]), data_len); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_MEM_SET_DESTINATION(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_MEM_SET_DESTINATION(const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); uint32_t dest; - endian_memcpy(&dest, param, 4); + ENDIAN_memcpy(&dest, param, 4); if ((dest >= memory_dump_.begin) && (dest < memory_dump_.end)) { // 宛先アドレスが領域内部に含まれる場合。 // これを認めると処理が複雑になるので禁止する。 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } // 宛先アドレスを設定し、RPを領域先頭に合わせる。 memory_dump_.dest = dest; memory_dump_.rp = memory_dump_.begin; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_MEM_COPY_REGION_SEQ(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_MEM_COPY_REGION_SEQ(const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); uint32_t copy_width, wp; @@ -249,11 +250,11 @@ CCP_EXEC_STS Cmd_MEM_COPY_REGION_SEQ(const CommonCmdPacket* packet) { // 既に領域全体の読み出しが完了している場合。 // 処理は行わず正常終了する。 - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } // パラメータ読み出し。 - endian_memcpy(©_width, param, 4); + ENDIAN_memcpy(©_width, param, 4); if ((memory_dump_.rp + copy_width) > memory_dump_.end) { @@ -268,7 +269,7 @@ CCP_EXEC_STS Cmd_MEM_COPY_REGION_SEQ(const CommonCmdPacket* packet) // 指定されたコピー幅だけ領域をコピーし、RPを更新。 memcpy((uint8_t*)wp, (const uint8_t*)memory_dump_.rp, copy_width); memory_dump_.rp += copy_width; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } static uint8_t MEM_get_next_adu_counter_(void) @@ -295,15 +296,15 @@ static CCP_EXEC_STS MEM_dump_region_(uint8_t category, // 生成したパケットを送出し、ADU Sequence Counterの値を更新 MEM_send_packet_(&MEM_ctp_, num_dumps); ++memory_dump_.adu_seq; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case MEM_NO_DATA: // すでに全領域ダンプ済みなら何もせず終了 - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); default: // それ以外のエラーはないはず - return CCP_EXEC_UNKNOWN; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_UNKNOWN); } } diff --git a/Applications/memory_dump.h b/Applications/memory_dump.h index b7873834f..6170c7e7c 100644 --- a/Applications/memory_dump.h +++ b/Applications/memory_dump.h @@ -32,31 +32,31 @@ AppInfo MEM_create_app(void); // 2018/08/24 // 自分の解釈をコメントとして追加 -CCP_EXEC_STS Cmd_MEM_SET_REGION(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_MEM_SET_REGION(const CommonCmdPacket* packet); // FIXME: CTCP 大改修が終わったら直す // https://github.com/ut-issl/c2a-core/pull/217 #if 0 -CCP_EXEC_STS Cmd_MEM_DUMP_REGION_SEQ(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_MEM_DUMP_REGION_SEQ(const CommonCmdPacket* packet); // 1パケットに入り切らない場合は,最初のADU分割された最初のパケットのみダンプ // もう一度送ると,その次のパケットがダンプ // 最後はちゃんと止まる -CCP_EXEC_STS Cmd_MEM_DUMP_REGION_RND(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_MEM_DUMP_REGION_RND(const CommonCmdPacket* packet); // ADU分割された場合,その途中のパケットからダンプ -CCP_EXEC_STS Cmd_MEM_DUMP_SINGLE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_MEM_DUMP_SINGLE(const CommonCmdPacket* packet); // アドレスを指定して,ダンプ? // Cmd_MEM_SET_REGION は無視? #endif -CCP_EXEC_STS Cmd_MEM_LOAD(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_MEM_LOAD(const CommonCmdPacket* packet); // MEMにアップリンクして書き込み -CCP_EXEC_STS Cmd_MEM_SET_DESTINATION(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_MEM_SET_DESTINATION(const CommonCmdPacket* packet); // Cmd_MEM_COPY_REGION_SEQのコピー先を指定 -CCP_EXEC_STS Cmd_MEM_COPY_REGION_SEQ(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_MEM_COPY_REGION_SEQ(const CommonCmdPacket* packet); // destにrpを指定幅だけコピーしていく // これもCmd_MEM_DUMP_REGION_SEQと同様に,何度も繰り返し発行して使う. diff --git a/Applications/nop.c b/Applications/nop.c index 5d87329b5..f773a6087 100644 --- a/Applications/nop.c +++ b/Applications/nop.c @@ -7,6 +7,7 @@ */ #include "nop.h" #include +#include "../TlmCmd/common_cmd_packet_util.h" static void NOP_nop_(void); @@ -19,10 +20,10 @@ static void NOP_nop_() { // no operation } -CCP_EXEC_STS Cmd_NOP(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_NOP(const CommonCmdPacket* packet) { (void)packet; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/Applications/nop.h b/Applications/nop.h index 57e807e75..e51ba2796 100644 --- a/Applications/nop.h +++ b/Applications/nop.h @@ -12,6 +12,6 @@ AppInfo NOP_create_app(void); -CCP_EXEC_STS Cmd_NOP(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_NOP(const CommonCmdPacket* packet); #endif diff --git a/Applications/realtime_command_dispatcher.c b/Applications/realtime_command_dispatcher.c index b5a6158d0..7bd6ffb5b 100644 --- a/Applications/realtime_command_dispatcher.c +++ b/Applications/realtime_command_dispatcher.c @@ -1,7 +1,7 @@ #pragma section REPRO #include "realtime_command_dispatcher.h" - #include "../TlmCmd/packet_handler.h" +#include "../TlmCmd/common_cmd_packet_util.h" static CommandDispatcher realtime_command_dispatcher_; const CommandDispatcher* const realtime_command_dispatcher = &realtime_command_dispatcher_; @@ -24,20 +24,20 @@ static void RTCD_dispatch_(void) CDIS_dispatch_command(&realtime_command_dispatcher_); } -CCP_EXEC_STS Cmd_RTCD_CLEAR_ALL_REALTIME(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_RTCD_CLEAR_ALL_REALTIME(const CommonCmdPacket* packet) { (void)packet; CDIS_clear_command_list(&realtime_command_dispatcher_); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_RTCD_CLEAR_ERR_LOG(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_RTCD_CLEAR_ERR_LOG(const CommonCmdPacket* packet) { (void)packet; // 記録されたエラー情報を解除。 CDIS_clear_error_status(&realtime_command_dispatcher_); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/Applications/realtime_command_dispatcher.h b/Applications/realtime_command_dispatcher.h index b0ba705fb..127664747 100644 --- a/Applications/realtime_command_dispatcher.h +++ b/Applications/realtime_command_dispatcher.h @@ -9,8 +9,8 @@ extern const CommandDispatcher* const realtime_command_dispatcher; AppInfo RTCD_create_app(void); -CCP_EXEC_STS Cmd_RTCD_CLEAR_ALL_REALTIME(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_RTCD_CLEAR_ALL_REALTIME(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_RTCD_CLEAR_ERR_LOG(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_RTCD_CLEAR_ERR_LOG(const CommonCmdPacket* packet); #endif diff --git a/Applications/telemetry_manager.c b/Applications/telemetry_manager.c index 01e2a0ed1..815835c95 100644 --- a/Applications/telemetry_manager.c +++ b/Applications/telemetry_manager.c @@ -13,10 +13,11 @@ #include "../TlmCmd/block_command_executor.h" #include "../TlmCmd/command_analyze.h" #include "../Library/print.h" -#include "../Library/endian_memcpy.h" +#include "../Library/endian.h" #include "../System/WatchdogTimer/watchdog_timer.h" #include #include +#include "../TlmCmd/common_cmd_packet_util.h" /** * @brief App初期化関数 @@ -389,7 +390,7 @@ static void TLM_MGR_load_nop_bc_(void) // FIXME: 実行時間やばい: 21ms // 適当に分割しないと -CCP_EXEC_STS Cmd_TLM_MGR_INIT(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLM_MGR_INIT(const CommonCmdPacket* packet) { uint8_t ret; uint16_t exec_counter; @@ -404,7 +405,7 @@ CCP_EXEC_STS Cmd_TLM_MGR_INIT(const CommonCmdPacket* packet) // DCU_STATUS_ABORTED_BY_ERR // DCU_STATUS_ABORTED_BY_CMD // がここに - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } switch (exec_counter) @@ -422,79 +423,79 @@ CCP_EXEC_STS Cmd_TLM_MGR_INIT(const CommonCmdPacket* packet) ret = TLM_MGR_init_4_(); break; default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } if (ret != 0) { DCU_report_err(Cmd_CODE_TLM_MGR_INIT, CCP_EXEC_ILLEGAL_CONTEXT); - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } if (exec_counter == 3) { DCU_report_finish(Cmd_CODE_TLM_MGR_INIT, CCP_EXEC_SUCCESS); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } // 再帰実行 if (DCU_register_next(Cmd_CODE_TLM_MGR_INIT, NULL, 0) != DCU_ACK_OK) { DCU_report_err(Cmd_CODE_TLM_MGR_INIT, CCP_EXEC_ILLEGAL_CONTEXT); - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TLM_MGR_INIT_MASTER_BC(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLM_MGR_INIT_MASTER_BC(const CommonCmdPacket* packet) { (void)packet; - if (telemetry_manager_.is_inited == 0) return CCP_EXEC_ILLEGAL_CONTEXT; + if (telemetry_manager_.is_inited == 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); // TODO: TLM_MGR_calc_register_info_from_bc_info_ は入れなくていいか検討する // とりあえずはなくていい気がする BCL_load_bc(telemetry_manager_.master_bc_id, TLM_MGR_load_master_bc_); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TLM_MGR_CLEAR_HK_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLM_MGR_CLEAR_HK_TLM(const CommonCmdPacket* packet) { (void)packet; - if (telemetry_manager_.is_inited == 0) return CCP_EXEC_ILLEGAL_CONTEXT; + if (telemetry_manager_.is_inited == 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); TLM_MGR_clear_bc_of_register_info_(&telemetry_manager_.register_info.hk_tlm); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TLM_MGR_CLEAR_SYSTEM_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLM_MGR_CLEAR_SYSTEM_TLM(const CommonCmdPacket* packet) { (void)packet; - if (telemetry_manager_.is_inited == 0) return CCP_EXEC_ILLEGAL_CONTEXT; + if (telemetry_manager_.is_inited == 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); TLM_MGR_clear_bc_of_register_info_(&telemetry_manager_.register_info.system_tlm); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } // FIXME: 実行時間チェック :9ms // 結局,NOP BC作るのが重い -CCP_EXEC_STS Cmd_TLM_MGR_CLEAR_USER_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLM_MGR_CLEAR_USER_TLM(const CommonCmdPacket* packet) { uint16_t exec_counter; (void)packet; - if (telemetry_manager_.is_inited == 0) return CCP_EXEC_ILLEGAL_CONTEXT; + if (telemetry_manager_.is_inited == 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); switch (DCU_check_in(Cmd_CODE_TLM_MGR_CLEAR_USER_TLM, &exec_counter)) { @@ -505,7 +506,7 @@ CCP_EXEC_STS Cmd_TLM_MGR_CLEAR_USER_TLM(const CommonCmdPacket* packet) // DCU_STATUS_ABORTED_BY_ERR // DCU_STATUS_ABORTED_BY_CMD // がここに - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } switch (exec_counter) @@ -519,21 +520,21 @@ CCP_EXEC_STS Cmd_TLM_MGR_CLEAR_USER_TLM(const CommonCmdPacket* packet) default: TLM_MGR_clear_bc_of_register_info_(&telemetry_manager_.register_info.reserve); // 便宜上ここで DCU_report_finish(Cmd_CODE_TLM_MGR_CLEAR_USER_TLM, CCP_EXEC_SUCCESS); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } // 再帰実行 if (DCU_register_next(Cmd_CODE_TLM_MGR_CLEAR_USER_TLM, NULL, 0) != DCU_ACK_OK) { DCU_report_err(Cmd_CODE_TLM_MGR_CLEAR_USER_TLM, CCP_EXEC_ILLEGAL_CONTEXT); - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TLM_MGR_START_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLM_MGR_START_TLM(const CommonCmdPacket* packet) { BCT_Pos bc_register_pos; bct_id_t master_bc_id; @@ -542,12 +543,12 @@ CCP_EXEC_STS Cmd_TLM_MGR_START_TLM(const CommonCmdPacket* packet) (void)packet; - if (telemetry_manager_.is_inited == 0) return CCP_EXEC_ILLEGAL_CONTEXT; + if (telemetry_manager_.is_inited == 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); // master BC が 1つでないのは何かがおかしい if (telemetry_manager_.register_info.master.bc_info_idx_used_num != 1) { - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } // master bc の末尾の nop を deploy に差し替える @@ -556,7 +557,7 @@ CCP_EXEC_STS Cmd_TLM_MGR_START_TLM(const CommonCmdPacket* packet) BCT_make_pos(&bc_register_pos, master_bc_id, bc_cmd_pos); param[0] = TLCD_ID_DEPLOY_TLM; - endian_memcpy(¶m[1], &master_bc_id, SIZE_OF_BCT_ID_T); + ENDIAN_memcpy(¶m[1], &master_bc_id, SIZE_OF_BCT_ID_T); CCP_form_tlc(&TLM_MGR_packet_, TLM_MGR_USE_BC_NUM, @@ -569,11 +570,11 @@ CCP_EXEC_STS Cmd_TLM_MGR_START_TLM(const CommonCmdPacket* packet) CCP_form_block_deploy_cmd(&TLM_MGR_packet_, TLCD_ID_DEPLOY_TLM, master_bc_id); PH_analyze_cmd_packet(&TLM_MGR_packet_); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TLM_MGR_STOP_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLM_MGR_STOP_TLM(const CommonCmdPacket* packet) { BCT_Pos bc_register_pos; bct_id_t master_bc_id; @@ -581,12 +582,12 @@ CCP_EXEC_STS Cmd_TLM_MGR_STOP_TLM(const CommonCmdPacket* packet) (void)packet; - if (telemetry_manager_.is_inited == 0) return CCP_EXEC_ILLEGAL_CONTEXT; + if (telemetry_manager_.is_inited == 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); // master BC が 1つでないのは何かがおかしい if (telemetry_manager_.register_info.master.bc_info_idx_used_num != 1) { - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } // master bc の末尾の deploy を nop に差し替えることで止める @@ -601,98 +602,98 @@ CCP_EXEC_STS Cmd_TLM_MGR_STOP_TLM(const CommonCmdPacket* packet) 0); BCT_overwrite_cmd(&bc_register_pos, &TLM_MGR_packet_); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TLM_MGR_CLEAR_TLM_TL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLM_MGR_CLEAR_TLM_TL(const CommonCmdPacket* packet) { uint8_t param[1]; (void)packet; - if (telemetry_manager_.is_inited == 0) return CCP_EXEC_ILLEGAL_CONTEXT; + if (telemetry_manager_.is_inited == 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); param[0] = TLCD_ID_DEPLOY_TLM; CCP_form_rtc(&TLM_MGR_packet_, Cmd_CODE_TLCD_CLEAR_ALL_TIMELINE, param, 1); PH_analyze_cmd_packet(&TLM_MGR_packet_); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TLM_MGR_REGISTER_HK_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLM_MGR_REGISTER_HK_TLM(const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); TLM_MGR_ERR_CODE ret; - if (telemetry_manager_.is_inited == 0) return CCP_EXEC_ILLEGAL_CONTEXT; + if (telemetry_manager_.is_inited == 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); if (CA_ckeck_cmd_param_len(Cmd_CODE_GENERATE_TLM, CCP_get_param_len(packet)) != CA_ACK_OK) { - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } ret = TLM_MGR_register_generate_tlm_(&telemetry_manager_.register_info.hk_tlm, param); - if (ret != TLM_MGR_ERR_CODE_OK) return CCP_EXEC_ILLEGAL_CONTEXT; + if (ret != TLM_MGR_ERR_CODE_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TLM_MGR_REGISTER_SYSTEM_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLM_MGR_REGISTER_SYSTEM_TLM(const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); TLM_MGR_ERR_CODE ret; - if (telemetry_manager_.is_inited == 0) return CCP_EXEC_ILLEGAL_CONTEXT; + if (telemetry_manager_.is_inited == 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); if (CA_ckeck_cmd_param_len(Cmd_CODE_GENERATE_TLM, CCP_get_param_len(packet)) != CA_ACK_OK) { - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } ret = TLM_MGR_register_generate_tlm_(&telemetry_manager_.register_info.system_tlm, param); - if (ret != TLM_MGR_ERR_CODE_OK) return CCP_EXEC_ILLEGAL_CONTEXT; + if (ret != TLM_MGR_ERR_CODE_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TLM_MGR_REGISTER_HIGH_FREQ_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLM_MGR_REGISTER_HIGH_FREQ_TLM(const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); TLM_MGR_ERR_CODE ret; - if (telemetry_manager_.is_inited == 0) return CCP_EXEC_ILLEGAL_CONTEXT; + if (telemetry_manager_.is_inited == 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); if (CA_ckeck_cmd_param_len(Cmd_CODE_GENERATE_TLM, CCP_get_param_len(packet)) != CA_ACK_OK) { - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } ret = TLM_MGR_register_generate_tlm_(&telemetry_manager_.register_info.high_freq_tlm, param); - if (ret != TLM_MGR_ERR_CODE_OK) return CCP_EXEC_ILLEGAL_CONTEXT; + if (ret != TLM_MGR_ERR_CODE_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TLM_MGR_REGISTER_LOW_FREQ_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLM_MGR_REGISTER_LOW_FREQ_TLM(const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); TLM_MGR_ERR_CODE ret; - if (telemetry_manager_.is_inited == 0) return CCP_EXEC_ILLEGAL_CONTEXT; + if (telemetry_manager_.is_inited == 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); if (CA_ckeck_cmd_param_len(Cmd_CODE_GENERATE_TLM, CCP_get_param_len(packet)) != CA_ACK_OK) { - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } ret = TLM_MGR_register_generate_tlm_(&telemetry_manager_.register_info.low_freq_tlm, param); - if (ret != TLM_MGR_ERR_CODE_OK) return CCP_EXEC_ILLEGAL_CONTEXT; + if (ret != TLM_MGR_ERR_CODE_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/Applications/telemetry_manager.h b/Applications/telemetry_manager.h index 9b7aa606f..a266534f8 100644 --- a/Applications/telemetry_manager.h +++ b/Applications/telemetry_manager.h @@ -109,34 +109,34 @@ AppInfo TLM_MGR_create_app(void); /** * @brief 初期化 */ -CCP_EXEC_STS Cmd_TLM_MGR_INIT(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLM_MGR_INIT(const CommonCmdPacket* packet); /** * @brief master bc の初期化 */ -CCP_EXEC_STS Cmd_TLM_MGR_INIT_MASTER_BC(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLM_MGR_INIT_MASTER_BC(const CommonCmdPacket* packet); /** * @brief HKテレメを初期化 */ -CCP_EXEC_STS Cmd_TLM_MGR_CLEAR_HK_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLM_MGR_CLEAR_HK_TLM(const CommonCmdPacket* packet); /** * @brief systemテレメを初期化 */ -CCP_EXEC_STS Cmd_TLM_MGR_CLEAR_SYSTEM_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLM_MGR_CLEAR_SYSTEM_TLM(const CommonCmdPacket* packet); /** * @brief high_freq_tlm, low_freq_tlm を初期化 * @note 便宜上 TLM_MGR_BC_TYPE_RESERVE の BC も初期化してしまう */ -CCP_EXEC_STS Cmd_TLM_MGR_CLEAR_USER_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLM_MGR_CLEAR_USER_TLM(const CommonCmdPacket* packet); /** * @brief TLM送出開始 * @note master bc の末尾を Cmd_TLCD_DEPLOY_BLOCK にして deploy block しているだけ */ -CCP_EXEC_STS Cmd_TLM_MGR_START_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLM_MGR_START_TLM(const CommonCmdPacket* packet); /** * @brief TLM送出一時停止 @@ -144,38 +144,38 @@ CCP_EXEC_STS Cmd_TLM_MGR_START_TLM(const CommonCmdPacket* packet); * @note Cmd_TLCD_CLEAR_ALL_TIMELINE / Cmd_TLM_MGR_CLEAR_TLM_TL だと他のものも消えてしまう * @note Cmd_TLCD_CLEAR_ALL_TIMELINE / Cmd_TLM_MGR_CLEAR_TLM_TL のほうが適切な場合もあるのでよく考えること */ -CCP_EXEC_STS Cmd_TLM_MGR_STOP_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLM_MGR_STOP_TLM(const CommonCmdPacket* packet); /** * @brief TLM送出用TLをクリア * @note Cmd_TLCD_CLEAR_ALL_TIMELINE しているだけ * @note Cmd_TLCD_CLEAR_ALL_TIMELINE をGSから送ってもいいが, TL No がマジックナンバーになるので. */ -CCP_EXEC_STS Cmd_TLM_MGR_CLEAR_TLM_TL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLM_MGR_CLEAR_TLM_TL(const CommonCmdPacket* packet); /** * @brief HKテレメを登録 */ -CCP_EXEC_STS Cmd_TLM_MGR_REGISTER_HK_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLM_MGR_REGISTER_HK_TLM(const CommonCmdPacket* packet); /** * @brief systemテレメを登録 */ -CCP_EXEC_STS Cmd_TLM_MGR_REGISTER_SYSTEM_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLM_MGR_REGISTER_SYSTEM_TLM(const CommonCmdPacket* packet); /** * @brief high_freq_tlm を登録 */ -CCP_EXEC_STS Cmd_TLM_MGR_REGISTER_HIGH_FREQ_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLM_MGR_REGISTER_HIGH_FREQ_TLM(const CommonCmdPacket* packet); /** * @brief low_freq_tlm を登録 */ -CCP_EXEC_STS Cmd_TLM_MGR_REGISTER_LOW_FREQ_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLM_MGR_REGISTER_LOW_FREQ_TLM(const CommonCmdPacket* packet); // TODO: いきなり設定が変わるのではなく,設定変更 → 反映,にしたい. -// CCP_EXEC_STS Cmd_TLM_MGR_APPLY(const CommonCmdPacket* packet); +// CCP_CmdRet Cmd_TLM_MGR_APPLY(const CommonCmdPacket* packet); // *** HOW TO USE *** diff --git a/Applications/timeline_command_dispatcher.c b/Applications/timeline_command_dispatcher.c index ed6cbf10c..7229cd896 100644 --- a/Applications/timeline_command_dispatcher.c +++ b/Applications/timeline_command_dispatcher.c @@ -2,7 +2,6 @@ #include "timeline_command_dispatcher.h" #include "../TlmCmd/packet_handler.h" #include "../System/TimeManager/time_manager.h" -#include "../System/AnomalyLogger/anomaly_logger.h" #include "../System/EventManager/event_logger.h" #include "../TlmCmd/common_cmd_packet_util.h" @@ -129,9 +128,6 @@ static void TLCD_tlc_dispatcher_(TLCD_ID id) { // Lockout無効の場合はアノマリーを記録。 // Lockout有効の場合はアノマリーの連続生成を防ぐため時刻超過状態でもアノマリーを記録しない。 -#ifndef AL_DISALBE_AT_C2A_CORE - AL_add_anomaly(AL_CORE_GROUP_TLCD, (uint32_t)id); -#endif EL_record_event((EL_GROUP)EL_CORE_GROUP_TLCD_PAST_TIME, (uint32_t)id, EL_ERROR_LEVEL_LOW, @@ -186,21 +182,21 @@ TLCD_ID TLCD_update_tl_list_for_tlm(TLCD_ID id) return id; } -CCP_EXEC_STS Cmd_TLCD_CLEAR_ALL_TIMELINE(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLCD_CLEAR_ALL_TIMELINE(const CommonCmdPacket* packet) { TLCD_ID id = (TLCD_ID)CCP_get_param_from_packet(packet, 0, uint8_t); if (id >= TLCD_ID_MAX) { // 指定されたライン番号が存在しない場合は異常判定 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } CDIS_clear_command_list(&timeline_command_dispatcher_.dispatcher[id]); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TLCD_CLEAR_TIMELINE_AT(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLCD_CLEAR_TIMELINE_AT(const CommonCmdPacket* packet) { TLCD_ID id = (TLCD_ID)CCP_get_param_from_packet(packet, 0, uint8_t); cycle_t time = CCP_get_param_from_packet(packet, 1, cycle_t); @@ -208,16 +204,16 @@ CCP_EXEC_STS Cmd_TLCD_CLEAR_TIMELINE_AT(const CommonCmdPacket* packet) if (id >= TLCD_ID_MAX) { // 指定されたライン番号が存在しない場合は異常判定 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } if (TLCD_drop_tl_cmd_at_(id, time) == PH_ACK_SUCCESS) { - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } else { - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } } @@ -247,7 +243,7 @@ static PH_ACK TLCD_drop_tl_cmd_at_(TLCD_ID id, cycle_t time) return PH_ACK_SUCCESS; } -CCP_EXEC_STS Cmd_TLCD_DEPLOY_BLOCK(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLCD_DEPLOY_BLOCK(const CommonCmdPacket* packet) { TLCD_ID id = (TLCD_ID)CCP_get_param_from_packet(packet, 0, uint8_t); bct_id_t block_no = CCP_get_param_from_packet(packet, 1, bct_id_t); @@ -257,19 +253,19 @@ CCP_EXEC_STS Cmd_TLCD_DEPLOY_BLOCK(const CommonCmdPacket* packet) { // パラメータはTLライン番号(1Byte)とブロック番号。 // 一致しない場合は異常判定。 - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } if (id >= TLCD_ID_MAX) { // 指定されたライン番号が存在しない場合は異常判定 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } if (block_no >= BCT_MAX_BLOCKS) { // 指定されたブロック番号が存在しない場合は異常判定 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } ack = PL_deploy_block_cmd(&(PH_tl_cmd_list[id]), block_no, TMGR_get_master_total_cycle()); @@ -279,29 +275,29 @@ CCP_EXEC_STS Cmd_TLCD_DEPLOY_BLOCK(const CommonCmdPacket* packet) EL_record_event((EL_GROUP)EL_CORE_GROUP_TLCD_DEPLOY_BLOCK, (uint32_t)ack, EL_ERROR_LEVEL_LOW, - (uint32_t)id); - return CCP_EXEC_ILLEGAL_CONTEXT; + (uint32_t)( ((0x000000ff & id) << 24) | (0x00ffffff & block_no) )); + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_CONTEXT, (uint32_t)ack); } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TLCD_CLEAR_ERR_LOG(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLCD_CLEAR_ERR_LOG(const CommonCmdPacket* packet) { TLCD_ID id = (TLCD_ID)CCP_get_param_from_packet(packet, 0, uint8_t); if (id >= TLCD_ID_MAX) { // ライン番号が不正。 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } // 当該コマンド処理機能のエラー記録を解除。 CDIS_clear_error_status(&timeline_command_dispatcher_.dispatcher[id]); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TLCD_SET_SOE_FLAG(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLCD_SET_SOE_FLAG(const CommonCmdPacket* packet) { TLCD_ID id = (TLCD_ID)CCP_get_param_from_packet(packet, 0, uint8_t); uint8_t flag = CCP_get_param_from_packet(packet, 1, uint8_t); @@ -309,21 +305,21 @@ CCP_EXEC_STS Cmd_TLCD_SET_SOE_FLAG(const CommonCmdPacket* packet) if (id >= TLCD_ID_MAX) { // 指定されたライン番号が存在しない場合は異常判定 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } if ((flag != 0) && (flag != 1)) { // フラグ内容が0/1でないなら異常判定。 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } // 異常時実行中断フラグを設定 timeline_command_dispatcher_.dispatcher[id].stop_on_error = flag; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TLCD_SET_LOUT_FLAG(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLCD_SET_LOUT_FLAG(const CommonCmdPacket* packet) { TLCD_ID id = (TLCD_ID)CCP_get_param_from_packet(packet, 0, uint8_t); uint8_t flag = CCP_get_param_from_packet(packet, 1, uint8_t); @@ -331,47 +327,47 @@ CCP_EXEC_STS Cmd_TLCD_SET_LOUT_FLAG(const CommonCmdPacket* packet) if (id >= TLCD_ID_MAX) { // 指定されたライン番号が存在しない場合は異常判定 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } if ((flag != 0) && (flag != 1)) { // フラグ情報が0/1でない場合は異常判定。 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } // コマンド実行フラグを設定。 timeline_command_dispatcher_.dispatcher[id].lockout = flag; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TLCD_SET_ID_FOR_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLCD_SET_ID_FOR_TLM(const CommonCmdPacket* packet) { TLCD_ID id = (TLCD_ID)CCP_get_param_from_packet(packet, 0, uint8_t); if (id >= TLCD_ID_MAX) { // 指定されたライン番号が存在しない場合は異常判定 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } timeline_command_dispatcher_.tlm_info_.id = id; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TLCD_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TLCD_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) { uint8_t page = CCP_get_param_from_packet(packet, 0, uint8_t); if (page >= TL_TLM_PAGE_MAX) { // ページ番号がコマンドテーブル範囲外 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } timeline_command_dispatcher_.tlm_info_.page_no = page; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/Applications/timeline_command_dispatcher.h b/Applications/timeline_command_dispatcher.h index 123048c58..07c808d7a 100644 --- a/Applications/timeline_command_dispatcher.h +++ b/Applications/timeline_command_dispatcher.h @@ -1,26 +1,7 @@ #ifndef TIMELINE_COMMAND_DISPATCHER_H_ #define TIMELINE_COMMAND_DISPATCHER_H_ -#include - -/** - * @enum TLCD_ID - * @brief TimeLineを選ぶときに統一的に使うコード - * @note uint8_tを想定 - */ -typedef enum -{ - TLCD_ID_FROM_GS = 0, - TLCD_ID_DEPLOY_BC, - TLCD_ID_DEPLOY_TLM, -#ifdef TLCD_ENABLE_MISSION_TL - TLCD_ID_FROM_GS_FOR_MISSION, -#endif - TLCD_ID_MAX -} TLCD_ID; -// FIXME: TL本数を可変にできるようにする - -// 循環参照を防ぐためにここでinclude +#include "timeline_command_dispatcher_id_define.h" #include "../TlmCmd/command_dispatcher.h" #include "../TlmCmd/common_cmd_packet.h" #include "../TlmCmd/packet_handler.h" @@ -82,13 +63,13 @@ AppInfo TLCD_mis_create_app(void); */ TLCD_ID TLCD_update_tl_list_for_tlm(TLCD_ID id); -CCP_EXEC_STS Cmd_TLCD_CLEAR_ALL_TIMELINE(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_TLCD_CLEAR_TIMELINE_AT(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_TLCD_DEPLOY_BLOCK(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_TLCD_CLEAR_ERR_LOG(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_TLCD_SET_SOE_FLAG(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_TLCD_SET_LOUT_FLAG(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_TLCD_SET_ID_FOR_TLM(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_TLCD_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLCD_CLEAR_ALL_TIMELINE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLCD_CLEAR_TIMELINE_AT(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLCD_DEPLOY_BLOCK(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLCD_CLEAR_ERR_LOG(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLCD_SET_SOE_FLAG(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLCD_SET_LOUT_FLAG(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLCD_SET_ID_FOR_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TLCD_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet); #endif diff --git a/Applications/timeline_command_dispatcher_id_define.h b/Applications/timeline_command_dispatcher_id_define.h new file mode 100644 index 000000000..53bbcb9a4 --- /dev/null +++ b/Applications/timeline_command_dispatcher_id_define.h @@ -0,0 +1,28 @@ +/** + * @file + * @brief TLCD_ID の定義 + * @note この ID は App や Core や各所で参照され,循環参照の原因となるので,分離 + */ +#ifndef TIMELINE_COMMAND_DISPATCHER_ID_DEFINE_H_ +#define TIMELINE_COMMAND_DISPATCHER_ID_DEFINE_H_ + +#include + +/** + * @enum TLCD_ID + * @brief TimeLineを選ぶときに統一的に使うコード + * @note uint8_tを想定 + */ +typedef enum +{ + TLCD_ID_FROM_GS = 0, + TLCD_ID_DEPLOY_BC, + TLCD_ID_DEPLOY_TLM, +#ifdef TLCD_ENABLE_MISSION_TL + TLCD_ID_FROM_GS_FOR_MISSION, +#endif + TLCD_ID_MAX +} TLCD_ID; +// FIXME: TL本数を可変にできるようにする + +#endif diff --git a/Applications/utility_command.c b/Applications/utility_command.c index da466ba0d..3b96d61bd 100644 --- a/Applications/utility_command.c +++ b/Applications/utility_command.c @@ -4,6 +4,7 @@ #include "../IfWrapper/uart.h" #include #include // for memcpy +#include "../TlmCmd/common_cmd_packet_util.h" static UtilityCommand utility_command_; @@ -77,13 +78,13 @@ static int UTIL_CMD_send_(unsigned char ch) return ret; } -CCP_EXEC_STS Cmd_UTIL_CMD_ADD(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_UTIL_CMD_ADD(const CommonCmdPacket* packet) { unsigned char size = CCP_get_param_head(packet)[0]; if (CCP_get_param_len(packet) != 21) { // パラメータ長確認(21Bytes) - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } if (size <= 20) { @@ -94,17 +95,17 @@ CCP_EXEC_STS Cmd_UTIL_CMD_ADD(const CommonCmdPacket* packet) } else { - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } } else { - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_UTIL_CMD_SEND(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_UTIL_CMD_SEND(const CommonCmdPacket* packet) { unsigned char uart_ch = CCP_get_param_head(packet)[0]; int ret; @@ -115,21 +116,21 @@ CCP_EXEC_STS Cmd_UTIL_CMD_SEND(const CommonCmdPacket* packet) ret = UTIL_CMD_send_(uart_ch); if (ret != 0) { - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } else { - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_UTIL_CMD_RESET(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_UTIL_CMD_RESET(const CommonCmdPacket* packet) { (void)packet; UTIL_CMD_reset_(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/Applications/utility_command.h b/Applications/utility_command.h index 0393cadfc..66f4c28c5 100644 --- a/Applications/utility_command.h +++ b/Applications/utility_command.h @@ -24,8 +24,8 @@ extern const UtilityCommand* const utility_command; AppInfo UTIL_CMD_create_app(void); // コマンド -CCP_EXEC_STS Cmd_UTIL_CMD_ADD(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_UTIL_CMD_SEND(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_UTIL_CMD_RESET(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_UTIL_CMD_ADD(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_UTIL_CMD_SEND(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_UTIL_CMD_RESET(const CommonCmdPacket* packet); #endif diff --git a/Applications/utility_counter.c b/Applications/utility_counter.c index 37c58835b..c5c4c10d9 100644 --- a/Applications/utility_counter.c +++ b/Applications/utility_counter.c @@ -1,10 +1,19 @@ #pragma section REPRO #include "utility_counter.h" -#ifdef AL_ENABLE + +// FIXME +// error: ISO C requires a translation unit to contain at least one declaration [-Werror,-Wempty-translation-unit] +// 対策のために,適当に宣言しておく +int UTIL_COUNTER_dummy(void) +{ + return 0; +} +#if 0 #include "../TlmCmd/packet_handler.h" #include "../System/AnomalyLogger/anomaly_logger.h" #include // for memcpy +#include "../TlmCmd/common_cmd_packet_util.h" static UtilityCounter utility_counter_; const UtilityCounter* const utility_counter = &utility_counter_; @@ -59,7 +68,7 @@ static void UTIL_COUNTER_incl_(UTIL_COUNTER_NAME num) } -CCP_EXEC_STS Cmd_UTIL_COUNTER_INCREMENT(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_UTIL_COUNTER_INCREMENT(const CommonCmdPacket* packet) { UTIL_COUNTER_NAME index; @@ -74,13 +83,13 @@ CCP_EXEC_STS Cmd_UTIL_COUNTER_INCREMENT(const CommonCmdPacket* packet) } else { - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_UTIL_COUNTER_RESET(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_UTIL_COUNTER_RESET(const CommonCmdPacket* packet) { UTIL_COUNTER_NAME index; @@ -100,12 +109,12 @@ CCP_EXEC_STS Cmd_UTIL_COUNTER_RESET(const CommonCmdPacket* packet) } else { - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_UTIL_COUNTER_SET_PARAM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_UTIL_COUNTER_SET_PARAM(const CommonCmdPacket* packet) { UTIL_COUNTER_NAME index; @@ -120,14 +129,14 @@ CCP_EXEC_STS Cmd_UTIL_COUNTER_SET_PARAM(const CommonCmdPacket* packet) if (utility_counter_.cnt[index].anomaly_active > 1) { utility_counter_.cnt[index].anomaly_active = 0; - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } } else { - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #endif diff --git a/Applications/utility_counter.h b/Applications/utility_counter.h index 47f4c23de..b621330ac 100644 --- a/Applications/utility_counter.h +++ b/Applications/utility_counter.h @@ -3,6 +3,7 @@ // FIXME: このAppは現在管理されていない! // 使用する前に確認すること +#if 0 // FIXME: 現在 AL に依存してしまっている #include #ifdef AL_ENABLE @@ -66,9 +67,10 @@ extern const UtilityCounter* const utility_counter; AppInfo UTIL_COUNTER_create_app(void); // コマンド -CCP_EXEC_STS Cmd_UTIL_COUNTER_INCREMENT(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_UTIL_COUNTER_RESET(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_UTIL_COUNTER_SET_PARAM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_UTIL_COUNTER_INCREMENT(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_UTIL_COUNTER_RESET(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_UTIL_COUNTER_SET_PARAM(const CommonCmdPacket* packet); #endif #endif +#endif diff --git a/CMakeLists.txt b/CMakeLists.txt index faee76312..1c47a0c5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,9 @@ option(USE_ALL_C2A_CORE_TEST_APPS "use C2A-core all Test Applications" ON) option(USE_ALL_C2A_CORE_LIB "use C2A-core all Library" ON) option(USE_32BIT_COMPILER "use 32bit compiler" OFF) +option(C2A_USE_SIMPLE_LIBC "use C2A-core hosted simple libc implementation" OFF) +option(C2A_USE_C99_STDINT "use C99 standard stdint.h" ON) + option(BUILD_C2A_AS_SILS_FW "build C2A as SILS firmware" ON) option(BUILD_C2A_AS_CXX "build C2A as C++" OFF) option(BUILD_C2A_AS_UTF8 "build C2A as UTF-8" ON) @@ -20,7 +23,7 @@ set(C2A_SRCS Drivers/Protocol/eb90_frame_for_driver_super.c Drivers/Protocol/eb90_packet_for_driver_super.c Drivers/Super/driver_super.c - # System/AnomalyLogger/anomaly_logger.c # deprecated. 使いたい場合は, user 側でビルドターゲットに入れる. + IfWrapper/Common/i2c_common.c System/ApplicationManager/app_info.c System/ApplicationManager/app_manager.c System/EventManager/event_manager.c @@ -47,6 +50,11 @@ set(C2A_SRCS TlmCmd/Ccsds/tlm_space_packet.c ) +if(NOT C2A_USE_C99_STDINT) + message("Use stdint.h wrapper") + include_directories(Library/stdint_wrapper) +endif() + if(BUILD_C2A_AS_CXX) set_source_files_properties(${C2A_SRCS} PROPERTIES LANGUAGE CXX) # C++ endif() diff --git a/Docs/Core/communication.md b/Docs/Core/communication.md index f9b9deff0..ed3733c0d 100644 --- a/Docs/Core/communication.md +++ b/Docs/Core/communication.md @@ -68,7 +68,7 @@ https://github.com/ut-issl/c2a-core/blob/217c3156a07ec503cd60fc7b75978a3234ec2c5 ### Secondary Header (Telemetry) Secondary Header は CCSDS Space Packet 定義において,ユーザー定義部分であるため,ここで定義する. 本ドキュメント更新時の実装は,以下である.ヘッダ構造は以下を参照すること. -https://github.com/ut-issl/c2a-core/blob/b84c3d051a1e15ab62c8f1a9744957daa4a62a3f/TlmCmd/Ccsds/tlm_space_packet.h#L1-L51 +https://github.com/ut-issl/c2a-core/blob/e84ac663187adb7b9d51939f2228b9ecfa7ae292/TlmCmd/Ccsds/tlm_space_packet.h#L1-L51 #### 各フィールドの説明 - Secondary Header Version @@ -76,7 +76,7 @@ https://github.com/ut-issl/c2a-core/blob/b84c3d051a1e15ab62c8f1a9744957daa4a62a3 - `0x01`: Version 1 - Board Time - テレメトリが生成されたボード (OBC など) の時刻 (TI など) -- Tlemetry ID +- Telemetry ID - テレメトリID - APID 内でユニークであればいい - Global Time @@ -101,8 +101,8 @@ https://github.com/ut-issl/c2a-core/blob/b84c3d051a1e15ab62c8f1a9744957daa4a62a3 - `0b00100000`: 将来拡張用の確保領域 - `0b01000000`: 将来拡張用の確保領域 - `0b10000000`: 将来拡張用の確保領域 -- Data Recorder Partition - - Stored Telemetry 時にどのパーティションに配送されるかを規定 +- Destination Info + - 例えば,Stored Telemetry 時には Data Recorder のどのパーティションに配送されるかを規定する - 将来拡張の可能性あり @@ -148,20 +148,20 @@ https://github.com/ut-issl/c2a-core/blob/b84c3d051a1e15ab62c8f1a9744957daa4a62a3 - コマンドの最終的な配送先,つまり実行されるボードは APID によって規定される - https://github.com/ut-issl/c2a-core/blob/5d7a9d9b878cf5ddcad4de919e77dcae13df7407/Examples/minimum_user_for_s2e/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h#L9-L13 - 一方で, BC や TLC などでのキューイングは, Destination Type によって決定される - - https://github.com/ut-issl/c2a-core/blob/5d7a9d9b878cf5ddcad4de919e77dcae13df7407/Examples/minimum_user_for_s2e/src/src_user/Settings/TlmCmd/common_cmd_packet_define.h#L19-L25 -- 具体例 - - APID: MOBC, Destination Type: TO_ME + - https://github.com/ut-issl/c2a-core/blob/6d71249dcdb3aefa1d67ffe8ce946e8d8d8b2a33/Examples/minimum_user/src/src_user/Settings/TlmCmd/common_cmd_packet_define.h#L20-L27 +- 具体例(GS と接続される OBC は MOBC とし,AOBC は MOBC にぶら下がってるものとする) + - APID: MOBC, Destination Type: TO_ME or MOBC - GSC: GS から MOBC に届き, MOBC で GSC としてエンキューされる.デキューした後, MOBC 内で GSC として実行される. - TLC: GS から MOBC に届き, MOBC で TLC としてエンキューされる.デキューした後, MOBC 内で RTC として実行される. - BC: GS から MOBC に届き, MOBC で BC 登録される.BC 展開した後, TL にエンキューされ,デキューした後, MOBC 内で RTC として実行される. - - APID: AOBC, Destination Type: TO_ME - - GSC: GS から MOBC に届き, MOBC で GSC としてエンキューされる.デキューした後, APID を元に, AOBC へ配送される.配送時, Destination Type は自分宛に上書きされ, AOBC で GSC としてキューイング & 実行される. - - TLC: GS から MOBC に届き, MOBC で TLC としてエンキューされる.デキューした後, APID を元に, AOBC へ配送される.配送時, Destination Type は自分宛に上書きされ, AOBC で RTC としてキューイング & 実行される. - - BC: GS から MOBC に届き, MOBC で BC 登録される.BC 展開した後, TL にエンキューされ,デキューした後, APID を元に, AOBC へ配送される.配送時, Destination Type は自分宛に上書きされ, AOBC で RTC としてキューイング & 実行される. + - APID: AOBC, Destination Type: TO_ME or MOBC + - GSC: GS から MOBC に届き, MOBC で GSC としてエンキューされる.デキューした後, APID を元に, AOBC へ配送される.配送時, Destination Type は自分宛 (TO_ME) に上書きされ, AOBC で RTC としてキューイング & 実行される. + - TLC: GS から MOBC に届き, MOBC で TLC としてエンキューされる.デキューした後, APID を元に, AOBC へ配送される.配送時, Destination Type は自分宛 (TO_ME) に上書きされ, AOBC で RTC としてキューイング & 実行される. + - BC: GS から MOBC に届き, MOBC で BC 登録される.BC 展開した後, TL にエンキューされ,デキューした後, APID を元に, AOBC へ配送される.配送時, Destination Type は自分宛 (TO_ME) に上書きされ, AOBC で RTC としてキューイング & 実行される. - APID: AOBC, Destination Type: AOBC - - GSC: GS から MOBC に届き, MOBC でエンキューされずに,そのまま AOBC へ配送される.配送時, Destination Type は自分宛に上書きされ, AOBC で RTC としてキューイング & 実行される. - - TLC: GS から MOBC に届き, MOBC でエンキューされずに,そのまま AOBC へ配送される.配送時, Destination Type は自分宛に上書きされ, AOBC で TLC としてキューイング & 実行される. - - BC: GS から MOBC に届き, MOBC で BC 登録されずに,そのまま AOBC へ配送される.配送時, Destination Type は自分宛に上書きされ, AOBC で BC として登録 & 実行される. + - GSC: GS から MOBC に届き, MOBC でエンキューされずに,そのまま AOBC へ配送される.配送時, Destination Type は自分宛 (TO_ME) に上書きされ, AOBC で GSC としてキューイング & 実行される. + - TLC: GS から MOBC に届き, MOBC でエンキューされずに,そのまま AOBC へ配送される.配送時, Destination Type は自分宛 (TO_ME) に上書きされ, AOBC で TLC としてキューイング & 実行される. + - BC: GS から MOBC に届き, MOBC で BC 登録されずに,そのまま AOBC へ配送される.配送時, Destination Type は自分宛 (TO_ME) に上書きされ, AOBC で BC として登録 & 実行される. - 地上局 SW での実装まとめ - MOBC 宛 - APID: APID_MOBC_CMD diff --git a/Docs/General/coding_rule.md b/Docs/General/coding_rule.md index e311fe87e..fd7eb6301 100644 --- a/Docs/General/coding_rule.md +++ b/Docs/General/coding_rule.md @@ -698,7 +698,7 @@ typedef enum - ほとんどのパソコンがリトルエンディアンなのに対し,いくつかのマイコンはビッグエンディアンである. - 当然バイトオーダーは異なるし,ビットフィールドの並びも異なる. - ドライバなどで,バイト列を int や float に変換するところなどは要注意. - - エンディアンに依存しないコードを書くか,以下のような定義を適切に使うこと.また,`endian_memcpy` などといった共用関数を積極的に利用すること. + - エンディアンに依存しないコードを書くか,以下のような定義を適切に使うこと.また,`ENDIAN_memcpy` などといった共用関数を積極的に利用すること. - `SILS_FW` と `IS_LITTLE_ENDIAN` を混同して使わないこと ```cpp #ifndef SILS_FW diff --git a/Docs/General/release.md b/Docs/General/release.md index c0dc2e825..e79a05942 100644 --- a/Docs/General/release.md +++ b/Docs/General/release.md @@ -58,6 +58,7 @@ - release には以下を含める. - 非互換となった Tools の新しい バージョン (Release) へのリンク - `develop` にマージしたときの PR のリンク +1. Bug fix や 大きな機能更新などで,本 Release 前に User サイドで最新の Core が必要になった際にも, Pre-release を行うことができる. ## バージョニング diff --git a/Docs/Tips/parameter_settings.md b/Docs/Tips/parameter_settings.md index 54749a296..ff5627796 100644 --- a/Docs/Tips/parameter_settings.md +++ b/Docs/Tips/parameter_settings.md @@ -20,8 +20,6 @@ FIXME: 2021/12/04現在,だいぶ情報が古いので更新する. - [telemetry_frame_params](#telemetry_frame_params) - [event_logger_params](#event_logger_params) - [event_handler_params](#event_handler_params) - - [anomaly_logger_params](#anomaly_logger_params) - - [anomaly_handler_params](#anomaly_handler_params) - [app_manager_params](#app_manager_params) - [obc_time_params](#obc_time_params) @@ -245,7 +243,7 @@ Event Logger 全体のメモリ使用量は以下Byte. #### 定義 - core: [`/src_core/System/EventManager/event_logger.h`](https://github.com/ut-issl/c2a-core/blob/develop/System/EventManager/event_logger.h) -- user: `/src_user/Settings/System/anomaly_logger_params.h` +- user: `/src_user/Settings/System/event_handler_params.h` #### 詳細説明 [`/src_core/System/EventManager/event_logger.h`](https://github.com/ut-issl/c2a-core/blob/develop/System/EventManager/event_logger.h) を参照. @@ -256,61 +254,6 @@ Event Logger 全体のメモリ使用量は以下Byte. TBW -- - - -### anomaly_logger_params -AnomalyLoggerのログ保存テーブルサイズを制御する. - -この値によって影響を受けるメモリ使用量は,現時点では以下Byte. -``` - (sizeof(ObcTime) + sizeof(size_t) + 8) * AL_RECORD_MAX - - sizeof(ObcTime): 時刻に関わり,完全に環境依存だが,3 * sizeof(size_t) となる環境が多いのでは? -``` -NOTE: この値が関わる部分を抽出しているため,AnomalyLoggerの他の機能のためのメモリは含まない. - -たとえば,以下の設定,環境では,およそ0.8 KB. -```cpp -#define AL_RECORD_MAX (32) -sizeof(size_t): 4 -``` - -#### 定義 -- core: [`/src_core/System/AnomalyLogger/AnomalyLogger.h`](https://github.com/ut-issl/c2a-core/blob/develop/System/AnomalyLogger/AnomalyLogger.h) -- user: `/src_user/Settings/System/anomaly_logger_params.h` - -#### 詳細説明 -[`/src_core/System/AnomalyLogger/AnomalyLogger.h`](https://github.com/ut-issl/c2a-core/blob/develop/System/AnomalyLogger/AnomalyLogger.h) を参照. - - -- - - -### anomaly_handler_params -AnomalyHandler関連テーブルサイズを制御する. -テーブルは以下の2つある. -- AH_Element: AnomalyHandlerのルール(アノマリ - イベント対応)テーブル -- AH_AnomalyRespond: イベントの発動ログ - -この値によって影響を受けるメモリ使用量は,現時点では以下Byte. -``` - (sizeof(bc_id) + 4 * sizeof(size_t) + 8) * AH_MAX_RULES + 2 * sizeof(size_t) * AH_LOG_MAX -``` -NOTE: この値が関わる部分を抽出しているため,AnomalyHandlerの他の機能のためのメモリは含まない. - -たとえば,以下の設定,環境では,およそ3.8 KB. -```cpp -#define AH_MAX_RULES (128) -#define AH_LOG_MAX (64) -sizeof(size_t): 4 -sizeof(bc_id): 2 -``` - -#### 定義 -- core: [`/src_core/Applications/AnomalyHandler.h`](https://github.com/ut-issl/c2a-core/blob/develop/Applications/AnomalyHandler.h) -- user: `/src_user/Settings/anomaly_handler_params.h` - -#### 詳細説明 -[`/src_core/Applications/AnomalyHandler.h`](https://github.com/ut-issl/c2a-core/blob/develop/Applications/AnomalyHandler.h) を参照. - - - - - ### app_manager_params AppManagerのAppInfo保存テーブルサイズを制御する. diff --git a/Drivers/Protocol/common_tlm_cmd_packet_for_driver_super.c b/Drivers/Protocol/common_tlm_cmd_packet_for_driver_super.c index 5807978e2..7fdbeba53 100644 --- a/Drivers/Protocol/common_tlm_cmd_packet_for_driver_super.c +++ b/Drivers/Protocol/common_tlm_cmd_packet_for_driver_super.c @@ -59,7 +59,10 @@ DS_ERR_CODE CTCP_init_dssc(DS_StreamConfig* p_stream_config, int16_t tx_frame_buffer_size, DS_ERR_CODE (*data_analyzer)(DS_StreamConfig* p_stream_config, void* p_driver)) { - if (tx_frame_buffer_size < EB90_FRAME_HEADER_SIZE + CTCP_MAX_LEN + EB90_FRAME_FOOTER_SIZE) + // MOBC か 2nd OBC かによって,送信側 (tx 側) が CTP になるか CCP になるかは不明なため,ひとまず CTCP に + // メモリが苦しい OBC もあるので,考えてもいいかも + const uint16_t max_frame_size = EB90_FRAME_HEADER_SIZE + CTCP_MAX_LEN + EB90_FRAME_FOOTER_SIZE; + if (tx_frame_buffer_size < max_frame_size) { return DS_ERR_CODE_ERR; } @@ -73,6 +76,7 @@ DS_ERR_CODE CTCP_init_dssc(DS_StreamConfig* p_stream_config, DSSC_set_rx_header(p_stream_config, EB90_FRAME_kStx, EB90_FRAME_STX_SIZE); DSSC_set_rx_footer(p_stream_config, EB90_FRAME_kEtx, EB90_FRAME_ETX_SIZE); DSSC_set_rx_frame_size(p_stream_config, -1); // 可変 + DSSC_set_max_rx_frame_size(p_stream_config, max_frame_size); DSSC_set_rx_framelength_pos(p_stream_config, EB90_FRAME_STX_SIZE); DSSC_set_rx_framelength_type_size(p_stream_config, 2); DSSC_set_rx_framelength_offset(p_stream_config, @@ -105,7 +109,7 @@ DS_ERR_CODE CTCP_set_tx_frame_to_dssc(DS_StreamConfig* p_stream_config, memcpy(&(tx_frame[pos]), EB90_FRAME_kStx, size); pos += size; size = EB90_FRAME_LEN_SIZE; - endian_memcpy(&(tx_frame[pos]), &packet_len, size); // ここはエンディアンを気にする! + ENDIAN_memcpy(&(tx_frame[pos]), &packet_len, size); // ここはエンディアンを気にする! pos += size; size = (size_t)packet_len; @@ -114,7 +118,7 @@ DS_ERR_CODE CTCP_set_tx_frame_to_dssc(DS_StreamConfig* p_stream_config, crc = EB90_FRAME_calc_crc(tx_frame + EB90_FRAME_HEADER_SIZE, pos - EB90_FRAME_HEADER_SIZE); size = EB90_FRAME_CRC_SIZE; - endian_memcpy(&(tx_frame[pos]), &crc, size); // ここはエンディアンを気にする! + ENDIAN_memcpy(&(tx_frame[pos]), &crc, size); // ここはエンディアンを気にする! pos += size; size = EB90_FRAME_ETX_SIZE; memcpy(&(tx_frame[pos]), EB90_FRAME_kEtx, size); diff --git a/Drivers/Protocol/common_tlm_cmd_packet_for_driver_super.h b/Drivers/Protocol/common_tlm_cmd_packet_for_driver_super.h index cafc70741..777921859 100644 --- a/Drivers/Protocol/common_tlm_cmd_packet_for_driver_super.h +++ b/Drivers/Protocol/common_tlm_cmd_packet_for_driver_super.h @@ -8,7 +8,7 @@ #ifndef COMMON_TLM_CMD_PACKET_FOR_DRIVER_SUPER_H_ #define COMMON_TLM_CMD_PACKET_FOR_DRIVER_SUPER_H_ -#include +#include #include "../Super/driver_super.h" #include "../../TlmCmd/common_tlm_cmd_packet.h" diff --git a/Drivers/Protocol/eb90_frame_for_driver_super.c b/Drivers/Protocol/eb90_frame_for_driver_super.c index 981e1d3f5..1032be2de 100644 --- a/Drivers/Protocol/eb90_frame_for_driver_super.c +++ b/Drivers/Protocol/eb90_frame_for_driver_super.c @@ -4,7 +4,7 @@ * @brief コンポ間通信などで標準的に使う データリンク層 の EB90 Frame */ #include "eb90_frame_for_driver_super.h" -#include "../../Library/endian_memcpy.h" +#include "../../Library/endian.h" #include "../../Library/crc.h" const uint8_t EB90_FRAME_kStx[EB90_FRAME_STX_SIZE] = {EB90_FRAME_STX_1ST_BYTE, EB90_FRAME_STX_2ND_BYTE}; @@ -14,7 +14,7 @@ const uint8_t EB90_FRAME_kEtx[EB90_FRAME_ETX_SIZE] = {EB90_FRAME_ETX_1ST_BYTE, E uint16_t EB90_FRAME_get_packet_length_from_dssc(const DS_StreamConfig* p_stream_config) { uint16_t length; - endian_memcpy(&length, &(DSSC_get_rx_frame(p_stream_config)[2]), EB90_FRAME_LEN_SIZE); + ENDIAN_memcpy(&length, &(DSSC_get_rx_frame(p_stream_config)[2]), EB90_FRAME_LEN_SIZE); return length; } @@ -29,7 +29,7 @@ uint16_t EB90_FRAME_get_crc_from_dssc(const DS_StreamConfig* p_stream_config) { uint16_t crc; uint16_t offset = EB90_FRAME_HEADER_SIZE + EB90_FRAME_get_packet_length_from_dssc(p_stream_config); - endian_memcpy(&crc, &(DSSC_get_rx_frame(p_stream_config)[offset]), EB90_FRAME_CRC_SIZE); + ENDIAN_memcpy(&crc, &(DSSC_get_rx_frame(p_stream_config)[offset]), EB90_FRAME_CRC_SIZE); return crc; } diff --git a/Drivers/Protocol/eb90_frame_for_driver_super.h b/Drivers/Protocol/eb90_frame_for_driver_super.h index 556dc28cb..765c6d1e7 100644 --- a/Drivers/Protocol/eb90_frame_for_driver_super.h +++ b/Drivers/Protocol/eb90_frame_for_driver_super.h @@ -34,7 +34,7 @@ #ifndef EB90_FRAME_FOR_DRIVER_SUPER_H_ #define EB90_FRAME_FOR_DRIVER_SUPER_H_ -#include +#include #include "../Super/driver_super.h" #define EB90_FRAME_STX_SIZE (2) //!< EB90 Frame の STX のサイズ diff --git a/Drivers/Protocol/eb90_packet_for_driver_super.c b/Drivers/Protocol/eb90_packet_for_driver_super.c index 1c5336b5a..d2b2e45a2 100644 --- a/Drivers/Protocol/eb90_packet_for_driver_super.c +++ b/Drivers/Protocol/eb90_packet_for_driver_super.c @@ -8,7 +8,7 @@ */ #include "eb90_packet_for_driver_super.h" #include "eb90_frame_for_driver_super.h" -#include "../../Library/endian_memcpy.h" +#include "../../Library/endian.h" // FIXME: DS_StreamConfig.data_link_layer_ をちゃんと見る! @@ -41,7 +41,7 @@ uint32_t EB90_PACKET_get_id_from_dssc(const DS_StreamConfig* p_stream_config) if (version == 1) { uint16_t id; - endian_memcpy(&id, &(EB90_FRAME_get_packet_head_from_dssc(p_stream_config)[2]), sizeof(uint16_t)); + ENDIAN_memcpy(&id, &(EB90_FRAME_get_packet_head_from_dssc(p_stream_config)[2]), sizeof(uint16_t)); return (uint32_t)id; } else diff --git a/Drivers/Protocol/eb90_packet_for_driver_super.h b/Drivers/Protocol/eb90_packet_for_driver_super.h index f12339397..e932d7662 100644 --- a/Drivers/Protocol/eb90_packet_for_driver_super.h +++ b/Drivers/Protocol/eb90_packet_for_driver_super.h @@ -26,7 +26,7 @@ #ifndef EB90_PACKET_FOR_DRIVER_SUPER_H_ #define EB90_PACKET_FOR_DRIVER_SUPER_H_ -#include +#include #include "../Super/driver_super.h" #define EB90_PACKET_HEADER_SIZE (4) //!< EB90 Packet のヘッダサイズ diff --git a/Drivers/Super/driver_super.c b/Drivers/Super/driver_super.c index 6ba2827a3..2a103e75f 100644 --- a/Drivers/Super/driver_super.c +++ b/Drivers/Super/driver_super.c @@ -11,18 +11,21 @@ #include "driver_super.h" #include "../../Library/print.h" -#include // for memsetなどのmem系 +#include // for memset などの mem 系 #include // for NULL +#include "../../TlmCmd/common_cmd_packet_util.h" // #define DS_DEBUG // 適切なときにコメントアウトする // #define DS_DEBUG_SHOW_REC_DATA // 適切なときにコメントアウトする +static uint8_t DS_if_rx_buffer_[DS_IF_RX_BUFFER_SIZE]; //!< IF_RX で受信するときの一次バッファ + /** * @brief コマンド送信処理 * * DS_send_general_cmd と DS_send_req_tlm_cmdの共通部分 - * @param p_super: DriverSuper構造体へのポインタ - * @param stream: どのconfigを使用するか.streamは0-MAXなので,継承先でENUMなど宣言して使いやすくすればいいと思う. + * @param p_super: DriverSuper 構造体へのポインタ + * @param stream: どの config を使用するか.stream は 0-MAX なので,継承先で ENUM など宣言して使いやすくすればいいと思う. * @retval DS_ERR_CODE_OK: 正常終了 * @retval DS_ERR_CODE_ERR: IF_TX でのエラーあり * @note 受信状況やエラー情報は send_status_ に格納されている @@ -32,8 +35,8 @@ static DS_ERR_CODE DS_send_cmd_(DriverSuper* p_super, uint8_t stream); /** * @brief 継承先の機器にコマンドを発行する * @note この関数の実行前に,tx_frame_, tx_frame_size_の設定が必要である - * @param p_super: DriverSuper構造体へのポインタ - * @param stream: どのconfigを使用するか.streamは0-MAXなので,継承先でENUMなど宣言して使いやすくすればいいと思う. + * @param p_super: DriverSuper 構造体へのポインタ + * @param stream: どの config を使用するか.stream は 0-MAX なので,継承先で ENUM など宣言して使いやすくすればいいと思う. * @retval DS_ERR_CODE_OK (0): 正常終了 * @retval 0 以外: IF_TX の戻り値 */ @@ -41,7 +44,7 @@ static int DS_tx_(DriverSuper* p_super, uint8_t stream); /** * @brief 継承先の機器からの受信データがあるか確認し,受信する - * @param p_super: DriverSuper構造体へのポインタ + * @param p_super: DriverSuper 構造体へのポインタ * @retval 0: 受信データなし * @retval 正数: 受信データ長 [Byte] * @retval 負数: IF_RXのエラー @@ -50,158 +53,98 @@ static int DS_rx_(DriverSuper* p_super); /** * @brief 受信フレーム解析関数 - * @param p_super: DriverSuper構造体へのポインタ - * @param stream: どのconfigを使用するか.streamは0-MAXなので,継承先でENUMなど宣言して使いやすくすればいいと思う. - * @param rec_data_len: 受信データのバッファの長さ + * @param[in] p_stream_config: DriverSuper 構造体の DS_StreamConfig + * @param[in] rec_data_len: 今回新規に受信したデータ長 * @return void 詳細は DS_StreamRecStatus */ -static void DS_analyze_rx_buffer_(DriverSuper* p_super, - uint8_t stream, +static void DS_analyze_rx_buffer_(DS_StreamConfig* p_stream_config, uint16_t rec_data_len); /** * @brief 解析用受信バッファの準備 * * 繰り越されたデータと今回受信したデータの結合を行い,受信データ解析の準備をする - * @param[in] p_super: DriverSuper構造体へのポインタ - * @param[in] stream: どのconfigを使用するか.streamは0-MAXなので,継承先でENUMなど宣言して使いやすくすればいいと思う. - * @param[out] rx_buffer: 解析用受信バッファ - * @param[in] rec_data_len: 受信データのバッファの長さ - * @return 解析用受信バッファの長さ + * @param[in] p_stream_config: DriverSuper 構造体の DS_StreamConfig + * @param[in] rec_data_len: 今回新規に受信したデータ長 + * @return void + * @note 厳格なフレーム探索が有効かどうかで処理が変わることに注意 */ -static uint16_t DS_analyze_rx_buffer_prepare_buffer_(DriverSuper* p_super, - uint8_t stream, - uint8_t* rx_buffer, - uint16_t rec_data_len); +static void DS_analyze_rx_buffer_prepare_buffer_(DS_StreamConfig* p_stream_config, + uint16_t rec_data_len); /** * @brief フレーム解析関数 * - * 解析用受信バッファを走査し,バイト単位でフレーム内データを拾っていく + * 受信バッファを走査し,バイト単位でフレーム内データを確認していく * @param p_stream_config: DriverSuper 構造体の DS_StreamConfig - * @param rx_buffer: 受信データのバッファ(配列) - * @param rec_data_len: 受信データのバッファの長さ - * @return 今回の呼び出しで走査したバイト長さ.その他の詳細は DS_StreamRecStatus + * @return void その他の詳細は DS_StreamRecStatus */ -static uint16_t DS_analyze_rx_buffer_pickup_(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t rec_data_len); +static void DS_analyze_rx_buffer_pickup_(DS_StreamConfig* p_stream_config); /** - * @brief フレーム解析関数後のデータ繰越関数 - * @param p_stream_config: DriverSuper 構造体の DS_StreamConfig - * @param rx_buffer: 受信データのバッファ(配列) - * @param total_processed_data_len: 受信データのバッファのうち,すでに処理されたバイト数 - * @param rec_data_len: 受信データのバッファの長さ + * @brief フレーム解析関数後の繰越データの頭出し + * @param p_stream_config: DriverSuper 構造体の DS_StreamConfig * @return void - * @note 受信データを次回呼び出しに引き継ぐ(いくつかのパターンあり) - * フレーム確定した場合(未解析受信データがある可能性がある) - * 厳格なフレーム探索が無効 - * --> フレーム確定したデータはOKとし,それ以後の解析できなかった受信データのみを次回に引き継ぐ - * 厳格なフレーム探索が有効 - * --> 確定フレームがユーザー側で弾かれる可能性を考慮し,確定フレームの先頭 + 1 バイト目以降を次回に引き継ぐ - * 次回のヘッダ探索はそこから始まる - * フレーム確定しなかった場合(未解析受信データはなし) - * DS_STREAM_REC_STATUS_FINDING_HEADER のとき - * --> ヘッダがなかったということなので,引き継ぎデータはなし - * DS_STREAM_REC_STATUS_FINDING_HEADER でないとき - * --> フレーム候補のフレーム先頭以降を次回に引き継ぐ - * これにより,フッタ不一致などの不整合が発生した場合にフレーム探索をやり直せる */ -static void DS_analyze_rx_buffer_carry_over_buffer_(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t total_processed_data_len, - uint16_t rec_data_len); +static void DS_analyze_rx_buffer_cueing_buffer_(DS_StreamConfig* p_stream_config); /** * @brief 固定長フレーム解析関数(バイト列処理) * - * 受信バッファのデータを走査し,必要なデータをフレームとしてpickupする - * @param p_stream_config: DriverSuper 構造体の DS_StreamConfig - * @param rx_buffer: 受信データのバッファ(配列) - * @param total_processed_data_len: 受信データのバッファのうち,すでに処理されたバイト数 - * @param rec_data_len: 受信データのバッファの長さ - * @return 今回の呼び出しで走査したバイト長さ.その他の詳細は DS_StreamRecStatus + * 受信バッファのデータを走査し,必要なデータをフレームとして pickup する + * @param p_stream_config: DriverSuper 構造体の DS_StreamConfig + * @return void その他の詳細は DS_StreamRecStatus */ -static uint16_t DS_analyze_rx_buffer_fixed_pickup_(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t total_processed_data_len, - uint16_t rec_data_len); +static void DS_analyze_rx_buffer_fixed_pickup_(DS_StreamConfig* p_stream_config); /** * @brief 可変フレーム解析関数(バイト列処理) * - * 受信バッファのデータを走査し,必要なデータをフレームとしてpickupする + * 受信バッファのデータを走査し,必要なデータをフレームとして pickup する * @note 受信フレームにフレーム長データが存在していることを前提とする - * @param p_stream_config: DriverSuper 構造体の DS_StreamConfig - * @param rx_buffer: 受信データのバッファ(配列) - * @param total_processed_data_len: 受信データのバッファのうち,すでに処理されたバイト数 - * @param rec_data_len: 受信データのバッファの長さ - * @return 今回の呼び出しで走査したバイト長さ.その他の詳細は DS_StreamRecStatus + * @param p_stream_config: DriverSuper 構造体の DS_StreamConfig + * @return void その他の詳細は DS_StreamRecStatus */ -static uint16_t DS_analyze_rx_buffer_variable_pickup_with_rx_frame_size_(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t total_processed_data_len, - uint16_t rec_data_len); +static void DS_analyze_rx_buffer_variable_pickup_with_rx_frame_size_(DS_StreamConfig* p_stream_config); /** * @brief 可変フレーム解析関数(バイト列処理) * - * 受信バッファのデータを走査し,必要なデータをフレームとしてpickupする + * 受信バッファのデータを走査し,必要なデータをフレームとして pickup する * @note DS_analyze_rx_buffer_variable_pickup_with_rx_frame_size_ との違いは,テレメ長データがフレームに含まれるか否か * @note フッタが存在していることを前提とする * @note ヘッダなしは認める.ただし,受信データ先頭からフレームとみなすので,ヘッダありを強く推奨する - * @param p_stream_config: DriverSuper 構造体の DS_StreamConfig - * @param rx_buffer: 受信データのバッファ(配列) - * @param total_processed_data_len: 受信データのバッファのうち,すでに処理されたバイト数 - * @param rec_data_len: 受信データのバッファの長さ - * @return 今回の呼び出しで走査したバイト長さ.その他の詳細は DS_StreamRecStatus + * @param p_stream_config: DriverSuper 構造体の DS_StreamConfig + * @return void その他の詳細は DS_StreamRecStatus */ -static uint16_t DS_analyze_rx_buffer_variable_pickup_with_footer_(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t total_processed_data_len, - uint16_t rec_data_len); +static void DS_analyze_rx_buffer_variable_pickup_with_footer_(DS_StreamConfig* p_stream_config); /** * @brief フレーム解析関数(ヘッダ探索) - * @note ヘッダが見つかった場合,最初の1 byte のみ処理する - * @param p_stream_config: DriverSuper 構造体の DS_StreamConfig - * @param rx_buffer: 受信データのバッファ(配列) - * @param total_processed_data_len: 受信データのバッファのうち,すでに処理されたバイト数 - * @param rec_data_len: 受信データのバッファの長さ - * @return 今回の呼び出しで走査したバイト長さ.その他の詳細は DS_StreamRecStatus + * @note ヘッダが見つかった場合,最初の 1 byte のみ処理する + * @param p_stream_config: DriverSuper 構造体の DS_StreamConfig + * @return void その他の詳細は DS_StreamRecStatus */ -static uint16_t DS_analyze_rx_buffer_finding_header_(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t total_processed_data_len, - uint16_t rec_data_len); +static void DS_analyze_rx_buffer_finding_header_(DS_StreamConfig* p_stream_config); /** * @brief フレーム解析関数(ヘッダ受信中) * @note 1 byte のみ処理する - * @param p_stream_config: DriverSuper 構造体の DS_StreamConfig - * @param rx_buffer: 受信データのバッファ(配列) - * @param total_processed_data_len: 受信データのバッファのうち,すでに処理されたバイト数 - * @return 今回の呼び出しで走査したバイト長さ(まあ,1なんだけど).その他の詳細は DS_StreamRecStatus + * @param p_stream_config: DriverSuper 構造体の DS_StreamConfig + * @return void その他の詳細は DS_StreamRecStatus */ -static uint16_t DS_analyze_rx_buffer_receiving_header_(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t total_processed_data_len); +static void DS_analyze_rx_buffer_receiving_header_(DS_StreamConfig* p_stream_config); /** * @brief フレーム解析関数(フッタ受信中) * @note 1 byte のみ処理する - * @note 現在,フレーム長がuint16_tを超えることは想定していない! - * @param p_stream_config: DriverSuper 構造体の DS_StreamConfig - * @param rx_buffer: 受信データのバッファ(配列) - * @param total_processed_data_len: 受信データのバッファのうち,すでに処理されたバイト数 - * @param rx_frame_size: フレームサイズ(可変長フレームの場合もあるので,引数に取る) - * @return 今回の呼び出しで走査したバイト長さ(まあ,1なんだけど).その他の詳細は DS_StreamRecStatus + * @note 現在,フレーム長が uint16_t を超えることは想定していない! + * @param p_stream_config: DriverSuper 構造体の DS_StreamConfig + * @param rx_frame_size: フレームサイズ(可変長フレームの場合もあるので,引数に取る) + * @return void その他の詳細は DS_StreamRecStatus */ -static uint16_t DS_analyze_rx_buffer_receiving_footer_(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t total_processed_data_len, - uint16_t rx_frame_size); +static void DS_analyze_rx_buffer_receiving_footer_(DS_StreamConfig* p_stream_config, + uint16_t rx_frame_size); /** * @brief フレーム解析中に受信したフレームからフレーム長を取得する関数 @@ -222,32 +165,119 @@ static DS_ERR_CODE DS_reset_stream_config_(DS_StreamConfig* p_stream_config); /** * @brief DS_StreamConfig 構造体のバリデーション + * @param p_super: DriverSuper 構造体へのポインタ * @param p_stream_config: DriverSuper 構造体の DS_StreamConfig * @return DS_ERR_CODE */ -static DS_ERR_CODE DS_validate_stream_config_(DS_StreamConfig* p_stream_config); +static DS_ERR_CODE DS_validate_stream_config_(const DriverSuper* p_super, DS_StreamConfig* p_stream_config); // ダミー関数 -// EQUだと関数ポインタの初期値をNULLにしていたためにぬるぽで事故ったので +// EQU だと関数ポインタの初期値を NULL にしていたためにぬるぽで事故ったので static DS_ERR_CODE DS_load_init_setting_dummy_(DriverSuper* p_super); static DS_ERR_CODE DS_data_analyzer_dummy_(DS_StreamConfig* p_stream_config, void* p_driver); +// ###### DS_StreamRecBuffer 関連関数 ###### + +/** + * @brief DS_StreamRecBuffer のクリア + * @param[in,out] stream_rec_buffer: クリアする DS_StreamRecBuffer + * @return void + */ +void DS_clear_stream_rec_buffer_(DS_StreamRecBuffer* stream_rec_buffer); + +/** + * @brief DS_StreamRecBuffer の前方要素の削除 + * @note stream_rec_buffer は NULL でないことを仮定する + * @param[in,out] stream_rec_buffer: 削除する DS_StreamRecBuffer + * @param[in] size: 削除するバッファサイズ + * @return void + */ +void DS_drop_from_stream_rec_buffer_(DS_StreamRecBuffer* stream_rec_buffer, + uint16_t size); + +/** + * @brief DS_StreamRecBuffer の追記(後ろへの) + * @note stream_rec_buffer は NULL でないことを仮定する + * @param[in,out] stream_rec_buffer: 追記する DS_StreamRecBuffer + * @param[in] buffer: 追記するバッファ + * @param[in] size: 追記するバッファサイズ + * @retval DS_ERR_CODE_OK: 正常終了 + * @retval DS_ERR_CODE_ERR: サイズ不足でコピーできず + */ +DS_ERR_CODE DS_push_to_stream_rec_buffer_(DS_StreamRecBuffer* stream_rec_buffer, + const uint8_t* buffer, + uint16_t size); + +/** + * @brief DS_StreamRecBuffer の未処理バッファサイズの取得 + * @note stream_rec_buffer は NULL でないことを仮定する + * @param[in] stream_rec_buffer: DS_StreamRecBuffer + * @return 未処理バッファサイズ + */ +uint16_t DS_get_unprocessed_size_from_stream_rec_buffer_(DS_StreamRecBuffer* stream_rec_buffer); + +/** + * @brief DS_StreamRecBuffer で指定サイズだけバッファを確定させる + * @note stream_rec_buffer は NULL でないことを仮定する + * @param[in,out] stream_rec_buffer: 確定させる DS_StreamRecBuffer + * @param[in] size: 確定させるバッファサイズ + * @return void + */ +void DS_confirm_stream_rec_buffer_(DS_StreamRecBuffer* stream_rec_buffer, + uint16_t size); + +/** + * @brief DS_StreamRecBuffer で指定サイズだけフレーム開始点を前進させる + * @note stream_rec_buffer は NULL でないことを仮定する + * @param[in,out] stream_rec_buffer: 前進させる DS_StreamRecBuffer + * @param[in] size: 前進させるバッファサイズ + * @return void + */ +void DS_move_forward_frame_head_candidate_of_stream_rec_buffer_(DS_StreamRecBuffer* stream_rec_buffer, + uint16_t size); + // ###### DriverSuper基本関数 ###### -DS_ERR_CODE DS_init(DriverSuper* p_super, void* if_config, DS_ERR_CODE (*load_init_setting)(DriverSuper* p_super)) +DS_ERR_CODE DS_init(DriverSuper* p_super, + void* if_config, + DS_StreamRecBuffer* rx_buffer, + DS_ERR_CODE (*load_init_setting)(DriverSuper* p_super)) { + DS_StreamRecBuffer* rx_buffers[DS_STREAM_MAX]; + DS_nullify_stream_rec_buffers(rx_buffers); + rx_buffers[0] = rx_buffer; + return DS_init_streams(p_super, if_config, rx_buffers, load_init_setting); +} + + +DS_ERR_CODE DS_init_streams(DriverSuper* p_super, + void* if_config, + DS_StreamRecBuffer* rx_buffers[DS_STREAM_MAX], + DS_ERR_CODE (*load_init_setting)(DriverSuper* p_super)) +{ + uint8_t stream; + if (DS_reset(p_super) != DS_ERR_CODE_OK) return DS_ERR_CODE_ERR; p_super->if_config = if_config; - p_super->config.load_init_setting = load_init_setting; - if (p_super->config.load_init_setting(p_super) != DS_ERR_CODE_OK) return DS_ERR_CODE_ERR; + // load_init_setting で上書きできるようにここで設定 + for (stream = 0; stream < DS_STREAM_MAX; ++stream) + { + if (rx_buffers[stream] != NULL) + { + DSSC_set_rx_buffer(&(p_super->stream_config[stream]), rx_buffers[stream]); + } + } + + p_super->config.internal.load_init_setting = load_init_setting; + if (p_super->config.internal.load_init_setting(p_super) != DS_ERR_CODE_OK) return DS_ERR_CODE_ERR; if (DS_validate_config(p_super) != DS_ERR_CODE_OK) return DS_ERR_CODE_ERR; - // IFの初期化 - // 一旦シンプルにIF_initのエラーコードは無視する(実機でここでエラー出る場合はコードがおかしいので.必要があれば将来実装.) + // IF の初期化 + // 一旦シンプルに IF_init のエラーコードは無視する(実機でここでエラー出る場合はコードがおかしいので.必要があれば将来実装.) if ( (*IF_init[p_super->interface])(p_super->if_config) != 0 ) return DS_ERR_CODE_ERR; return DS_ERR_CODE_OK; @@ -259,27 +289,29 @@ DS_ERR_CODE DS_reset(DriverSuper* p_super) uint8_t stream; p_super->interface = IF_LIST_MAX; // FIXME: (*IF_init[p_super->interface])(p_super->if_config) の様な使い方をするのでセグフォが起こる可能性があり - p_super->if_config = NULL; // FIXME: NULLポインタはこの関数がReset単体で使われるとマズい - - memset(p_super->config.rx_buffer_, 0x00, sizeof(p_super->config.rx_buffer_)); + p_super->if_config = NULL; // FIXME: NULL ポインタはこの関数が Reset 単体で使われるとマズい - p_super->config.load_init_setting = DS_load_init_setting_dummy_; + p_super->config.settings.rx_buffer_size_in_if_rx_ = DS_IF_RX_BUFFER_SIZE; + p_super->config.settings.should_monitor_for_rx_disruption_ = 0; + p_super->config.settings.time_threshold_for_rx_disruption_ = 60 * 1000; // この値はよく考えること - p_super->config.rec_status_.ret_from_if_rx = 0; - p_super->config.rec_status_.rx_disruption_status = DS_RX_DISRUPTION_STATUS_OK; + p_super->config.info.rec_status_.ret_from_if_rx = 0; + p_super->config.info.rec_status_.rx_disruption_status = DS_RX_DISRUPTION_STATUS_OK; - p_super->config.rx_count_ = 0; - p_super->config.rx_call_count_ = 0; - p_super->config.rx_time_ = TMGR_get_master_clock(); + p_super->config.info.rx_count_ = 0; + p_super->config.info.rx_call_count_ = 0; + p_super->config.info.rx_time_ = TMGR_get_master_clock(); - p_super->config.should_monitor_for_rx_disruption_ = 0; - p_super->config.time_threshold_for_rx_disruption_ = 60 * 1000; // この値はよく考えること + p_super->config.internal.load_init_setting = DS_load_init_setting_dummy_; for (stream = 0; stream < DS_STREAM_MAX; ++stream) { DS_ERR_CODE ret = DS_reset_stream_config_(&p_super->stream_config[stream]); if (ret != DS_ERR_CODE_OK) return ret; } + + DS_clear_rx_buffer(p_super); + return DS_ERR_CODE_OK; } @@ -291,9 +323,11 @@ DS_ERR_CODE DS_validate_config(DriverSuper* p_super) if (p_super->interface < 0 || p_super->interface >= IF_LIST_MAX) return DS_ERR_CODE_ERR; if (p_super->if_config == NULL) return DS_ERR_CODE_ERR; + if (p_super->config.settings.rx_buffer_size_in_if_rx_ > DS_IF_RX_BUFFER_SIZE) return DS_ERR_CODE_ERR; + for (stream = 0; stream < DS_STREAM_MAX; ++stream) { - DS_ERR_CODE ret = DS_validate_stream_config_(&p_super->stream_config[stream]); + DS_ERR_CODE ret = DS_validate_stream_config_(p_super, &p_super->stream_config[stream]); if (ret != DS_ERR_CODE_OK) return ret; } @@ -304,24 +338,16 @@ DS_ERR_CODE DS_clear_rx_buffer(DriverSuper* p_super) { uint8_t stream; - // 以下,各種 buffer を memsetで念の為0クリアしておくが, - // 情報は carry_over_buffer_size_ にあるので,動作上意味はない. - memset(p_super->config.rx_buffer_, 0x00, sizeof(p_super->config.rx_buffer_)); - for (stream = 0; stream < DS_STREAM_MAX; ++stream) { - p_super->stream_config[stream].rx_frame_rec_len_ = 0; - p_super->stream_config[stream].is_rx_buffer_carry_over_ = 0; - p_super->stream_config[stream].carry_over_buffer_size_ = 0; - - memset(p_super->stream_config[stream].rx_frame_, - 0x00, - sizeof(p_super->stream_config[stream].rx_frame_)); - memset(p_super->stream_config[stream].rx_buffer_for_carry_over_, - 0x00, - sizeof(p_super->stream_config[stream].rx_buffer_for_carry_over_)); + DS_clear_stream_rec_buffer_(p_super->stream_config[stream].settings.rx_buffer_); } + // FIXME: すべての Driver の初期化で呼ばれ,無駄 + memset(DS_if_rx_buffer_, + 0x00, + sizeof(DS_if_rx_buffer_)); + return DS_ERR_CODE_OK; } @@ -332,51 +358,51 @@ DS_ERR_CODE DS_receive(DriverSuper* p_super) uint16_t rec_data_len; int ret_rx; - p_super->config.rx_call_count_++; + p_super->config.info.rx_call_count_++; - // 各Driverで物理的に接続されている wire は1本なので,それをここで受信する. + // 各 Driver で物理的に接続されている wire は1本なので,それをここで受信する. // 後段の stream では,その受信したビット列に対して,複数のフレーム種類に対して,フレーム探索,確定処理を走らす. ret_rx = DS_rx_(p_super); - p_super->config.rec_status_.ret_from_if_rx = ret_rx; + p_super->config.info.rec_status_.ret_from_if_rx = ret_rx; if (ret_rx > 0) { // なにかしらの受信データあり - p_super->config.rx_count_++; - p_super->config.rx_time_ = TMGR_get_master_clock(); + p_super->config.info.rx_count_++; + p_super->config.info.rx_time_ = TMGR_get_master_clock(); } // 受信途絶判定 // テレメなどで見るときにノイズになるので,判定しないときは OK にしておく - p_super->config.rec_status_.rx_disruption_status = DS_RX_DISRUPTION_STATUS_OK; - if (p_super->config.should_monitor_for_rx_disruption_) + p_super->config.info.rec_status_.rx_disruption_status = DS_RX_DISRUPTION_STATUS_OK; + if (p_super->config.settings.should_monitor_for_rx_disruption_) { ObcTime now = TMGR_get_master_clock(); - uint32_t last_rx_ago = OBCT_diff_in_msec(&p_super->config.rx_time_, &now); + uint32_t last_rx_ago = OBCT_diff_in_msec(&p_super->config.info.rx_time_, &now); - if (last_rx_ago > p_super->config.time_threshold_for_rx_disruption_) + if (last_rx_ago > p_super->config.settings.time_threshold_for_rx_disruption_) { - p_super->config.rec_status_.rx_disruption_status = DS_RX_DISRUPTION_STATUS_LOST; + p_super->config.info.rec_status_.rx_disruption_status = DS_RX_DISRUPTION_STATUS_LOST; } } for (stream = 0; stream < DS_STREAM_MAX; ++stream) { DS_StreamConfig* p_stream_config = &(p_super->stream_config[stream]); - if (!p_stream_config->is_enabled_) + if (!p_stream_config->settings.is_enabled_) { - p_stream_config->rec_status_.status_code = DS_STREAM_REC_STATUS_DISABLE; + p_stream_config->info.rec_status_.status_code = DS_STREAM_REC_STATUS_DISABLE; continue; } // setter で validation かけると,初期化などで何度もかかることや, // そもそもこの validation は打ち上げ時というよりむしろ地上試験時に有用なので,ここに置く - if (p_stream_config->is_validation_needed_for_rec_) + if (p_stream_config->internal.is_validation_needed_for_rec_) { - DS_ERR_CODE ret = DS_validate_stream_config_(p_stream_config); + DS_ERR_CODE ret = DS_validate_stream_config_(p_super, p_stream_config); if (ret != DS_ERR_CODE_OK) { - p_stream_config->rec_status_.status_code = DS_STREAM_REC_STATUS_VALIDATE_ERR; + p_stream_config->info.rec_status_.status_code = DS_STREAM_REC_STATUS_VALIDATE_ERR; continue; } } @@ -384,7 +410,7 @@ DS_ERR_CODE DS_receive(DriverSuper* p_super) if (ret_rx < 0) // この共通処理が for の中にあるの,若干キモい... { // RX失敗 - p_stream_config->rec_status_.status_code = DS_STREAM_REC_STATUS_RX_ERR; + p_stream_config->info.rec_status_.status_code = DS_STREAM_REC_STATUS_RX_ERR; // [TODO] ここに DriverSuper としての共通のアノマリ発行を入れるかは要議論 // 個別対応なので, Driver に実装する,ないしは, IF 側に実装するのが自然か? continue; @@ -392,8 +418,9 @@ DS_ERR_CODE DS_receive(DriverSuper* p_super) else if (ret_rx == 0) { // 受信データなし - // 繰越データがあれば処理する - if (p_stream_config->is_rx_buffer_carry_over_) + + // 今回の受信はなくとも,バッファ内部に未処理データがあれば処理する + if (DS_get_unprocessed_size_from_stream_rec_buffer_(p_stream_config->settings.rx_buffer_) > 0) { // 繰越があるので,ここで continue せずへ次へ } @@ -401,9 +428,9 @@ DS_ERR_CODE DS_receive(DriverSuper* p_super) { // rec_status_.status_code 基本は更新せず // FIXED の場合はリセット - if (p_stream_config->rec_status_.status_code == DS_STREAM_REC_STATUS_FIXED_FRAME) + if (p_stream_config->info.rec_status_.status_code == DS_STREAM_REC_STATUS_FIXED_FRAME) { - p_stream_config->rec_status_.status_code = DS_STREAM_REC_STATUS_FINDING_HEADER; + p_stream_config->info.rec_status_.status_code = DS_STREAM_REC_STATUS_FINDING_HEADER; } continue; } @@ -416,14 +443,15 @@ DS_ERR_CODE DS_receive(DriverSuper* p_super) // ここまできたら受信データあり rec_data_len = (uint16_t)ret_rx; // ここまでくれば非負数 - DS_analyze_rx_buffer_(p_super, stream, rec_data_len); + // 受信データ処理 + DS_analyze_rx_buffer_(p_stream_config, rec_data_len); // フレーム確定処理 - if (p_stream_config->rec_status_.status_code == DS_STREAM_REC_STATUS_FIXED_FRAME) + if (p_stream_config->info.rec_status_.status_code == DS_STREAM_REC_STATUS_FIXED_FRAME) { - p_stream_config->rx_frame_fix_count_++; - p_stream_config->rx_frame_fix_time_ = TMGR_get_master_clock(); - p_stream_config->req_tlm_cmd_tx_count_after_last_tx_ = 0; + p_stream_config->info.rx_frame_fix_count_++; + p_stream_config->info.rx_frame_fix_time_ = TMGR_get_master_clock(); + p_stream_config->info.req_tlm_cmd_tx_count_after_last_tx_ = 0; } } @@ -435,19 +463,19 @@ DS_ERR_CODE DS_receive(DriverSuper* p_super) uint32_t last_tlm_fix_ago; // テレメなどで見るときにノイズになるので,判定しないときは OK にしておく - p_stream_config->rec_status_.tlm_disruption_status = DS_STREAM_TLM_DISRUPTION_STATUS_OK; + p_stream_config->info.rec_status_.tlm_disruption_status = DS_STREAM_TLM_DISRUPTION_STATUS_OK; - if (!p_stream_config->is_enabled_ || !p_stream_config->should_monitor_for_tlm_disruption_) + if (!p_stream_config->settings.is_enabled_ || !p_stream_config->settings.should_monitor_for_tlm_disruption_) { continue; } now = TMGR_get_master_clock(); - last_tlm_fix_ago = OBCT_diff_in_msec(&p_stream_config->rx_frame_fix_time_, &now); + last_tlm_fix_ago = OBCT_diff_in_msec(&p_stream_config->info.rx_frame_fix_time_, &now); - if (last_tlm_fix_ago > p_stream_config->time_threshold_for_tlm_disruption_) + if (last_tlm_fix_ago > p_stream_config->settings.time_threshold_for_tlm_disruption_) { - p_stream_config->rec_status_.tlm_disruption_status = DS_STREAM_TLM_DISRUPTION_STATUS_LOST; + p_stream_config->info.rec_status_.tlm_disruption_status = DS_STREAM_TLM_DISRUPTION_STATUS_LOST; } } @@ -459,9 +487,9 @@ DS_ERR_CODE DS_analyze_rec_data(DriverSuper* p_super, uint8_t stream, void* p_dr { DS_StreamConfig* p_stream_config = &(p_super->stream_config[stream]); - p_stream_config->ret_from_data_analyzer_ = p_stream_config->data_analyzer_(p_stream_config, p_driver); + p_stream_config->info.ret_from_data_analyzer_ = p_stream_config->settings.data_analyzer_(p_stream_config, p_driver); - return p_stream_config->ret_from_data_analyzer_; + return p_stream_config->info.ret_from_data_analyzer_; } @@ -469,14 +497,14 @@ DS_ERR_CODE DS_send_general_cmd(DriverSuper* p_super, uint8_t stream) { DS_StreamConfig* p_stream_config = &(p_super->stream_config[stream]); - if (!p_stream_config->is_enabled_) + if (!p_stream_config->settings.is_enabled_) { - p_stream_config->send_status_.status_code = DS_STREAM_SEND_STATUS_DISABLE; + p_stream_config->info.send_status_.status_code = DS_STREAM_SEND_STATUS_DISABLE; return DS_ERR_CODE_OK; } - p_stream_config->general_cmd_tx_count_++; - p_stream_config->general_cmd_tx_time_ = TMGR_get_master_clock(); + p_stream_config->info.general_cmd_tx_count_++; + p_stream_config->info.general_cmd_tx_time_ = TMGR_get_master_clock(); #ifdef DS_DEBUG Printf("DS: send_general_cmd\n"); @@ -490,15 +518,15 @@ DS_ERR_CODE DS_send_req_tlm_cmd(DriverSuper* p_super, uint8_t stream) { DS_StreamConfig* p_stream_config = &(p_super->stream_config[stream]); - if (!p_stream_config->is_enabled_) + if (!p_stream_config->settings.is_enabled_) { - p_stream_config->send_status_.status_code = DS_STREAM_SEND_STATUS_DISABLE; + p_stream_config->info.send_status_.status_code = DS_STREAM_SEND_STATUS_DISABLE; return DS_ERR_CODE_OK; } - p_stream_config->req_tlm_cmd_tx_count_++; - p_stream_config->req_tlm_cmd_tx_count_after_last_tx_++; - p_stream_config->req_tlm_cmd_tx_time_ = TMGR_get_master_clock(); + p_stream_config->info.req_tlm_cmd_tx_count_++; + p_stream_config->info.req_tlm_cmd_tx_count_after_last_tx_++; + p_stream_config->info.req_tlm_cmd_tx_time_ = TMGR_get_master_clock(); #ifdef DS_DEBUG Printf("DS: send_req_tlm_cmd\n"); @@ -514,25 +542,25 @@ static DS_ERR_CODE DS_send_cmd_(DriverSuper* p_super, uint8_t stream) // setter で validation かけると,初期化などで何度もかかることや, // そもそもこの validation は打ち上げじというよりむしろ地上試験時に有用なので,ここに置く - if (p_stream_config->is_validation_needed_for_send_) + if (p_stream_config->internal.is_validation_needed_for_send_) { - DS_ERR_CODE ret = DS_validate_stream_config_(p_stream_config); + DS_ERR_CODE ret = DS_validate_stream_config_(p_super, p_stream_config); if (ret != DS_ERR_CODE_OK) { - p_stream_config->send_status_.status_code = DS_STREAM_SEND_STATUS_VALIDATE_ERR; + p_stream_config->info.send_status_.status_code = DS_STREAM_SEND_STATUS_VALIDATE_ERR; return DS_ERR_CODE_ERR; } } - p_stream_config->send_status_.ret_from_if_tx = DS_tx_(p_super, stream); + p_stream_config->info.send_status_.ret_from_if_tx = DS_tx_(p_super, stream); - if (p_stream_config->send_status_.ret_from_if_tx != 0) + if (p_stream_config->info.send_status_.ret_from_if_tx != 0) { - p_stream_config->send_status_.status_code = DS_STREAM_SEND_STATUS_TX_ERR; + p_stream_config->info.send_status_.status_code = DS_STREAM_SEND_STATUS_TX_ERR; return DS_ERR_CODE_ERR; } - p_stream_config->send_status_.status_code = DS_STREAM_SEND_STATUS_OK; + p_stream_config->info.send_status_.status_code = DS_STREAM_SEND_STATUS_OK; return DS_ERR_CODE_OK; } @@ -542,16 +570,16 @@ static int DS_tx_(DriverSuper* p_super, uint8_t stream) int ret; DS_StreamConfig* p_stream_config = &(p_super->stream_config[stream]); - if (p_stream_config->tx_frame_size_ == 0) return DS_ERR_CODE_OK; - if (p_stream_config->tx_frame_ == NULL) return DS_ERR_CODE_OK; + if (p_stream_config->settings.tx_frame_size_ == 0) return DS_ERR_CODE_OK; + if (p_stream_config->settings.tx_frame_ == NULL) return DS_ERR_CODE_OK; #ifdef DS_DEBUG Printf("DS: tx_\n"); #endif ret = (*IF_TX[p_super->interface])(p_super->if_config, - p_stream_config->tx_frame_, - (int)p_stream_config->tx_frame_size_); + p_stream_config->settings.tx_frame_, + (int)p_stream_config->settings.tx_frame_size_); if (ret != 0) return ret; return DS_ERR_CODE_OK; @@ -567,12 +595,12 @@ static int DS_rx_(DriverSuper* p_super) int16_t i; #endif - // 少なくとも1つのstreamが有効でかつ,rx_frame_size_が0以外でないと受信処理はしない + // 少なくとも 1 つの stream が有効でかつ,rx_frame_size_ が 0 以外でないと受信処理はしない flag = 0; for (stream = 0; stream < DS_STREAM_MAX; ++stream) { - if (! (p_super->stream_config[stream].is_enabled_) ) continue; - if (p_super->stream_config[stream].rx_frame_size_ != 0) + if (! (p_super->stream_config[stream].settings.is_enabled_) ) continue; + if (p_super->stream_config[stream].settings.rx_frame_size_ != 0) { flag = 1; } @@ -580,8 +608,8 @@ static int DS_rx_(DriverSuper* p_super) if (flag == 0) return 0; rec_data_len = (*IF_RX[p_super->interface])(p_super->if_config, - p_super->config.rx_buffer_, - DS_RX_BUFFER_SIZE_MAX); + DS_if_rx_buffer_, + p_super->config.settings.rx_buffer_size_in_if_rx_); #ifdef DS_DEBUG Printf("DS: rx_\n"); @@ -593,7 +621,7 @@ static int DS_rx_(DriverSuper* p_super) Printf("DS: Receive data size is %d bytes, as follow:\n", rec_data_len); for (i = 0; i < rec_data_len; i++) { - Printf("%02x ", p_super->config.rx_buffer_[i]); + Printf("%02x ", DS_if_rx_buffer_[i]); if (i % 4 == 3) Printf(" "); } Printf("\n"); @@ -603,82 +631,74 @@ static int DS_rx_(DriverSuper* p_super) } -static void DS_analyze_rx_buffer_(DriverSuper* p_super, - uint8_t stream, +static void DS_analyze_rx_buffer_(DS_StreamConfig* p_stream_config, uint16_t rec_data_len) { - // 解析用受信バッファ - // 巨大なデータなので,staticで予め確保しておき,実行時のスタック枯渇を避ける - static uint8_t rx_buffer[DS_RX_BUFFER_SIZE_MAX * 2]; - DS_StreamConfig* p_stream_config = &(p_super->stream_config[stream]); - uint16_t total_processed_data_len; - - rec_data_len = DS_analyze_rx_buffer_prepare_buffer_(p_super, stream, rx_buffer, rec_data_len); + DS_analyze_rx_buffer_prepare_buffer_(p_stream_config, rec_data_len); - total_processed_data_len = DS_analyze_rx_buffer_pickup_(p_stream_config, rx_buffer, rec_data_len); + DS_analyze_rx_buffer_pickup_(p_stream_config); - DS_analyze_rx_buffer_carry_over_buffer_(p_stream_config, rx_buffer, total_processed_data_len, rec_data_len); + // 次回のデータ受信に備えて,バッファの頭出し + DS_analyze_rx_buffer_cueing_buffer_(p_stream_config); } -static uint16_t DS_analyze_rx_buffer_prepare_buffer_(DriverSuper* p_super, - uint8_t stream, - uint8_t* rx_buffer, - uint16_t rec_data_len) +static void DS_analyze_rx_buffer_prepare_buffer_(DS_StreamConfig* p_stream_config, + uint16_t rec_data_len) { - DS_StreamConfig* p_stream_config = &(p_super->stream_config[stream]); - uint16_t buffer_offset = 0; + // rx_buffer_ には,前回確定したフレームも残っているので,それは除く + // したがって, DS の DSSC_get_rx_frame した frame へのポインタは,次回受信時までしか有効ではない + DS_StreamRecBuffer* buffer = p_stream_config->settings.rx_buffer_; + DS_ERR_CODE ret; - // 繰越受信データのとりこみ - if (p_stream_config->is_rx_buffer_carry_over_) + if (buffer->is_frame_fixed) { - memcpy(rx_buffer, - p_stream_config->rx_buffer_for_carry_over_, - (size_t)p_stream_config->carry_over_buffer_size_); - buffer_offset += p_stream_config->carry_over_buffer_size_; - } + // ユーザー側ですでにデータを取得したと判断して,バッファから下ろす + DS_drop_from_stream_rec_buffer_(buffer, buffer->pos_of_frame_head_candidate); // 念のため - // 今回受信分のとりこみ - memcpy(&(rx_buffer[buffer_offset]), - p_super->config.rx_buffer_, - (size_t)rec_data_len); + if (p_stream_config->settings.is_strict_frame_search_) + { + // 厳格なフレーム探索なので,1 つの可能性も受信漏らさないように + DS_drop_from_stream_rec_buffer_(buffer, 1); + } + else + { + DS_drop_from_stream_rec_buffer_(buffer, buffer->confirmed_frame_len); + } - if (p_stream_config->is_rx_buffer_carry_over_) - { - rec_data_len += p_stream_config->carry_over_buffer_size_; + buffer->is_frame_fixed = 0; } - return rec_data_len; + // 新規受信分をバッファへ + buffer->pos_of_last_rec = buffer->size; // 最終更新地点を更新 + ret = DS_push_to_stream_rec_buffer_(buffer, DS_if_rx_buffer_, rec_data_len); + if (ret != DS_ERR_CODE_OK) + { + // バッファがあふれるので,一旦古いバッファのクリア + // TODO: この仕様は検討してもよいかも?(ユーザー選択にするとか) + DS_clear_stream_rec_buffer_(buffer); + DS_push_to_stream_rec_buffer_(buffer, DS_if_rx_buffer_, rec_data_len); + p_stream_config->info.rec_status_.count_of_carry_over_failures++; + } } -static uint16_t DS_analyze_rx_buffer_pickup_(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t rec_data_len) +static void DS_analyze_rx_buffer_pickup_(DS_StreamConfig* p_stream_config) { - uint16_t total_processed_data_len; - // 受信バッファのデータを走査し,必要なデータをフレームとしてpickupする関数 - uint16_t (*pickup_func)(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t total_processed_data_len, - uint16_t rec_data_len); - p_stream_config->rx_frame_head_pos_of_frame_candidate_ = 0; + DS_StreamRecBuffer* buffer = p_stream_config->settings.rx_buffer_; + // 受信バッファのデータを走査し,必要なデータをフレームとして pickup する関数 + void (*pickup_func)(DS_StreamConfig* p_stream_config); + + if (p_stream_config->settings.rx_frame_size_ == 0) return; - // TODO: ビッグデータ対応 - if (p_stream_config->rx_frame_size_ > 0 && p_stream_config->rx_frame_size_ < DS_RX_FRAME_SIZE_MAX) + if (p_stream_config->settings.rx_frame_size_ > 0) { pickup_func = DS_analyze_rx_buffer_fixed_pickup_; } - else if (p_stream_config->rx_frame_size_ > 0) - { - // DS_analyze_rx_buffer_fixed_bigdata_(void) - pickup_func = NULL; - return rec_data_len; - } - else if (p_stream_config->rx_frame_size_ < 0 && p_stream_config->rx_frame_size_ < DS_RX_FRAME_SIZE_MAX) + else if (p_stream_config->settings.rx_frame_size_ < 0) { // フレームにフレーム長データが含まれているか? - if (p_stream_config->rx_framelength_pos_ >= 0) + if (p_stream_config->settings.rx_framelength_pos_ >= 0) { pickup_func = DS_analyze_rx_buffer_variable_pickup_with_rx_frame_size_; } @@ -689,146 +709,80 @@ static uint16_t DS_analyze_rx_buffer_pickup_(DS_StreamConfig* p_stream_config, } else { - // DS_analyze_rx_buffer_variable_bigdata_(void) + // TODO: ビッグデータ対応 pickup_func = NULL; - return rec_data_len; + return; } // 受信バッファからデータをピックアップしていく - total_processed_data_len = p_stream_config->carry_over_buffer_next_pos_; - while (total_processed_data_len < rec_data_len) + while (DS_get_unprocessed_size_from_stream_rec_buffer_(buffer) > 0) { - uint16_t processed_data_len = pickup_func(p_stream_config, - rx_buffer, - total_processed_data_len, - rec_data_len); - total_processed_data_len += processed_data_len; + pickup_func(p_stream_config); - if (p_stream_config->rec_status_.status_code == DS_STREAM_REC_STATUS_FIXED_FRAME) + if (p_stream_config->info.rec_status_.status_code == DS_STREAM_REC_STATUS_FIXED_FRAME) { break; } - // 不整合が起きたら,現在のframe候補の先頭 + 1バイト目に走査場所を戻す - if (p_stream_config->rec_status_.status_code == DS_STREAM_REC_STATUS_HEADER_MISMATCH || - p_stream_config->rec_status_.status_code == DS_STREAM_REC_STATUS_FOOTER_MISMATCH || - p_stream_config->rec_status_.status_code == DS_STREAM_REC_STATUS_RX_FRAME_TOO_LONG || - p_stream_config->rec_status_.status_code == DS_STREAM_REC_STATUS_RX_FRAME_TOO_SHORT) + // 不整合が起きたら,現在の frame 候補の先頭 + 1 バイト目に走査場所を戻す + if (p_stream_config->info.rec_status_.status_code == DS_STREAM_REC_STATUS_HEADER_MISMATCH || + p_stream_config->info.rec_status_.status_code == DS_STREAM_REC_STATUS_FOOTER_MISMATCH || + p_stream_config->info.rec_status_.status_code == DS_STREAM_REC_STATUS_RX_FRAME_TOO_LONG || + p_stream_config->info.rec_status_.status_code == DS_STREAM_REC_STATUS_RX_FRAME_TOO_SHORT) { - total_processed_data_len = (uint16_t)(p_stream_config->rx_frame_head_pos_of_frame_candidate_ + 1); + DS_move_forward_frame_head_candidate_of_stream_rec_buffer_(buffer, 1); // 他の部分での条件分岐のために,詳細エラー情報を現在のステータスに上書きする - p_stream_config->rec_status_.status_code = DS_STREAM_REC_STATUS_FINDING_HEADER; + p_stream_config->info.rec_status_.status_code = DS_STREAM_REC_STATUS_FINDING_HEADER; } + } - // processed_data_len > rec_data_lenなることはありえないが,念の為チャックする?? + if (p_stream_config->info.rec_status_.status_code == DS_STREAM_REC_STATUS_FIXED_FRAME) + { + buffer->is_frame_fixed = 1; + p_stream_config->info.rec_status_.fixed_frame_len = buffer->confirmed_frame_len; + // FIXME: is_frame_fixed と DS_STREAM_REC_STATUS_FIXED_FRAME あたいの混在がだるいので直す? + // FIXME: confirmed_frame_len と fixed_frame_len も?(これはまあ最後のを残すという意味ではよさそう) } - return total_processed_data_len; + return; } -static void DS_analyze_rx_buffer_carry_over_buffer_(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t total_processed_data_len, - uint16_t rec_data_len) +static void DS_analyze_rx_buffer_cueing_buffer_(DS_StreamConfig* p_stream_config) { - p_stream_config->carry_over_buffer_size_ = 0; - if (p_stream_config->rec_status_.status_code == DS_STREAM_REC_STATUS_FIXED_FRAME) - { - if (p_stream_config->is_strict_frame_search_) - { - // 確定フレームの先頭 + 1 バイト目以降を次回に引き継ぐ - p_stream_config->carry_over_buffer_size_ = (uint16_t)(rec_data_len - p_stream_config->rx_frame_head_pos_of_frame_candidate_ - 1); - // 次回は,引き継いだデータの先頭から再びフレーム探索 - p_stream_config->carry_over_buffer_next_pos_ = 0; - } - else - { - // フレーム確定して,解析できなかった受信データがある場合,次回に引き継ぐ - p_stream_config->carry_over_buffer_size_ = (uint16_t)(rec_data_len - total_processed_data_len); - // 次回は,引き継いだデータの先頭から再びフレーム探索 - p_stream_config->carry_over_buffer_next_pos_ = 0; - } - } - else - { - if (p_stream_config->rec_status_.status_code == DS_STREAM_REC_STATUS_FINDING_HEADER) - { - // 引き継ぎデータはなし - p_stream_config->carry_over_buffer_size_ = 0; - // 次回は,先頭から再びフレーム探索 - p_stream_config->carry_over_buffer_next_pos_ = 0; - } - else - { - // 確定フレームの先頭以降を次回に引き継ぐ - p_stream_config->carry_over_buffer_size_ = (uint16_t)(rec_data_len - p_stream_config->rx_frame_head_pos_of_frame_candidate_); - // 次回は,引き継いだデータはスキップし,受信したものの先頭からフレーム - p_stream_config->carry_over_buffer_next_pos_ = p_stream_config->carry_over_buffer_size_; - } - } - - if (p_stream_config->carry_over_buffer_size_ > 0 && p_stream_config->carry_over_buffer_size_ <= DS_RX_BUFFER_SIZE_MAX) - { - uint16_t pos = (uint16_t)(rec_data_len - p_stream_config->carry_over_buffer_size_); - p_stream_config->is_rx_buffer_carry_over_ = 1; - memcpy(p_stream_config->rx_buffer_for_carry_over_, - &(rx_buffer[pos]), - (size_t)p_stream_config->carry_over_buffer_size_); - } - else - { - // 引き継ぐサイズが DS_RX_BUFFER_SIZE_MAX を超えた場合,処理のキャパを超えてしまっているので,リセット. - if (p_stream_config->carry_over_buffer_size_ > 0) - { - p_stream_config->rec_status_.count_of_carry_over_failures++; - } - p_stream_config->is_rx_buffer_carry_over_ = 0; - p_stream_config->carry_over_buffer_size_ = 0; - p_stream_config->carry_over_buffer_next_pos_ = 0; - } + DS_StreamConfig* p = p_stream_config; // ちょっと変数名が長すぎて配列 index などがみずらいので... + DS_StreamRecBuffer* buffer = p->settings.rx_buffer_; - return; + // pos_of_frame_head_candidate の頭出しをしておけば OK + DS_drop_from_stream_rec_buffer_(buffer, buffer->pos_of_frame_head_candidate); } -static uint16_t DS_analyze_rx_buffer_fixed_pickup_(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t total_processed_data_len, - uint16_t rec_data_len) +static void DS_analyze_rx_buffer_fixed_pickup_(DS_StreamConfig* p_stream_config) { - uint16_t unprocessed_data_len = (uint16_t)(rec_data_len - total_processed_data_len); // このキャストは若干危ない(コードが論理的に正しければ問題ないが) - DS_StreamConfig* p = p_stream_config; // ちょっと変数名が長すぎて配列indexなどがみずらいので... + DS_StreamConfig* p = p_stream_config; // ちょっと変数名が長すぎて配列 index などがみずらいので... + DS_StreamRecBuffer* buffer = p->settings.rx_buffer_; - if (p->rx_frame_rec_len_ == 0 && p->rx_header_size_ != 0) + if (buffer->confirmed_frame_len == 0 && p->settings.rx_header_size_ != 0) { // まだヘッダの先頭すら未発見の場合(ヘッダなし時はここはスキップ) - return DS_analyze_rx_buffer_finding_header_(p_stream_config, - rx_buffer, - total_processed_data_len, - rec_data_len); + DS_analyze_rx_buffer_finding_header_(p_stream_config); + return; } - else if (p->rx_frame_rec_len_ < p->rx_header_size_) + else if (buffer->confirmed_frame_len < p->settings.rx_header_size_) { // ヘッダ受信中 - return DS_analyze_rx_buffer_receiving_header_(p_stream_config, - rx_buffer, - total_processed_data_len); + DS_analyze_rx_buffer_receiving_header_(p_stream_config); + return; } - else if (p->rx_frame_rec_len_ < p->rx_frame_size_ - p->rx_footer_size_) + else if (buffer->confirmed_frame_len < p->settings.rx_frame_size_ - p->settings.rx_footer_size_) { // データ受信中 // ここは高速化のために一括処理 - uint16_t pickup_data_len; - - // ヘッダなしの場合は,ここがフレーム先頭 - if (p->rx_frame_rec_len_ == 0) - { - p->rx_frame_head_pos_of_frame_candidate_ = total_processed_data_len; - } - - pickup_data_len = (uint16_t)(p->rx_frame_size_ - p->rx_footer_size_ - p->rx_frame_rec_len_); + // ヘッダなしの場合は,ここがフレーム先頭であることに注意 + const uint16_t unprocessed_data_len = DS_get_unprocessed_size_from_stream_rec_buffer_(buffer); + uint16_t pickup_data_len = (uint16_t)(p->settings.rx_frame_size_ - p->settings.rx_footer_size_ - buffer->confirmed_frame_len); // 今回で全部受信しきらない場合 if (pickup_data_len > unprocessed_data_len) @@ -836,73 +790,54 @@ static uint16_t DS_analyze_rx_buffer_fixed_pickup_(DS_StreamConfig* p_stream_con pickup_data_len = unprocessed_data_len; } - memcpy(&(p->rx_frame_[p->rx_frame_rec_len_]), - &(rx_buffer[total_processed_data_len]), - (size_t)pickup_data_len); - - p->rx_frame_rec_len_ += pickup_data_len; - p->rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_DATA; + DS_confirm_stream_rec_buffer_(buffer, pickup_data_len); // pickup_data_len byte 確定 + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_DATA; - // フッタがなく,data受信仕切った場合はフレーム確定 + // フッタがなく,data 受信仕切った場合はフレーム確定 // これがないと,DS_analyze_rx_buffer_fixed_ で // 今まさに受信したデータ長がぴったりフレーム末だった場合に,フレーム確定が1周期遅れることになるので - if (p->rx_footer_size_ == 0 && p->rx_frame_rec_len_ == p->rx_frame_size_) + if (p->settings.rx_footer_size_ == 0 && buffer->confirmed_frame_len == p->settings.rx_frame_size_) { - p->rec_status_.status_code = DS_STREAM_REC_STATUS_FIXED_FRAME; - p->rec_status_.fixed_frame_len = p->rx_frame_rec_len_; - p->rx_frame_rec_len_ = 0; + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_FIXED_FRAME; } - return pickup_data_len; + return; } else { // フッタ受信中 or フッタなしの場合はフレーム確定 - return DS_analyze_rx_buffer_receiving_footer_(p_stream_config, - rx_buffer, - total_processed_data_len, - (uint16_t)(p->rx_frame_size_)); + DS_analyze_rx_buffer_receiving_footer_(p_stream_config, + (uint16_t)(p->settings.rx_frame_size_)); + return; } } -static uint16_t DS_analyze_rx_buffer_variable_pickup_with_rx_frame_size_(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t total_processed_data_len, - uint16_t rec_data_len) +static void DS_analyze_rx_buffer_variable_pickup_with_rx_frame_size_(DS_StreamConfig* p_stream_config) { - uint16_t unprocessed_data_len = (uint16_t)(rec_data_len - total_processed_data_len); // このキャストは若干危ない(コードが論理的に正しければ問題ないが) - DS_StreamConfig* p = p_stream_config; // ちょっと変数名が長すぎて配列indexなどがみずらいので... + DS_StreamConfig* p = p_stream_config; // ちょっと変数名が長すぎて配列 index などがみずらいので... + DS_StreamRecBuffer* buffer = p->settings.rx_buffer_; + const uint16_t unprocessed_data_len = DS_get_unprocessed_size_from_stream_rec_buffer_(buffer); uint32_t rx_frame_size = DS_analyze_rx_buffer_get_framelength_(p_stream_config); // まだ受信していない場合は不定値が入ることに留意すること!! - if (p->rx_frame_rec_len_ == 0 && p->rx_header_size_ != 0) + if (buffer->confirmed_frame_len == 0 && p->settings.rx_header_size_ != 0) { // まだヘッダの先頭すら未発見の場合(ヘッダなし時はここはスキップ) - return DS_analyze_rx_buffer_finding_header_(p_stream_config, - rx_buffer, - total_processed_data_len, - rec_data_len); + DS_analyze_rx_buffer_finding_header_(p_stream_config); + return; } - else if (p->rx_frame_rec_len_ < p->rx_header_size_) + else if (buffer->confirmed_frame_len < p->settings.rx_header_size_) { // ヘッダ受信中 - return DS_analyze_rx_buffer_receiving_header_(p_stream_config, - rx_buffer, - total_processed_data_len); + DS_analyze_rx_buffer_receiving_header_(p_stream_config); + return; } - else if (p->rx_frame_rec_len_ < p->rx_framelength_pos_ + p->rx_framelength_type_size_) + else if (buffer->confirmed_frame_len < p->settings.rx_framelength_pos_ + p->settings.rx_framelength_type_size_) { // フレームサイズ探索中 // ここは高速化のために一括処理 - uint16_t pickup_data_len; - - // ヘッダなしの場合は,ここがフレーム先頭 - if (p->rx_frame_rec_len_ == 0) - { - p->rx_frame_head_pos_of_frame_candidate_ = total_processed_data_len; - } - - pickup_data_len = (uint16_t)(p->rx_framelength_pos_ + p->rx_framelength_type_size_ - p->rx_frame_rec_len_); + // ヘッダなしの場合は,ここがフレーム先頭であることに注意 + uint16_t pickup_data_len = (uint16_t)(p->settings.rx_framelength_pos_ + p->settings.rx_framelength_type_size_ - buffer->confirmed_frame_len); // 今回で全部受信しきらない場合 if (pickup_data_len > unprocessed_data_len) @@ -910,49 +845,43 @@ static uint16_t DS_analyze_rx_buffer_variable_pickup_with_rx_frame_size_(DS_Stre pickup_data_len = unprocessed_data_len; } - memcpy(&(p->rx_frame_[p->rx_frame_rec_len_]), - &(rx_buffer[total_processed_data_len]), - (size_t)pickup_data_len); - - p->rx_frame_rec_len_ += pickup_data_len; - p->rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_FRAMELENGTH; + DS_confirm_stream_rec_buffer_(buffer, pickup_data_len); // pickup_data_len byte 確定 + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_FRAMELENGTH; // フレーム長を受信し終わった場合,チェックする - if (p->rx_frame_rec_len_ >= p->rx_framelength_pos_ + p->rx_framelength_type_size_) + if (buffer->confirmed_frame_len >= p->settings.rx_framelength_pos_ + p->settings.rx_framelength_type_size_) { rx_frame_size = DS_analyze_rx_buffer_get_framelength_(p_stream_config); - // バッファー超えはエラーを出す! - if (rx_frame_size > DS_RX_FRAME_SIZE_MAX) + // バッファー超え or 上限値超えはエラーを出す! + if (rx_frame_size > buffer->capacity || rx_frame_size > p->settings.max_rx_frame_size_) { - p->rec_status_.status_code = DS_STREAM_REC_STATUS_RX_FRAME_TOO_LONG; - p->rx_frame_rec_len_ = 0; + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_RX_FRAME_TOO_LONG; #ifdef DS_DEBUG Printf("DS: RX frame size is too long\n"); #endif - return 0; // TODO: ここで何を返すかはもうすこし考えても良いかも? + return; } - // bodyサイズがは0以上を要請 - if (rx_frame_size < p->rx_header_size_ + p->rx_footer_size_) + // body サイズがは 0 以上を要請 + if (rx_frame_size < p->settings.rx_header_size_ + p->settings.rx_footer_size_) { - p->rec_status_.status_code = DS_STREAM_REC_STATUS_RX_FRAME_TOO_SHORT; - p->rx_frame_rec_len_ = 0; + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_RX_FRAME_TOO_SHORT; #ifdef DS_DEBUG Printf("DS: RX frame size is too short\n"); #endif - return 0; // TODO: ここで何を返すかはもうすこし考えても良いかも? + return; } } - return pickup_data_len; + return; } - else if (p->rx_frame_rec_len_ < rx_frame_size - p->rx_footer_size_) + else if (buffer->confirmed_frame_len < rx_frame_size - p->settings.rx_footer_size_) { // データ受信中 // ここは高速化のために一括処理 - - uint16_t pickup_data_len = (uint16_t)(rx_frame_size - p->rx_footer_size_ - p->rx_frame_rec_len_); // TODO: 現在,フレーム長がuint16_tを超えることは想定していない! + // TODO: 現在,フレーム長が uint16_t を超えることは想定していない! + uint16_t pickup_data_len = (uint16_t)(rx_frame_size - p->settings.rx_footer_size_ - buffer->confirmed_frame_len); // 今回で全部受信しきらない場合 if (pickup_data_len > unprocessed_data_len) @@ -960,167 +889,147 @@ static uint16_t DS_analyze_rx_buffer_variable_pickup_with_rx_frame_size_(DS_Stre pickup_data_len = unprocessed_data_len; } - memcpy(&(p->rx_frame_[p->rx_frame_rec_len_]), - &(rx_buffer[total_processed_data_len]), - (size_t)pickup_data_len); - - p->rx_frame_rec_len_ += pickup_data_len; - p->rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_DATA; + DS_confirm_stream_rec_buffer_(buffer, pickup_data_len); // pickup_data_len byte 確定 + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_DATA; - // フッタがなく,data受信仕切った場合はフレーム確定 - // これがないと,DS_analyze_rx_buffer_fixed_ で今まさに受信したデータ長がぴったりフレーム末だった場合に,フレーム確定が1周期遅れることになるので - if (p->rx_footer_size_ == 0 && p->rx_frame_rec_len_ == rx_frame_size) + // フッタがなく,data 受信仕切った場合はフレーム確定 + // これがないと,DS_analyze_rx_buffer_fixed_ で + // 今まさに受信したデータ長がぴったりフレーム末だった場合に,フレーム確定が 1 周期遅れることになるので + if (p->settings.rx_footer_size_ == 0 && buffer->confirmed_frame_len == rx_frame_size) { - p->rec_status_.status_code = DS_STREAM_REC_STATUS_FIXED_FRAME; - p->rx_frame_rec_len_ = 0; + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_FIXED_FRAME; } - return pickup_data_len; + return; } else { // フッタ受信中 or フッタなしの場合はフレーム確定 - return DS_analyze_rx_buffer_receiving_footer_(p_stream_config, - rx_buffer, - total_processed_data_len, - (uint16_t)rx_frame_size); + DS_analyze_rx_buffer_receiving_footer_(p_stream_config, + (uint16_t)rx_frame_size); + return; } } -static uint16_t DS_analyze_rx_buffer_variable_pickup_with_footer_(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t total_processed_data_len, - uint16_t rec_data_len) +static void DS_analyze_rx_buffer_variable_pickup_with_footer_(DS_StreamConfig* p_stream_config) { - uint16_t unprocessed_data_len = (uint16_t)(rec_data_len - total_processed_data_len); // このキャストは若干危ない(コードが論理的に正しければ問題ないが) - DS_StreamConfig* p = p_stream_config; // ちょっと変数名が長すぎて配列indexなどがみずらいので... + DS_StreamConfig* p = p_stream_config; // ちょっと変数名が長すぎて配列 index などがみずらいので... + DS_StreamRecBuffer* buffer = p->settings.rx_buffer_; - if (p->rx_frame_rec_len_ == 0 && p->rx_header_size_ != 0) + if (buffer->confirmed_frame_len == 0 && p->settings.rx_header_size_ != 0) { // まだヘッダの先頭すら未発見の場合(ヘッダなし時はここはスキップ) - return DS_analyze_rx_buffer_finding_header_(p_stream_config, - rx_buffer, - total_processed_data_len, - rec_data_len); + DS_analyze_rx_buffer_finding_header_(p_stream_config); + return; } - else if (p->rx_frame_rec_len_ < p->rx_header_size_) + else if (buffer->confirmed_frame_len < p->settings.rx_header_size_) { // ヘッダ受信中 - return DS_analyze_rx_buffer_receiving_header_(p_stream_config, - rx_buffer, - total_processed_data_len); + DS_analyze_rx_buffer_receiving_header_(p_stream_config); + return; } else { // 最後まで受信し,フッタの最終文字を探す.フッタなしはありえない. + // ヘッダなしの場合は,ここがフレーム先頭 + const uint16_t unprocessed_data_len = DS_get_unprocessed_size_from_stream_rec_buffer_(buffer); uint8_t* p_footer_last; // inclusive - int32_t body_data_len; // サイズ的にはu16でよいが,負数もとりたいのでi32としている + int32_t body_data_len; // サイズ的には u16 でよいが,負数もとりたいので i32 としている uint16_t processed_data_len; uint16_t i; - uint16_t estimated_rx_frame_size; - uint16_t pickup_data_len; + const uint16_t memchr_offset = buffer->pos_of_frame_head_candidate + buffer->confirmed_frame_len; + uint16_t estimated_rx_frame_end_pos; - // ヘッダなしの場合は,ここがフレーム先頭 - if (p->rx_frame_rec_len_ == 0) + // 届いているデータを受信フレームバッファに格納する + // ここは高速化のために一括処理 + // フッタ最終文字を探す + p_footer_last = (uint8_t*)memchr(&(buffer->buffer[memchr_offset]), + (int)(p->settings.rx_footer_[p->settings.rx_footer_size_ - 1]), + (size_t)unprocessed_data_len); + + if (p_footer_last == NULL) + { + // まだフッタ候補まで受信していない → 受信データはすべて今回のフレームとして確定 + processed_data_len = unprocessed_data_len; + } + else { - p->rx_frame_head_pos_of_frame_candidate_ = total_processed_data_len; + // フッタ候補発見 → フッタ候補までフレーム確定 + processed_data_len = (uint16_t)(p_footer_last - &(buffer->buffer[memchr_offset]) + 1); } - // 届いているデータを受信フレームバッファに格納する - // ここは高速化のために一括処理 - pickup_data_len = unprocessed_data_len; - // 永遠にフッタを受信しない場合にバッファーオーバーランすることを防ぐ - if (p->rx_frame_rec_len_ + pickup_data_len > DS_RX_FRAME_SIZE_MAX) + // ↓ buffer->confirmed_frame_len が更新されることに注意! + DS_confirm_stream_rec_buffer_(buffer, processed_data_len); // processed_data_len byte 確定 + if (buffer->confirmed_frame_len > p->settings.max_rx_frame_size_) { - if (p->rx_frame_rec_len_ >= DS_RX_FRAME_SIZE_MAX) - { - // これ以上受信できないため,フッタ探索失敗として,リセットする - p->rec_status_.status_code = DS_STREAM_REC_STATUS_RX_FRAME_TOO_LONG; - p->rx_frame_rec_len_ = 0; + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_RX_FRAME_TOO_LONG; #ifdef DS_DEBUG - Printf("DS: RX frame is too long\n"); + Printf("DS: RX frame size is too long\n"); #endif - return 0; // 処理済みデータもなし - } - pickup_data_len = (uint16_t)(DS_RX_FRAME_SIZE_MAX - p->rx_frame_rec_len_); + return; } - memcpy(&(p->rx_frame_[p->rx_frame_rec_len_]), - &(rx_buffer[total_processed_data_len]), - (size_t)pickup_data_len); - - // フッタ最終文字を探す - p_footer_last = (uint8_t*)memchr(&(rx_buffer[p->rx_frame_rec_len_]), - (int)(p->rx_footer_[p->rx_footer_size_ - 1]), - (size_t)pickup_data_len); + // フッタ候補未発見の場合はここで処理を返す if (p_footer_last == NULL) { - // まだまだ受信する - p->rx_frame_rec_len_ += pickup_data_len; - p->rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_DATA; - return pickup_data_len; + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_DATA; + return; } - processed_data_len = (uint16_t)(p_footer_last - &(rx_buffer[p->rx_frame_rec_len_]) + 1); - body_data_len = (p_footer_last - rx_buffer + 1) - p->rx_header_size_ - p->rx_footer_size_; + body_data_len = buffer->confirmed_frame_len - p->settings.rx_header_size_ - p->settings.rx_footer_size_; if (body_data_len < 0) { // これはフッタではないので受信続行 // まだまだ受信する - p->rx_frame_rec_len_ += pickup_data_len; - p->rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_DATA; - return pickup_data_len; + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_DATA; + return; } // フッタ候補発見 // フッタチェックする - estimated_rx_frame_size = (uint16_t)(p->rx_header_size_ + body_data_len + p->rx_footer_size_); - for (i = 0; i < p->rx_footer_size_; i++) + estimated_rx_frame_end_pos = buffer->pos_of_frame_head_candidate + buffer->confirmed_frame_len; + for (i = 0; i < p->settings.rx_footer_size_; i++) { - if (rx_buffer[estimated_rx_frame_size - i - 1] != p->rx_footer_[p->rx_footer_size_ - i - 1]) + if (buffer->buffer[estimated_rx_frame_end_pos - i - 1] != p->settings.rx_footer_[p->settings.rx_footer_size_ - i - 1]) { // これはフッタではないので受信続行 // まだまだ受信する - p->rx_frame_rec_len_ += pickup_data_len; - p->rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_DATA; - return pickup_data_len; + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_DATA; + return; } } // フッタ確定 → フレーム確定 - p->rec_status_.status_code = DS_STREAM_REC_STATUS_FIXED_FRAME; - p->rec_status_.fixed_frame_len = estimated_rx_frame_size; - p->rx_frame_rec_len_ = 0; - return processed_data_len; + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_FIXED_FRAME; + return; } } -static uint16_t DS_analyze_rx_buffer_finding_header_(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t total_processed_data_len, - uint16_t rec_data_len) +static void DS_analyze_rx_buffer_finding_header_(DS_StreamConfig* p_stream_config) { - uint16_t unprocessed_data_len = (uint16_t)(rec_data_len - total_processed_data_len); // このキャストは若干危ない(コードが論理的に正しければ問題ないが) - DS_StreamConfig* p = p_stream_config; // ちょっと変数名が長すぎて配列indexなどがみずらいので... + DS_StreamConfig* p = p_stream_config; // ちょっと変数名が長すぎて配列 index などがみずらいので... + DS_StreamRecBuffer* buffer = p->settings.rx_buffer_; + const uint16_t unprocessed_data_len = DS_get_unprocessed_size_from_stream_rec_buffer_(buffer); uint8_t* p_header; - uint16_t processed_data_len; + uint16_t found_header_offset; // コードが正しければ,ヘッダがないケースはここに到達し得ないが,ヌルポ回避をいれておく - if (p_stream_config->rx_header_ == NULL) + if (p_stream_config->settings.rx_header_ == NULL) { #ifdef DS_DEBUG Printf("DS: RX header is invalid\n"); #endif - p->rec_status_.status_code = DS_STREAM_REC_STATUS_OTHER_ERR; - return unprocessed_data_len; + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_OTHER_ERR; + DS_move_forward_frame_head_candidate_of_stream_rec_buffer_(buffer, unprocessed_data_len); + return; } // まだヘッダの先頭すら未発見の場合 // ここは高速化のために一括処理 - p_header = (uint8_t*)memchr(&(rx_buffer[total_processed_data_len]), - (int)(p->rx_header_[0]), + p_header = (uint8_t*)memchr(&buffer->buffer[buffer->pos_of_frame_head_candidate], + (int)(p->settings.rx_header_[0]), (size_t)unprocessed_data_len); if (p_header == NULL) @@ -1128,250 +1037,265 @@ static uint16_t DS_analyze_rx_buffer_finding_header_(DS_StreamConfig* p_stream_c #ifdef DS_DEBUG Printf("DS: RX header not found\n"); #endif - p->rec_status_.status_code = DS_STREAM_REC_STATUS_FINDING_HEADER; - return unprocessed_data_len; + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_FINDING_HEADER; + DS_move_forward_frame_head_candidate_of_stream_rec_buffer_(buffer, unprocessed_data_len); + return; } - processed_data_len = (uint16_t)(p_header - &(rx_buffer[total_processed_data_len]) + 1); - - // ヘッダコピー.ホントはbufferからコピるべきだけど,ちょっとアドレスいじっていて怖いので... - p->rx_frame_[p->rx_frame_rec_len_] = p->rx_header_[0]; - p->rx_frame_rec_len_++; - - p->rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_HEADER; - p->rx_frame_head_pos_of_frame_candidate_ = (uint16_t)(total_processed_data_len + processed_data_len - 1); - return processed_data_len; + found_header_offset = (uint16_t)(p_header - &buffer->buffer[buffer->pos_of_frame_head_candidate]); + DS_move_forward_frame_head_candidate_of_stream_rec_buffer_(buffer, found_header_offset); + DS_confirm_stream_rec_buffer_(buffer, 1); // ヘッダ 1 byte 目が見つかった + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_HEADER; + return; } -static uint16_t DS_analyze_rx_buffer_receiving_header_(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t total_processed_data_len) +static void DS_analyze_rx_buffer_receiving_header_(DS_StreamConfig* p_stream_config) { - DS_StreamConfig* p = p_stream_config; // ちょっと変数名が長すぎて配列indexなどがみずらいので... + DS_StreamConfig* p = p_stream_config; // ちょっと変数名が長すぎて配列 index などがみずらいので... + DS_StreamRecBuffer* buffer = p->settings.rx_buffer_; + const uint16_t buffer_offset = buffer->pos_of_frame_head_candidate + buffer->confirmed_frame_len; // ヘッダ受信中 - // 受信が細切れのときなどの処理分岐がめんどくさいので,1byteずつ処理させる + // 受信が細切れのときなどの処理分岐がめんどくさいので, 1 byte ずつ処理させる // ヘッダが正しいか? - if (rx_buffer[total_processed_data_len] == p->rx_header_[p->rx_frame_rec_len_]) + if (buffer->buffer[buffer_offset] == p->settings.rx_header_[buffer->confirmed_frame_len]) { - p->rx_frame_[p->rx_frame_rec_len_] = p->rx_header_[p->rx_frame_rec_len_]; - p->rx_frame_rec_len_++; - - p->rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_HEADER; - return 1; + DS_confirm_stream_rec_buffer_(buffer, 1); // ヘッダの次の 1 byte がみつかった + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_HEADER; + return; } else { // ヘッダが正しくなかった // DS_STREAM_REC_STATUS_HEADER_MISMATCH になり,再びバッファを巻き戻してヘッダ探索を始める // その後 DS_STREAM_REC_STATUS_FINDING_HEADER に戻る - p->rec_status_.status_code = DS_STREAM_REC_STATUS_HEADER_MISMATCH; - p->rx_frame_rec_len_ = 0; + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_HEADER_MISMATCH; #ifdef DS_DEBUG Printf("DS: RX header is mismatch\n"); #endif - return 1; + return; } } -static uint16_t DS_analyze_rx_buffer_receiving_footer_(DS_StreamConfig* p_stream_config, - uint8_t* rx_buffer, - uint16_t total_processed_data_len, - uint16_t rx_frame_size) +static void DS_analyze_rx_buffer_receiving_footer_(DS_StreamConfig* p_stream_config, + uint16_t rx_frame_size) { - DS_StreamConfig* p = p_stream_config; // ちょっと変数名が長すぎて配列indexなどがみずらいので... + DS_StreamConfig* p = p_stream_config; // ちょっと変数名が長すぎて配列 index などがみずらいので... + DS_StreamRecBuffer* buffer = p->settings.rx_buffer_; + const uint16_t buffer_offset = buffer->pos_of_frame_head_candidate + buffer->confirmed_frame_len; uint16_t rec_footer_pos; // フッタなしの場合はフレーム確定 - if (p->rx_footer_size_ == 0) + if (p->settings.rx_footer_size_ == 0) { // フッタなし - p->rec_status_.status_code = DS_STREAM_REC_STATUS_FIXED_FRAME; - p->rec_status_.fixed_frame_len = p->rx_frame_rec_len_; - p->rx_frame_rec_len_ = 0; - return 0; // 処理済みデータもなし + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_FIXED_FRAME; + return; } // フッタ受信 - // ここも条件分岐がめんどくさいので,1byteずつ処理する - rec_footer_pos = (uint16_t)(p->rx_frame_rec_len_ - (rx_frame_size - p->rx_footer_size_)); + // ここも条件分岐がめんどくさいので,1 byte ずつ処理する + rec_footer_pos = (uint16_t)(buffer->confirmed_frame_len - (rx_frame_size - p->settings.rx_footer_size_)); // 期待されているフッタが受信できたか? // 受信できなかった場合, DS_STREAM_REC_STATUS_FOOTER_MISMATCH になり,再びバッファを巻き戻してヘッダ探索を始める // その後 DS_STREAM_REC_STATUS_FINDING_HEADER に戻る - if (rx_buffer[total_processed_data_len] != p->rx_footer_[rec_footer_pos]) + if (buffer->buffer[buffer_offset] != p->settings.rx_footer_[rec_footer_pos]) { - p->rec_status_.status_code = DS_STREAM_REC_STATUS_FOOTER_MISMATCH; - p->rx_frame_rec_len_ = 0; + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_FOOTER_MISMATCH; #ifdef DS_DEBUG Printf("DS: RX footer is mismatch\n"); #endif - return 1; + return; } // ここまできたら正しいフッタが受信されている - p->rx_frame_[p->rx_frame_rec_len_] = p->rx_footer_[rec_footer_pos]; - p->rx_frame_rec_len_++; + DS_confirm_stream_rec_buffer_(buffer, 1); // ヘッダの次の 1 byte がみつかった - if (p->rx_frame_rec_len_ == rx_frame_size) + if (buffer->confirmed_frame_len == rx_frame_size) { // フレーム確定 - p->rec_status_.status_code = DS_STREAM_REC_STATUS_FIXED_FRAME; - p->rec_status_.fixed_frame_len = p->rx_frame_rec_len_; - p->rx_frame_rec_len_ = 0; + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_FIXED_FRAME; } else { // フレーム確定せず - p->rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_FOOTER; + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_RECEIVING_FOOTER; } - return 1; + return; } static uint32_t DS_analyze_rx_buffer_get_framelength_(DS_StreamConfig* p_stream_config) { + DS_StreamConfig* p = p_stream_config; // ちょっと変数名が長すぎて配列 index などがみずらいので... uint32_t len = 0; uint8_t i; + const uint16_t pos = p->settings.rx_framelength_pos_ + p->settings.rx_buffer_->pos_of_frame_head_candidate; + const uint16_t size = p->settings.rx_framelength_type_size_; - for (i = 0; i < p_stream_config->rx_framelength_type_size_; ++i) + if (p->settings.rx_framelength_endian_ == ENDIAN_TYPE_BIG) { - if (i == 0) + for (i = 0; i < size; ++i) { - len = p_stream_config->rx_frame_[p_stream_config->rx_framelength_pos_]; + if (i == 0) + { + len = p->settings.rx_buffer_->buffer[pos]; + } + else + { + len <<= 8; + len |= p->settings.rx_buffer_->buffer[pos + i]; + } } - else + } + else + { + for (i = 0; i < size; ++i) { - len <<= 8; - len |= p_stream_config->rx_frame_[p_stream_config->rx_framelength_pos_ + i]; + if (i == 0) + { + len = p->settings.rx_buffer_->buffer[pos + size - 1]; + } + else + { + len <<= 8; + len |= p->settings.rx_buffer_->buffer[pos + size - 1 - i]; + } } } - len += p_stream_config->rx_framelength_offset_; + len += p->settings.rx_framelength_offset_; return len; } static DS_ERR_CODE DS_reset_stream_config_(DS_StreamConfig* p_stream_config) { - p_stream_config->is_enabled_ = 0; - p_stream_config->is_strict_frame_search_ = 0; + DS_StreamConfig* p = p_stream_config; - p_stream_config->general_cmd_tx_count_ = 0; - p_stream_config->req_tlm_cmd_tx_count_ = 0; - p_stream_config->req_tlm_cmd_tx_count_after_last_tx_ = 0; - p_stream_config->rx_frame_fix_count_ = 0; + p->settings.is_enabled_ = 0; + p->settings.is_strict_frame_search_ = 0; - p_stream_config->general_cmd_tx_time_ = TMGR_get_master_clock(); - p_stream_config->req_tlm_cmd_tx_time_ = TMGR_get_master_clock(); - p_stream_config->rx_frame_fix_time_ = TMGR_get_master_clock(); + p->settings.tx_frame_ = NULL; + p->settings.tx_frame_size_ = 0; + p->settings.tx_frame_buffer_size_ = -1; - p_stream_config->tx_frame_ = NULL; - p_stream_config->tx_frame_size_ = 0; - p_stream_config->tx_frame_buffer_size_ = -1; - p_stream_config->rx_header_ = NULL; - p_stream_config->rx_header_size_ = 0; - p_stream_config->rx_footer_ = NULL; - p_stream_config->rx_footer_size_ = 0; - p_stream_config->rx_frame_size_ = 0; + p->settings.rx_buffer_ = NULL; + p->settings.rx_header_ = NULL; + p->settings.rx_header_size_ = 0; + p->settings.rx_footer_ = NULL; + p->settings.rx_footer_size_ = 0; + p->settings.rx_frame_size_ = 0; + p->settings.max_rx_frame_size_ = 0xffff; - p_stream_config->rx_framelength_pos_ = -1; - p_stream_config->rx_framelength_type_size_ = 0; - p_stream_config->rx_framelength_offset_ = 0; + p->settings.rx_framelength_pos_ = -1; + p->settings.rx_framelength_type_size_ = 0; + p->settings.rx_framelength_offset_ = 0; + p->settings.rx_framelength_endian_ = ENDIAN_TYPE_BIG; - p_stream_config->data_analyzer_ = DS_data_analyzer_dummy_; - p_stream_config->ret_from_data_analyzer_ = DS_ERR_CODE_OK; + p->settings.should_monitor_for_tlm_disruption_ = 0; + p->settings.time_threshold_for_tlm_disruption_ = 60 * 1000; // この値はよく考えること - p_stream_config->should_monitor_for_tlm_disruption_ = 0; - p_stream_config->time_threshold_for_tlm_disruption_ = 60 * 1000; // この値はよく考えること + p->settings.data_analyzer_ = DS_data_analyzer_dummy_; - p_stream_config->is_validation_needed_for_send_ = 0; - p_stream_config->is_validation_needed_for_rec_ = 0; + // DS_StreamSendStatus の初期化 + p->info.send_status_.status_code = DS_STREAM_SEND_STATUS_DISABLE; + p->info.send_status_.ret_from_if_tx = 0; - p_stream_config->rx_frame_rec_len_ = 0; - p_stream_config->rx_frame_head_pos_of_frame_candidate_ = 0; + // DS_StreamRecStatus の初期化 + p->info.rec_status_.status_code = DS_STREAM_REC_STATUS_DISABLE; + p->info.rec_status_.fixed_frame_len = 0; + p->info.rec_status_.tlm_disruption_status = DS_STREAM_TLM_DISRUPTION_STATUS_OK; + p->info.rec_status_.count_of_carry_over_failures = 0; - memset(p_stream_config->rx_frame_, - 0x00, - sizeof(p_stream_config->rx_frame_)); + p->info.general_cmd_tx_count_ = 0; + p->info.req_tlm_cmd_tx_count_ = 0; + p->info.req_tlm_cmd_tx_count_after_last_tx_ = 0; + p->info.rx_frame_fix_count_ = 0; - p_stream_config->is_rx_buffer_carry_over_ = 0; - p_stream_config->carry_over_buffer_size_ = 0; - p_stream_config->carry_over_buffer_next_pos_ = 0; - memset(p_stream_config->rx_buffer_for_carry_over_, - 0x00, - sizeof(p_stream_config->rx_buffer_for_carry_over_)); + p->info.general_cmd_tx_time_ = TMGR_get_master_clock(); + p->info.req_tlm_cmd_tx_time_ = TMGR_get_master_clock(); + p->info.rx_frame_fix_time_ = TMGR_get_master_clock(); - // DS_StreamSendStatus の初期化 - p_stream_config->send_status_.status_code = DS_STREAM_SEND_STATUS_DISABLE; - p_stream_config->send_status_.ret_from_if_tx = 0; + p->info.ret_from_data_analyzer_ = DS_ERR_CODE_OK; - // DS_StreamRecStatus の初期化 - p_stream_config->rec_status_.status_code = DS_STREAM_REC_STATUS_DISABLE; - p_stream_config->rec_status_.fixed_frame_len = 0; - p_stream_config->rec_status_.tlm_disruption_status = DS_STREAM_TLM_DISRUPTION_STATUS_OK; - p_stream_config->rec_status_.count_of_carry_over_failures = 0; + p->internal.is_validation_needed_for_send_ = 0; + p->internal.is_validation_needed_for_rec_ = 0; return DS_ERR_CODE_OK; } -static DS_ERR_CODE DS_validate_stream_config_(DS_StreamConfig* p_stream_config) +static DS_ERR_CODE DS_validate_stream_config_(const DriverSuper* p_super, DS_StreamConfig* p_stream_config) { - if (!p_stream_config->is_enabled_) return DS_ERR_CODE_OK; + DS_StreamConfig* p = p_stream_config; - if (p_stream_config->tx_frame_size_ != 0 && p_stream_config->tx_frame_ == NULL) return DS_ERR_CODE_ERR; - if (p_stream_config->rx_header_size_ != 0 && p_stream_config->rx_header_ == NULL) return DS_ERR_CODE_ERR; - if (p_stream_config->rx_footer_size_ != 0 && p_stream_config->rx_footer_ == NULL) return DS_ERR_CODE_ERR; + if (!p->settings.is_enabled_) return DS_ERR_CODE_OK; - if (p_stream_config->rx_frame_size_ > DS_RX_FRAME_SIZE_MAX) return DS_ERR_CODE_ERR; // [TODO] 現在はBigData未実装(詳細はヘッダファイル参照)のため,ここで弾く + if (p->settings.tx_frame_size_ != 0 && p->settings.tx_frame_ == NULL) return DS_ERR_CODE_ERR; + if (p->settings.rx_header_size_ != 0 && p->settings.rx_header_ == NULL) return DS_ERR_CODE_ERR; + if (p->settings.rx_footer_size_ != 0 && p->settings.rx_footer_ == NULL) return DS_ERR_CODE_ERR; - if (p_stream_config->tx_frame_buffer_size_ >= 0) + if (p->settings.tx_frame_buffer_size_ >= 0) { - if (p_stream_config->tx_frame_size_ > p_stream_config->tx_frame_buffer_size_) return DS_ERR_CODE_ERR; + if (p->settings.tx_frame_size_ > p->settings.tx_frame_buffer_size_) return DS_ERR_CODE_ERR; } - if (p_stream_config->rx_frame_size_ < 0) + if (p->settings.rx_frame_size_ < 0) { // テレメトリ可変長 - if (p_stream_config->rx_framelength_pos_ < 0) + if (p->settings.rx_framelength_pos_ < 0) { // フレームサイズデータがない場合 // フッタの存在が必須 - if (p_stream_config->rx_footer_size_ == 0) return DS_ERR_CODE_ERR; + if (p->settings.rx_footer_size_ == 0) return DS_ERR_CODE_ERR; } else { - if (p_stream_config->rx_header_size_ == 0) return DS_ERR_CODE_ERR; // 可変長かつヘッダなしは対応しない(固定長のようにして回避する.詳細はヘッダファイル参照) - if (p_stream_config->rx_framelength_pos_ < p_stream_config->rx_header_size_) return DS_ERR_CODE_ERR; // フレームサイズがヘッダ(つまり固定値)に含まれることはありえないので - if (!(p_stream_config->rx_framelength_type_size_ == 1 || - p_stream_config->rx_framelength_type_size_ == 2 || - p_stream_config->rx_framelength_type_size_ == 3 || - p_stream_config->rx_framelength_type_size_ == 4 )) return DS_ERR_CODE_ERR; // 現在はuint8 to uint32のみ対応 + if (p->settings.rx_header_size_ == 0) return DS_ERR_CODE_ERR; // 可変長かつヘッダなしは対応しない(固定長のようにして回避する.詳細はヘッダファイル参照) + if (p->settings.rx_framelength_pos_ < p->settings.rx_header_size_) return DS_ERR_CODE_ERR; // フレームサイズがヘッダ(つまり固定値)に含まれることはありえないので + if (!(p->settings.rx_framelength_type_size_ == 1 || + p->settings.rx_framelength_type_size_ == 2 || + p->settings.rx_framelength_type_size_ == 3 || + p->settings.rx_framelength_type_size_ == 4 )) return DS_ERR_CODE_ERR; // 現在は uint8 to uint32 のみ対応 + if (!(p->settings.rx_framelength_endian_ == ENDIAN_TYPE_BIG || + p->settings.rx_framelength_endian_ == ENDIAN_TYPE_LITTLE )) return DS_ERR_CODE_ERR; } } - else if (p_stream_config->rx_frame_size_ == 0) + else if (p->settings.rx_frame_size_ == 0) { // テレメなし } else { // テレメトリ固定長 - if (p_stream_config->rx_frame_size_ < (p_stream_config->rx_header_size_ + p_stream_config->rx_footer_size_)) return DS_ERR_CODE_ERR; + if ( p->settings.rx_frame_size_ < + (p->settings.rx_header_size_ + p->settings.rx_footer_size_) ) + { + return DS_ERR_CODE_ERR; + } } - if (p_stream_config->is_strict_frame_search_) + if (p->settings.is_strict_frame_search_) { // ヘッダがあることが前提 - if (p_stream_config->rx_header_size_ == 0) return DS_ERR_CODE_ERR; + if (p->settings.rx_header_size_ == 0) return DS_ERR_CODE_ERR; } - p_stream_config->is_validation_needed_for_send_ = 0; - p_stream_config->is_validation_needed_for_rec_ = 0; + if (p->settings.rx_buffer_ == NULL) return DS_ERR_CODE_ERR; + if (p->settings.rx_buffer_->buffer == NULL) return DS_ERR_CODE_ERR; + if (p->settings.rx_buffer_->capacity < p_super->config.settings.rx_buffer_size_in_if_rx_) return DS_ERR_CODE_ERR; + if (p->settings.rx_buffer_->capacity < p->settings.rx_frame_size_) return DS_ERR_CODE_ERR; + if (p->settings.rx_buffer_->capacity < p->settings.rx_header_size_ + p->settings.rx_footer_size_) return DS_ERR_CODE_ERR; + + p->internal.is_validation_needed_for_send_ = 0; + p->internal.is_validation_needed_for_rec_ = 0; + return DS_ERR_CODE_OK; } @@ -1390,334 +1314,532 @@ static DS_ERR_CODE DS_data_analyzer_dummy_(DS_StreamConfig* p_stream_config, voi } -// ###### DS_Config Getter/Setter ###### -// FIXME: HEWでWarningが出てしまう(gccではでない)ので,キャストしている関数がいくつかある -const DS_RecStatus* DSC_get_rec_status(const DriverSuper* p_super) +// ###### DS_Config Getter/Setter of Settings ###### +uint16_t DSC_get_rx_buffer_size_in_if_rx(const DriverSuper* p_super) { - return &p_super->config.rec_status_; + return (uint16_t)p_super->config.settings.rx_buffer_size_in_if_rx_; } -uint32_t DSC_get_rx_count(const DriverSuper* p_super) -{ - return (uint32_t)p_super->config.rx_count_; -} - -uint32_t DSC_get_rx_call_count(const DriverSuper* p_super) +DS_ERR_CODE DSC_set_rx_buffer_size_in_if_rx(DriverSuper* p_super, + const uint16_t rx_buffer_size_in_if_rx) { - return (uint32_t)p_super->config.rx_call_count_; -} - -const ObcTime* DSC_get_rx_time(const DriverSuper* p_super) -{ - return &p_super->config.rx_time_; + if (rx_buffer_size_in_if_rx > DS_IF_RX_BUFFER_SIZE) return DS_ERR_CODE_ERR; + p_super->config.settings.rx_buffer_size_in_if_rx_ = rx_buffer_size_in_if_rx; + return DS_ERR_CODE_OK; } uint8_t DSC_get_should_monitor_for_rx_disruption(const DriverSuper* p_super) { - return (uint8_t)p_super->config.should_monitor_for_rx_disruption_; + return (uint8_t)p_super->config.settings.should_monitor_for_rx_disruption_; } void DSC_enable_monitor_for_rx_disruption(DriverSuper* p_super) { - p_super->config.should_monitor_for_rx_disruption_ = 1; + p_super->config.settings.should_monitor_for_rx_disruption_ = 1; } void DSC_disable_monitor_for_rx_disruption(DriverSuper* p_super) { - p_super->config.should_monitor_for_rx_disruption_ = 0; + p_super->config.settings.should_monitor_for_rx_disruption_ = 0; } uint32_t DSC_get_time_threshold_for_rx_disruption(const DriverSuper* p_super) { - return (uint32_t)p_super->config.time_threshold_for_rx_disruption_; + return (uint32_t)p_super->config.settings.time_threshold_for_rx_disruption_; } void DSC_set_time_threshold_for_rx_disruption(DriverSuper* p_super, const uint32_t time_threshold_for_rx_disruption) { - p_super->config.time_threshold_for_rx_disruption_ = time_threshold_for_rx_disruption; -} - -DS_RX_DISRUPTION_STATUS_CODE DSC_get_rx_disruption_status(const DriverSuper* p_super) -{ - return (DS_RX_DISRUPTION_STATUS_CODE)p_super->config.rec_status_.rx_disruption_status; + p_super->config.settings.time_threshold_for_rx_disruption_ = time_threshold_for_rx_disruption; } -// ###### DS_StreamConfig Getter/Setter ###### -// FIXME: HEWでWarningが出てしまう(gccではでない)ので,キャストしている関数がいくつかある -uint8_t DSSC_get_is_enable(const DS_StreamConfig* p_stream_config) -{ - return (uint8_t)p_stream_config->is_enabled_; -} -void DSSC_enable(DS_StreamConfig* p_stream_config) +// ###### DS_Config Getter/Setter of Info ###### +// FIXME: HEW で Warning が出てしまう(gcc ではでない)ので,キャストしている関数がいくつかある +const DS_RecStatus* DSC_get_rec_status(const DriverSuper* p_super) { - p_stream_config->is_enabled_ = 1; - p_stream_config->is_validation_needed_for_send_ = 1; - p_stream_config->is_validation_needed_for_rec_ = 1; + return &p_super->config.info.rec_status_; } -void DSSC_disable(DS_StreamConfig* p_stream_config) +uint32_t DSC_get_rx_count(const DriverSuper* p_super) { - p_stream_config->is_enabled_ = 0; + return (uint32_t)p_super->config.info.rx_count_; } -uint8_t DSSC_get_is_strict_frame_search(const DS_StreamConfig* p_stream_config) +uint32_t DSC_get_rx_call_count(const DriverSuper* p_super) { - return (uint8_t)p_stream_config->is_strict_frame_search_; + return (uint32_t)p_super->config.info.rx_call_count_; } -void DSSC_enable_strict_frame_search(DS_StreamConfig* p_stream_config) +const ObcTime* DSC_get_rx_time(const DriverSuper* p_super) { - p_stream_config->is_strict_frame_search_ = 1; - p_stream_config->is_validation_needed_for_rec_ = 1; + return &p_super->config.info.rx_time_; } -void DSSC_disable_strict_frame_search(DS_StreamConfig* p_stream_config) +DS_RX_DISRUPTION_STATUS_CODE DSC_get_rx_disruption_status(const DriverSuper* p_super) { - p_stream_config->is_strict_frame_search_ = 0; + return (DS_RX_DISRUPTION_STATUS_CODE)p_super->config.info.rec_status_.rx_disruption_status; } -const DS_StreamSendStatus* DSSC_get_send_status(const DS_StreamConfig* p_stream_config) -{ - return &p_stream_config->send_status_; -} -const DS_StreamRecStatus* DSSC_get_rec_status(const DS_StreamConfig* p_stream_config) +// ###### DS_StreamConfig Getter/Setter of Settings ###### +// FIXME: HEW で Warning が出てしまう(gcc ではでない)ので,キャストしている関数がいくつかある +uint8_t DSSC_get_is_enabled(const DS_StreamConfig* p_stream_config) { - return &p_stream_config->rec_status_; + return (uint8_t)p_stream_config->settings.is_enabled_; } -uint32_t DSSC_get_general_cmd_tx_count(const DS_StreamConfig* p_stream_config) +void DSSC_enable(DS_StreamConfig* p_stream_config) { - return (uint32_t)p_stream_config->general_cmd_tx_count_; + p_stream_config->settings.is_enabled_ = 1; + p_stream_config->internal.is_validation_needed_for_send_ = 1; + p_stream_config->internal.is_validation_needed_for_rec_ = 1; } -uint32_t DSSC_get_req_tlm_cmd_tx_count(const DS_StreamConfig* p_stream_config) +void DSSC_disable(DS_StreamConfig* p_stream_config) { - return (uint32_t)p_stream_config->req_tlm_cmd_tx_count_; + p_stream_config->settings.is_enabled_ = 0; } -uint32_t DSSC_get_req_tlm_cmd_tx_count_after_last_tx(const DS_StreamConfig* p_stream_config) +uint8_t DSSC_get_is_strict_frame_search(const DS_StreamConfig* p_stream_config) { - return (uint32_t)p_stream_config->req_tlm_cmd_tx_count_after_last_tx_; + return (uint8_t)p_stream_config->settings.is_strict_frame_search_; } -uint32_t DSSC_get_rx_frame_fix_count(const DS_StreamConfig* p_stream_config) +void DSSC_enable_strict_frame_search(DS_StreamConfig* p_stream_config) { - return (uint32_t)p_stream_config->rx_frame_fix_count_; + p_stream_config->settings.is_strict_frame_search_ = 1; + p_stream_config->internal.is_validation_needed_for_rec_ = 1; } -const ObcTime* DSSC_get_general_cmd_tx_time(const DS_StreamConfig* p_stream_config) +void DSSC_disable_strict_frame_search(DS_StreamConfig* p_stream_config) { - return &p_stream_config->general_cmd_tx_time_; + p_stream_config->settings.is_strict_frame_search_ = 0; } -const ObcTime* DSSC_get_req_tlm_cmd_tx_time(const DS_StreamConfig* p_stream_config) +const uint8_t* DSSC_get_tx_frame(DS_StreamConfig* p_stream_config) { - return &p_stream_config->req_tlm_cmd_tx_time_; + return p_stream_config->settings.tx_frame_; } -const ObcTime* DSSC_get_rx_frame_fix_time(const DS_StreamConfig* p_stream_config) +uint8_t* DSSC_get_tx_frame_as_non_const_pointer(DS_StreamConfig* p_stream_config) { - return &p_stream_config->rx_frame_fix_time_; + return p_stream_config->settings.tx_frame_; } void DSSC_set_tx_frame(DS_StreamConfig* p_stream_config, uint8_t* tx_frame) { - p_stream_config->tx_frame_ = tx_frame; - p_stream_config->is_validation_needed_for_send_ = 1; -} - -const uint8_t* DSSC_get_tx_frame(DS_StreamConfig* p_stream_config) -{ - return p_stream_config->tx_frame_; + p_stream_config->settings.tx_frame_ = tx_frame; + p_stream_config->internal.is_validation_needed_for_send_ = 1; } -uint8_t* DSSC_get_tx_frame_as_non_const_pointer(DS_StreamConfig* p_stream_config) +uint16_t DSSC_get_tx_frame_size(const DS_StreamConfig* p_stream_config) { - return p_stream_config->tx_frame_; + return (uint16_t)p_stream_config->settings.tx_frame_size_; } void DSSC_set_tx_frame_size(DS_StreamConfig* p_stream_config, const uint16_t tx_frame_size) { - p_stream_config->tx_frame_size_ = tx_frame_size; - p_stream_config->is_validation_needed_for_send_ = 1; + p_stream_config->settings.tx_frame_size_ = tx_frame_size; + p_stream_config->internal.is_validation_needed_for_send_ = 1; } -uint16_t DSSC_get_tx_frame_size(const DS_StreamConfig* p_stream_config) +int16_t DSSC_get_tx_frame_buffer_size(DS_StreamConfig* p_stream_config) { - return (uint16_t)p_stream_config->tx_frame_size_; + return (int16_t)p_stream_config->settings.tx_frame_buffer_size_; } void DSSC_set_tx_frame_buffer_size(DS_StreamConfig* p_stream_config, const int16_t tx_frame_buffer_size) { - p_stream_config->tx_frame_buffer_size_ = tx_frame_buffer_size; - p_stream_config->is_validation_needed_for_send_ = 1; -} - -int16_t DSSC_get_tx_frame_buffer_size(DS_StreamConfig* p_stream_config) -{ - return (int16_t)p_stream_config->tx_frame_buffer_size_; + p_stream_config->settings.tx_frame_buffer_size_ = tx_frame_buffer_size; + p_stream_config->internal.is_validation_needed_for_send_ = 1; } -const uint8_t* DSSC_get_rx_frame(const DS_StreamConfig* p_stream_config) +void DSSC_set_rx_buffer(DS_StreamConfig* p_stream_config, + DS_StreamRecBuffer* rx_buffer) { - return p_stream_config->rx_frame_; + p_stream_config->settings.rx_buffer_ = rx_buffer; + p_stream_config->internal.is_validation_needed_for_rec_ = 1; } void DSSC_set_rx_header(DS_StreamConfig* p_stream_config, const uint8_t* rx_header, const uint16_t rx_header_size) { - p_stream_config->rx_header_ = rx_header; - p_stream_config->rx_header_size_ = rx_header_size; - p_stream_config->is_validation_needed_for_rec_ = 1; + p_stream_config->settings.rx_header_ = rx_header; + p_stream_config->settings.rx_header_size_ = rx_header_size; + p_stream_config->internal.is_validation_needed_for_rec_ = 1; +} + +uint16_t DSSC_get_rx_header_size(const DS_StreamConfig* p_stream_config) +{ + return (uint16_t)p_stream_config->settings.rx_header_size_; } void DSSC_set_rx_footer(DS_StreamConfig* p_stream_config, const uint8_t* rx_footer, const uint16_t rx_footer_size) { - p_stream_config->rx_footer_ = rx_footer; - p_stream_config->rx_footer_size_ = rx_footer_size; - p_stream_config->is_validation_needed_for_rec_ = 1; + p_stream_config->settings.rx_footer_ = rx_footer; + p_stream_config->settings.rx_footer_size_ = rx_footer_size; + p_stream_config->internal.is_validation_needed_for_rec_ = 1; } -void DSSC_set_rx_frame_size(DS_StreamConfig* p_stream_config, - const int16_t rx_frame_size) +uint16_t DSSC_get_rx_footer_size(const DS_StreamConfig* p_stream_config) { - p_stream_config->rx_frame_size_ = rx_frame_size; - p_stream_config->is_validation_needed_for_rec_ = 1; + return (uint16_t)p_stream_config->settings.rx_footer_size_; } -uint16_t DSSC_get_rx_header_size(const DS_StreamConfig* p_stream_config) +int16_t DSSC_get_rx_frame_size(const DS_StreamConfig* p_stream_config) { - return (uint16_t)p_stream_config->rx_header_size_; + return (int16_t)p_stream_config->settings.rx_frame_size_; } -uint16_t DSSC_get_rx_footer_size(const DS_StreamConfig* p_stream_config) +void DSSC_set_rx_frame_size(DS_StreamConfig* p_stream_config, + const int16_t rx_frame_size) { - return (uint16_t)p_stream_config->rx_footer_size_; + p_stream_config->settings.rx_frame_size_ = rx_frame_size; + p_stream_config->internal.is_validation_needed_for_rec_ = 1; } -int16_t DSSC_get_rx_frame_size(const DS_StreamConfig* p_stream_config) +uint16_t DSSC_get_max_rx_frame_size(const DS_StreamConfig* p_stream_config) +{ + return (uint16_t)p_stream_config->settings.max_rx_frame_size_; +} + +void DSSC_set_max_rx_frame_size(DS_StreamConfig* p_stream_config, + const uint16_t max_rx_frame_size) { - return (int16_t)p_stream_config->rx_frame_size_; + p_stream_config->settings.max_rx_frame_size_ = max_rx_frame_size; + p_stream_config->internal.is_validation_needed_for_rec_ = 1; } void DSSC_set_rx_framelength_pos(DS_StreamConfig* p_stream_config, const int16_t rx_framelength_pos) { - p_stream_config->rx_framelength_pos_ = rx_framelength_pos; - p_stream_config->is_validation_needed_for_rec_ = 1; + p_stream_config->settings.rx_framelength_pos_ = rx_framelength_pos; + p_stream_config->internal.is_validation_needed_for_rec_ = 1; } void DSSC_set_rx_framelength_type_size(DS_StreamConfig* p_stream_config, const uint16_t rx_framelength_type_size) { - p_stream_config->rx_framelength_type_size_ = rx_framelength_type_size; - p_stream_config->is_validation_needed_for_rec_ = 1; + p_stream_config->settings.rx_framelength_type_size_ = rx_framelength_type_size; + p_stream_config->internal.is_validation_needed_for_rec_ = 1; } void DSSC_set_rx_framelength_offset(DS_StreamConfig* p_stream_config, const uint16_t rx_framelength_offset) { - p_stream_config->rx_framelength_offset_ = rx_framelength_offset; - p_stream_config->is_validation_needed_for_rec_ = 1; + p_stream_config->settings.rx_framelength_offset_ = rx_framelength_offset; + p_stream_config->internal.is_validation_needed_for_rec_ = 1; +} + +void DSSC_set_rx_framelength_endian(DS_StreamConfig* p_stream_config, + const ENDIAN_TYPE rx_framelength_endian) +{ + p_stream_config->settings.rx_framelength_endian_ = rx_framelength_endian; + p_stream_config->internal.is_validation_needed_for_rec_ = 1; } uint8_t DSSC_get_should_monitor_for_tlm_disruption(const DS_StreamConfig* p_stream_config) { - return (uint8_t)p_stream_config->should_monitor_for_tlm_disruption_; + return (uint8_t)p_stream_config->settings.should_monitor_for_tlm_disruption_; } void DSSC_enable_monitor_for_tlm_disruption(DS_StreamConfig* p_stream_config) { - p_stream_config->should_monitor_for_tlm_disruption_ = 1; - p_stream_config->is_validation_needed_for_rec_ = 1; + p_stream_config->settings.should_monitor_for_tlm_disruption_ = 1; + p_stream_config->internal.is_validation_needed_for_rec_ = 1; } void DSSC_disable_monitor_for_tlm_disruption(DS_StreamConfig* p_stream_config) { - p_stream_config->should_monitor_for_tlm_disruption_ = 0; - p_stream_config->is_validation_needed_for_rec_ = 1; + p_stream_config->settings.should_monitor_for_tlm_disruption_ = 0; + p_stream_config->internal.is_validation_needed_for_rec_ = 1; } uint32_t DSSC_get_time_threshold_for_tlm_disruption(const DS_StreamConfig* p_stream_config) { - return (uint32_t)p_stream_config->time_threshold_for_tlm_disruption_; + return (uint32_t)p_stream_config->settings.time_threshold_for_tlm_disruption_; } void DSSC_set_time_threshold_for_tlm_disruption(DS_StreamConfig* p_stream_config, const uint32_t time_threshold_for_tlm_disruption) { - p_stream_config->time_threshold_for_tlm_disruption_ = time_threshold_for_tlm_disruption; - p_stream_config->is_validation_needed_for_rec_ = 1; + p_stream_config->settings.time_threshold_for_tlm_disruption_ = time_threshold_for_tlm_disruption; + p_stream_config->internal.is_validation_needed_for_rec_ = 1; } -DS_STREAM_TLM_DISRUPTION_STATUS_CODE DSSC_get_tlm_disruption_status(const DS_StreamConfig* p_stream_config) +void DSSC_set_data_analyzer(DS_StreamConfig* p_stream_config, + DS_ERR_CODE (*data_analyzer)(DS_StreamConfig* p_stream_config, void* p_driver)) { - return (DS_STREAM_TLM_DISRUPTION_STATUS_CODE)p_stream_config->rec_status_.tlm_disruption_status; + p_stream_config->settings.data_analyzer_ = data_analyzer; + p_stream_config->internal.is_validation_needed_for_rec_ = 1; } -void DSSC_set_data_analyzer(DS_StreamConfig* p_stream_config, - DS_ERR_CODE (*data_analyzer)(DS_StreamConfig* p_stream_config, void* p_driver)) + +// ###### DS_StreamConfig Getter/Setter of Info ###### +const DS_StreamSendStatus* DSSC_get_send_status(const DS_StreamConfig* p_stream_config) +{ + return &p_stream_config->info.send_status_; +} + +const DS_StreamRecStatus* DSSC_get_rec_status(const DS_StreamConfig* p_stream_config) +{ + return &p_stream_config->info.rec_status_; +} + +uint32_t DSSC_get_general_cmd_tx_count(const DS_StreamConfig* p_stream_config) +{ + return (uint32_t)p_stream_config->info.general_cmd_tx_count_; +} + +uint32_t DSSC_get_req_tlm_cmd_tx_count(const DS_StreamConfig* p_stream_config) +{ + return (uint32_t)p_stream_config->info.req_tlm_cmd_tx_count_; +} + +uint32_t DSSC_get_req_tlm_cmd_tx_count_after_last_tx(const DS_StreamConfig* p_stream_config) +{ + return (uint32_t)p_stream_config->info.req_tlm_cmd_tx_count_after_last_tx_; +} + +uint32_t DSSC_get_rx_frame_fix_count(const DS_StreamConfig* p_stream_config) +{ + return (uint32_t)p_stream_config->info.rx_frame_fix_count_; +} + +const ObcTime* DSSC_get_general_cmd_tx_time(const DS_StreamConfig* p_stream_config) +{ + return &p_stream_config->info.general_cmd_tx_time_; +} + +const ObcTime* DSSC_get_req_tlm_cmd_tx_time(const DS_StreamConfig* p_stream_config) +{ + return &p_stream_config->info.req_tlm_cmd_tx_time_; +} + +const ObcTime* DSSC_get_rx_frame_fix_time(const DS_StreamConfig* p_stream_config) +{ + return &p_stream_config->info.rx_frame_fix_time_; +} + +DS_STREAM_TLM_DISRUPTION_STATUS_CODE DSSC_get_tlm_disruption_status(const DS_StreamConfig* p_stream_config) { - p_stream_config->data_analyzer_ = data_analyzer; - p_stream_config->is_validation_needed_for_rec_ = 1; + return (DS_STREAM_TLM_DISRUPTION_STATUS_CODE)p_stream_config->info.rec_status_.tlm_disruption_status; } DS_ERR_CODE DSSC_get_ret_from_data_analyzer(const DS_StreamConfig* p_stream_config) { - return (DS_ERR_CODE)p_stream_config->ret_from_data_analyzer_; + return (DS_ERR_CODE)p_stream_config->info.ret_from_data_analyzer_; } -// ###### Driver汎用Util関数 ###### +// ###### Driver 汎用 Util 関数 ###### -CCP_EXEC_STS DS_conv_driver_err_to_ccp_exec_sts(DS_DRIVER_ERR_CODE code) +DS_ERR_CODE DS_init_stream_rec_buffer(DS_StreamRecBuffer* stream_rec_buffer, + uint8_t* buffer, + const uint16_t buffer_capacity) +{ + if (stream_rec_buffer == NULL) return DS_ERR_CODE_ERR; + if (buffer == NULL) return DS_ERR_CODE_ERR; + stream_rec_buffer->buffer = buffer; + stream_rec_buffer->capacity = buffer_capacity; + DS_clear_stream_rec_buffer_(stream_rec_buffer); + return DS_ERR_CODE_OK; +} + + +void DS_nullify_stream_rec_buffers(DS_StreamRecBuffer* rx_buffers[DS_STREAM_MAX]) +{ + uint8_t stream; + if (rx_buffers == NULL) return; + + for (stream = 0; stream < DS_STREAM_MAX; ++stream) + { + rx_buffers[stream] = NULL; + } +} + + +CCP_CmdRet DS_conv_driver_err_to_ccp_cmd_ret(DS_DRIVER_ERR_CODE code) { switch (code) { case DS_DRIVER_ERR_CODE_ILLEGAL_CONTEXT: case DS_DRIVER_ERR_CODE_UNKNOWN_ERR: // 全てこれでいいのかは,要検討 - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_CONTEXT, (uint32_t)code); case DS_DRIVER_ERR_CODE_ILLEGAL_PARAMETER: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_PARAMETER, (uint32_t)code); case DS_DRIVER_ERR_CODE_ILLEGAL_LENGTH: - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_LENGTH, (uint32_t)code); default: // ここに来るのは以下 // DS_DRIVER_ERR_CODE_OK - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret(CCP_EXEC_SUCCESS, (uint32_t)code); } } -CCP_EXEC_STS DS_conv_cmd_err_to_ccp_exec_sts(DS_CMD_ERR_CODE code) +CCP_CmdRet DS_conv_cmd_err_to_ccp_cmd_ret(DS_CMD_ERR_CODE code) { switch (code) { case DS_CMD_ILLEGAL_CONTEXT: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_CONTEXT, (uint32_t)code); case DS_CMD_ILLEGAL_PARAMETER: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_PARAMETER, (uint32_t)code); case DS_CMD_ILLEGAL_LENGTH: - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_LENGTH, (uint32_t)code); default: - // ここに来るのは以下の3つ + // ここに来るのは以下の 3 つ // DS_CMD_OK // DS_CMD_DRIVER_SUPER_ERR // DS_CMD_UNKNOWN_ERR - // 下2つのエラーはDriver側の問題で,そちらでエラー情報を持つべき - // ここでは SUCCESSを返す - return CCP_EXEC_SUCCESS; + // 下 2 つのエラーは Driver 側の問題で,そちらでエラー情報を持つべき + // ここでは SUCCESS を返す + return CCP_make_cmd_ret(CCP_EXEC_SUCCESS, (uint32_t)code); + } +} + + +const uint8_t* DSSC_get_rx_frame(const DS_StreamConfig* p_stream_config) +{ + DS_StreamRecBuffer* buffer = p_stream_config->settings.rx_buffer_; + return &(buffer->buffer[buffer->pos_of_frame_head_candidate]); +} + + +uint16_t DSSC_get_fixed_rx_frame_size(const DS_StreamConfig* p_stream_config) +{ + DS_StreamRecBuffer* buffer = p_stream_config->settings.rx_buffer_; + if (buffer->is_frame_fixed) + { + return buffer->confirmed_frame_len; + } + else + { + return 0; + } +} + +void DS_clear_stream_rec_buffer_(DS_StreamRecBuffer* stream_rec_buffer) +{ + if (stream_rec_buffer == NULL) return; + if (stream_rec_buffer->buffer == NULL) return; + + memset(stream_rec_buffer->buffer, + 0x00, + stream_rec_buffer->capacity); + stream_rec_buffer->size = 0; + stream_rec_buffer->pos_of_frame_head_candidate = 0; + stream_rec_buffer->confirmed_frame_len = 0; + stream_rec_buffer->is_frame_fixed = 0; + stream_rec_buffer->pos_of_last_rec = 0; +} + + +void DS_drop_from_stream_rec_buffer_(DS_StreamRecBuffer* stream_rec_buffer, + uint16_t size) +{ + int32_t move_size = stream_rec_buffer->size - size; + + if (size == 0) return; + + if (move_size > 0) + { + memmove(&stream_rec_buffer->buffer[0], + &stream_rec_buffer->buffer[size], + move_size); + } + + // データ整合 + if (stream_rec_buffer->pos_of_frame_head_candidate < size) + { + stream_rec_buffer->confirmed_frame_len = 0; + } + + if (stream_rec_buffer->size > size) + { + stream_rec_buffer->size -= size; + } + else + { + stream_rec_buffer->size = 0; + } + + if (stream_rec_buffer->pos_of_frame_head_candidate >= size) + { + stream_rec_buffer->pos_of_frame_head_candidate -= size; + } + else + { + stream_rec_buffer->pos_of_frame_head_candidate = 0; + stream_rec_buffer->is_frame_fixed = 0; + } + + if (stream_rec_buffer->pos_of_last_rec > size) + { + stream_rec_buffer->pos_of_last_rec -= size; + } + else + { + stream_rec_buffer->pos_of_last_rec = 0; + } +} + + +DS_ERR_CODE DS_push_to_stream_rec_buffer_(DS_StreamRecBuffer* stream_rec_buffer, + const uint8_t* buffer, + uint16_t size) +{ + uint16_t rest_size = stream_rec_buffer->capacity - stream_rec_buffer->size; + if (rest_size < size) return DS_ERR_CODE_ERR; + + memcpy(&stream_rec_buffer->buffer[stream_rec_buffer->size], + buffer, + size); + stream_rec_buffer->size += size; + + return DS_ERR_CODE_OK; +} + + +uint16_t DS_get_unprocessed_size_from_stream_rec_buffer_(DS_StreamRecBuffer* stream_rec_buffer) +{ + int32_t len = stream_rec_buffer->size - stream_rec_buffer->pos_of_frame_head_candidate - stream_rec_buffer->confirmed_frame_len; + if (len < 0) return 0; // まああり得ないが + return (uint16_t)len; +} + + +void DS_confirm_stream_rec_buffer_(DS_StreamRecBuffer* stream_rec_buffer, + uint16_t size) +{ + stream_rec_buffer->confirmed_frame_len += size; + if (stream_rec_buffer->confirmed_frame_len > stream_rec_buffer->size) + { + stream_rec_buffer->confirmed_frame_len = stream_rec_buffer->size; + } +} + + +void DS_move_forward_frame_head_candidate_of_stream_rec_buffer_(DS_StreamRecBuffer* stream_rec_buffer, + uint16_t size) +{ + stream_rec_buffer->pos_of_frame_head_candidate += size; + if (stream_rec_buffer->pos_of_frame_head_candidate > stream_rec_buffer->size) + { + stream_rec_buffer->pos_of_frame_head_candidate = stream_rec_buffer->size; } + // head が動くということは,フレーム探索中ということ + stream_rec_buffer->confirmed_frame_len = 0; } #pragma section diff --git a/Drivers/Super/driver_super.h b/Drivers/Super/driver_super.h index af4889cad..2a70323c2 100644 --- a/Drivers/Super/driver_super.h +++ b/Drivers/Super/driver_super.h @@ -6,19 +6,33 @@ * 各制御センサ・アクチュエータ等とのインターフェースを実現し, * 初期化,コマンド発行,テレメトリリクエスト,テレメトリ受信,テレメトリ解析などを行う,ドライバ群のスーパークラスです. * 個々の機器のインターフェースドライバに継承させて使用します. + * @note DS_StreamRecBuffer で与える受信バッファサイズについて + * このバッファに受信データを格納していき,フレームを確定していく. + * したがって,最低限のバッファサイズは, + * - 非同期通信の場合: 受信フレーム最大長 x 2 以上 + * - 同期通信の場合: 受信フレーム最大長 以上 + * が望ましい. + * メモリに余力がある場合,さらに + * - rx_buffer_size_in_if_rx_ (or DS_IF_RX_BUFFER_SIZE) x 2 以上 + * があると,さらに受信漏れを防ぐことができる. + * @note バッファのサイズ設定について + * - DS_StreamRecBuffer のサイズは rx_buffer_size_in_if_rx_ よりも大きい必要がある + * - rx_buffer_size_in_if_rx_ のサイズは,実際の OBC のハードウェアバッファサイズと等しくすると最も効率が良い + * - DS_IF_RX_BUFFER_SIZE はすべてのドライバの rx_buffer_size_in_if_rx_ 以上の値にする(最大値にすると良い) */ #ifndef DRIVER_SUPER_H_ #define DRIVER_SUPER_H_ #include -#include -#include "../../Library/endian_memcpy.h" // パスが不定な自動生成コード類で使えるように +#include +#include "../../Library/endian.h" // パスが不定な自動生成コード類で使えるように #include "../../System/TimeManager/time_manager.h" -#define DS_STREAM_MAX (3) /*!< DS_StreamConfigの最大数 - uint8_t を想定 */ -#define DS_RX_BUFFER_SIZE_MAX (1024) //!< 受信データバッファの最大長 -#define DS_RX_FRAME_SIZE_MAX (1024) //!< 受信データフレームの最大長 +#define DS_STREAM_MAX (3) /*!< DS_StreamConfig の最大数 + uint8_t を想定 */ +#define DS_IF_RX_BUFFER_SIZE (1024) /*!< IF_RX で受信するときの一次バッファ + IF_RX から受信できる最大数を規定する + OBC の物理的な信号ラインのバッファサイズ以上とするともっともパフォーマンスが出る */ #include @@ -29,13 +43,13 @@ typedef struct DS_StreamConfig DS_StreamConfig; * @enum DS_DRIVER_ERR_CODE * @brief Driver の汎用エラーコード * - * Driver 内の各種setter 等の関数返り値で使われることを想定 + * Driver 内の各種 setter 等の関数返り値で使われることを想定 * @note uint8_t を想定 * @note 初期化関数呼び出し時については, DS_INIT_ERR_CODE を用いること * @note 受信関数呼び出し時については, DS_REC_ERR_CODE を用いること * @note 接続先機器へ送るCmd呼び出し時については, DS_CMD_ERR_CODE を用いること * @note DI の Cmd の返り値である CCP_EXEC_STS との整合性を多少意識している - * @note CCP_EXEC_STS への変換は DS_conv_driver_err_to_ccp_exec_sts を用いる + * @note CCP_EXEC_STS への変換は DS_conv_driver_err_to_ccp_cmd_ret を用いる * @note より詳細なエラー情報を返したい場合は, Driver ごとに独自 enum を定義して良い */ typedef enum @@ -80,15 +94,15 @@ typedef enum * @brief 各DIが Driver にコマンドを送るときに,統一的に使うコード * @note uint8_t を想定 * @note DI の Cmd の返り値である CCP_EXEC_STS との整合性を多少意識している - * @note CCP_EXEC_STS への変換は DS_conv_cmd_err_to_ccp_exec_sts を用いる + * @note CCP_EXEC_STS への変換は DS_conv_cmd_err_to_ccp_cmd_ret を用いる */ typedef enum { DS_CMD_OK = 0, //!< OKは0であることを保証する - DS_CMD_ILLEGAL_CONTEXT = 1, //!< CCP_EXEC_ILLEGAL_CONTEXT に対応.DIでみることも多いはず.HW依存部はDriverでみる - DS_CMD_ILLEGAL_PARAMETER = 2, //!< CCP_EXEC_ILLEGAL_PARAMETER に対応.ヒーターの個数など,HW依存部はDrivreでみる + DS_CMD_ILLEGAL_CONTEXT = 1, //!< CCP_EXEC_ILLEGAL_CONTEXT に対応.DIでみることも多いはず.HW依存部は Driver でみる + DS_CMD_ILLEGAL_PARAMETER = 2, //!< CCP_EXEC_ILLEGAL_PARAMETER に対応.ヒーターの個数など,HW 依存部は Driver でみる DS_CMD_ILLEGAL_LENGTH = 3, //!< CCP_EXEC_ILLEGAL_LENGTH に対応.これは基本的にはDIで見るはずなので,使われないことを想定 - DS_CMD_DRIVER_SUPER_ERR = 4, //!< DriverSuper側,つまり配送の低レイヤーでエラーが起きた場合 + DS_CMD_DRIVER_SUPER_ERR = 4, //!< DriverSuper 側,つまり配送の低レイヤーでエラーが起きた場合 DS_CMD_UNKNOWN_ERR = 255 } DS_CMD_ERR_CODE; @@ -100,7 +114,7 @@ typedef enum */ typedef enum { - DS_ERR_CODE_OK = 0, //!< 返り値は継承先やIF先で上書きされるため,OKは0であることが必須 + DS_ERR_CODE_OK = 0, //!< 返り値は継承先や IF 先で上書きされるため,OK は 0 であることが必須 DS_ERR_CODE_ERR = 1 } DS_ERR_CODE; @@ -134,8 +148,8 @@ typedef enum { DS_STREAM_SEND_STATUS_OK, DS_STREAM_SEND_STATUS_DISABLE, - DS_STREAM_SEND_STATUS_TX_ERR, //!< IF_TXでエラー - DS_STREAM_SEND_STATUS_VALIDATE_ERR, //!< 送信前にvalidate_configでエラー + DS_STREAM_SEND_STATUS_TX_ERR, //!< IF_TX でエラー + DS_STREAM_SEND_STATUS_VALIDATE_ERR, //!< 送信前に validate_config でエラー DS_STREAM_SEND_STATUS_OTHER_ERR } DS_STREAM_SEND_STATUS_CODE; @@ -169,7 +183,7 @@ typedef enum DS_STREAM_REC_STATUS_RX_FRAME_TOO_LONG, DS_STREAM_REC_STATUS_RX_FRAME_TOO_SHORT, DS_STREAM_REC_STATUS_RX_ERR, //!< IF_RX でエラー - DS_STREAM_REC_STATUS_VALIDATE_ERR, //!< 受信前にvalidate_configでエラー + DS_STREAM_REC_STATUS_VALIDATE_ERR, //!< 受信前に validate_config でエラー DS_STREAM_REC_STATUS_OTHER_ERR } DS_STREAM_REC_STATUS_CODE; @@ -195,199 +209,269 @@ typedef struct DS_STREAM_TLM_DISRUPTION_STATUS_CODE tlm_disruption_status; //!< テレメ途絶判定 uint32_t count_of_carry_over_failures; /*!< 受信バッファの繰越に失敗した回数 DS_receive の呼び出し頻度がおそすぎることが原因 */ - // 今後詳細情報を拡張するなら,ここに入れる(ref. EQU Driver Super の DRIVE_Super_recなど) + // 今後詳細情報を拡張するなら,ここに入れる(ref. EQU Driver Super の DRIVE_Super_rec など) } DS_StreamRecStatus; +/** + * @struct DS_StreamRecBuffer + * @brief フレーム受信バッファ + * @note FIXME: DS_StreamRecStatus.status_code と is_frame_fixed の棲み分けを考える + * 現状, is_frame_fixed は, DS_receive 後に降りるフラグになってる + */ +typedef struct +{ + uint8_t* buffer; //!< バッファ本体となる uint8_t 配列.外部から与える + uint16_t capacity; //!< buffer のメモリ確保量 + uint16_t size; //!< 現在使われているサイズ + uint16_t pos_of_frame_head_candidate; //!< フレーム開始点の候補 + uint16_t confirmed_frame_len; //!< 受信フレームとして受理された pos_of_frame_head_candidate からの長さ(フレーム確定後,これがフレーム長になる) + uint8_t is_frame_fixed; //!< このバッファ上でフレームが確定してるか? + uint16_t pos_of_last_rec; //!< 最後に受信したデータを格納した位置 +} DS_StreamRecBuffer; + /** * @struct DS_Config * @brief DriverSuper の設定 * * 各IFはこれを継承してつかう. + * DS_Config のメンバはすべての Driver から非公開とし, getter / setter でアクセスする */ typedef struct { - // 【ユーザー設定/取得値】(DS_Configの変数はすべてのDriverから非公開とする) - DS_RecStatus rec_status_; //!< IF受信状況 - - uint32_t rx_count_; //!< なにかしらのデータの受信回数 - uint32_t rx_call_count_; //!< DS_receive 呼び出し回数 - - ObcTime rx_time_; //!< なにかしらのデータの受信時刻 - - uint8_t should_monitor_for_rx_disruption_; //!< 受信途絶判定をするか? - uint32_t time_threshold_for_rx_disruption_; //!< 受信途絶判定の閾値 [ms] - - // 【内部処理で用いる値】 - uint8_t rx_buffer_[DS_RX_BUFFER_SIZE_MAX]; //!< データ受信バッファ - - DS_ERR_CODE (*load_init_setting)(DriverSuper* p_super); /*!< DS_init でロードする,ドライバの初期設定の設定関数 - DS_reset_config での設定をオーバーロードする - 返り値は DS_ERR_CODE */ + struct + { + uint16_t rx_buffer_size_in_if_rx_; /*!< IF_RX で受信するときの一次バッファのサイズ + DS ではまず IF_RX を全 Driver 共通の一次バッファにコピーした後, + DS_StreamRecBuffer に push して解析していく. + IF_RX で読み込む量が多すぎると,DS_StreamRecBuffer に収まりきらないことがあるので, + DS_StreamRecBuffer のサイズが小さい場合は,IF_RX で読み込むサイズも小さくする必要がある. + 最大値: DS_IF_RX_BUFFER_SIZE + 初期値: DS_IF_RX_BUFFER_SIZE */ + uint8_t should_monitor_for_rx_disruption_; /*!< 受信途絶判定をするか? + 初期値: 0 */ + uint32_t time_threshold_for_rx_disruption_; /*!< 受信途絶判定の閾値 [ms] + 初期値: 60 * 1000 */ + } settings; //!< 設定値 + + struct + { + DS_RecStatus rec_status_; //!< IF受信状況 + + uint32_t rx_count_; //!< なにかしらのデータの受信回数 + uint32_t rx_call_count_; //!< DS_receive 呼び出し回数 + + ObcTime rx_time_; //!< なにかしらのデータの受信時刻 + } info; //!< 取得値(メトリクス) + + struct + { + DS_ERR_CODE (*load_init_setting)(DriverSuper* p_super); /*!< DS_init でロードする,ドライバの初期設定の設定関数 + DS_reset_config での設定をオーバーロードする + 返り値は DS_ERR_CODE */ + } internal; //!< 内部処理用 } DS_Config; /** * @struct DS_StreamConfig - * @brief DriverSuperStreamの設定 + * @brief DriverSuperStream の設定 + * + * DS_StreamConfig のメンバはすべての Driver から非公開とし, getter / setter でアクセスする */ struct DS_StreamConfig { - // 【継承先まで公開】 - // 現状なし - // setter/getterで操作する - - // 【ユーザー設定/取得値】(DS_StreamConfigの変数はすべてのDriverから非公開とする) - uint8_t is_enabled_; //!< 有効か? - - uint8_t is_strict_frame_search_; /*!< 厳格なフレーム探索が有効か? - ノイズ発生時や複数stream使用時にフレーム受信漏れを完全になくすモード - - OFFの場合(通常はこちら) - ヘッダを見つけて,フレーム候補を見つけた後,次のフレームはフレーム候補から探索する - - ONの場合 - ヘッダを見つけて,フレーム候補を見つけた後,次のフレームは,見つけたヘッダ先頭の次バイトから探索する - 実行時間は長くなる - 複数streamやノイズが入ってしまった場合など,本来ヘッダでない部分をヘッダとして認識してしまう場合に有効化すると, - 論理的なフレーム受信漏れの確率を限りなく 0 に近づけることができる. - ヘッダがあるフレームの場合のみ,有効にできる */ - - DS_StreamSendStatus send_status_; //!< フレーム送信状況 - DS_StreamRecStatus rec_status_; //!< フレーム受信状況 - - uint32_t general_cmd_tx_count_; //!< 通常コマンド送信回数 - uint32_t req_tlm_cmd_tx_count_; //!< テレメ要求コマンド送信回数 - uint32_t req_tlm_cmd_tx_count_after_last_tx_; /*!< 最後にテレメを受信してからのテレメ要求コマンド送信回数 - これが 0 でない場合,テレメが最新ではない可能性がある */ - uint32_t rx_frame_fix_count_; //!< フレーム受信確定回数 - - ObcTime general_cmd_tx_time_; //!< 通常コマンド最終送信時刻 - ObcTime req_tlm_cmd_tx_time_; //!< テレメ要求コマンド最終送信時刻 - ObcTime rx_frame_fix_time_; //!< フレーム確定時刻 - - uint8_t* tx_frame_; //!< コマンドフレーム - uint16_t tx_frame_size_; /*!< コマンドフレームサイズ - tx_frame_ のうち実際に送信するバイト数 - 送信データがない場合は 0 */ - int16_t tx_frame_buffer_size_; /*!< 与えた tx_frame_ の最大サイズ - Drivers/Protocol などで, Util が tx_frame_ を使うときに使用 - Protocol を使うときは設定しておくと良い(一部の関数は設定しないと使えない) - 未指定の場合は負数とする */ - - uint8_t rx_frame_[DS_RX_FRAME_SIZE_MAX]; /*!< データ受信フレームバッファ - DS_RX_FRAME_SIZE_MAX を超えるような巨大なフレーム(ビッグデータ)には未対応(将来実装予定) - 対応させる場合,この配列変数を外部の大きな配列のポインタに上書きする必要がある. */ - - const uint8_t* rx_header_; //!< 受信データのヘッダ - uint16_t rx_header_size_; /*!< 受信データのヘッダサイズ - ヘッダがない場合は0に設定 - この場合,基本的には固定長( rx_frame_size が正)を使う. - ヘッダがなく,可変長の場合は,受信前(例えば DS_send_req_tlm_cmd 呼び出し前) に - rx_frame_size_ を設定することで固定長のように扱うことで対応する. - また,初期化時の Validation を通すためにも,初期値は適切な正数にしておくこと */ - const uint8_t* rx_footer_; //!< 受信データのフッタ - uint16_t rx_footer_size_; /*!< 受信データのフッタサイズ - ヘッダがない場合は0に設定 */ - int16_t rx_frame_size_; /*!< 受信データ(テレメトリ)フレームサイズ - 受信データがない場合は0に設定 - 受信データが可変の場合は負数に設定 */ - int16_t rx_framelength_pos_; /*!< 受信データ内のフレームサイズデータの存在する場所(先頭から数えて何 byte 目に位置するか.0 起算) - 受信データが可変長の場合のみ使用される. - フレームサイズデータがない場合には負に設定する. - 可変長でかつフレームサイズデータのないフレームは,フッタが設定されている場合は有効である. - ただし,フッタの探索が必要なため,実行時間は若干遅くなる. - もちろん,ヘッダがあることを推奨する.ヘッダがない場合は,受信したデータの冒頭からフレームとみなす. - 受信されるフレーム長が受信前に判明している場合は, - ヘッダがない場合のときと同様に,受信前(例えば DS_send_req_tlm_cmd 呼び出し前) に - rx_frame_size_ を設定することで,固定長のように扱うことで対応することを推奨する. */ - uint16_t rx_framelength_type_size_; /*!< フレームサイズデータの型サイズ [Byte] - 受信データが可変長の場合のみ使用される. - 例えば uint8 なら 1, uint32 なら 4 */ - uint16_t rx_framelength_offset_; /*!< フレームサイズデータのオフセット値 - 受信データが可変長の場合のみ使用される - フレームサイズデータによる可変長データの解析は「フレームの全サイズ」により行われるが, - 機器の中にはヘッダとフッタの分は除いたデータ数としてサイズが表現される場合がある - その場合のサイズ調整のために使う - フレームサイズデータが「フレームの全サイズ」を示している場合には0に設定する */ - - uint8_t should_monitor_for_tlm_disruption_; //!< テレメ途絶判定をするか? - uint32_t time_threshold_for_tlm_disruption_; //!< テレメ途絶判定の閾値 [ms] - - DS_ERR_CODE (*data_analyzer_)(DS_StreamConfig* p_stream_config, void* p_driver); - /*!< 受信データの解析関数 - p_driver は継承先機器のドライバ構造体など - 返り値は DS_ERR_CODE */ - DS_ERR_CODE ret_from_data_analyzer_; //!< data_analyzer_ の返り値 - - // 【内部処理で用いる値】 - uint8_t is_validation_needed_for_send_; //!< 送信前に設定値の Validation が必要か? - uint8_t is_validation_needed_for_rec_; //!< 受信前に設定値の Validation が必要か? - - uint16_t rx_frame_rec_len_; //!< 受信データフレームの受信済みByte.rx_frame_ に対する操作ポインタになる - uint16_t rx_frame_head_pos_of_frame_candidate_; /*!< 受信バッファ解析時に,フレーム候補としたフレームの先頭位置(0 起算) - DS_analyze_rx_buffer_fixed_, DS_analyze_rx_buffer_variable_ から呼ばれる関数で, - フレーム候補がロジカルなエラー(フッタの不一致やフレーム長の不整合)等が起きた時に, - 再度フレームを探索できるようにするために使う */ - - uint8_t is_rx_buffer_carry_over_; //!< 繰越する受信データがあるか? - uint16_t carry_over_buffer_size_; //!< 繰越する受信データのサイズ - uint16_t carry_over_buffer_next_pos_; //!< 次回探索を始めるバッファ位置(0 起算) - uint8_t rx_buffer_for_carry_over_[DS_RX_BUFFER_SIZE_MAX]; - /*!< フレーム確定したときに,その後に続いていた受信データを繰越すための保存用バッファ - 次の受信時にまとめて処理させる */ + struct + { + uint8_t is_enabled_; /*!< 有効か? + 初期値: 0 (無効) */ + + uint8_t is_strict_frame_search_; /*!< 厳格なフレーム探索が有効か? + ノイズ発生時や複数 stream 使用時にフレーム受信漏れを完全になくすモード + - OFFの場合(通常はこちら) + ヘッダを見つけて,フレーム候補を見つけた後,次のフレームはフレーム候補から探索する + - ONの場合 + ヘッダを見つけて,フレーム候補を見つけた後,次のフレームは,見つけたヘッダ先頭の次バイトから探索する + 実行時間は長くなる + 複数 stream やノイズが入ってしまった場合など,本来ヘッダでない部分をヘッダとして認識してしまう場合に有効化すると, + 論理的なフレーム受信漏れの確率を限りなく 0 に近づけることができる. + ヘッダがあるフレームの場合のみ,有効にできる + 初期値: 0 (OFF) */ + + uint8_t* tx_frame_; /*!< コマンドフレーム + FIXME: tx_frame_buffer_ に rename する? + 初期値: NULL */ + uint16_t tx_frame_size_; /*!< コマンドフレームサイズ + tx_frame_ のうち実際に送信するバイト数 + 送信データがない場合は 0 + 初期値: 0 */ + int16_t tx_frame_buffer_size_; /*!< 与えた tx_frame_ の最大サイズ + Drivers/Protocol などで, Util が tx_frame_ を使うときに使用 + Protocol を使うときは設定しておくと良い(一部の関数は設定しないと使えない) + 未指定の場合は負数とする + 初期値: -1 */ + + DS_StreamRecBuffer* rx_buffer_; /*!< 受信バッファ + stream 初期化時に user がメモリを割り当て,設定する + 初期値: NULL */ + const uint8_t* rx_header_; /*!< 受信データのヘッダ + 初期値: NULL */ + uint16_t rx_header_size_; /*!< 受信データのヘッダサイズ + ヘッダがない場合は0に設定 + この場合,基本的には固定長(rx_frame_size が正)を使う. + ヘッダがなく,可変長の場合は,受信前(例えば DS_send_req_tlm_cmd 呼び出し前) に + rx_frame_size_ を設定することで固定長のように扱うことで対応する. + また,初期化時の Validation を通すためにも,初期値は適切な正数にしておくこと + 初期値: 0 */ + const uint8_t* rx_footer_; /*!< 受信データのフッタ + 初期値: NULL */ + uint16_t rx_footer_size_; /*!< 受信データのフッタサイズ + ヘッダがない場合は0に設定 + 初期値: 0 */ + int16_t rx_frame_size_; /*!< 受信データ(テレメトリ)フレームサイズ + 受信データがない場合は 0 に設定 + 受信データが可変の場合は負数に設定 + 初期値: 0 */ + uint16_t max_rx_frame_size_; /*!< 受信データ(テレメトリ)の想定される最大フレームサイズ + これよりも長いフレームが来た(来そうな)場合は,そのフレーム(候補)は破棄される + これにより,ヘッダ内部のフレーム長が巨大な値に化けていた場合などに永遠に受信してしまうことを防ぐことができる + rx_frame_size_ が固定長の場合は無視される + 初期値: 0xffff */ + int16_t rx_framelength_pos_; /*!< 受信データ内のフレームサイズデータの存在する場所(先頭から数えて何 byte 目に位置するか.0 起算) + 受信データが可変長の場合のみ使用される. + フレームサイズデータがない場合には負に設定する. + 可変長でかつフレームサイズデータのないフレームは,フッタが設定されている場合は有効である. + ただし,フッタの探索が必要なため,実行時間は若干遅くなる. + もちろん,ヘッダがあることを推奨する.ヘッダがない場合は,受信したデータの冒頭からフレームとみなす. + 受信されるフレーム長が受信前に判明している場合は, + ヘッダがない場合のときと同様に,受信前(例えば DS_send_req_tlm_cmd 呼び出し前) に + rx_frame_size_ を設定することで,固定長のように扱うことで対応することを推奨する. + 初期値: -1 */ + uint16_t rx_framelength_type_size_; /*!< フレームサイズデータの型サイズ [byte] + 受信データが可変長の場合のみ使用される. + 例えば uint8 なら 1, uint32 なら 4 + 初期値: 0 */ + uint16_t rx_framelength_offset_; /*!< フレームサイズデータのオフセット値 + 受信データが可変長の場合のみ使用される + フレームサイズデータによる可変長データの解析は「フレームの全サイズ」により行われるが, + 機器の中にはヘッダとフッタの分は除いたデータ数としてサイズが表現される場合がある + その場合のサイズ調整のために使う + フレームサイズデータが「フレームの全サイズ」を示している場合には 0 に設定する + 初期値: 0 */ + ENDIAN_TYPE rx_framelength_endian_; /*!< フレームサイズデータのエンディアン + 受信データが可変長の場合のみ使用される + 初期値: ENDIAN_TYPE_BIG */ + + uint8_t should_monitor_for_tlm_disruption_; /*!< テレメ途絶判定をするか? + 初期値: 0 */ + uint32_t time_threshold_for_tlm_disruption_; /*!< テレメ途絶判定の閾値 [ms] + 初期値: 60 * 1000 */ + + DS_ERR_CODE (*data_analyzer_)(DS_StreamConfig* p_stream_config, void* p_driver); + /*!< 受信データの解析関数 + p_driver は継承先機器のドライバ構造体など + 返り値は DS_ERR_CODE + DS_data_analyzer_dummy_ */ + } settings; //!< 設定値 + + struct + { + DS_StreamSendStatus send_status_; //!< フレーム送信状況 + DS_StreamRecStatus rec_status_; //!< フレーム受信状況 + + uint32_t general_cmd_tx_count_; //!< 通常コマンド送信回数 + uint32_t req_tlm_cmd_tx_count_; //!< テレメ要求コマンド送信回数 + uint32_t req_tlm_cmd_tx_count_after_last_tx_; /*!< 最後にテレメを受信してからのテレメ要求コマンド送信回数 + これが 0 でない場合,テレメが最新ではない可能性がある */ + uint32_t rx_frame_fix_count_; //!< フレーム受信確定回数 + + ObcTime general_cmd_tx_time_; //!< 通常コマンド最終送信時刻 + ObcTime req_tlm_cmd_tx_time_; //!< テレメ要求コマンド最終送信時刻 + ObcTime rx_frame_fix_time_; //!< フレーム確定時刻 + + DS_ERR_CODE ret_from_data_analyzer_; //!< data_analyzer_ の返り値 + } info; //!< 取得値(メトリクス) + + struct + { + uint8_t is_validation_needed_for_send_; //!< 送信前に設定値の Validation が必要か? + uint8_t is_validation_needed_for_rec_; //!< 受信前に設定値の Validation が必要か? + } internal; //!< 内部処理用 }; // TODO: Protocol 用に data_link_layer_ を追加 /** * @struct DriverSuper - * @brief DriverSuperの設定 - * 各IFはこれを継承してつかう. + * @brief DriverSuper の設定 + * 各 IF はこれを継承してつかう. */ struct DriverSuper { // 【継承先まで公開】 - IF_LIST_ENUM interface; //!< 継承先の機器の使用IF - void* if_config; //!< IF設定 + IF_LIST_ENUM interface; //!< 継承先の機器の使用 IF + void* if_config; //!< IF 設定 - DS_Config config; //!< DriverSuperの設定 + DS_Config config; //!< DriverSuper の設定 DS_StreamConfig stream_config[DS_STREAM_MAX]; /*!< DriverSuperStream - indexが低いものほど優先(に今後するかも.実行速度次第). - 使い方例:[0]のみをつかって,テレメ内に仕込んだ TLM ID などで data_analyzer_ 内で処理を分岐 - 使い方例:[0]を定期テレメと一般コマンドで使い,[1]以降を非定期や特殊コマンド・テレメトリで使う + index が低いものほど優先(に今後するかも.実行速度次第). + 使い方例:[0] のみをつかって,テレメ内に仕込んだ TLM ID などで data_analyzer_ 内で処理を分岐 + 使い方例:[0] を定期テレメと一般コマンドで使い,[1] 以降を非定期や特殊コマンド・テレメトリで使う が,まあ自由に使ってもらえたら */ }; -// ###### DriverSuper基本関数 ###### + +// ###### DriverSuper 基本関数 ###### /** - * @brief 継承先の機器よりDriverSuperを初期化する + * @brief 継承先の機器より DriverSuper を初期化する(stream 0 のみの使用の場合) * - * DriverSuper構造体を継承先Drive構造体のメンバとして定義(継承)し,ポインタを渡すことでポートを初期化する. + * DriverSuper 構造体を継承先 Driver 構造体のメンバとして定義(継承)し,ポインタを渡すことでポートを初期化する. * そして,構造体内の初期化が必要な変数を初期化する. * デフォルト値の上書きは load_init_setting で行う - * @note DriverSuperを使用する時は起動時に必ず実施すること - * @param p_super: 初期化するDriverSuper構造体へのポインタ - * @param if_config: 初期化するDriverで用いられているIFのconfig構造体 - * @param load_init_setting: DriverSuperの初期設定ロード関数ポインタ + * @note DriverSuper を使用する時は起動時に必ず実施すること + * @param p_super: 初期化する DriverSuper 構造体へのポインタ + * @param if_config: 初期化する Driverで用いられている IF の config 構造体 + * @param rx_buffer: 初期化する DriverSuper の stream 0 で用いられるフレーム受信バッファ + * @param load_init_setting: DriverSuper の初期設定ロード関数ポインタ * @return DS_ERR_CODE */ DS_ERR_CODE DS_init(DriverSuper* p_super, void* if_config, + DS_StreamRecBuffer* rx_buffer, DS_ERR_CODE (*load_init_setting)(DriverSuper* p_super)); /** - * @brief DriverSuperのリセット - * @note DS_init内で呼ばれている. - * @param p_super: DriverSuper構造体へのポインタ + * @brief 継承先の機器より DriverSuper を初期化する(複数の stream を使用する場合) + * + * DriverSuper 構造体を継承先 Driver 構造体のメンバとして定義(継承)し,ポインタを渡すことでポートを初期化する. + * そして,構造体内の初期化が必要な変数を初期化する. + * デフォルト値の上書きは load_init_setting で行う + * @note DriverSuper を使用する時は起動時に必ず実施すること + * @param p_super: 初期化する DriverSuper 構造体へのポインタ + * @param if_config: 初期化する Driverで用いられている IF の config 構造体 + * @param rx_buffers: 初期化する DriverSuper で用いられるフレーム受信バッファ.使用しない stream は NULL を設定しておく + * @param load_init_setting: DriverSuper の初期設定ロード関数ポインタ + * @return DS_ERR_CODE + */ +DS_ERR_CODE DS_init_streams(DriverSuper* p_super, + void* if_config, + DS_StreamRecBuffer* rx_buffers[DS_STREAM_MAX], + DS_ERR_CODE (*load_init_setting)(DriverSuper* p_super)); + +/** + * @brief DriverSuper のリセット + * @note DS_init 内で呼ばれている. + * @param p_super: DriverSuper 構造体へのポインタ * @return DS_ERR_CODE */ DS_ERR_CODE DS_reset(DriverSuper* p_super); /** - * @brief DriverSuperの設定に不整合が生じていないかチェックする + * @brief DriverSuper の設定に不整合が生じていないかチェックする * - * Driverの設定を変えた場合は毎回呼び出すことを推奨する - * @note DS_init内で呼ばれている. - * @note 内部の管理フラグを変更しているので, p_super に厳密なconst性はない - * @param p_super: DriverSuper構造体へのポインタ + * Driver の設定を変えた場合は毎回呼び出すことを推奨する + * @note DS_init 内で呼ばれている. + * @note 内部の管理フラグを変更しているので, p_super に厳密な const 性はない + * @param p_super: DriverSuper 構造体へのポインタ * @return DS_ERR_CODE */ DS_ERR_CODE DS_validate_config(DriverSuper* p_super); @@ -396,9 +480,9 @@ DS_ERR_CODE DS_validate_config(DriverSuper* p_super); * @brief 受信バッファをクリアする * * 例えば,ヘッダなしテレメの場合,途中でゴミデータが入ると以後すべてのフレームがずれてしまう. - * そのようなとき(CRCエラーがでるとか,受信データが明らかにおかしい場合)に,bufferを一度クリアし, + * そのようなとき(CRC エラーがでるとか,受信データが明らかにおかしい場合)に,buffer を一度クリアし, * 次に届くデータからフレーム解析を先頭から行うようにするために用いる. - * @param p_super: DriverSuper構造体へのポインタ + * @param p_super: DriverSuper 構造体へのポインタ * @return DS_ERR_CODE */ DS_ERR_CODE DS_clear_rx_buffer(DriverSuper* p_super); @@ -406,10 +490,10 @@ DS_ERR_CODE DS_clear_rx_buffer(DriverSuper* p_super); /** * @brief 継承先の機器からテレメトリを受信する * - * フレームを確定させて,rx_frame_にいれるまで.解析 (data_analyzer_) はしないのでドライバで DS_analyze_rec_data を呼び出すこと - * これは,同じstreamでもテレメ内部のIDなどで解析を変えたいときなどが想定されるため + * フレームを確定させて,rx_frame_ にいれるまで.解析 (data_analyzer_) はしないのでドライバで DS_analyze_rec_data を呼び出すこと + * これは,同じ stream でもテレメ内部の ID などで解析を変えたいときなどが想定されるため * @note 継承先の機器のデータ出力周期より早い周期で定期的に実行すること - * @param p_super: DriverSuper構造体へのポインタ + * @param p_super: DriverSuper 構造体へのポインタ * @retval DS_ERR_CODE_OK: IF_RX でのエラーなし * @retval DS_ERR_CODE_ERR: IF_RX でのエラーあり * @note 受信状況やエラー情報は rec_status_ に格納されている @@ -420,8 +504,8 @@ DS_ERR_CODE DS_receive(DriverSuper* p_super); * @brief data_analyzer_ を呼び出し,受信データを解析する. * * DS_receive にてデータを受信した後, DSSC_get_rec_status(p_stream_config)->status_code が DS_STREAM_REC_STATUS_FIXED_FRAME ならば呼び出す. - * @param p_super: DriverSuper構造体へのポインタ - * @param stream: どのstream_configを使用するか.streamは0-MAXなので,継承先でENUMなど宣言して使いやすくすればいいと思う. + * @param p_super: DriverSuper 構造体へのポインタ + * @param stream: どの stream_config を使用するか.stream は 0-MAX なので,継承先で ENUM など宣言して使いやすくすればいいと思う. * @param p_driver: 継承先機器のドライバ構造体など.data_analyzer_ の第二引数. * @return DS_ERR_CODE: data_analyzer_ の返り値をそのまま返す * @note data_analyzer_ の返り値は, ret_from_data_analyzer_ にも保存される. @@ -432,10 +516,10 @@ DS_ERR_CODE DS_analyze_rec_data(DriverSuper* p_super, uint8_t stream, void* p_dr * @brief 継承先の機器に一般コマンドを発行する * * このコマンドを送ったことによってレスポンスが返ってくることを想定していない(その場合は DS_send_req_tlm_cmd を使う) - * @note この関数の実行前に,tx_frame, tx_frame_sizeの設定が必要である + * @note この関数の実行前に,tx_frame, tx_frame_size の設定が必要である * @note これは基底クラスなため,アノマリ発行は行わない.継承先で返り値を見て適切にアノマリ発行すること - * @param p_super: DriverSuper構造体へのポインタ - * @param stream: どのstream_configを使用するか.streamは0-MAXなので,継承先でENUMなど宣言して使いやすくすればいいと思う. + * @param p_super: DriverSuper 構造体へのポインタ + * @param stream: どのstream_config を使用するか.stream は 0-MAX なので,継承先で ENUM など宣言して使いやすくすればいいと思う. * @retval DS_ERR_CODE_OK: 正常終了 * @retval DS_ERR_CODE_ERR: IF_TX でのエラーあり * @note 受信状況やエラー情報は send_status_ に格納されている @@ -447,29 +531,37 @@ DS_ERR_CODE DS_send_general_cmd(DriverSuper* p_super, uint8_t stream); * * テレメについては DS_receive で受け取る. * @note この関数の実行前に,tx_frame, tx_frame_sizeの設定が必要である - * @param p_super: DriverSuper構造体へのポインタ - * @param stream: どのstream_configを使用するか.streamは0-MAXなので,継承先でENUMなど宣言して使いやすくすればいいと思う. + * @param p_super: DriverSuper 構造体へのポインタ + * @param stream: どのstream_config を使用するか.stream は 0-MAX なので,継承先で ENUM など宣言して使いやすくすればいいと思う. * @retval DS_ERR_CODE_OK: 正常終了 * @retval DS_ERR_CODE_ERR: IF_TX でのエラーあり * @note 受信状況やエラー情報は send_status_ に格納されている */ DS_ERR_CODE DS_send_req_tlm_cmd(DriverSuper* p_super, uint8_t stream); -// ###### DS_Config Getter/Setter ###### -const DS_RecStatus* DSC_get_rec_status(const DriverSuper* p_super); -uint32_t DSC_get_rx_count(const DriverSuper* p_super); -uint32_t DSC_get_rx_call_count(const DriverSuper* p_super); -const ObcTime* DSC_get_rx_time(const DriverSuper* p_super); +// ###### DS_Config Getter/Setter of Settings ###### +uint16_t DSC_get_rx_buffer_size_in_if_rx(const DriverSuper* p_super); +DS_ERR_CODE DSC_set_rx_buffer_size_in_if_rx(DriverSuper* p_super, + const uint16_t rx_buffer_size_in_if_rx); uint8_t DSC_get_should_monitor_for_rx_disruption(const DriverSuper* p_super); void DSC_enable_monitor_for_rx_disruption(DriverSuper* p_super); void DSC_disable_monitor_for_rx_disruption(DriverSuper* p_super); uint32_t DSC_get_time_threshold_for_rx_disruption(const DriverSuper* p_super); void DSC_set_time_threshold_for_rx_disruption(DriverSuper* p_super, const uint32_t time_threshold_for_rx_disruption); + + +// ###### DS_Config Getter of Info ###### +const DS_RecStatus* DSC_get_rec_status(const DriverSuper* p_super); +uint32_t DSC_get_rx_count(const DriverSuper* p_super); +uint32_t DSC_get_rx_call_count(const DriverSuper* p_super); +const ObcTime* DSC_get_rx_time(const DriverSuper* p_super); + DS_RX_DISRUPTION_STATUS_CODE DSC_get_rx_disruption_status(const DriverSuper* p_super); -// ###### DS_StreamConfig Getter/Setter ###### + +// ###### DS_StreamConfig Getter/Setter of Settings ###### uint8_t DSSC_get_is_enabled(const DS_StreamConfig* p_stream_config); void DSSC_enable(DS_StreamConfig* p_stream_config); void DSSC_disable(DS_StreamConfig* p_stream_config); @@ -478,41 +570,33 @@ uint8_t DSSC_get_is_strict_frame_search(const DS_StreamConfig* p_stream_config); void DSSC_enable_strict_frame_search(DS_StreamConfig* p_stream_config); void DSSC_disable_strict_frame_search(DS_StreamConfig* p_stream_config); -const DS_StreamSendStatus* DSSC_get_send_status(const DS_StreamConfig* p_stream_config); -const DS_StreamRecStatus* DSSC_get_rec_status(const DS_StreamConfig* p_stream_config); - -uint32_t DSSC_get_general_cmd_tx_count(const DS_StreamConfig* p_stream_config); -uint32_t DSSC_get_req_tlm_cmd_tx_count(const DS_StreamConfig* p_stream_config); -uint32_t DSSC_get_req_tlm_cmd_tx_count_after_last_tx(const DS_StreamConfig* p_stream_config); -uint32_t DSSC_get_rx_frame_fix_count(const DS_StreamConfig* p_stream_config); - -const ObcTime* DSSC_get_general_cmd_tx_time(const DS_StreamConfig* p_stream_config); -const ObcTime* DSSC_get_req_tlm_cmd_tx_time(const DS_StreamConfig* p_stream_config); -const ObcTime* DSSC_get_rx_frame_fix_time(const DS_StreamConfig* p_stream_config); - -void DSSC_set_tx_frame(DS_StreamConfig* p_stream_config, - uint8_t* tx_frame); const uint8_t* DSSC_get_tx_frame(DS_StreamConfig* p_stream_config); uint8_t* DSSC_get_tx_frame_as_non_const_pointer(DS_StreamConfig* p_stream_config); +void DSSC_set_tx_frame(DS_StreamConfig* p_stream_config, + uint8_t* tx_frame); +uint16_t DSSC_get_tx_frame_size(const DS_StreamConfig* p_stream_config); void DSSC_set_tx_frame_size(DS_StreamConfig* p_stream_config, const uint16_t tx_frame_size); -uint16_t DSSC_get_tx_frame_size(const DS_StreamConfig* p_stream_config); +int16_t DSSC_get_tx_frame_buffer_size(DS_StreamConfig* p_stream_config); void DSSC_set_tx_frame_buffer_size(DS_StreamConfig* p_stream_config, const int16_t tx_frame_buffer_size); -int16_t DSSC_get_tx_frame_buffer_size(DS_StreamConfig* p_stream_config); -const uint8_t* DSSC_get_rx_frame(const DS_StreamConfig* p_stream_config); +void DSSC_set_rx_buffer(DS_StreamConfig* p_stream_config, + DS_StreamRecBuffer* rx_buffer); void DSSC_set_rx_header(DS_StreamConfig* p_stream_config, const uint8_t* rx_header, const uint16_t rx_header_size); +uint16_t DSSC_get_rx_header_size(const DS_StreamConfig* p_stream_config); void DSSC_set_rx_footer(DS_StreamConfig* p_stream_config, const uint8_t* rx_footer, const uint16_t rx_footer_size); -void DSSC_set_rx_frame_size(DS_StreamConfig* p_stream_config, - const int16_t rx_frame_size); -uint16_t DSSC_get_rx_header_size(const DS_StreamConfig* p_stream_config); uint16_t DSSC_get_rx_footer_size(const DS_StreamConfig* p_stream_config); int16_t DSSC_get_rx_frame_size(const DS_StreamConfig* p_stream_config); +void DSSC_set_rx_frame_size(DS_StreamConfig* p_stream_config, + const int16_t rx_frame_size); +uint16_t DSSC_get_max_rx_frame_size(const DS_StreamConfig* p_stream_config); +void DSSC_set_max_rx_frame_size(DS_StreamConfig* p_stream_config, + const uint16_t max_rx_frame_size); void DSSC_set_rx_framelength_pos(DS_StreamConfig* p_stream_config, const int16_t rx_framelength_pos); @@ -520,6 +604,8 @@ void DSSC_set_rx_framelength_type_size(DS_StreamConfig* p_stream_config, const uint16_t rx_framelength_type_size); void DSSC_set_rx_framelength_offset(DS_StreamConfig* p_stream_config, const uint16_t rx_framelength_offset); +void DSSC_set_rx_framelength_endian(DS_StreamConfig* p_stream_config, + const ENDIAN_TYPE rx_framelength_endian); uint8_t DSSC_get_should_monitor_for_tlm_disruption(const DS_StreamConfig* p_stream_config); void DSSC_enable_monitor_for_tlm_disruption(DS_StreamConfig* p_stream_config); @@ -527,33 +613,92 @@ void DSSC_disable_monitor_for_tlm_disruption(DS_StreamConfig* p_stream_config); uint32_t DSSC_get_time_threshold_for_tlm_disruption(const DS_StreamConfig* p_stream_config); void DSSC_set_time_threshold_for_tlm_disruption(DS_StreamConfig* p_stream_config, const uint32_t time_threshold_for_tlm_disruption); -DS_STREAM_TLM_DISRUPTION_STATUS_CODE DSSC_get_tlm_disruption_status(const DS_StreamConfig* p_stream_config); void DSSC_set_data_analyzer(DS_StreamConfig* p_stream_config, DS_ERR_CODE (*data_analyzer)(DS_StreamConfig* p_stream_config, void* p_driver)); + + +// ###### DS_StreamConfig Getter of Info ###### +const DS_StreamSendStatus* DSSC_get_send_status(const DS_StreamConfig* p_stream_config); +const DS_StreamRecStatus* DSSC_get_rec_status(const DS_StreamConfig* p_stream_config); + +uint32_t DSSC_get_general_cmd_tx_count(const DS_StreamConfig* p_stream_config); +uint32_t DSSC_get_req_tlm_cmd_tx_count(const DS_StreamConfig* p_stream_config); +uint32_t DSSC_get_req_tlm_cmd_tx_count_after_last_tx(const DS_StreamConfig* p_stream_config); +uint32_t DSSC_get_rx_frame_fix_count(const DS_StreamConfig* p_stream_config); + +const ObcTime* DSSC_get_general_cmd_tx_time(const DS_StreamConfig* p_stream_config); +const ObcTime* DSSC_get_req_tlm_cmd_tx_time(const DS_StreamConfig* p_stream_config); +const ObcTime* DSSC_get_rx_frame_fix_time(const DS_StreamConfig* p_stream_config); + +DS_STREAM_TLM_DISRUPTION_STATUS_CODE DSSC_get_tlm_disruption_status(const DS_StreamConfig* p_stream_config); + DS_ERR_CODE DSSC_get_ret_from_data_analyzer(const DS_StreamConfig* p_stream_config); -// ###### Driver汎用Util関数 ###### +// ###### Driver 汎用 Util 関数 ###### + +/** + * @brief DS_StreamRecBuffer に確保したメモリを与えて初期化する + * @param[out] stream_rec_buffer: 初期化する DS_StreamRecBuffer + * @param[in] buffer: 与えるメモリ領域 + * @param[in] buffer_capacity: 与えるメモリサイズ + * @return DS_ERR_CODE + */ +DS_ERR_CODE DS_init_stream_rec_buffer(DS_StreamRecBuffer* stream_rec_buffer, + uint8_t* buffer, + const uint16_t buffer_capacity); /** - * @brief DS_DRIVER_ERR_CODE から CCP_EXEC_STS への変換関数 + * @brief DS_StreamRecBuffer の要素数 DS_STREAM_MAX の配列を NULL で初期化する + * @note DS_init_streams の引数を作るのに使う + * @param[out] rx_buffers: 初期化する DS_StreamRecBuffer の配列 + * @return void + */ +void DS_nullify_stream_rec_buffers(DS_StreamRecBuffer* rx_buffers[DS_STREAM_MAX]); + +/** + * @brief DS_DRIVER_ERR_CODE から CCP_CmdRet への変換関数 * * DI から Driver の関数を呼び出したときのエラーコードの変換に用いる - * @note 汎用Util関数 + * @note 汎用 Util 関数 * @param DS_DRIVER_ERR_CODE - * @return CCP_EXEC_STS + * @return CCP_CmdRet */ -CCP_EXEC_STS DS_conv_driver_err_to_ccp_exec_sts(DS_DRIVER_ERR_CODE code); +CCP_CmdRet DS_conv_driver_err_to_ccp_cmd_ret(DS_DRIVER_ERR_CODE code); /** - * @brief DS_CMD_ERR_CODE から CCP_EXEC_STS への変換関数 + * @brief DS_CMD_ERR_CODE から CCP_CmdRet への変換関数 * * DI から Driver の関数を呼び出したときのエラーコードの変換に用いる - * @note 汎用Util関数 + * @note 汎用 Util 関数 * @param DS_CMD_ERR_CODE - * @return CCP_EXEC_STS + * @return CCP_CmdRet + */ +CCP_CmdRet DS_conv_cmd_err_to_ccp_cmd_ret(DS_CMD_ERR_CODE code); + + +// ###### Driver Stream Config 汎用 Util 関数 ###### + +/** + * @brief 確定したフレームを取得 + * @param p_stream_config[in]: DriverSuper 構造体の DS_StreamConfig + * @retval フレーム確定時: 受信フレーム先頭ポインタ + * @retval フレーム未確定時: rx_buffer_.pos_of_frame_head_candidate + * @note フレームサイズは DSSC_get_fixed_rx_frame_size で取得可能 + * @note rx_buffer_ (DS_StreamRecBuffer) には,前回確定したフレームが入っているが,次回の DS_receive 呼び出しで失われる. + * したがって,次回の DS_receive 呼び出し時までに内容を吸い出しておくこと + * @note 基本的には, rx_buffer_.pos_of_frame_head_candidate は rx_buffer_.buffer 先頭に頭出しされているはず. + * したがって,ここで取得したポインタを rx_buffer_.capacity 以上読み込まない場合は,問題ない. + */ +const uint8_t* DSSC_get_rx_frame(const DS_StreamConfig* p_stream_config); + +/** + * @brief 確定したフレームのサイズを取得 + * @param p_stream_config[in]: DriverSuper 構造体の DS_StreamConfig + * @retval フレーム確定時: 確定したフレームサイズ + * @retval フレーム未確定時: 0 */ -CCP_EXEC_STS DS_conv_cmd_err_to_ccp_exec_sts(DS_CMD_ERR_CODE code); +uint16_t DSSC_get_fixed_rx_frame_size(const DS_StreamConfig* p_stream_config); #endif diff --git a/Examples/2nd_obc_user/CMakeLists.txt b/Examples/2nd_obc_user/CMakeLists.txt index 70733adb9..4db3a125d 100644 --- a/Examples/2nd_obc_user/CMakeLists.txt +++ b/Examples/2nd_obc_user/CMakeLists.txt @@ -14,13 +14,10 @@ option(USE_SILS_MOCKUP "Use SILS mockup for build C2A with minimal user in C89 o option(BUILD_C2A_AS_SILS_FW "Build C2A as SILS firmware" ON) -# default config -set(USE_SCI_COM_WINGS ON) set(USE_ALL_C2A_CORE_APPS OFF) # Core App のターゲット追加は src_user/Applications/CMakeLists.txt で行う set(USE_ALL_C2A_CORE_TEST_APPS OFF) - if(USE_SILS_MOCKUP) set(BUILD_C2A_AS_CXX OFF) endif() diff --git a/Examples/2nd_obc_user/src/src_user/Applications/DriverInstances/di_mobc.c b/Examples/2nd_obc_user/src/src_user/Applications/DriverInstances/di_mobc.c index 215dd1328..a1cb17a16 100644 --- a/Examples/2nd_obc_user/src/src_user/Applications/DriverInstances/di_mobc.c +++ b/Examples/2nd_obc_user/src/src_user/Applications/DriverInstances/di_mobc.c @@ -8,17 +8,22 @@ #include #include #include "../../Settings/port_config.h" - -static MOBC_Driver mobc_driver_; -const MOBC_Driver* const mobc_driver = &mobc_driver_; - -static const uint8_t DI_MOBC_kMsTlmPhMaxNumOfProc_ = 4; //!< 一度に送出する最大テレメ数 +#include "../../Settings/DriverSuper/driver_buffer_define.h" static void DI_MOBC_init_(void); static void DI_MOBC_update_(void); static void DI_MOBC_ms_tlm_packet_handler_init_(void); static void DI_MOBC_ms_tlm_packet_handler_(void); +static MOBC_Driver mobc_driver_; +const MOBC_Driver* const mobc_driver = &mobc_driver_; + +// バッファ +static DS_StreamRecBuffer DI_MOBC_rx_buffer_; +static uint8_t DI_MOBC_rx_buffer_allocation_[DS_STREAM_REC_BUFFER_SIZE_DEFAULT]; + +static const uint8_t DI_MOBC_kMsTlmPhMaxNumOfProc_ = 4; //!< 一度に送出する最大テレメ数 + AppInfo DI_MOBC_update(void) { @@ -27,11 +32,21 @@ AppInfo DI_MOBC_update(void) static void DI_MOBC_init_(void) { - DS_INIT_ERR_CODE ret = MOBC_init(&mobc_driver_, PORT_CH_UART_MOBC); + DS_ERR_CODE ret1; + DS_INIT_ERR_CODE ret2; + + ret1 = DS_init_stream_rec_buffer(&DI_MOBC_rx_buffer_, + DI_MOBC_rx_buffer_allocation_, + sizeof(DI_MOBC_rx_buffer_allocation_)); + if (ret1 != DS_ERR_CODE_OK) + { + Printf("MOBC buffer init Failed ! %d \n", ret1); + } - if (ret != DS_INIT_OK) + ret2 = MOBC_init(&mobc_driver_, PORT_CH_UART_MOBC, &DI_MOBC_rx_buffer_); + if (ret2 != DS_INIT_OK) { - Printf("MOBC init Failed ! %d \n", ret); + Printf("MOBC init Failed ! %d \n", ret2); } } diff --git a/Examples/2nd_obc_user/src/src_user/Applications/UserDefined/debug_apps.c b/Examples/2nd_obc_user/src/src_user/Applications/UserDefined/debug_apps.c index abae02634..4a8a61f21 100644 --- a/Examples/2nd_obc_user/src/src_user/Applications/UserDefined/debug_apps.c +++ b/Examples/2nd_obc_user/src/src_user/Applications/UserDefined/debug_apps.c @@ -2,6 +2,7 @@ #include "debug_apps.h" #include // for NULL +#include #include #include @@ -20,7 +21,6 @@ // #include #include "../../Library/git_revision.h" #include "../../Library/vt100.h" -#include "../../Library/stdint.h" void APP_DBG_flush_screen_(void); void APP_DBG_print_time_stamp_(void); @@ -88,12 +88,13 @@ void APP_DBG_print_time_stamp_(void) void APP_DBG_print_cmd_status_(void) { VT100_erase_line(); - Printf("CMD: GS %3d, RT %3d, Ack %3d, Code 0x%02x, Sts %3d\n", + Printf("CMD: GS %3d, RT %3d, Ack %2d, ID 0x%02x, Sts %1d, EC %d\n", (PL_count_executed_nodes(&PH_gs_cmd_list) & 0xff), (PL_count_executed_nodes(&PH_rt_cmd_list) & 0xff), mobc_driver->info.c2a.ph_ack, gs_command_dispatcher->prev.code, - gs_command_dispatcher->prev.sts); + gs_command_dispatcher->prev.cmd_ret.exec_sts, + gs_command_dispatcher->prev.cmd_ret.err_code); } void APP_DBG_print_event_logger0_(void) diff --git a/Examples/2nd_obc_user/src/src_user/Drivers/Etc/mobc.c b/Examples/2nd_obc_user/src/src_user/Drivers/Etc/mobc.c index f431ce059..7fb236972 100644 --- a/Examples/2nd_obc_user/src/src_user/Drivers/Etc/mobc.c +++ b/Examples/2nd_obc_user/src/src_user/Drivers/Etc/mobc.c @@ -8,7 +8,6 @@ #include "./mobc.h" #include -#include #include #include #include @@ -24,7 +23,7 @@ static DS_ERR_CODE MOBC_analyze_rec_data_(DS_StreamConfig* p_stream_config, void* p_driver); -DS_INIT_ERR_CODE MOBC_init(MOBC_Driver* mobc_driver, uint8_t ch) +DS_INIT_ERR_CODE MOBC_init(MOBC_Driver* mobc_driver, uint8_t ch, DS_StreamRecBuffer* rx_buffer) { DS_ERR_CODE ret; @@ -38,6 +37,7 @@ DS_INIT_ERR_CODE MOBC_init(MOBC_Driver* mobc_driver, uint8_t ch) ret = DS_init(&(mobc_driver->driver.super), &(mobc_driver->driver.uart_config), + rx_buffer, MOBC_load_driver_super_init_settings_); if (ret != DS_ERR_CODE_OK) return DS_INIT_DS_INIT_ERR; return DS_INIT_OK; diff --git a/Examples/2nd_obc_user/src/src_user/Drivers/Etc/mobc.h b/Examples/2nd_obc_user/src/src_user/Drivers/Etc/mobc.h index e41e1cf8c..5077e96ca 100644 --- a/Examples/2nd_obc_user/src/src_user/Drivers/Etc/mobc.h +++ b/Examples/2nd_obc_user/src/src_user/Drivers/Etc/mobc.h @@ -77,16 +77,17 @@ typedef struct * @brief MOBC初期化 * * MOBC_Driver 構造体のポインタを渡すことでポートを初期化し, MOBC_Driver の各メンバも初期化する - * @param *mobc_driver : 初期化する MOBC_Driver 構造体へのポインタ - * @param ch : MOBCが接続されている UART ポート番号 + * @param mobc_driver: 初期化する MOBC_Driver 構造体へのポインタ + * @param ch: MOBC が接続されている UART ポート番号 + * @param rx_buffer: 受信バッファ * @return DS_INIT_ERR_CODE */ -DS_INIT_ERR_CODE MOBC_init(MOBC_Driver* mobc_driver, uint8_t ch); +DS_INIT_ERR_CODE MOBC_init(MOBC_Driver* mobc_driver, uint8_t ch, DS_StreamRecBuffer* rx_buffer); /** * @brief MOBC からのデータ( MOBC → AOBC のコマンド)受信 - * @param *mobc_driver : MOBC_Driver 構造体へのポインタ + * @param mobc_driver: MOBC_Driver 構造体へのポインタ * @return DS_REC_ERR_CODE */ DS_REC_ERR_CODE MOBC_rec(MOBC_Driver* mobc_driver); @@ -94,8 +95,8 @@ DS_REC_ERR_CODE MOBC_rec(MOBC_Driver* mobc_driver); /** * @brief MOBC へのデータ(MOBC → AOBCのテレメ)送信 - * @param *mobc_driver : MOBC_Drive r構造体へのポインタ - * @param *packet : 送信する CTP packet + * @param mobc_driver: MOBC_Driver 構造体へのポインタ + * @param packet: 送信する CTP packet * @return DS_CMD_ERR_CODE */ DS_CMD_ERR_CODE MOBC_send(MOBC_Driver* mobc_driver, const CommonTlmPacket* packet); diff --git a/Examples/2nd_obc_user/src/src_user/IfWrapper/CMakeLists.txt b/Examples/2nd_obc_user/src/src_user/IfWrapper/CMakeLists.txt index ca8e8669c..ae8bb4c18 100644 --- a/Examples/2nd_obc_user/src/src_user/IfWrapper/CMakeLists.txt +++ b/Examples/2nd_obc_user/src/src_user/IfWrapper/CMakeLists.txt @@ -12,12 +12,14 @@ if(USE_SILS_MOCKUP) #target_sources(${PROJECT_NAME} PRIVATE list(APPEND C2A_SRCS + SilsMockup/i2c_sils.c SilsMockup/uart_sils.c SilsMockup/wdt_sils.c ) else() #target_sources(${PROJECT_NAME} PUBLIC list(APPEND C2A_SRCS + Sils/i2c_sils.cpp Sils/uart_sils.cpp Sils/wdt_sils.cpp ) diff --git a/Examples/2nd_obc_user/src/src_user/IfWrapper/Sils/i2c_sils.cpp b/Examples/2nd_obc_user/src/src_user/IfWrapper/Sils/i2c_sils.cpp new file mode 100644 index 000000000..f363a1727 --- /dev/null +++ b/Examples/2nd_obc_user/src/src_user/IfWrapper/Sils/i2c_sils.cpp @@ -0,0 +1,47 @@ +#pragma section REPRO +#include + +int I2C_init(void* my_i2c_v) +{ + (void)my_i2c_v; + return 0; +} + +int I2C_rx(void* my_i2c_v, void* data_v, int buffer_size) +{ + (void*)my_i2c_v; + (void*)data_v; + (void)buffer_size; + return 0; +} + +int I2C_tx(void* my_i2c_v, void* data_v, int data_size) +{ + (void*)my_i2c_v; + (void*)data_v; + (void)data_size; + return 0; +} + +int I2C_reopen(void* my_i2c_v, int reason) +{ + (void*)my_i2c_v; + (void)reason; + return 0; +} + +void I2C_set_stop_flag(void* my_i2c_v, const unsigned char stop_flag) +{ + (void*)my_i2c_v; + (void)stop_flag; + return; +} + +void I2C_set_rx_length(void* my_i2c_v, const uint32_t rx_length) +{ + (void*)my_i2c_v; + (void)rx_length; + return; +} + +#pragma section diff --git a/Examples/2nd_obc_user/src/src_user/IfWrapper/SilsMockup/i2c_sils.c b/Examples/2nd_obc_user/src/src_user/IfWrapper/SilsMockup/i2c_sils.c new file mode 100644 index 000000000..c42ff135d --- /dev/null +++ b/Examples/2nd_obc_user/src/src_user/IfWrapper/SilsMockup/i2c_sils.c @@ -0,0 +1,47 @@ +#pragma section REPRO +#include + +int I2C_init(void* my_i2c_v) +{ + (void)my_i2c_v; + return 0; +} + +int I2C_rx(void* my_i2c_v, void* data_v, int buffer_size) +{ + (void)my_i2c_v; + (void)data_v; + (void)buffer_size; + return 0; +} + +int I2C_tx(void* my_i2c_v, void* data_v, int data_size) +{ + (void)my_i2c_v; + (void)data_v; + (void)data_size; + return 0; +} + +int I2C_reopen(void* my_i2c_v, int reason) +{ + (void)my_i2c_v; + (void)reason; + return 0; +} + +void I2C_set_stop_flag(void* my_i2c_v, const unsigned char stop_flag) +{ + (void)my_i2c_v; + (void)stop_flag; + return; +} + +void I2C_set_rx_length(void* my_i2c_v, const uint32_t rx_length) +{ + (void)my_i2c_v; + (void)rx_length; + return; +} + +#pragma section diff --git a/Examples/2nd_obc_user/src/src_user/Library/git_revision.h b/Examples/2nd_obc_user/src/src_user/Library/git_revision.h index 58703af43..9da4eabed 100644 --- a/Examples/2nd_obc_user/src/src_user/Library/git_revision.h +++ b/Examples/2nd_obc_user/src/src_user/Library/git_revision.h @@ -5,7 +5,7 @@ #ifndef GIT_REVISION_H_ #define GIT_REVISION_H_ -#include "stdint.h" +#include extern const char GIT_REV_CORE[41]; extern const uint32_t GIT_REV_CORE_SHORT; diff --git a/Examples/2nd_obc_user/src/src_user/Library/stdint.h b/Examples/2nd_obc_user/src/src_user/Library/stdint.h deleted file mode 100644 index a7de58d8b..000000000 --- a/Examples/2nd_obc_user/src/src_user/Library/stdint.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef STDINT_H_ -#define STDINT_H_ - -#include "../Settings/sils_define.h" - -// HEWや外部ライブラリヘッダーとの重複typedefをガード -#ifndef _TYPEDEFINE_H_ - -#ifndef SILS_FW -// HEWに標準ヘッダstdint.hに相当するヘッダがなかったため、必要機能を自前で定義。 -// bit幅指定の整数型をひとまず定義 - -typedef signed char int8_t; -typedef signed short int16_t; -typedef signed long int32_t; -typedef signed long long int int64_t; - -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned long uint32_t; -typedef unsigned long long int uint64_t; - -#else -#include -#endif // SILS_FW - -#endif // _TYPEDEFINE_H_ -#endif // STDINT_H_ diff --git a/Examples/2nd_obc_user/src/src_user/Settings/DriverSuper/driver_buffer_define.h b/Examples/2nd_obc_user/src/src_user/Settings/DriverSuper/driver_buffer_define.h new file mode 100644 index 000000000..03ef3305a --- /dev/null +++ b/Examples/2nd_obc_user/src/src_user/Settings/DriverSuper/driver_buffer_define.h @@ -0,0 +1,14 @@ +/** + * @file + * @brief Driver の各種バッファサイズなどの定義 + */ +#ifndef DRIVER_BUFFER_DEFINE_H_ +#define DRIVER_BUFFER_DEFINE_H_ + +#include "./driver_super_params.h" + +#define DS_STREAM_REC_BUFFER_SIZE_DEFAULT (DS_IF_RX_BUFFER_SIZE * 2) /*!< DS_StreamRecBuffer のバッファサイズのデフォルト値 + UART などの非同期通信はメモリに余力があれば DS_IF_RX_BUFFER_SIZE * 2 を推奨 + 詳細は dirver_super.c の @note を参照 */ + +#endif diff --git a/Examples/2nd_obc_user/src/src_user/Settings/Modes/Transitions/sl_initial.c b/Examples/2nd_obc_user/src/src_user/Settings/Modes/Transitions/sl_initial.c index a20129e0c..180fcf23d 100644 --- a/Examples/2nd_obc_user/src/src_user/Settings/Modes/Transitions/sl_initial.c +++ b/Examples/2nd_obc_user/src/src_user/Settings/Modes/Transitions/sl_initial.c @@ -4,7 +4,7 @@ #include "../../../TlmCmd/block_command_definitions.h" #include "../../../TlmCmd/command_definitions.h" -#include +#include #include #include diff --git a/Examples/2nd_obc_user/src/src_user/Settings/System/EventHandlerRules/event_handler_rules.h b/Examples/2nd_obc_user/src/src_user/Settings/System/EventHandlerRules/event_handler_rules.h index 6e10cad62..08a59816b 100644 --- a/Examples/2nd_obc_user/src/src_user/Settings/System/EventHandlerRules/event_handler_rules.h +++ b/Examples/2nd_obc_user/src/src_user/Settings/System/EventHandlerRules/event_handler_rules.h @@ -6,7 +6,7 @@ #define EVENT_HANDLER_RULES_H_ /** - * @enum AH_RULE_ID + * @enum EH_RULE_ID * @brief EH_Rule の ID * @note 最大数は EH_RULE_MAX で規定 * @note uint16_t を想定 diff --git a/Examples/2nd_obc_user/src/src_user/Settings/System/anomaly_logger_define.h b/Examples/2nd_obc_user/src/src_user/Settings/System/anomaly_logger_define.h deleted file mode 100644 index c794bc8d7..000000000 --- a/Examples/2nd_obc_user/src/src_user/Settings/System/anomaly_logger_define.h +++ /dev/null @@ -1,11 +0,0 @@ -/** - * @file - * @brief AL (と AH) を有効化するかどうかの定義 - * @note AL, AH は EL, EH の新規実装によって deprecated であり,基本的には使うべきではない - */ -#ifndef ANOMALY_LOGGER_DEFINE_H_ -#define ANOMALY_LOGGER_DEFINE_H_ - -// #define AL_ENABLE - -#endif diff --git a/Examples/2nd_obc_user/src/src_user/Settings/System/event_logger_group.h b/Examples/2nd_obc_user/src/src_user/Settings/System/event_logger_group.h index 0c94ac351..2e525f16d 100644 --- a/Examples/2nd_obc_user/src/src_user/Settings/System/event_logger_group.h +++ b/Examples/2nd_obc_user/src/src_user/Settings/System/event_logger_group.h @@ -14,7 +14,7 @@ */ typedef enum { - // C2A CORE: 0-19 + // C2A CORE: 0-49 // src_core/System/EventManager/event_logger.h の EL_CORE_GROUP にて定義 // とりあえず最大値は0xffに! diff --git a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/Ccsds/apid_define.c b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/Ccsds/apid_define.c index 491c21ed4..06db3e0fe 100644 --- a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/Ccsds/apid_define.c +++ b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/Ccsds/apid_define.c @@ -5,6 +5,7 @@ * @note common_tlm_cmd_packet.h などから include されることを前提 */ #include "apid_define.h" +#include "../common_tlm_packet_define.h" APID APID_get_apid_from_uint16(uint16_t apid) { @@ -30,6 +31,7 @@ int APID_is_other_obc_tlm_apid(APID apid) { switch (apid) { + // FIXME: 2nd obc の場合は変更しなければいけないが, https://github.com/ut-issl/c2a-core/issues/489 で消えるので一旦このまま case APID_AOBC_TLM: // FALLTHROUGH case APID_TOBC_TLM: return 1; diff --git a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h index faf8b6191..f715fe5e3 100644 --- a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h +++ b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h @@ -6,7 +6,7 @@ #ifndef APID_DEFINE_H_ #define APID_DEFINE_H_ -#include "../../../Library/stdint.h" +#include /** * @enum APID diff --git a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_AOBC_CMD_DB.xlsm b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_AOBC_CMD_DB.xlsm index 686b24376..7924e1c9a 100644 Binary files a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_AOBC_CMD_DB.xlsm and b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_AOBC_CMD_DB.xlsm differ diff --git a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_AOBC_CMD_DB_BCT.csv b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_AOBC_CMD_DB_BCT.csv index b8b5b2475..2c88d4f44 100644 --- a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_AOBC_CMD_DB_BCT.csv +++ b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_AOBC_CMD_DB_BCT.csv @@ -15,7 +15,7 @@ Comment,Name,ShortName,BCID,エイリアス,,,,,Danger Flag,Description,Note ,BC_AC_TLM_CMD_HIRATE,,50,,,,,,danger,, **,==== 各系領域 ====,,,,,,,,,, *,./C2A/TlmCmd/NormalBlockCommandDefinition/で定義,,,,,,,,,, -*,アノマリハンドラはBC_AH_など,接頭辞を適切につけること!,,,,,,,,,, +*,イベントハンドラはBC_EH_など,接頭辞を適切につけること!,,,,,,,,,, **,CDH:60-79,,,,,,,,,, ,BC_HK_CYCLIC_TLM,BC_HK10S,60,○,○,○,○,○,,, ,BC_RESERVED_FOR_HK,,77,,,,,,,EM電気試験でのコマンドファイルとのバッティングを防ぐ, diff --git a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_AOBC_TLM_DB.xlsm b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_AOBC_TLM_DB.xlsm index 4942a05c8..49d77c03d 100644 Binary files a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_AOBC_TLM_DB.xlsm and b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_AOBC_TLM_DB.xlsm differ diff --git a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_AOBC_TLM_DB_AOBC_AOBC.csv b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_AOBC_TLM_DB_AOBC_AOBC.csv index b212c2b40..7ee17aab9 100644 --- a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_AOBC_TLM_DB_AOBC_AOBC.csv +++ b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_AOBC_TLM_DB_AOBC_AOBC.csv @@ -19,73 +19,84 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,TM_MODE_TIME,uint32_t,(uint32_t)(TMGR_get_master_clock().mode_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,,,,,,,,モード遷移後経過時刻, ,TM_UTL_UNIXTIME_EPOCH,double,TMGR_get_utl_unixtime_epoch(),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,,,,,,,,UTL_cmdで用いるunixtimeの紀元, ,TM_CYCLES_PER_SEC_FIX_RATIO,double,(double)(time_manager->unixtime_info_.cycle_correction),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,,,,,,,,CYCLES_PER_SECの補正倍率. 初期値は1.0, ,MM_STS,uint8_t,(uint8_t)(mode_manager->stat),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,,,,,,,,モード遷移実行状態, ,MM_OPSMODE,uint8_t,(uint8_t)(mode_manager->current_id),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,,,,,,,,現状モード番号, ,MM_OPSMODE_PREV,uint8_t,(uint8_t)(mode_manager->previous_id),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,,,,,,,,直前モード番号, -,TDSP_CURRENT_ID,uint8_t,(uint8_t)(TDSP_info->task_list_id),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,,,,,,,,現状 TaskList ID, -,TDSP_CMD_LAST_ERR_TIME_MASTER,uint32_t,(uint32_t)(TDSP_info->tskd.prev_err.time.total_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,,,,,,,,最新内部コマンド実行時刻, -,TDSP_CMD_LAST_ERR_TIME_STEP,uint8_t,(uint8_t)(TDSP_info->tskd.prev_err.time.step),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,,,,,,,,, -,TDSP_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(TDSP_info->tskd.prev_err.code),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,,,,,,,,最新内部コマンドID, -,TDSP_CMD_LAST_ERR_STS,int32_t,(int32_t)(TDSP_info->tskd.prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, -,GS_CMD_COUNTER,uint32_t,PL_count_executed_nodes(&PH_gs_cmd_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,,,,,,,,地上局コマンドカウンタ, -,GS_CMD_LAST_EXEC_TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev.time.total_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,,,,,,,,最新地上局コマンド実行時刻, -,GS_CMD_LAST_EXEC_ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev.code),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,,,,,,,,最新地上局コマンドID, -,GS_CMD_LAST_EXEC_STS,int32_t,(int32_t)(gs_command_dispatcher->prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, -,GS_CMD_LAST_ERR_TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev_err.time.total_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,,,,,,,,最新地上局コマンド実行時刻, -,GS_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev_err.code),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,,,,,,,,最新地上局コマンドID, -,GS_CMD_LAST_ERR_STS,int32_t,(int32_t)(gs_command_dispatcher->prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, -,GS_CMD_ERR_COUNTER,uint32_t,(uint32_t)(gs_command_dispatcher->error_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_CMD_COUNTER,uint32_t,PL_count_executed_nodes(&PH_rt_cmd_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,,,,,,,,内部コマンドカウンタ, -,RT_CMD_LAST_EXEC_TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev.time.total_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,,,,,,,,最新内部コマンド実行時刻, -,RT_CMD_LAST_EXEC_ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev.code),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,,,,,,,,最新内部コマンドID, -,RT_CMD_LAST_EXEC_STS,int32_t,(int32_t)(realtime_command_dispatcher->prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, -,RT_CMD_LAST_ERR_TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev_err.time.total_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,,,,,,,,最新内部コマンド実行時刻, -,RT_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev_err.code),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,,,,,,,,最新内部コマンドID, -,RT_CMD_LAST_ERR_STS,int32_t,(int32_t)(realtime_command_dispatcher->prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, -,RT_CMD_ERR_COUNTER,uint32_t,(uint32_t)(realtime_command_dispatcher->error_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,,,,,,,,地上局コマンド実行異常カウンタ, +,TDSP.CURRENT_ID,uint8_t,(uint8_t)(task_dispathcer->task_list_id),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,,,,,,,,現状 TaskList ID, +,TDSP.LAST_ERR.TIME.TOTAL_CYCLE,uint32_t,(uint32_t)(task_dispathcer->tskd.prev_err.time.total_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,,,,,,,,最新内部コマンド実行時刻, +,TDSP.LAST_ERR.TIME.STEP,uint8_t,(uint8_t)(task_dispathcer->tskd.prev_err.time.step),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,,,,,,,,, +,TDSP.LAST_ERR.ID,uint16_t,(uint16_t)(task_dispathcer->tskd.prev_err.code),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,,,,,,,,最新内部コマンドID, +,TDSP.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(task_dispathcer->tskd.prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,TDSP.LAST_ERR.ERR_CODE,uint32_t,task_dispathcer->tskd.prev_err.cmd_ret.err_code,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,,,,,,,,, +,GS_CMD.COUNTER,uint32_t,PL_count_executed_nodes(&PH_gs_cmd_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,,,,,,,,地上局コマンドカウンタ, +,GS_CMD.LAST_EXEC.TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev.time.total_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,,,,,,,,最新地上局コマンド実行時刻, +,GS_CMD.LAST_EXEC.ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev.code),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,,,,,,,,最新地上局コマンドID, +,GS_CMD.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(gs_command_dispatcher->prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, +,GS_CMD.LAST_EXEC.ERR_CODE,uint32_t,gs_command_dispatcher->prev.cmd_ret.err_code,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,,,,,,,,, +,GS_CMD.LAST_ERR.TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev_err.time.total_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,,,,,,,,最新地上局コマンド実行時刻, +,GS_CMD.LAST_ERR.ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev_err.code),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,,,,,,,,最新地上局コマンドID, +,GS_CMD.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(gs_command_dispatcher->prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, +,GS_CMD.LAST_ERR.ERR_CODE,uint32_t,gs_command_dispatcher->prev_err.cmd_ret.err_code,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,,,,,,,,, +,GS_CMD.ERR_COUNTER,uint32_t,(uint32_t)(gs_command_dispatcher->error_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_CMD.COUNTER,uint32_t,PL_count_executed_nodes(&PH_rt_cmd_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,,,,,,,,内部コマンドカウンタ, +,RT_CMD.LAST_EXEC.TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev.time.total_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,,,,,,,,最新内部コマンド実行時刻, +,RT_CMD.LAST_EXEC.ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev.code),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,,,,,,,,最新内部コマンドID, +,RT_CMD.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(realtime_command_dispatcher->prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,RT_CMD.LAST_EXEC.ERR_CODE,uint32_t,realtime_command_dispatcher->prev.cmd_ret.err_code,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_CMD.LAST_ERR.TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev_err.time.total_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,,,,,,,,最新内部コマンド実行時刻, +,RT_CMD.LAST_ERR.ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev_err.code),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,,,,,,,,最新内部コマンドID, +,RT_CMD.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(realtime_command_dispatcher->prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,RT_CMD.LAST_ERR.ERR_CODE,uint32_t,realtime_command_dispatcher->prev_err.cmd_ret.err_code,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_CMD.ERR_COUNTER,uint32_t,(uint32_t)(realtime_command_dispatcher->error_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,,,,,,,,地上局コマンド実行異常カウンタ, ,TLC_GS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]),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コマンドカウンタ, ,TLC_GS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])),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登録コマンド数, -,TLC_GS.LAST_EXEC_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_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,,,,,,,,最新TL0コマンド実行時刻, -,TLC_GS.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code),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コマンドID, -,TLC_GS.LAST_EXEC_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, -,TLC_GS.LAST_ERR_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_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,,,,,,,,最新TL0コマンド実行時刻, -,TLC_GS.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code),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コマンドID, -,TLC_GS.LAST_ERR_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, -,TLC_GS.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_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,,,,,,,,地上局コマンド実行異常カウンタ, +,TLC_GS.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_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,,,,,,,,最新TL0コマンド実行時刻, +,TLC_GS.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code),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コマンドID, +,TLC_GS.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, +,TLC_GS.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.err_code,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,,,,,,,,, +,TLC_GS.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_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,,,,,,,,最新TL0コマンド実行時刻, +,TLC_GS.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code),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コマンドID, +,TLC_GS.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, +,TLC_GS.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.err_code,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,,,,,,,,, +,TLC_GS.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_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,,,,,,,,最新TL0コマンド実行異常カウンタ, ,TLC_GS.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error),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=FALSE@@ 1=TRUE,, ,TLC_GS.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout),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=FALSE:G@@ 1=TRUE:R,, ,TLC_GS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),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コマンド実行時刻,変数指定が大変なことに… ,TLC_GS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),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コマンドID,変数指定が大変なことに… ,TLC_BC.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]),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,,,,,,,,TL1コマンドカウンタ, ,TLC_BC.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])),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,,,,,,,,TL1登録コマンド数, -,TLC_BC.LAST_EXEC_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.time.total_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,,,,,,,,最新TL1コマンド実行時刻, -,TLC_BC.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.code),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,,,,,,,,最新TL1コマンドID, -,TLC_BC.LAST_EXEC_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, -,TLC_BC.LAST_ERR_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.time.total_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,,,,,,,,最新TL1コマンド実行時刻, -,TLC_BC.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.code),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,,,,,,,,最新TL1コマンドID, -,TLC_BC.LAST_ERR_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, -,TLC_BC.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].error_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,,,,,,,,地上局コマンド実行異常カウンタ, +,TLC_BC.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.time.total_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,,,,,,,,最新TL1コマンド実行時刻, +,TLC_BC.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.code),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,,,,,,,,最新TL1コマンドID, +,TLC_BC.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, +,TLC_BC.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.cmd_ret.err_code,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,,,,,,,,, +,TLC_BC.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.time.total_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,,,,,,,,最新TL1コマンド実行時刻, +,TLC_BC.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.code),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,,,,,,,,最新TL1コマンドID, +,TLC_BC.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, +,TLC_BC.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.cmd_ret.err_code,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,,,,,,,,, +,TLC_BC.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].error_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,,,,,,,,最新TL1コマンド実行異常カウンタ, ,TLC_BC.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error),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=FALSE@@ 1=TRUE,, ,TLC_BC.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout),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=FALSE:G@@ 1=TRUE:R,, ,TLC_BC.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet))),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,,,,,,,,次TL1コマンド実行時刻,変数指定が大変なことに… ,TLC_BC.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet))),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,,,,,,,,次TL1コマンドID,変数指定が大変なことに… -,TLC_TLM.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]),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,,,,,,,,TL1コマンドカウンタ, -,TLC_TLM.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])),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,,,,,,,,TL1登録コマンド数, -,TLC_TLM.LAST_EXEC_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.time.total_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,,,,,,,,最新TL1コマンド実行時刻, -,TLC_TLM.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.code),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,,,,,,,,最新TL1コマンドID, -,TLC_TLM.LAST_EXEC_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, -,TLC_TLM.LAST_ERR_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.time.total_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,,,,,,,,最新TL1コマンド実行時刻, -,TLC_TLM.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.code),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,,,,,,,,最新TL1コマンドID, -,TLC_TLM.LAST_ERR_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, -,TLC_TLM.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].error_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,,,,,,,,地上局コマンド実行異常カウンタ, +,TLC_TLM.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]),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,,,,,,,,TL2コマンドカウンタ, +,TLC_TLM.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])),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,,,,,,,,TL2登録コマンド数, +,TLC_TLM.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.time.total_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,,,,,,,,最新TL2コマンド実行時刻, +,TLC_TLM.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.code),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,,,,,,,,最新TL2コマンドID, +,TLC_TLM.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL2コマンド実行結果, +,TLC_TLM.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.cmd_ret.err_code,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,,,,,,,,, +,TLC_TLM.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.time.total_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,,,,,,,,最新TL2コマンド実行時刻, +,TLC_TLM.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.code),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,,,,,,,,最新TL2コマンドID, +,TLC_TLM.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL2コマンド実行結果, +,TLC_TLM.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.cmd_ret.err_code,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,,,,,,,,, +,TLC_TLM.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].error_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,,,,,,,,最新TL2実行異常カウンタ, ,TLC_TLM.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error),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=FALSE@@ 1=TRUE,, ,TLC_TLM.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout),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=FALSE:G@@ 1=TRUE:R,, -,TLC_TLM.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet))),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,,,,,,,,次TL1コマンド実行時刻,変数指定が大変なことに… -,TLC_TLM.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet))),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,,,,,,,,次TL1コマンドID,変数指定が大変なことに… +,TLC_TLM.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet))),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,,,,,,,,次TL2コマンド実行時刻,変数指定が大変なことに… +,TLC_TLM.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet))),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,,,,,,,,次TL2コマンドID,変数指定が大変なことに… ,BCT_BLK_PTR,uint8_t,(uint8_t)(block_command_table->pos.block),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_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 登録コマンド時刻,変数指定が大変なことに… @@ -487,14 +498,3 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, diff --git a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_AOBC_TLM_DB_AOBC_HK.csv b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_AOBC_TLM_DB_AOBC_HK.csv index 0f449d558..2ad81d093 100644 --- a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_AOBC_TLM_DB_AOBC_HK.csv +++ b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_AOBC_TLM_DB_AOBC_HK.csv @@ -19,56 +19,65 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, -,OBC_TM_MODE_TIME,uint32_t,TMGR_get_master_clock().mode_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,,,,,,,,, -,OBC_TM_UNIXTIME_AT_TI0,double,TMGR_get_unixtime_at_ti0(),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,,,,,,,,, -,OBC_MM_OPSMODE,uint8_t,(uint8_t)(mode_manager->current_id),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=START_UP@@1=INITIAL@@2=GND_TEST@@3=WDFAR@@4=RTC_HIGH_RATE@@5=5@@6=6@@7=7@@8=8@@9=9@@10=10@@11=11@@12=12@@13=13@@14=14@@15=15@@16=MAX@@*=N/A,, -,OBC_MM_STS,uint8_t,(uint8_t)( ((uint8_t)(mode_manager->stat) << 7 & 0x80) | ((uint8_t)(mode_manager->previous_id) & 0x7F) ),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=FINISHED@@1=PROGRESS@@*=N/A,, -,OBC_MM_OPSMODE_PREV,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),7,STATUS,,,,,,,0=START_UP@@1=INITIAL@@2=GND_TEST@@3=WDFAR@@4=RTC_HIGH_RATE@@5=5@@6=6@@7=7@@8=8@@9=9@@10=10@@11=11@@12=12@@13=13@@14=14@@15=15@@16=MAX@@*=N/A,, -,OBC_TDSP_CURRENT_ID,uint16_t,TDSP_info->task_list_id,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,,,,,,,,, -,OBC_GS_CMD_COUNTER,uint32_t,PL_count_executed_nodes(&PH_gs_cmd_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,,,,,,,,地上局コマンドカウンタ, -,OBC_GS_CMD_LAST_EXEC_TIME,uint32_t,gs_command_dispatcher->prev.time.total_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,,,,,,,,最新地上局コマンド実行時刻, -,OBC_GS_CMD_LAST_EXEC_ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev.code),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,,,,,,,,最新地上局コマンドID, -,OBC_GS_CMD_LAST_EXEC_STS,int8_t,(int8_t)(gs_command_dispatcher->prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, -,OBC_GS_CMD_LAST_ERR_TIME,uint32_t,gs_command_dispatcher->prev_err.time.total_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,,,,,,,,地上局異常コマンド実行時刻, -,OBC_GS_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev_err.code),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,,,,,,,,地上局異常コマンドID, -,OBC_GS_CMD_LAST_ERR_STS,int8_t,(int8_t)(gs_command_dispatcher->prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,地上局異常コマンド実行結果, -,OBC_RT_CMD_COUNTER,uint32_t,PL_count_executed_nodes(&PH_rt_cmd_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,,,,,,,,内部コマンドカウンタ, -,OBC_RT_CMD_LAST_EXEC_TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev.time.total_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,,,,,,,,最新内部コマンド実行時刻, -,OBC_RT_CMD_LAST_EXEC_ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev.code),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,,,,,,,,最新内部コマンドID, -,OBC_RT_CMD_LAST_EXEC_STS,int32_t,(int32_t)(realtime_command_dispatcher->prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, -,OBC_RT_CMD_LAST_ERR_TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev_err.time.total_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,,,,,,,,最新内部コマンド実行時刻, -,OBC_RT_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev_err.code),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,,,,,,,,最新内部コマンドID, -,OBC_RT_CMD_LAST_ERR_STS,int32_t,(int32_t)(realtime_command_dispatcher->prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, -,OBC_TLC_GS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]),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,,,,,,,,バス用TLのコマンドカウンタ, -,OBC_TLC_GS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])),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,,,,,,,,バス用TLの登録コマンド数, -,OBC_TLC_GS.LAST_EXEC_TIME,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_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,,,,,,,,バス用TLの最新コマンド実行時刻, -,OBC_TLC_GS.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code),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,,,,,,,,バス用TLの最新コマンドID, -,OBC_TLC_GS.LAST_EXEC_STS,int8_t,(int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,バス用TLの最新コマンド実行結果, -,OBC_TLC_GS.LAST_ERR_TIME,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_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,,,,,,,,バス用TLの異常コマンド実行時刻, -,OBC_TLC_GS.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code),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,,,,,,,,バス用TLの異常コマンドID, -,OBC_TLC_GS.LAST_ERR_STS,int8_t,(int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,バス用TLの異常コマンド実行結果, -,OBC_TLC_GS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),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,,,,,,,,バス用TLの次コマンド実行時刻,変数指定が大変なことに… -,OBC_TLC_GS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),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,,,,,,,,バス用TLの次コマンドID,変数指定が大変なことに… -,OBC_TLC_BC.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]),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,,,,,,,,BC用TLのコマンドカウンタ, -,OBC_TLC_BC.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])),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,,,,,,,,BC用TLの登録コマンド数, -,OBC_TLC_TLM.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]),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,,,,,,,,テレメ用TLのコマンドカウンタ, -,OBC_TLC_TLM.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])),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,,,,,,,,テレメ用TLの登録コマンド数, -,OBC_TLC_GS.SOE_FLAG,uint8_t,(uint8_t)(((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error << 7 & 0x80) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout << 6 & 0x40) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error << 5 & 0x20) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout << 4 & 0x10) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error << 3 & 0x08) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout << 2 & 0x04) | (0 << 1 & 0x02) | (0 & 0x01) ),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,OBC_TLC_GS.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),1,STATUS,,,,,,,0=NO@@ 1=YES,, -,OBC_TLC_BC.SOE_FLAG,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,OBC_TLC_BC.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),1,STATUS,,,,,,,0=NO@@ 1=YES,, -,OBC_TLC_TLM.SOE_FLAG,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,OBC_TLC_TLM.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),1,STATUS,,,,,,,0=NO@@ 1=YES,, -*,OBC_TLC_MIS.SOE_FLAG,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -*,OBC_TLC_MIS.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),1,STATUS,,,,,,,0=NO@@ 1=YES,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, +,OBC.TM_MODE_TIME,uint32_t,TMGR_get_master_clock().mode_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,,,,,,,,, +,OBC.TM_UNIXTIME_AT_TI0,double,TMGR_get_unixtime_at_ti0(),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,,,,,,,,, +,OBC.MM_OPSMODE,uint8_t,(uint8_t)(mode_manager->current_id),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=START_UP@@1=INITIAL@@2=GND_TEST@@3=WDFAR@@4=RTC_HIGH_RATE@@5=5@@6=6@@7=7@@8=8@@9=9@@10=10@@11=11@@12=12@@13=13@@14=14@@15=15@@16=MAX@@*=N/A,, +,OBC.MM_STS,uint8_t,(uint8_t)( ((uint8_t)(mode_manager->stat) << 7 & 0x80) | ((uint8_t)(mode_manager->previous_id) & 0x7F) ),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=FINISHED@@1=PROGRESS@@*=N/A,, +,OBC.MM_OPSMODE_PREV,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),7,STATUS,,,,,,,0=START_UP@@1=INITIAL@@2=GND_TEST@@3=WDFAR@@4=RTC_HIGH_RATE@@5=5@@6=6@@7=7@@8=8@@9=9@@10=10@@11=11@@12=12@@13=13@@14=14@@15=15@@16=MAX@@*=N/A,, +,OBC.TDSP.CURRENT_ID,uint16_t,task_dispathcer->task_list_id,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,,,,,,,,, +,OBC.GS_CMD.COUNTER,uint32_t,PL_count_executed_nodes(&PH_gs_cmd_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,,,,,,,,地上局コマンドカウンタ, +,OBC.GS_CMD.LAST_EXEC.TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev.time.total_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,,,,,,,,最新地上局コマンド実行時刻, +,OBC.GS_CMD.LAST_EXEC.ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev.code),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,,,,,,,,最新地上局コマンドID, +,OBC.GS_CMD.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(gs_command_dispatcher->prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, +,OBC.GS_CMD.LAST_EXEC.ERR_CODE,uint32_t,gs_command_dispatcher->prev.cmd_ret.err_code,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,,,,,,,,, +,OBC.GS_CMD.LAST_ERR.TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev_err.time.total_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,,,,,,,,最新地上局コマンド実行時刻, +,OBC.GS_CMD.LAST_ERR.ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev_err.code),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,,,,,,,,最新地上局コマンドID, +,OBC.GS_CMD.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(gs_command_dispatcher->prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, +,OBC.GS_CMD.LAST_ERR.ERR_CODE,uint32_t,gs_command_dispatcher->prev_err.cmd_ret.err_code,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,,,,,,,,, +,OBC.GS_CMD.ERR_COUNTER,uint32_t,(uint32_t)(gs_command_dispatcher->error_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,,,,,,,,地上局コマンド実行異常カウンタ, +,OBC.RT_CMD.COUNTER,uint32_t,PL_count_executed_nodes(&PH_rt_cmd_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,,,,,,,,内部コマンドカウンタ, +,OBC.RT_CMD.LAST_EXEC.TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev.time.total_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,,,,,,,,最新内部コマンド実行時刻, +,OBC.RT_CMD.LAST_EXEC.ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev.code),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,,,,,,,,最新内部コマンドID, +,OBC.RT_CMD.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(realtime_command_dispatcher->prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,OBC.RT_CMD.LAST_ERR.ERR_CODE,uint32_t,realtime_command_dispatcher->prev.cmd_ret.err_code,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,,,,,,,,, +,OBC.RT_CMD.LAST_ERR.TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev_err.time.total_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,,,,,,,,最新内部コマンド実行時刻, +,OBC.RT_CMD.LAST_ERR.ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev_err.code),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,,,,,,,,最新内部コマンドID, +,OBC.RT_CMD.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(realtime_command_dispatcher->prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,OBC.RT_CMD.LAST_EXEC.ERR_CODE,uint32_t,realtime_command_dispatcher->prev_err.cmd_ret.err_code,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,,,,,,,,, +,OBC.RT_CMD.ERR_COUNTER,uint32_t,(uint32_t)(realtime_command_dispatcher->error_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,,,,,,,,地上局コマンド実行異常カウンタ, +,OBC.TLC_GS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]),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コマンドカウンタ, +,OBC.TLC_GS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])),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登録コマンド数, +,OBC.TLC_GS.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_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,,,,,,,,最新TL0コマンド実行時刻, +,OBC.TLC_GS.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code),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コマンドID, +,OBC.TLC_GS.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, +,OBC.TLC_GS.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.err_code,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,,,,,,,,, +,OBC.TLC_GS.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_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,,,,,,,,最新TL0コマンド実行時刻, +,OBC.TLC_GS.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code),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コマンドID, +,OBC.TLC_GS.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, +,OBC.TLC_GS.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.err_code,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,,,,,,,,, +,OBC.TLC_GS.ERR_COUNTER,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_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,,,,,,,,最新TL0コマンド実行異常カウンタ, +,OBC.TLC_GS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),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コマンド実行時刻,変数指定が大変なことに… +,OBC.TLC_GS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),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コマンドID,変数指定が大変なことに… +,OBC.TLC_BC.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]),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,,,,,,,,TL1コマンドカウンタ, +,OBC.TLC_BC.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])),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,,,,,,,,TL1登録コマンド数, +,OBC.TLC_TLM.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]),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,,,,,,,,TL2コマンドカウンタ, +,OBC.TLC_TLM.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])),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,,,,,,,,TL2登録コマンド数, +,OBC.TLC_GS.SOE_FLAG,uint8_t,(uint8_t)(((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error << 7 & 0x80) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout << 6 & 0x40) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error << 5 & 0x20) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout << 4 & 0x10) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error << 3 & 0x08) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout << 2 & 0x04) | (0 << 1 & 0x02) | (0 & 0x01) ),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,OBC.TLC_GS.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),1,STATUS,,,,,,,0=NO@@ 1=YES,, +,OBC.TLC_BC.SOE_FLAG,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,OBC.TLC_BC.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),1,STATUS,,,,,,,0=NO@@ 1=YES,, +,OBC.TLC_TLM.SOE_FLAG,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,OBC.TLC_TLM.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),1,STATUS,,,,,,,0=NO@@ 1=YES,, +*,OBC.TLC_MIS.SOE_FLAG,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +*,OBC.TLC_MIS.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),1,STATUS,,,,,,,0=NO@@ 1=YES,, ,WDT.IS_ENABLE,uint8_t,(uint8_t)((wdt_config->is_wdt_enable << 7 & 0x80) | (wdt_config->is_clear_enable << 6 & 0x40) | 0x00),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, ,WDT.IS_CLEAR_ENABLE,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, ,DUMMY_DATA0,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),6,NONE,,,,,,,,, -,OBC_BCT_BLK_PTR,uint16_t,block_command_table->pos.block,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 ブロックポインタ, -,OBC_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 コマンドポインタ, -,OBC_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 登録コマンド時刻,変数指定が大変なことに… -,OBC_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,変数指定が大変なことに… +,OBC.BCT_BLK_PTR,uint16_t,block_command_table->pos.block,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 ブロックポインタ, +,OBC.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 コマンドポインタ, +,OBC.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 登録コマンド時刻,変数指定が大変なことに… +,OBC.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,変数指定が大変なことに… ,EL.STATISTICS.RECORD_COUNTER_TOTAL,uint32_t,event_logger->statistics.record_counter_total,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,,,,,,,,, ,EL.STATISTICS.RECORD_COUNTERS_HIGH,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_HIGH],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,,,,,,,,,データサイズ減らすためにu16 ,EL.STATISTICS.RECORD_COUNTERS_MIDDLE,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_MIDDLE],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,,,,,,,,,データサイズ減らすためにu16 @@ -87,7 +96,6 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,EL.LATEST_HIGH_EVENT.TIME.STEP,uint8_t,(uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->time.step,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,,,,,,,,, ,EL.LATEST_HIGH_EVENT.NOTE,uint16_t,(uint16_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->note,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,,,,,,,,,u8にしてもよい ,EH.LOG_TABLE.RESPOND_COUNTER,uint32_t,event_handler->log_table.respond_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,,,,,,,,, -,OBC_GS_CMD_ERR_COUNTER,uint8_t,(uint8_t)(gs_command_dispatcher->error_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,,,,,,,,アノマリ対応発生回数, ,GIT_REV_CORE,uint32_t,GIT_REV_CORE_SHORT,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)))),HEX,,,,,,,,, ,GIT_REV_USER,uint32_t,GIT_REV_USER_SHORT,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)))),HEX,,,,,,,,, ,BCT_BLK_PTR,uint8_t,(uint8_t)(block_command_table->pos.block),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 ブロックポインタ, @@ -145,15 +153,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,DUMMY_DATA49,uint32_t,0,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,,,,,,,,, ,DUMMY_DATA50,uint32_t,0,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,,,,,,,,, ,DUMMY_DATA51,uint32_t,0,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,,,,,,,,, -,DUMMY_DATA52,uint32_t,0,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,,,,,,,,, -,DUMMY_DATA53,uint32_t,0,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,,,,,,,,, -,DUMMY_DATA54,uint32_t,0,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,,,,,,,,, -,DUMMY_DATA55,uint32_t,0,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,,,,,,,,, -,DUMMY_DATA56,uint32_t,0,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,,,,,,,,, -,DUMMY_DATA57,uint32_t,0,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,,,,,,,,, -,DUMMY_DATA58,uint32_t,0,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,,,,,,,,, -,DUMMY_DATA59,uint32_t,0,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,,,,,,,,, -,DUMMY_DATA60,uint32_t,0,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/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_AOBC_TLM_DB_AOBC_AOBC.csv b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_AOBC_TLM_DB_AOBC_AOBC.csv index e351ac257..a0da44590 100644 --- a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_AOBC_TLM_DB_AOBC_AOBC.csv +++ b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_AOBC_TLM_DB_AOBC_AOBC.csv @@ -19,90 +19,90 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,TM_MODE_TIME,uint32_t,(uint32_t)(TMGR_get_master_clock().mode_cycle),PACKET,26,0,32,NONE,,,,,,,,モード遷移後経過時刻, ,TM_UTL_UNIXTIME_EPOCH,double,TMGR_get_utl_unixtime_epoch(),PACKET,30,0,64,NONE,,,,,,,,UTL_cmdで用いるunixtimeの紀元, ,TM_CYCLES_PER_SEC_FIX_RATIO,double,(double)(time_manager->unixtime_info_.cycle_correction),PACKET,38,0,64,NONE,,,,,,,,CYCLES_PER_SECの補正倍率. 初期値は1.0, ,MM_STS,uint8_t,(uint8_t)(mode_manager->stat),PACKET,46,0,8,NONE,,,,,,,,モード遷移実行状態, ,MM_OPSMODE,uint8_t,(uint8_t)(mode_manager->current_id),PACKET,47,0,8,NONE,,,,,,,,現状モード番号, ,MM_OPSMODE_PREV,uint8_t,(uint8_t)(mode_manager->previous_id),PACKET,48,0,8,NONE,,,,,,,,直前モード番号, -,TDSP_CURRENT_ID,uint8_t,(uint8_t)(TDSP_info->task_list_id),PACKET,49,0,8,NONE,,,,,,,,現状 TaskList ID, -,TDSP_CMD_LAST_ERR_TIME_MASTER,uint32_t,(uint32_t)(TDSP_info->tskd.prev_err.time.total_cycle),PACKET,50,0,32,NONE,,,,,,,,最新内部コマンド実行時刻, -,TDSP_CMD_LAST_ERR_TIME_STEP,uint8_t,(uint8_t)(TDSP_info->tskd.prev_err.time.step),PACKET,54,0,8,NONE,,,,,,,,, -,TDSP_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(TDSP_info->tskd.prev_err.code),PACKET,55,0,16,NONE,,,,,,,,最新内部コマンドID, -,TDSP_CMD_LAST_ERR_STS,int32_t,(int32_t)(TDSP_info->tskd.prev_err.sts),PACKET,57,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, -,GS_CMD_COUNTER,uint32_t,PL_count_executed_nodes(&PH_gs_cmd_list),PACKET,61,0,32,NONE,,,,,,,,地上局コマンドカウンタ, -,GS_CMD_LAST_EXEC_TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev.time.total_cycle),PACKET,65,0,32,NONE,,,,,,,,最新地上局コマンド実行時刻, -,GS_CMD_LAST_EXEC_ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev.code),PACKET,69,0,16,NONE,,,,,,,,最新地上局コマンドID, -,GS_CMD_LAST_EXEC_STS,int32_t,(int32_t)(gs_command_dispatcher->prev.sts),PACKET,71,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, -,GS_CMD_LAST_ERR_TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev_err.time.total_cycle),PACKET,75,0,32,NONE,,,,,,,,最新地上局コマンド実行時刻, -,GS_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev_err.code),PACKET,79,0,16,NONE,,,,,,,,最新地上局コマンドID, -,GS_CMD_LAST_ERR_STS,int32_t,(int32_t)(gs_command_dispatcher->prev_err.sts),PACKET,81,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, -,GS_CMD_ERR_COUNTER,uint32_t,(uint32_t)(gs_command_dispatcher->error_counter),PACKET,85,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, -,RT_CMD_COUNTER,uint32_t,PL_count_executed_nodes(&PH_rt_cmd_list),PACKET,89,0,32,NONE,,,,,,,,内部コマンドカウンタ, -,RT_CMD_LAST_EXEC_TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev.time.total_cycle),PACKET,93,0,32,NONE,,,,,,,,最新内部コマンド実行時刻, -,RT_CMD_LAST_EXEC_ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev.code),PACKET,97,0,16,NONE,,,,,,,,最新内部コマンドID, -,RT_CMD_LAST_EXEC_STS,int32_t,(int32_t)(realtime_command_dispatcher->prev.sts),PACKET,99,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, -,RT_CMD_LAST_ERR_TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev_err.time.total_cycle),PACKET,103,0,32,NONE,,,,,,,,最新内部コマンド実行時刻, -,RT_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev_err.code),PACKET,107,0,16,NONE,,,,,,,,最新内部コマンドID, -,RT_CMD_LAST_ERR_STS,int32_t,(int32_t)(realtime_command_dispatcher->prev_err.sts),PACKET,109,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, -,RT_CMD_ERR_COUNTER,uint32_t,(uint32_t)(realtime_command_dispatcher->error_counter),PACKET,113,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, -,TLC_GS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]),PACKET,117,0,32,NONE,,,,,,,,TL0コマンドカウンタ, -,TLC_GS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])),PACKET,121,0,8,NONE,,,,,,,,TL0登録コマンド数, -,TLC_GS.LAST_EXEC_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_cycle),PACKET,122,0,32,NONE,,,,,,,,最新TL0コマンド実行時刻, -,TLC_GS.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code),PACKET,126,0,16,NONE,,,,,,,,最新TL0コマンドID, -,TLC_GS.LAST_EXEC_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.sts),PACKET,128,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, -,TLC_GS.LAST_ERR_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_cycle),PACKET,132,0,32,NONE,,,,,,,,最新TL0コマンド実行時刻, -,TLC_GS.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code),PACKET,136,0,16,NONE,,,,,,,,最新TL0コマンドID, -,TLC_GS.LAST_ERR_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.sts),PACKET,138,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, -,TLC_GS.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_counter),PACKET,142,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, -,TLC_GS.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error),PACKET,146,0,8,STATUS,,,,,,,0=FALSE@@ 1=TRUE,, -,TLC_GS.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout),PACKET,147,0,8,STATUS,,,,,,,0=FALSE:G@@ 1=TRUE:R,, -,TLC_GS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),PACKET,148,0,32,NONE,,,,,,,,次TL0コマンド実行時刻,変数指定が大変なことに… -,TLC_GS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),PACKET,152,0,16,NONE,,,,,,,,次TL0コマンドID,変数指定が大変なことに… -,TLC_BC.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]),PACKET,154,0,32,NONE,,,,,,,,TL1コマンドカウンタ, -,TLC_BC.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])),PACKET,158,0,8,NONE,,,,,,,,TL1登録コマンド数, -,TLC_BC.LAST_EXEC_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.time.total_cycle),PACKET,159,0,32,NONE,,,,,,,,最新TL1コマンド実行時刻, -,TLC_BC.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.code),PACKET,163,0,16,NONE,,,,,,,,最新TL1コマンドID, -,TLC_BC.LAST_EXEC_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.sts),PACKET,165,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, -,TLC_BC.LAST_ERR_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.time.total_cycle),PACKET,169,0,32,NONE,,,,,,,,最新TL1コマンド実行時刻, -,TLC_BC.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.code),PACKET,173,0,16,NONE,,,,,,,,最新TL1コマンドID, -,TLC_BC.LAST_ERR_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.sts),PACKET,175,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, -,TLC_BC.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].error_counter),PACKET,179,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, -,TLC_BC.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error),PACKET,183,0,8,STATUS,,,,,,,0=FALSE@@ 1=TRUE,, -,TLC_BC.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout),PACKET,184,0,8,STATUS,,,,,,,0=FALSE:G@@ 1=TRUE:R,, -,TLC_BC.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet))),PACKET,185,0,32,NONE,,,,,,,,次TL1コマンド実行時刻,変数指定が大変なことに… -,TLC_BC.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet))),PACKET,189,0,16,NONE,,,,,,,,次TL1コマンドID,変数指定が大変なことに… -,TLC_TLM.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]),PACKET,191,0,32,NONE,,,,,,,,TL1コマンドカウンタ, -,TLC_TLM.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])),PACKET,195,0,8,NONE,,,,,,,,TL1登録コマンド数, -,TLC_TLM.LAST_EXEC_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.time.total_cycle),PACKET,196,0,32,NONE,,,,,,,,最新TL1コマンド実行時刻, -,TLC_TLM.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.code),PACKET,200,0,16,NONE,,,,,,,,最新TL1コマンドID, -,TLC_TLM.LAST_EXEC_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.sts),PACKET,202,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, -,TLC_TLM.LAST_ERR_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.time.total_cycle),PACKET,206,0,32,NONE,,,,,,,,最新TL1コマンド実行時刻, -,TLC_TLM.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.code),PACKET,210,0,16,NONE,,,,,,,,最新TL1コマンドID, -,TLC_TLM.LAST_ERR_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.sts),PACKET,212,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, -,TLC_TLM.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].error_counter),PACKET,216,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, -,TLC_TLM.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error),PACKET,220,0,8,STATUS,,,,,,,0=FALSE@@ 1=TRUE,, -,TLC_TLM.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout),PACKET,221,0,8,STATUS,,,,,,,0=FALSE:G@@ 1=TRUE:R,, -,TLC_TLM.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet))),PACKET,222,0,32,NONE,,,,,,,,次TL1コマンド実行時刻,変数指定が大変なことに… -,TLC_TLM.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet))),PACKET,226,0,16,NONE,,,,,,,,次TL1コマンドID,変数指定が大変なことに… -,BCT_BLK_PTR,uint8_t,(uint8_t)(block_command_table->pos.block),PACKET,228,0,8,NONE,,,,,,,,BCT ブロックポインタ, -,BCT_CMD_PTR,uint8_t,(uint8_t)(block_command_table->pos.cmd),PACKET,229,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,230,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,234,0,16,NONE,,,,,,,,BCT 登録コマンドID,変数指定が大変なことに… -,MS_TLM_COUNTER,uint32_t,PL_count_executed_nodes(&PH_ms_tlm_list),PACKET,236,0,32,NONE,,,,,,,,TL0コマンドカウンタ, -,MS_TLM_QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_ms_tlm_list)),PACKET,240,0,8,NONE,,,,,,,,TL0登録コマンド数, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, +,TDSP.CURRENT_ID,uint8_t,(uint8_t)(task_dispathcer->task_list_id),PACKET,49,0,8,NONE,,,,,,,,現状 TaskList ID, +,TDSP.LAST_ERR.TIME.TOTAL_CYCLE,uint32_t,(uint32_t)(task_dispathcer->tskd.prev_err.time.total_cycle),PACKET,50,0,32,NONE,,,,,,,,最新内部コマンド実行時刻, +,TDSP.LAST_ERR.TIME.STEP,uint8_t,(uint8_t)(task_dispathcer->tskd.prev_err.time.step),PACKET,54,0,8,NONE,,,,,,,,, +,TDSP.LAST_ERR.ID,uint16_t,(uint16_t)(task_dispathcer->tskd.prev_err.code),PACKET,55,0,16,NONE,,,,,,,,最新内部コマンドID, +,TDSP.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(task_dispathcer->tskd.prev_err.cmd_ret.exec_sts),PACKET,57,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,TDSP.LAST_ERR.ERR_CODE,uint32_t,task_dispathcer->tskd.prev_err.cmd_ret.err_code,PACKET,58,0,32,NONE,,,,,,,,, +,GS_CMD.COUNTER,uint32_t,PL_count_executed_nodes(&PH_gs_cmd_list),PACKET,62,0,32,NONE,,,,,,,,地上局コマンドカウンタ, +,GS_CMD.LAST_EXEC.TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev.time.total_cycle),PACKET,66,0,32,NONE,,,,,,,,最新地上局コマンド実行時刻, +,GS_CMD.LAST_EXEC.ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev.code),PACKET,70,0,16,NONE,,,,,,,,最新地上局コマンドID, +,GS_CMD.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(gs_command_dispatcher->prev.cmd_ret.exec_sts),PACKET,72,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, +,GS_CMD.LAST_EXEC.ERR_CODE,uint32_t,gs_command_dispatcher->prev.cmd_ret.err_code,PACKET,73,0,32,NONE,,,,,,,,, +,GS_CMD.LAST_ERR.TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev_err.time.total_cycle),PACKET,77,0,32,NONE,,,,,,,,最新地上局コマンド実行時刻, +,GS_CMD.LAST_ERR.ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev_err.code),PACKET,81,0,16,NONE,,,,,,,,最新地上局コマンドID, +,GS_CMD.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(gs_command_dispatcher->prev_err.cmd_ret.exec_sts),PACKET,83,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, +,GS_CMD.LAST_ERR.ERR_CODE,uint32_t,gs_command_dispatcher->prev_err.cmd_ret.err_code,PACKET,84,0,32,NONE,,,,,,,,, +,GS_CMD.ERR_COUNTER,uint32_t,(uint32_t)(gs_command_dispatcher->error_counter),PACKET,88,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, +,RT_CMD.COUNTER,uint32_t,PL_count_executed_nodes(&PH_rt_cmd_list),PACKET,92,0,32,NONE,,,,,,,,内部コマンドカウンタ, +,RT_CMD.LAST_EXEC.TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev.time.total_cycle),PACKET,96,0,32,NONE,,,,,,,,最新内部コマンド実行時刻, +,RT_CMD.LAST_EXEC.ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev.code),PACKET,100,0,16,NONE,,,,,,,,最新内部コマンドID, +,RT_CMD.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(realtime_command_dispatcher->prev.cmd_ret.exec_sts),PACKET,102,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,RT_CMD.LAST_EXEC.ERR_CODE,uint32_t,realtime_command_dispatcher->prev.cmd_ret.err_code,PACKET,103,0,32,NONE,,,,,,,,, +,RT_CMD.LAST_ERR.TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev_err.time.total_cycle),PACKET,107,0,32,NONE,,,,,,,,最新内部コマンド実行時刻, +,RT_CMD.LAST_ERR.ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev_err.code),PACKET,111,0,16,NONE,,,,,,,,最新内部コマンドID, +,RT_CMD.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(realtime_command_dispatcher->prev_err.cmd_ret.exec_sts),PACKET,113,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,RT_CMD.LAST_ERR.ERR_CODE,uint32_t,realtime_command_dispatcher->prev_err.cmd_ret.err_code,PACKET,114,0,32,NONE,,,,,,,,, +,RT_CMD.ERR_COUNTER,uint32_t,(uint32_t)(realtime_command_dispatcher->error_counter),PACKET,118,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, +,TLC_GS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]),PACKET,122,0,32,NONE,,,,,,,,TL0コマンドカウンタ, +,TLC_GS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])),PACKET,126,0,8,NONE,,,,,,,,TL0登録コマンド数, +,TLC_GS.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_cycle),PACKET,127,0,32,NONE,,,,,,,,最新TL0コマンド実行時刻, +,TLC_GS.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code),PACKET,131,0,16,NONE,,,,,,,,最新TL0コマンドID, +,TLC_GS.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.exec_sts),PACKET,133,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, +,TLC_GS.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.err_code,PACKET,134,0,32,NONE,,,,,,,,, +,TLC_GS.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_cycle),PACKET,138,0,32,NONE,,,,,,,,最新TL0コマンド実行時刻, +,TLC_GS.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code),PACKET,142,0,16,NONE,,,,,,,,最新TL0コマンドID, +,TLC_GS.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.exec_sts),PACKET,144,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, +,TLC_GS.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.err_code,PACKET,145,0,32,NONE,,,,,,,,, +,TLC_GS.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_counter),PACKET,149,0,32,NONE,,,,,,,,最新TL0コマンド実行異常カウンタ, +,TLC_GS.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error),PACKET,153,0,8,STATUS,,,,,,,0=FALSE@@ 1=TRUE,, +,TLC_GS.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout),PACKET,154,0,8,STATUS,,,,,,,0=FALSE:G@@ 1=TRUE:R,, +,TLC_GS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),PACKET,155,0,32,NONE,,,,,,,,次TL0コマンド実行時刻,変数指定が大変なことに… +,TLC_GS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),PACKET,159,0,16,NONE,,,,,,,,次TL0コマンドID,変数指定が大変なことに… +,TLC_BC.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]),PACKET,161,0,32,NONE,,,,,,,,TL1コマンドカウンタ, +,TLC_BC.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])),PACKET,165,0,8,NONE,,,,,,,,TL1登録コマンド数, +,TLC_BC.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.time.total_cycle),PACKET,166,0,32,NONE,,,,,,,,最新TL1コマンド実行時刻, +,TLC_BC.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.code),PACKET,170,0,16,NONE,,,,,,,,最新TL1コマンドID, +,TLC_BC.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.cmd_ret.exec_sts),PACKET,172,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, +,TLC_BC.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.cmd_ret.err_code,PACKET,173,0,32,NONE,,,,,,,,, +,TLC_BC.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.time.total_cycle),PACKET,177,0,32,NONE,,,,,,,,最新TL1コマンド実行時刻, +,TLC_BC.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.code),PACKET,181,0,16,NONE,,,,,,,,最新TL1コマンドID, +,TLC_BC.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.cmd_ret.exec_sts),PACKET,183,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, +,TLC_BC.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.cmd_ret.err_code,PACKET,184,0,32,NONE,,,,,,,,, +,TLC_BC.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].error_counter),PACKET,188,0,32,NONE,,,,,,,,最新TL1コマンド実行異常カウンタ, +,TLC_BC.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error),PACKET,192,0,8,STATUS,,,,,,,0=FALSE@@ 1=TRUE,, +,TLC_BC.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout),PACKET,193,0,8,STATUS,,,,,,,0=FALSE:G@@ 1=TRUE:R,, +,TLC_BC.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet))),PACKET,194,0,32,NONE,,,,,,,,次TL1コマンド実行時刻,変数指定が大変なことに… +,TLC_BC.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet))),PACKET,198,0,16,NONE,,,,,,,,次TL1コマンドID,変数指定が大変なことに… +,TLC_TLM.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]),PACKET,200,0,32,NONE,,,,,,,,TL2コマンドカウンタ, +,TLC_TLM.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])),PACKET,204,0,8,NONE,,,,,,,,TL2登録コマンド数, +,TLC_TLM.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.time.total_cycle),PACKET,205,0,32,NONE,,,,,,,,最新TL2コマンド実行時刻, +,TLC_TLM.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.code),PACKET,209,0,16,NONE,,,,,,,,最新TL2コマンドID, +,TLC_TLM.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.cmd_ret.exec_sts),PACKET,211,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL2コマンド実行結果, +,TLC_TLM.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.cmd_ret.err_code,PACKET,212,0,32,NONE,,,,,,,,, +,TLC_TLM.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.time.total_cycle),PACKET,216,0,32,NONE,,,,,,,,最新TL2コマンド実行時刻, +,TLC_TLM.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.code),PACKET,220,0,16,NONE,,,,,,,,最新TL2コマンドID, +,TLC_TLM.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.cmd_ret.exec_sts),PACKET,222,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL2コマンド実行結果, +,TLC_TLM.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.cmd_ret.err_code,PACKET,223,0,32,NONE,,,,,,,,, +,TLC_TLM.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].error_counter),PACKET,227,0,32,NONE,,,,,,,,最新TL2実行異常カウンタ, +,TLC_TLM.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error),PACKET,231,0,8,STATUS,,,,,,,0=FALSE@@ 1=TRUE,, +,TLC_TLM.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout),PACKET,232,0,8,STATUS,,,,,,,0=FALSE:G@@ 1=TRUE:R,, +,TLC_TLM.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet))),PACKET,233,0,32,NONE,,,,,,,,次TL2コマンド実行時刻,変数指定が大変なことに… +,TLC_TLM.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet))),PACKET,237,0,16,NONE,,,,,,,,次TL2コマンドID,変数指定が大変なことに… +,BCT_BLK_PTR,uint8_t,(uint8_t)(block_command_table->pos.block),PACKET,239,0,8,NONE,,,,,,,,BCT ブロックポインタ, +,BCT_CMD_PTR,uint8_t,(uint8_t)(block_command_table->pos.cmd),PACKET,240,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,241,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,245,0,16,NONE,,,,,,,,BCT 登録コマンドID,変数指定が大変なことに… +,MS_TLM_COUNTER,uint32_t,PL_count_executed_nodes(&PH_ms_tlm_list),PACKET,247,0,32,NONE,,,,,,,,TL0コマンドカウンタ, +,MS_TLM_QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_ms_tlm_list)),PACKET,251,0,8,NONE,,,,,,,,TL0登録コマンド数, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, diff --git a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_AOBC_TLM_DB_AOBC_HK.csv b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_AOBC_TLM_DB_AOBC_HK.csv index 053c8342e..1fbb40a50 100644 --- a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_AOBC_TLM_DB_AOBC_HK.csv +++ b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_AOBC_TLM_DB_AOBC_HK.csv @@ -19,141 +19,141 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, -,OBC_TM_MODE_TIME,uint32_t,TMGR_get_master_clock().mode_cycle,PACKET,26,0,32,NONE,,,,,,,,, -,OBC_TM_UNIXTIME_AT_TI0,double,TMGR_get_unixtime_at_ti0(),PACKET,30,0,64,NONE,,,,,,,,, -,OBC_MM_OPSMODE,uint8_t,(uint8_t)(mode_manager->current_id),PACKET,38,0,8,STATUS,,,,,,,0=START_UP@@1=INITIAL@@2=GND_TEST@@3=WDFAR@@4=RTC_HIGH_RATE@@5=5@@6=6@@7=7@@8=8@@9=9@@10=10@@11=11@@12=12@@13=13@@14=14@@15=15@@16=MAX@@*=N/A,, -,OBC_MM_STS,uint8_t,(uint8_t)( ((uint8_t)(mode_manager->stat) << 7 & 0x80) | ((uint8_t)(mode_manager->previous_id) & 0x7F) ),PACKET,39,0,1,STATUS,,,,,,,0=FINISHED@@1=PROGRESS@@*=N/A,, -,OBC_MM_OPSMODE_PREV,,,PACKET,39,1,7,STATUS,,,,,,,0=START_UP@@1=INITIAL@@2=GND_TEST@@3=WDFAR@@4=RTC_HIGH_RATE@@5=5@@6=6@@7=7@@8=8@@9=9@@10=10@@11=11@@12=12@@13=13@@14=14@@15=15@@16=MAX@@*=N/A,, -,OBC_TDSP_CURRENT_ID,uint16_t,TDSP_info->task_list_id,PACKET,40,0,16,NONE,,,,,,,,, -,OBC_GS_CMD_COUNTER,uint32_t,PL_count_executed_nodes(&PH_gs_cmd_list),PACKET,42,0,32,NONE,,,,,,,,地上局コマンドカウンタ, -,OBC_GS_CMD_LAST_EXEC_TIME,uint32_t,gs_command_dispatcher->prev.time.total_cycle,PACKET,46,0,32,NONE,,,,,,,,最新地上局コマンド実行時刻, -,OBC_GS_CMD_LAST_EXEC_ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev.code),PACKET,50,0,16,NONE,,,,,,,,最新地上局コマンドID, -,OBC_GS_CMD_LAST_EXEC_STS,int8_t,(int8_t)(gs_command_dispatcher->prev.sts),PACKET,52,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, -,OBC_GS_CMD_LAST_ERR_TIME,uint32_t,gs_command_dispatcher->prev_err.time.total_cycle,PACKET,53,0,32,NONE,,,,,,,,地上局異常コマンド実行時刻, -,OBC_GS_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev_err.code),PACKET,57,0,16,NONE,,,,,,,,地上局異常コマンドID, -,OBC_GS_CMD_LAST_ERR_STS,int8_t,(int8_t)(gs_command_dispatcher->prev_err.sts),PACKET,59,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,地上局異常コマンド実行結果, -,OBC_RT_CMD_COUNTER,uint32_t,PL_count_executed_nodes(&PH_rt_cmd_list),PACKET,60,0,32,NONE,,,,,,,,内部コマンドカウンタ, -,OBC_RT_CMD_LAST_EXEC_TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev.time.total_cycle),PACKET,64,0,32,NONE,,,,,,,,最新内部コマンド実行時刻, -,OBC_RT_CMD_LAST_EXEC_ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev.code),PACKET,68,0,16,NONE,,,,,,,,最新内部コマンドID, -,OBC_RT_CMD_LAST_EXEC_STS,int32_t,(int32_t)(realtime_command_dispatcher->prev.sts),PACKET,70,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, -,OBC_RT_CMD_LAST_ERR_TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev_err.time.total_cycle),PACKET,74,0,32,NONE,,,,,,,,最新内部コマンド実行時刻, -,OBC_RT_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev_err.code),PACKET,78,0,16,NONE,,,,,,,,最新内部コマンドID, -,OBC_RT_CMD_LAST_ERR_STS,int32_t,(int32_t)(realtime_command_dispatcher->prev_err.sts),PACKET,80,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, -,OBC_TLC_GS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]),PACKET,84,0,32,NONE,,,,,,,,バス用TLのコマンドカウンタ, -,OBC_TLC_GS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])),PACKET,88,0,8,NONE,,,,,,,,バス用TLの登録コマンド数, -,OBC_TLC_GS.LAST_EXEC_TIME,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_cycle,PACKET,89,0,32,NONE,,,,,,,,バス用TLの最新コマンド実行時刻, -,OBC_TLC_GS.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code),PACKET,93,0,16,NONE,,,,,,,,バス用TLの最新コマンドID, -,OBC_TLC_GS.LAST_EXEC_STS,int8_t,(int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.sts),PACKET,95,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,バス用TLの最新コマンド実行結果, -,OBC_TLC_GS.LAST_ERR_TIME,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_cycle,PACKET,96,0,32,NONE,,,,,,,,バス用TLの異常コマンド実行時刻, -,OBC_TLC_GS.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code),PACKET,100,0,16,NONE,,,,,,,,バス用TLの異常コマンドID, -,OBC_TLC_GS.LAST_ERR_STS,int8_t,(int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.sts),PACKET,102,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,バス用TLの異常コマンド実行結果, -,OBC_TLC_GS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),PACKET,103,0,32,NONE,,,,,,,,バス用TLの次コマンド実行時刻,変数指定が大変なことに… -,OBC_TLC_GS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),PACKET,107,0,16,NONE,,,,,,,,バス用TLの次コマンドID,変数指定が大変なことに… -,OBC_TLC_BC.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]),PACKET,109,0,32,NONE,,,,,,,,BC用TLのコマンドカウンタ, -,OBC_TLC_BC.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])),PACKET,113,0,8,NONE,,,,,,,,BC用TLの登録コマンド数, -,OBC_TLC_TLM.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]),PACKET,114,0,32,NONE,,,,,,,,テレメ用TLのコマンドカウンタ, -,OBC_TLC_TLM.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])),PACKET,118,0,8,NONE,,,,,,,,テレメ用TLの登録コマンド数, -,OBC_TLC_GS.SOE_FLAG,uint8_t,(uint8_t)(((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error << 7 & 0x80) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout << 6 & 0x40) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error << 5 & 0x20) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout << 4 & 0x10) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error << 3 & 0x08) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout << 2 & 0x04) | (0 << 1 & 0x02) | (0 & 0x01) ),PACKET,119,0,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,OBC_TLC_GS.LOCKOUT_FLAG,,,PACKET,119,1,1,STATUS,,,,,,,0=NO@@ 1=YES,, -,OBC_TLC_BC.SOE_FLAG,,,PACKET,119,2,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,OBC_TLC_BC.LOCKOUT_FLAG,,,PACKET,119,3,1,STATUS,,,,,,,0=NO@@ 1=YES,, -,OBC_TLC_TLM.SOE_FLAG,,,PACKET,119,4,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,OBC_TLC_TLM.LOCKOUT_FLAG,,,PACKET,119,5,1,STATUS,,,,,,,0=NO@@ 1=YES,, -*,OBC_TLC_MIS.SOE_FLAG,,,PACKET,119,6,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -*,OBC_TLC_MIS.LOCKOUT_FLAG,,,PACKET,119,7,1,STATUS,,,,,,,0=NO@@ 1=YES,, -,WDT.IS_ENABLE,uint8_t,(uint8_t)((wdt_config->is_wdt_enable << 7 & 0x80) | (wdt_config->is_clear_enable << 6 & 0x40) | 0x00),PACKET,120,0,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,WDT.IS_CLEAR_ENABLE,,,PACKET,120,1,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,DUMMY_DATA0,,,PACKET,120,2,6,NONE,,,,,,,,, -,OBC_BCT_BLK_PTR,uint16_t,block_command_table->pos.block,PACKET,121,0,16,NONE,,,,,,,,BCT ブロックポインタ, -,OBC_BCT_CMD_PTR,uint8_t,(uint8_t)(block_command_table->pos.cmd),PACKET,123,0,8,NONE,,,,,,,,BCT コマンドポインタ, -,OBC_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,124,0,32,NONE,,,,,,,,BCT 登録コマンド時刻,変数指定が大変なことに… -,OBC_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,128,0,16,NONE,,,,,,,,BCT 登録コマンドID,変数指定が大変なことに… -,EL.STATISTICS.RECORD_COUNTER_TOTAL,uint32_t,event_logger->statistics.record_counter_total,PACKET,130,0,32,NONE,,,,,,,,, -,EL.STATISTICS.RECORD_COUNTERS_HIGH,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_HIGH],PACKET,134,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 -,EL.STATISTICS.RECORD_COUNTERS_MIDDLE,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_MIDDLE],PACKET,136,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 -,EL.STATISTICS.RECORD_COUNTERS_LOW,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_LOW],PACKET,138,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 -,EL.STATISTICS.RECORD_COUNTERS_EL,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_EL],PACKET,140,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 -,EL.STATISTICS.RECORD_COUNTERS_EH,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_EH],PACKET,142,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 -,EL.LATEST_EVENT.GROUP,uint8_t,(uint8_t)event_logger->latest_event.group,PACKET,144,0,8,NONE,,,,,,,,, -,EL.LATEST_EVENT.LOCAL,uint32_t,event_logger->latest_event.local,PACKET,145,0,32,NONE,,,,,,,,, -,EL.LATEST_EVENT.ERR_LEVEL,uint8_t,(uint8_t)event_logger->latest_event.err_level,PACKET,149,0,8,STATUS,,,,,,,0=HIGH@@ 1=MIDDLE@@ 2=LOW@@ 3=EL@@ 4=EH@@ *=N/A,, -,EL.LATEST_EVENT.TIME.TOTAL_CYCLE,uint32_t,event_logger->latest_event.time.total_cycle,PACKET,150,0,32,NONE,,,,,,,,, -,EL.LATEST_EVENT.TIME.STEP,uint8_t,(uint8_t)event_logger->latest_event.time.step,PACKET,154,0,8,NONE,,,,,,,,, -,EL.LATEST_EVENT.NOTE,uint32_t,event_logger->latest_event.note,PACKET,155,0,32,NONE,,,,,,,,,u8にしてもよい -,EL.LATEST_HIGH_EVENT.GROUP,uint8_t,(uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->group,PACKET,159,0,8,NONE,,,,,,,,, -,EL.LATEST_HIGH_EVENT.LOCAL,uint32_t,EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->local,PACKET,160,0,32,NONE,,,,,,,,, -,EL.LATEST_HIGH_EVENT.TIME.TOTAL_CYCLE,uint32_t,EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->time.total_cycle,PACKET,164,0,32,NONE,,,,,,,,, -,EL.LATEST_HIGH_EVENT.TIME.STEP,uint8_t,(uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->time.step,PACKET,168,0,8,NONE,,,,,,,,, -,EL.LATEST_HIGH_EVENT.NOTE,uint16_t,(uint16_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->note,PACKET,169,0,16,NONE,,,,,,,,,u8にしてもよい -,EH.LOG_TABLE.RESPOND_COUNTER,uint32_t,event_handler->log_table.respond_counter,PACKET,171,0,32,NONE,,,,,,,,, -,OBC_GS_CMD_ERR_COUNTER,uint8_t,(uint8_t)(gs_command_dispatcher->error_counter),PACKET,175,0,8,NONE,,,,,,,,アノマリ対応発生回数, -,GIT_REV_CORE,uint32_t,GIT_REV_CORE_SHORT,PACKET,176,0,32,HEX,,,,,,,,, -,GIT_REV_USER,uint32_t,GIT_REV_USER_SHORT,PACKET,180,0,32,HEX,,,,,,,,, -,BCT_BLK_PTR,uint8_t,(uint8_t)(block_command_table->pos.block),PACKET,184,0,8,NONE,,,,,,,,BCT ブロックポインタ, -,BCT_CMD_PTR,uint8_t,(uint8_t)(block_command_table->pos.cmd),PACKET,185,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,186,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,190,0,16,NONE,,,,,,,,BCT 登録コマンドID, -,DUMMY_DATA1,uint32_t,0,PACKET,192,0,32,NONE,,,,,,,,, -,DUMMY_DATA2,uint32_t,0,PACKET,196,0,32,NONE,,,,,,,,, -,DUMMY_DATA3,uint32_t,0,PACKET,200,0,32,NONE,,,,,,,,, -,DUMMY_DATA4,uint32_t,0,PACKET,204,0,32,NONE,,,,,,,,, -,DUMMY_DATA5,uint32_t,0,PACKET,208,0,32,NONE,,,,,,,,, -,DUMMY_DATA6,uint32_t,0,PACKET,212,0,32,NONE,,,,,,,,, -,DUMMY_DATA7,uint32_t,0,PACKET,216,0,32,NONE,,,,,,,,, -,DUMMY_DATA8,uint32_t,0,PACKET,220,0,32,NONE,,,,,,,,, -,DUMMY_DATA9,uint32_t,0,PACKET,224,0,32,NONE,,,,,,,,, -,DUMMY_DATA10,uint32_t,0,PACKET,228,0,32,NONE,,,,,,,,, -,DUMMY_DATA11,uint32_t,0,PACKET,232,0,32,NONE,,,,,,,,, -,DUMMY_DATA12,uint32_t,0,PACKET,236,0,32,NONE,,,,,,,,, -,DUMMY_DATA13,uint32_t,0,PACKET,240,0,32,NONE,,,,,,,,, -,DUMMY_DATA14,uint32_t,0,PACKET,244,0,32,NONE,,,,,,,,, -,DUMMY_DATA15,uint32_t,0,PACKET,248,0,32,NONE,,,,,,,,, -,DUMMY_DATA16,uint32_t,0,PACKET,252,0,32,NONE,,,,,,,,, -,DUMMY_DATA17,uint32_t,0,PACKET,256,0,32,NONE,,,,,,,,, -,DUMMY_DATA18,uint32_t,0,PACKET,260,0,32,NONE,,,,,,,,, -,DUMMY_DATA19,uint32_t,0,PACKET,264,0,32,NONE,,,,,,,,, -,DUMMY_DATA20,uint32_t,0,PACKET,268,0,32,NONE,,,,,,,,, -,DUMMY_DATA21,uint32_t,0,PACKET,272,0,32,NONE,,,,,,,,, -,DUMMY_DATA22,uint32_t,0,PACKET,276,0,32,NONE,,,,,,,,, -,DUMMY_DATA23,uint32_t,0,PACKET,280,0,32,NONE,,,,,,,,, -,DUMMY_DATA24,uint32_t,0,PACKET,284,0,32,NONE,,,,,,,,, -,DUMMY_DATA25,uint32_t,0,PACKET,288,0,32,NONE,,,,,,,,, -,DUMMY_DATA26,uint32_t,0,PACKET,292,0,32,NONE,,,,,,,,, -,DUMMY_DATA27,uint32_t,0,PACKET,296,0,32,NONE,,,,,,,,, -,DUMMY_DATA28,uint32_t,0,PACKET,300,0,32,NONE,,,,,,,,, -,DUMMY_DATA29,uint32_t,0,PACKET,304,0,32,NONE,,,,,,,,, -,DUMMY_DATA30,uint32_t,0,PACKET,308,0,32,NONE,,,,,,,,, -,DUMMY_DATA31,uint32_t,0,PACKET,312,0,32,NONE,,,,,,,,, -,DUMMY_DATA32,uint32_t,0,PACKET,316,0,32,NONE,,,,,,,,, -,DUMMY_DATA33,uint32_t,0,PACKET,320,0,32,NONE,,,,,,,,, -,DUMMY_DATA34,uint32_t,0,PACKET,324,0,32,NONE,,,,,,,,, -,DUMMY_DATA35,uint32_t,0,PACKET,328,0,32,NONE,,,,,,,,, -,DUMMY_DATA36,uint32_t,0,PACKET,332,0,32,NONE,,,,,,,,, -,DUMMY_DATA37,uint32_t,0,PACKET,336,0,32,NONE,,,,,,,,, -,DUMMY_DATA38,uint32_t,0,PACKET,340,0,32,NONE,,,,,,,,, -,DUMMY_DATA39,uint32_t,0,PACKET,344,0,32,NONE,,,,,,,,, -,DUMMY_DATA40,uint32_t,0,PACKET,348,0,32,NONE,,,,,,,,, -,DUMMY_DATA41,uint32_t,0,PACKET,352,0,32,NONE,,,,,,,,, -,DUMMY_DATA42,uint32_t,0,PACKET,356,0,32,NONE,,,,,,,,, -,DUMMY_DATA43,uint32_t,0,PACKET,360,0,32,NONE,,,,,,,,, -,DUMMY_DATA44,uint32_t,0,PACKET,364,0,32,NONE,,,,,,,,, -,DUMMY_DATA45,uint32_t,0,PACKET,368,0,32,NONE,,,,,,,,, -,DUMMY_DATA46,uint32_t,0,PACKET,372,0,32,NONE,,,,,,,,, -,DUMMY_DATA47,uint32_t,0,PACKET,376,0,32,NONE,,,,,,,,, -,DUMMY_DATA48,uint32_t,0,PACKET,380,0,32,NONE,,,,,,,,, -,DUMMY_DATA49,uint32_t,0,PACKET,384,0,32,NONE,,,,,,,,, -,DUMMY_DATA50,uint32_t,0,PACKET,388,0,32,NONE,,,,,,,,, -,DUMMY_DATA51,uint32_t,0,PACKET,392,0,32,NONE,,,,,,,,, -,DUMMY_DATA52,uint32_t,0,PACKET,396,0,32,NONE,,,,,,,,, -,DUMMY_DATA53,uint32_t,0,PACKET,400,0,32,NONE,,,,,,,,, -,DUMMY_DATA54,uint32_t,0,PACKET,404,0,32,NONE,,,,,,,,, -,DUMMY_DATA55,uint32_t,0,PACKET,408,0,32,NONE,,,,,,,,, -,DUMMY_DATA56,uint32_t,0,PACKET,412,0,32,NONE,,,,,,,,, -,DUMMY_DATA57,uint32_t,0,PACKET,416,0,32,NONE,,,,,,,,, -,DUMMY_DATA58,uint32_t,0,PACKET,420,0,32,NONE,,,,,,,,, -,DUMMY_DATA59,uint32_t,0,PACKET,424,0,32,NONE,,,,,,,,, -,DUMMY_DATA60,uint32_t,0,PACKET,428,0,32,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,OBC.TM_MODE_TIME,uint32_t,TMGR_get_master_clock().mode_cycle,PACKET,26,0,32,NONE,,,,,,,,, +,OBC.TM_UNIXTIME_AT_TI0,double,TMGR_get_unixtime_at_ti0(),PACKET,30,0,64,NONE,,,,,,,,, +,OBC.MM_OPSMODE,uint8_t,(uint8_t)(mode_manager->current_id),PACKET,38,0,8,STATUS,,,,,,,0=START_UP@@1=INITIAL@@2=GND_TEST@@3=WDFAR@@4=RTC_HIGH_RATE@@5=5@@6=6@@7=7@@8=8@@9=9@@10=10@@11=11@@12=12@@13=13@@14=14@@15=15@@16=MAX@@*=N/A,, +,OBC.MM_STS,uint8_t,(uint8_t)( ((uint8_t)(mode_manager->stat) << 7 & 0x80) | ((uint8_t)(mode_manager->previous_id) & 0x7F) ),PACKET,39,0,1,STATUS,,,,,,,0=FINISHED@@1=PROGRESS@@*=N/A,, +,OBC.MM_OPSMODE_PREV,,,PACKET,39,1,7,STATUS,,,,,,,0=START_UP@@1=INITIAL@@2=GND_TEST@@3=WDFAR@@4=RTC_HIGH_RATE@@5=5@@6=6@@7=7@@8=8@@9=9@@10=10@@11=11@@12=12@@13=13@@14=14@@15=15@@16=MAX@@*=N/A,, +,OBC.TDSP.CURRENT_ID,uint16_t,task_dispathcer->task_list_id,PACKET,40,0,16,NONE,,,,,,,,, +,OBC.GS_CMD.COUNTER,uint32_t,PL_count_executed_nodes(&PH_gs_cmd_list),PACKET,42,0,32,NONE,,,,,,,,地上局コマンドカウンタ, +,OBC.GS_CMD.LAST_EXEC.TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev.time.total_cycle),PACKET,46,0,32,NONE,,,,,,,,最新地上局コマンド実行時刻, +,OBC.GS_CMD.LAST_EXEC.ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev.code),PACKET,50,0,16,NONE,,,,,,,,最新地上局コマンドID, +,OBC.GS_CMD.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(gs_command_dispatcher->prev.cmd_ret.exec_sts),PACKET,52,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, +,OBC.GS_CMD.LAST_EXEC.ERR_CODE,uint32_t,gs_command_dispatcher->prev.cmd_ret.err_code,PACKET,53,0,32,NONE,,,,,,,,, +,OBC.GS_CMD.LAST_ERR.TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev_err.time.total_cycle),PACKET,57,0,32,NONE,,,,,,,,最新地上局コマンド実行時刻, +,OBC.GS_CMD.LAST_ERR.ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev_err.code),PACKET,61,0,16,NONE,,,,,,,,最新地上局コマンドID, +,OBC.GS_CMD.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(gs_command_dispatcher->prev_err.cmd_ret.exec_sts),PACKET,63,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, +,OBC.GS_CMD.LAST_ERR.ERR_CODE,uint32_t,gs_command_dispatcher->prev_err.cmd_ret.err_code,PACKET,64,0,32,NONE,,,,,,,,, +,OBC.GS_CMD.ERR_COUNTER,uint32_t,(uint32_t)(gs_command_dispatcher->error_counter),PACKET,68,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, +,OBC.RT_CMD.COUNTER,uint32_t,PL_count_executed_nodes(&PH_rt_cmd_list),PACKET,72,0,32,NONE,,,,,,,,内部コマンドカウンタ, +,OBC.RT_CMD.LAST_EXEC.TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev.time.total_cycle),PACKET,76,0,32,NONE,,,,,,,,最新内部コマンド実行時刻, +,OBC.RT_CMD.LAST_EXEC.ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev.code),PACKET,80,0,16,NONE,,,,,,,,最新内部コマンドID, +,OBC.RT_CMD.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(realtime_command_dispatcher->prev.cmd_ret.exec_sts),PACKET,82,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,OBC.RT_CMD.LAST_ERR.ERR_CODE,uint32_t,realtime_command_dispatcher->prev.cmd_ret.err_code,PACKET,83,0,32,NONE,,,,,,,,, +,OBC.RT_CMD.LAST_ERR.TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev_err.time.total_cycle),PACKET,87,0,32,NONE,,,,,,,,最新内部コマンド実行時刻, +,OBC.RT_CMD.LAST_ERR.ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev_err.code),PACKET,91,0,16,NONE,,,,,,,,最新内部コマンドID, +,OBC.RT_CMD.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(realtime_command_dispatcher->prev_err.cmd_ret.exec_sts),PACKET,93,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,OBC.RT_CMD.LAST_EXEC.ERR_CODE,uint32_t,realtime_command_dispatcher->prev_err.cmd_ret.err_code,PACKET,94,0,32,NONE,,,,,,,,, +,OBC.RT_CMD.ERR_COUNTER,uint32_t,(uint32_t)(realtime_command_dispatcher->error_counter),PACKET,98,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, +,OBC.TLC_GS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]),PACKET,102,0,32,NONE,,,,,,,,TL0コマンドカウンタ, +,OBC.TLC_GS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])),PACKET,106,0,8,NONE,,,,,,,,TL0登録コマンド数, +,OBC.TLC_GS.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_cycle),PACKET,107,0,32,NONE,,,,,,,,最新TL0コマンド実行時刻, +,OBC.TLC_GS.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code),PACKET,111,0,16,NONE,,,,,,,,最新TL0コマンドID, +,OBC.TLC_GS.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.exec_sts),PACKET,113,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, +,OBC.TLC_GS.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.err_code,PACKET,114,0,32,NONE,,,,,,,,, +,OBC.TLC_GS.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_cycle),PACKET,118,0,32,NONE,,,,,,,,最新TL0コマンド実行時刻, +,OBC.TLC_GS.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code),PACKET,122,0,16,NONE,,,,,,,,最新TL0コマンドID, +,OBC.TLC_GS.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.exec_sts),PACKET,124,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, +,OBC.TLC_GS.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.err_code,PACKET,125,0,32,NONE,,,,,,,,, +,OBC.TLC_GS.ERR_COUNTER,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_counter),PACKET,129,0,8,NONE,,,,,,,,最新TL0コマンド実行異常カウンタ, +,OBC.TLC_GS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),PACKET,130,0,32,NONE,,,,,,,,次TL0コマンド実行時刻,変数指定が大変なことに… +,OBC.TLC_GS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),PACKET,134,0,16,NONE,,,,,,,,次TL0コマンドID,変数指定が大変なことに… +,OBC.TLC_BC.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]),PACKET,136,0,32,NONE,,,,,,,,TL1コマンドカウンタ, +,OBC.TLC_BC.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])),PACKET,140,0,8,NONE,,,,,,,,TL1登録コマンド数, +,OBC.TLC_TLM.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]),PACKET,141,0,32,NONE,,,,,,,,TL2コマンドカウンタ, +,OBC.TLC_TLM.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])),PACKET,145,0,8,NONE,,,,,,,,TL2登録コマンド数, +,OBC.TLC_GS.SOE_FLAG,uint8_t,(uint8_t)(((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error << 7 & 0x80) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout << 6 & 0x40) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error << 5 & 0x20) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout << 4 & 0x10) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error << 3 & 0x08) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout << 2 & 0x04) | (0 << 1 & 0x02) | (0 & 0x01) ),PACKET,146,0,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,OBC.TLC_GS.LOCKOUT_FLAG,,,PACKET,146,1,1,STATUS,,,,,,,0=NO@@ 1=YES,, +,OBC.TLC_BC.SOE_FLAG,,,PACKET,146,2,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,OBC.TLC_BC.LOCKOUT_FLAG,,,PACKET,146,3,1,STATUS,,,,,,,0=NO@@ 1=YES,, +,OBC.TLC_TLM.SOE_FLAG,,,PACKET,146,4,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,OBC.TLC_TLM.LOCKOUT_FLAG,,,PACKET,146,5,1,STATUS,,,,,,,0=NO@@ 1=YES,, +*,OBC.TLC_MIS.SOE_FLAG,,,PACKET,146,6,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +*,OBC.TLC_MIS.LOCKOUT_FLAG,,,PACKET,146,7,1,STATUS,,,,,,,0=NO@@ 1=YES,, +,WDT.IS_ENABLE,uint8_t,(uint8_t)((wdt_config->is_wdt_enable << 7 & 0x80) | (wdt_config->is_clear_enable << 6 & 0x40) | 0x00),PACKET,147,0,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,WDT.IS_CLEAR_ENABLE,,,PACKET,147,1,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,DUMMY_DATA0,,,PACKET,147,2,6,NONE,,,,,,,,, +,OBC.BCT_BLK_PTR,uint16_t,block_command_table->pos.block,PACKET,148,0,16,NONE,,,,,,,,BCT ブロックポインタ, +,OBC.BCT_CMD_PTR,uint8_t,(uint8_t)(block_command_table->pos.cmd),PACKET,150,0,8,NONE,,,,,,,,BCT コマンドポインタ, +,OBC.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,151,0,32,NONE,,,,,,,,BCT 登録コマンド時刻,変数指定が大変なことに… +,OBC.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,155,0,16,NONE,,,,,,,,BCT 登録コマンドID,変数指定が大変なことに… +,EL.STATISTICS.RECORD_COUNTER_TOTAL,uint32_t,event_logger->statistics.record_counter_total,PACKET,157,0,32,NONE,,,,,,,,, +,EL.STATISTICS.RECORD_COUNTERS_HIGH,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_HIGH],PACKET,161,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 +,EL.STATISTICS.RECORD_COUNTERS_MIDDLE,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_MIDDLE],PACKET,163,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 +,EL.STATISTICS.RECORD_COUNTERS_LOW,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_LOW],PACKET,165,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 +,EL.STATISTICS.RECORD_COUNTERS_EL,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_EL],PACKET,167,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 +,EL.STATISTICS.RECORD_COUNTERS_EH,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_EH],PACKET,169,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 +,EL.LATEST_EVENT.GROUP,uint8_t,(uint8_t)event_logger->latest_event.group,PACKET,171,0,8,NONE,,,,,,,,, +,EL.LATEST_EVENT.LOCAL,uint32_t,event_logger->latest_event.local,PACKET,172,0,32,NONE,,,,,,,,, +,EL.LATEST_EVENT.ERR_LEVEL,uint8_t,(uint8_t)event_logger->latest_event.err_level,PACKET,176,0,8,STATUS,,,,,,,0=HIGH@@ 1=MIDDLE@@ 2=LOW@@ 3=EL@@ 4=EH@@ *=N/A,, +,EL.LATEST_EVENT.TIME.TOTAL_CYCLE,uint32_t,event_logger->latest_event.time.total_cycle,PACKET,177,0,32,NONE,,,,,,,,, +,EL.LATEST_EVENT.TIME.STEP,uint8_t,(uint8_t)event_logger->latest_event.time.step,PACKET,181,0,8,NONE,,,,,,,,, +,EL.LATEST_EVENT.NOTE,uint32_t,event_logger->latest_event.note,PACKET,182,0,32,NONE,,,,,,,,,u8にしてもよい +,EL.LATEST_HIGH_EVENT.GROUP,uint8_t,(uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->group,PACKET,186,0,8,NONE,,,,,,,,, +,EL.LATEST_HIGH_EVENT.LOCAL,uint32_t,EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->local,PACKET,187,0,32,NONE,,,,,,,,, +,EL.LATEST_HIGH_EVENT.TIME.TOTAL_CYCLE,uint32_t,EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->time.total_cycle,PACKET,191,0,32,NONE,,,,,,,,, +,EL.LATEST_HIGH_EVENT.TIME.STEP,uint8_t,(uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->time.step,PACKET,195,0,8,NONE,,,,,,,,, +,EL.LATEST_HIGH_EVENT.NOTE,uint16_t,(uint16_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->note,PACKET,196,0,16,NONE,,,,,,,,,u8にしてもよい +,EH.LOG_TABLE.RESPOND_COUNTER,uint32_t,event_handler->log_table.respond_counter,PACKET,198,0,32,NONE,,,,,,,,, +,GIT_REV_CORE,uint32_t,GIT_REV_CORE_SHORT,PACKET,202,0,32,HEX,,,,,,,,, +,GIT_REV_USER,uint32_t,GIT_REV_USER_SHORT,PACKET,206,0,32,HEX,,,,,,,,, +,BCT_BLK_PTR,uint8_t,(uint8_t)(block_command_table->pos.block),PACKET,210,0,8,NONE,,,,,,,,BCT ブロックポインタ, +,BCT_CMD_PTR,uint8_t,(uint8_t)(block_command_table->pos.cmd),PACKET,211,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,212,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,216,0,16,NONE,,,,,,,,BCT 登録コマンドID, +,DUMMY_DATA1,uint32_t,0,PACKET,218,0,32,NONE,,,,,,,,, +,DUMMY_DATA2,uint32_t,0,PACKET,222,0,32,NONE,,,,,,,,, +,DUMMY_DATA3,uint32_t,0,PACKET,226,0,32,NONE,,,,,,,,, +,DUMMY_DATA4,uint32_t,0,PACKET,230,0,32,NONE,,,,,,,,, +,DUMMY_DATA5,uint32_t,0,PACKET,234,0,32,NONE,,,,,,,,, +,DUMMY_DATA6,uint32_t,0,PACKET,238,0,32,NONE,,,,,,,,, +,DUMMY_DATA7,uint32_t,0,PACKET,242,0,32,NONE,,,,,,,,, +,DUMMY_DATA8,uint32_t,0,PACKET,246,0,32,NONE,,,,,,,,, +,DUMMY_DATA9,uint32_t,0,PACKET,250,0,32,NONE,,,,,,,,, +,DUMMY_DATA10,uint32_t,0,PACKET,254,0,32,NONE,,,,,,,,, +,DUMMY_DATA11,uint32_t,0,PACKET,258,0,32,NONE,,,,,,,,, +,DUMMY_DATA12,uint32_t,0,PACKET,262,0,32,NONE,,,,,,,,, +,DUMMY_DATA13,uint32_t,0,PACKET,266,0,32,NONE,,,,,,,,, +,DUMMY_DATA14,uint32_t,0,PACKET,270,0,32,NONE,,,,,,,,, +,DUMMY_DATA15,uint32_t,0,PACKET,274,0,32,NONE,,,,,,,,, +,DUMMY_DATA16,uint32_t,0,PACKET,278,0,32,NONE,,,,,,,,, +,DUMMY_DATA17,uint32_t,0,PACKET,282,0,32,NONE,,,,,,,,, +,DUMMY_DATA18,uint32_t,0,PACKET,286,0,32,NONE,,,,,,,,, +,DUMMY_DATA19,uint32_t,0,PACKET,290,0,32,NONE,,,,,,,,, +,DUMMY_DATA20,uint32_t,0,PACKET,294,0,32,NONE,,,,,,,,, +,DUMMY_DATA21,uint32_t,0,PACKET,298,0,32,NONE,,,,,,,,, +,DUMMY_DATA22,uint32_t,0,PACKET,302,0,32,NONE,,,,,,,,, +,DUMMY_DATA23,uint32_t,0,PACKET,306,0,32,NONE,,,,,,,,, +,DUMMY_DATA24,uint32_t,0,PACKET,310,0,32,NONE,,,,,,,,, +,DUMMY_DATA25,uint32_t,0,PACKET,314,0,32,NONE,,,,,,,,, +,DUMMY_DATA26,uint32_t,0,PACKET,318,0,32,NONE,,,,,,,,, +,DUMMY_DATA27,uint32_t,0,PACKET,322,0,32,NONE,,,,,,,,, +,DUMMY_DATA28,uint32_t,0,PACKET,326,0,32,NONE,,,,,,,,, +,DUMMY_DATA29,uint32_t,0,PACKET,330,0,32,NONE,,,,,,,,, +,DUMMY_DATA30,uint32_t,0,PACKET,334,0,32,NONE,,,,,,,,, +,DUMMY_DATA31,uint32_t,0,PACKET,338,0,32,NONE,,,,,,,,, +,DUMMY_DATA32,uint32_t,0,PACKET,342,0,32,NONE,,,,,,,,, +,DUMMY_DATA33,uint32_t,0,PACKET,346,0,32,NONE,,,,,,,,, +,DUMMY_DATA34,uint32_t,0,PACKET,350,0,32,NONE,,,,,,,,, +,DUMMY_DATA35,uint32_t,0,PACKET,354,0,32,NONE,,,,,,,,, +,DUMMY_DATA36,uint32_t,0,PACKET,358,0,32,NONE,,,,,,,,, +,DUMMY_DATA37,uint32_t,0,PACKET,362,0,32,NONE,,,,,,,,, +,DUMMY_DATA38,uint32_t,0,PACKET,366,0,32,NONE,,,,,,,,, +,DUMMY_DATA39,uint32_t,0,PACKET,370,0,32,NONE,,,,,,,,, +,DUMMY_DATA40,uint32_t,0,PACKET,374,0,32,NONE,,,,,,,,, +,DUMMY_DATA41,uint32_t,0,PACKET,378,0,32,NONE,,,,,,,,, +,DUMMY_DATA42,uint32_t,0,PACKET,382,0,32,NONE,,,,,,,,, +,DUMMY_DATA43,uint32_t,0,PACKET,386,0,32,NONE,,,,,,,,, +,DUMMY_DATA44,uint32_t,0,PACKET,390,0,32,NONE,,,,,,,,, +,DUMMY_DATA45,uint32_t,0,PACKET,394,0,32,NONE,,,,,,,,, +,DUMMY_DATA46,uint32_t,0,PACKET,398,0,32,NONE,,,,,,,,, +,DUMMY_DATA47,uint32_t,0,PACKET,402,0,32,NONE,,,,,,,,, +,DUMMY_DATA48,uint32_t,0,PACKET,406,0,32,NONE,,,,,,,,, +,DUMMY_DATA49,uint32_t,0,PACKET,410,0,32,NONE,,,,,,,,, +,DUMMY_DATA50,uint32_t,0,PACKET,414,0,32,NONE,,,,,,,,, +,DUMMY_DATA51,uint32_t,0,PACKET,418,0,32,NONE,,,,,,,,, +,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, diff --git a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/common_cmd_packet_define.h b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/common_cmd_packet_define.h index ec2cdab3b..5254edbc9 100644 --- a/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/common_cmd_packet_define.h +++ b/Examples/2nd_obc_user/src/src_user/Settings/TlmCmd/common_cmd_packet_define.h @@ -22,6 +22,7 @@ typedef CmdSpacePacket CommonCmdPacket; * @brief コマンドの解釈の宛先を規定 * @note TO_ME: 自分自身 → 自分自身の TLC や BC として解釈.コマンド実行時に必要に応じて別 OBC へ配送 (この定義は C2A Core で使うため,どんな C2A でも必須) * @note TO_*: 転送先の TL や BC として解釈 (直接指定 OBC へ配送. GS から来たコマンドを自身のキューにいれない) + * なお,自分自身宛だった場合は,キューに入れる * @note 4bit を想定 */ typedef enum diff --git a/Examples/2nd_obc_user/src/src_user/Test/authorization.json.temp b/Examples/2nd_obc_user/src/src_user/Test/authorization.json.temp deleted file mode 100644 index d9dd01841..000000000 --- a/Examples/2nd_obc_user/src/src_user/Test/authorization.json.temp +++ /dev/null @@ -1,7 +0,0 @@ -{ - "client_id": "hoge_id", - "client_secret": "hoge_secret", - "grant_type": "hoge", - "username": "hoge@fuga", - "password": "piyopiyo" -} diff --git a/Examples/2nd_obc_user/src/src_user/Test/test/conftest.py b/Examples/2nd_obc_user/src/src_user/Test/test/conftest.py index b14dfc08b..fd21bdf42 100644 --- a/Examples/2nd_obc_user/src/src_user/Test/test/conftest.py +++ b/Examples/2nd_obc_user/src/src_user/Test/test/conftest.py @@ -23,7 +23,6 @@ def increase_hk_frequency(): def _increase_hk_frequency(): - ope.send_rt_cmd( mobc_c2a_enum.Cmd_CODE_TLCD_CLEAR_ALL_TIMELINE, (2,), diff --git a/Examples/2nd_obc_user/src/src_user/Test/test/test_comm_between_c2a.py b/Examples/2nd_obc_user/src/src_user/Test/test/test_comm_between_c2a.py index 4d5b643f8..9eb3d2a86 100644 --- a/Examples/2nd_obc_user/src/src_user/Test/test/test_comm_between_c2a.py +++ b/Examples/2nd_obc_user/src/src_user/Test/test/test_comm_between_c2a.py @@ -171,52 +171,52 @@ def check_gsc_ack(exec_cmd, sts): wait_for_2nd_obc_hk_tlm() assert g_mobc_gsc_cnt == get_mobc_gsc_counter() tlm_2ND_HK = get_2nd_obc_hk_tlm() - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_GS_CMD_COUNTER"] == g_second_obc_gsc_cnt - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_RT_CMD_COUNTER"] == g_second_obc_rtc_cnt - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_GS_CMD_LAST_EXEC_ID"] == exec_cmd - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_GS_CMD_LAST_EXEC_STS"] == sts + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.GS_CMD.COUNTER"] == g_second_obc_gsc_cnt + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.RT_CMD.COUNTER"] == g_second_obc_rtc_cnt + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.GS_CMD.LAST_EXEC.ID"] == exec_cmd + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.GS_CMD.LAST_EXEC.EXEC_STS"] == sts def check_rtc_ack(exec_cmd, sts): wait_for_2nd_obc_hk_tlm() assert g_mobc_gsc_cnt == get_mobc_gsc_counter() tlm_2ND_HK = get_2nd_obc_hk_tlm() - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_GS_CMD_COUNTER"] == g_second_obc_gsc_cnt - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_RT_CMD_COUNTER"] == g_second_obc_rtc_cnt - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_RT_CMD_LAST_EXEC_ID"] == exec_cmd - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_RT_CMD_LAST_EXEC_STS"] == sts + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.GS_CMD.COUNTER"] == g_second_obc_gsc_cnt + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.RT_CMD.COUNTER"] == g_second_obc_rtc_cnt + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.RT_CMD.LAST_EXEC.ID"] == exec_cmd + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.RT_CMD.LAST_EXEC.EXEC_STS"] == sts def check_tlc_ack(ti, exec_cmd): wait_for_2nd_obc_hk_tlm() assert g_mobc_gsc_cnt == get_mobc_gsc_counter() tlm_2ND_HK = get_2nd_obc_hk_tlm() - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_GS_CMD_COUNTER"] == g_second_obc_gsc_cnt - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_RT_CMD_COUNTER"] == g_second_obc_rtc_cnt - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_TLC_GS.QUEUED"] == 1 - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_TLC_GS.NEXT_TIME"] == ti - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_TLC_GS.NEXT_ID"] == exec_cmd + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.GS_CMD.COUNTER"] == g_second_obc_gsc_cnt + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.RT_CMD.COUNTER"] == g_second_obc_rtc_cnt + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.TLC_GS.QUEUED"] == 1 + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.TLC_GS.NEXT_TIME"] == ti + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.TLC_GS.NEXT_ID"] == exec_cmd def check_mobc_tlc_ack(ti, exec_cmd): wait_for_2nd_obc_hk_tlm() assert g_mobc_gsc_cnt == get_mobc_gsc_counter() tlm_HK = get_mobc_hk_tlm() - assert tlm_HK["HK.OBC_TLC_GS.QUEUED"] == 1 - assert tlm_HK["HK.OBC_TLC_GS.NEXT_TIME"] == ti - assert tlm_HK["HK.OBC_TLC_GS.NEXT_ID"] == exec_cmd + assert tlm_HK["HK.OBC.TLC_GS.QUEUED"] == 1 + assert tlm_HK["HK.OBC.TLC_GS.NEXT_TIME"] == ti + assert tlm_HK["HK.OBC.TLC_GS.NEXT_ID"] == exec_cmd tlm_2ND_HK = get_2nd_obc_hk_tlm() - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_GS_CMD_COUNTER"] == g_second_obc_gsc_cnt - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_RT_CMD_COUNTER"] == g_second_obc_rtc_cnt - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_TLC_GS.QUEUED"] == 0 + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.GS_CMD.COUNTER"] == g_second_obc_gsc_cnt + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.RT_CMD.COUNTER"] == g_second_obc_rtc_cnt + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.TLC_GS.QUEUED"] == 0 def ckeck_bct_ack(ti, exec_cmd, bct_id): wait_for_2nd_obc_hk_tlm() assert g_mobc_gsc_cnt == get_mobc_gsc_counter() tlm_2ND_HK = get_2nd_obc_hk_tlm() - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_GS_CMD_COUNTER"] == g_second_obc_gsc_cnt - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_RT_CMD_COUNTER"] == g_second_obc_rtc_cnt + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.GS_CMD.COUNTER"] == g_second_obc_gsc_cnt + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.RT_CMD.COUNTER"] == g_second_obc_rtc_cnt assert tlm_2ND_HK[SECOND_OBC + "_HK.BCT_BLK_PTR"] == bct_id assert tlm_2ND_HK[SECOND_OBC + "_HK.BCT_CMD_PTR"] == 1 assert tlm_2ND_HK[SECOND_OBC + "_HK.BCT_REGD_TIME"] == ti @@ -238,8 +238,8 @@ def ckeck_mobc_bct_ack(ti, exec_cmd, bct_id): assert tlm_MOBC["MOBC.BCT_REGD_ID"] == exec_cmd tlm_2ND_HK = get_2nd_obc_hk_tlm() - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_GS_CMD_COUNTER"] == g_second_obc_gsc_cnt - assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC_RT_CMD_COUNTER"] == g_second_obc_rtc_cnt + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.GS_CMD.COUNTER"] == g_second_obc_gsc_cnt + assert tlm_2ND_HK[SECOND_OBC + "_HK.OBC.RT_CMD.COUNTER"] == g_second_obc_rtc_cnt assert tlm_2ND_HK[SECOND_OBC + "_HK.BCT_BLK_PTR"] == bct_id assert tlm_2ND_HK[SECOND_OBC + "_HK.BCT_CMD_PTR"] == 0 @@ -269,15 +269,15 @@ def get_2nd_obc_ti(): def get_mobc_gsc_counter(): - return get_mobc_hk_tlm()["HK.OBC_GS_CMD_COUNTER"] + return get_mobc_hk_tlm()["HK.OBC.GS_CMD.COUNTER"] def get_2nd_obc_gsc_counter(): - return get_2nd_obc_hk_tlm()[SECOND_OBC + "_HK.OBC_GS_CMD_COUNTER"] + return get_2nd_obc_hk_tlm()[SECOND_OBC + "_HK.OBC.GS_CMD.COUNTER"] def get_2nd_obc_rtc_counter(): - return get_2nd_obc_hk_tlm()[SECOND_OBC + "_HK.OBC_RT_CMD_COUNTER"] + return get_2nd_obc_hk_tlm()[SECOND_OBC + "_HK.OBC.RT_CMD.COUNTER"] def wait_for_2nd_obc_hk_tlm(): diff --git a/Examples/2nd_obc_user/src/src_user/Test/utils/wings_utils.py b/Examples/2nd_obc_user/src/src_user/Test/utils/wings_utils.py index 82f4338e8..14ecfeab7 100644 --- a/Examples/2nd_obc_user/src/src_user/Test/utils/wings_utils.py +++ b/Examples/2nd_obc_user/src/src_user/Test/utils/wings_utils.py @@ -1,21 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -import json -import os import isslwings as wings def get_wings_operation(): - authorization = dict( - client_id=os.environ.get("WINGS_CLIENT_ID"), - client_secret=os.environ.get("WINGS_CLIENT_SECRET"), - grant_type=os.environ.get("WINGS_GRANT_TYPE"), - username=os.environ.get("WINGS_USERNAME"), - password=os.environ.get("WINGS_PASSWORD"), - ) - - # 環境変数があればそちらを優先 - if None in authorization.values(): - with open(os.path.dirname(__file__) + "/../authorization.json") as f: - authorization = json.load(f) - return wings.Operation(authentication_info=authorization) + return wings.Operation() diff --git a/Examples/2nd_obc_user/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_start_hk_tlm.c b/Examples/2nd_obc_user/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_start_hk_tlm.c index ef6735c1b..ab2bc117b 100644 --- a/Examples/2nd_obc_user/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_start_hk_tlm.c +++ b/Examples/2nd_obc_user/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_start_hk_tlm.c @@ -5,7 +5,7 @@ #include "../command_definitions.h" #include "../telemetry_definitions.h" -#include +#include #include diff --git a/Examples/2nd_obc_user/src/src_user/TlmCmd/block_command_definitions.h b/Examples/2nd_obc_user/src/src_user/TlmCmd/block_command_definitions.h index 712a76c66..69584d7ab 100644 --- a/Examples/2nd_obc_user/src/src_user/TlmCmd/block_command_definitions.h +++ b/Examples/2nd_obc_user/src/src_user/TlmCmd/block_command_definitions.h @@ -28,7 +28,7 @@ typedef enum // ==== 各系領域 ==== // ./C2A/TlmCmd/NormalBlockCommandDefinition/で定義 - // アノマリハンドラはBC_AH_など,接頭辞を適切につけること! + // イベントハンドラはBC_EH_など,接頭辞を適切につけること! // CDH:60-79 BC_HK_CYCLIC_TLM = 60, diff --git a/Examples/2nd_obc_user/src/src_user/TlmCmd/telemetry_definitions.c b/Examples/2nd_obc_user/src/src_user/TlmCmd/telemetry_definitions.c index fd46c10fc..5ec92ce17 100644 --- a/Examples/2nd_obc_user/src/src_user/TlmCmd/telemetry_definitions.c +++ b/Examples/2nd_obc_user/src/src_user/TlmCmd/telemetry_definitions.c @@ -19,7 +19,7 @@ void TF_load_tlm_table(TF_TlmInfo tlm_table[TF_MAX_TLMS]) static TF_TLM_FUNC_ACK Tlm_AOBC_AOBC_(uint8_t* packet, uint16_t* len, uint16_t max_len) { - if (241 > max_len) return TF_TLM_FUNC_ACK_TOO_SHORT_LEN; + if (252 > max_len) return TF_TLM_FUNC_ACK_TOO_SHORT_LEN; #ifndef BUILD_SETTINGS_FAST_BUILD TF_copy_u32(&packet[26], (uint32_t)(TMGR_get_master_clock().mode_cycle)); @@ -28,210 +28,220 @@ static TF_TLM_FUNC_ACK Tlm_AOBC_AOBC_(uint8_t* packet, uint16_t* len, uint16_t m TF_copy_u8(&packet[46], (uint8_t)(mode_manager->stat)); TF_copy_u8(&packet[47], (uint8_t)(mode_manager->current_id)); TF_copy_u8(&packet[48], (uint8_t)(mode_manager->previous_id)); - TF_copy_u8(&packet[49], (uint8_t)(TDSP_info->task_list_id)); - TF_copy_u32(&packet[50], (uint32_t)(TDSP_info->tskd.prev_err.time.total_cycle)); - TF_copy_u8(&packet[54], (uint8_t)(TDSP_info->tskd.prev_err.time.step)); - TF_copy_u16(&packet[55], (uint16_t)(TDSP_info->tskd.prev_err.code)); - TF_copy_i32(&packet[57], (int32_t)(TDSP_info->tskd.prev_err.sts)); - TF_copy_u32(&packet[61], PL_count_executed_nodes(&PH_gs_cmd_list)); - TF_copy_u32(&packet[65], (uint32_t)(gs_command_dispatcher->prev.time.total_cycle)); - TF_copy_u16(&packet[69], (uint16_t)(gs_command_dispatcher->prev.code)); - TF_copy_i32(&packet[71], (int32_t)(gs_command_dispatcher->prev.sts)); - TF_copy_u32(&packet[75], (uint32_t)(gs_command_dispatcher->prev_err.time.total_cycle)); - TF_copy_u16(&packet[79], (uint16_t)(gs_command_dispatcher->prev_err.code)); - TF_copy_i32(&packet[81], (int32_t)(gs_command_dispatcher->prev_err.sts)); - TF_copy_u32(&packet[85], (uint32_t)(gs_command_dispatcher->error_counter)); - TF_copy_u32(&packet[89], PL_count_executed_nodes(&PH_rt_cmd_list)); - TF_copy_u32(&packet[93], (uint32_t)(realtime_command_dispatcher->prev.time.total_cycle)); - TF_copy_u16(&packet[97], (uint16_t)(realtime_command_dispatcher->prev.code)); - TF_copy_i32(&packet[99], (int32_t)(realtime_command_dispatcher->prev.sts)); - TF_copy_u32(&packet[103], (uint32_t)(realtime_command_dispatcher->prev_err.time.total_cycle)); - TF_copy_u16(&packet[107], (uint16_t)(realtime_command_dispatcher->prev_err.code)); - TF_copy_i32(&packet[109], (int32_t)(realtime_command_dispatcher->prev_err.sts)); - TF_copy_u32(&packet[113], (uint32_t)(realtime_command_dispatcher->error_counter)); - TF_copy_u32(&packet[117], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])); - TF_copy_u8(&packet[121], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]))); - TF_copy_u32(&packet[122], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_cycle)); - TF_copy_u16(&packet[126], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code)); - TF_copy_i32(&packet[128], (int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.sts)); - TF_copy_u32(&packet[132], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_cycle)); - TF_copy_u16(&packet[136], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code)); - TF_copy_i32(&packet[138], (int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.sts)); - TF_copy_u32(&packet[142], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_counter)); - TF_copy_u8(&packet[146], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error)); - TF_copy_u8(&packet[147], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout)); - TF_copy_u32(&packet[148], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet)))); - TF_copy_u16(&packet[152], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet)))); - TF_copy_u32(&packet[154], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])); - TF_copy_u8(&packet[158], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))); - TF_copy_u32(&packet[159], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.time.total_cycle)); - TF_copy_u16(&packet[163], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.code)); - TF_copy_i32(&packet[165], (int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.sts)); - TF_copy_u32(&packet[169], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.time.total_cycle)); - TF_copy_u16(&packet[173], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.code)); - TF_copy_i32(&packet[175], (int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.sts)); - TF_copy_u32(&packet[179], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].error_counter)); - TF_copy_u8(&packet[183], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error)); - TF_copy_u8(&packet[184], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout)); - TF_copy_u32(&packet[185], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet)))); - TF_copy_u16(&packet[189], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet)))); - TF_copy_u32(&packet[191], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])); - TF_copy_u8(&packet[195], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))); - TF_copy_u32(&packet[196], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.time.total_cycle)); - TF_copy_u16(&packet[200], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.code)); - TF_copy_i32(&packet[202], (int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.sts)); - TF_copy_u32(&packet[206], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.time.total_cycle)); - TF_copy_u16(&packet[210], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.code)); - TF_copy_i32(&packet[212], (int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.sts)); - TF_copy_u32(&packet[216], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].error_counter)); - TF_copy_u8(&packet[220], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error)); - TF_copy_u8(&packet[221], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout)); - TF_copy_u32(&packet[222], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet)))); - TF_copy_u16(&packet[226], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet)))); - TF_copy_u8(&packet[228], (uint8_t)(block_command_table->pos.block)); - TF_copy_u8(&packet[229], (uint8_t)(block_command_table->pos.cmd)); - TF_copy_u32(&packet[230], ((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)))); - TF_copy_u16(&packet[234], (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)))); - TF_copy_u32(&packet[236], PL_count_executed_nodes(&PH_ms_tlm_list)); - TF_copy_u8(&packet[240], (uint8_t)(PL_count_active_nodes(&PH_ms_tlm_list))); + TF_copy_u8(&packet[49], (uint8_t)(task_dispathcer->task_list_id)); + TF_copy_u32(&packet[50], (uint32_t)(task_dispathcer->tskd.prev_err.time.total_cycle)); + TF_copy_u8(&packet[54], (uint8_t)(task_dispathcer->tskd.prev_err.time.step)); + TF_copy_u16(&packet[55], (uint16_t)(task_dispathcer->tskd.prev_err.code)); + TF_copy_u8(&packet[57], (uint8_t)(task_dispathcer->tskd.prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[58], task_dispathcer->tskd.prev_err.cmd_ret.err_code); + TF_copy_u32(&packet[62], PL_count_executed_nodes(&PH_gs_cmd_list)); + TF_copy_u32(&packet[66], (uint32_t)(gs_command_dispatcher->prev.time.total_cycle)); + TF_copy_u16(&packet[70], (uint16_t)(gs_command_dispatcher->prev.code)); + TF_copy_u8(&packet[72], (uint8_t)(gs_command_dispatcher->prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[73], gs_command_dispatcher->prev.cmd_ret.err_code); + TF_copy_u32(&packet[77], (uint32_t)(gs_command_dispatcher->prev_err.time.total_cycle)); + TF_copy_u16(&packet[81], (uint16_t)(gs_command_dispatcher->prev_err.code)); + TF_copy_u8(&packet[83], (uint8_t)(gs_command_dispatcher->prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[84], gs_command_dispatcher->prev_err.cmd_ret.err_code); + TF_copy_u32(&packet[88], (uint32_t)(gs_command_dispatcher->error_counter)); + TF_copy_u32(&packet[92], PL_count_executed_nodes(&PH_rt_cmd_list)); + TF_copy_u32(&packet[96], (uint32_t)(realtime_command_dispatcher->prev.time.total_cycle)); + TF_copy_u16(&packet[100], (uint16_t)(realtime_command_dispatcher->prev.code)); + TF_copy_u8(&packet[102], (uint8_t)(realtime_command_dispatcher->prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[103], realtime_command_dispatcher->prev.cmd_ret.err_code); + TF_copy_u32(&packet[107], (uint32_t)(realtime_command_dispatcher->prev_err.time.total_cycle)); + TF_copy_u16(&packet[111], (uint16_t)(realtime_command_dispatcher->prev_err.code)); + TF_copy_u8(&packet[113], (uint8_t)(realtime_command_dispatcher->prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[114], realtime_command_dispatcher->prev_err.cmd_ret.err_code); + TF_copy_u32(&packet[118], (uint32_t)(realtime_command_dispatcher->error_counter)); + TF_copy_u32(&packet[122], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])); + TF_copy_u8(&packet[126], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]))); + TF_copy_u32(&packet[127], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_cycle)); + TF_copy_u16(&packet[131], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code)); + TF_copy_u8(&packet[133], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[134], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.err_code); + TF_copy_u32(&packet[138], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_cycle)); + TF_copy_u16(&packet[142], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code)); + TF_copy_u8(&packet[144], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[145], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.err_code); + TF_copy_u32(&packet[149], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_counter)); + TF_copy_u8(&packet[153], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error)); + TF_copy_u8(&packet[154], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout)); + TF_copy_u32(&packet[155], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet)))); + TF_copy_u16(&packet[159], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet)))); + TF_copy_u32(&packet[161], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])); + TF_copy_u8(&packet[165], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))); + TF_copy_u32(&packet[166], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.time.total_cycle)); + TF_copy_u16(&packet[170], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.code)); + TF_copy_u8(&packet[172], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[173], timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.cmd_ret.err_code); + TF_copy_u32(&packet[177], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.time.total_cycle)); + TF_copy_u16(&packet[181], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.code)); + TF_copy_u8(&packet[183], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[184], timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.cmd_ret.err_code); + TF_copy_u32(&packet[188], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].error_counter)); + TF_copy_u8(&packet[192], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error)); + TF_copy_u8(&packet[193], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout)); + TF_copy_u32(&packet[194], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet)))); + TF_copy_u16(&packet[198], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet)))); + TF_copy_u32(&packet[200], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])); + TF_copy_u8(&packet[204], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))); + TF_copy_u32(&packet[205], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.time.total_cycle)); + TF_copy_u16(&packet[209], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.code)); + TF_copy_u8(&packet[211], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[212], timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.cmd_ret.err_code); + TF_copy_u32(&packet[216], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.time.total_cycle)); + TF_copy_u16(&packet[220], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.code)); + TF_copy_u8(&packet[222], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[223], timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.cmd_ret.err_code); + TF_copy_u32(&packet[227], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].error_counter)); + TF_copy_u8(&packet[231], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error)); + TF_copy_u8(&packet[232], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout)); + TF_copy_u32(&packet[233], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet)))); + TF_copy_u16(&packet[237], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet)))); + TF_copy_u8(&packet[239], (uint8_t)(block_command_table->pos.block)); + TF_copy_u8(&packet[240], (uint8_t)(block_command_table->pos.cmd)); + TF_copy_u32(&packet[241], ((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)))); + TF_copy_u16(&packet[245], (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)))); + TF_copy_u32(&packet[247], PL_count_executed_nodes(&PH_ms_tlm_list)); + TF_copy_u8(&packet[251], (uint8_t)(PL_count_active_nodes(&PH_ms_tlm_list))); #endif - *len = 241; + *len = 252; return TF_TLM_FUNC_ACK_SUCCESS; } static TF_TLM_FUNC_ACK Tlm_AOBC_HK_(uint8_t* packet, uint16_t* len, uint16_t max_len) { - if (432 > max_len) return TF_TLM_FUNC_ACK_TOO_SHORT_LEN; + if (422 > max_len) return TF_TLM_FUNC_ACK_TOO_SHORT_LEN; #ifndef BUILD_SETTINGS_FAST_BUILD TF_copy_u32(&packet[26], TMGR_get_master_clock().mode_cycle); TF_copy_double(&packet[30], TMGR_get_unixtime_at_ti0()); TF_copy_u8(&packet[38], (uint8_t)(mode_manager->current_id)); TF_copy_u8(&packet[39], (uint8_t)( ((uint8_t)(mode_manager->stat) << 7 & 0x80) | ((uint8_t)(mode_manager->previous_id) & 0x7F) )); - TF_copy_u16(&packet[40], TDSP_info->task_list_id); + TF_copy_u16(&packet[40], task_dispathcer->task_list_id); TF_copy_u32(&packet[42], PL_count_executed_nodes(&PH_gs_cmd_list)); - TF_copy_u32(&packet[46], gs_command_dispatcher->prev.time.total_cycle); + TF_copy_u32(&packet[46], (uint32_t)(gs_command_dispatcher->prev.time.total_cycle)); TF_copy_u16(&packet[50], (uint16_t)(gs_command_dispatcher->prev.code)); - TF_copy_i8(&packet[52], (int8_t)(gs_command_dispatcher->prev.sts)); - TF_copy_u32(&packet[53], gs_command_dispatcher->prev_err.time.total_cycle); - TF_copy_u16(&packet[57], (uint16_t)(gs_command_dispatcher->prev_err.code)); - TF_copy_i8(&packet[59], (int8_t)(gs_command_dispatcher->prev_err.sts)); - TF_copy_u32(&packet[60], PL_count_executed_nodes(&PH_rt_cmd_list)); - TF_copy_u32(&packet[64], (uint32_t)(realtime_command_dispatcher->prev.time.total_cycle)); - TF_copy_u16(&packet[68], (uint16_t)(realtime_command_dispatcher->prev.code)); - TF_copy_i32(&packet[70], (int32_t)(realtime_command_dispatcher->prev.sts)); - TF_copy_u32(&packet[74], (uint32_t)(realtime_command_dispatcher->prev_err.time.total_cycle)); - TF_copy_u16(&packet[78], (uint16_t)(realtime_command_dispatcher->prev_err.code)); - TF_copy_i32(&packet[80], (int32_t)(realtime_command_dispatcher->prev_err.sts)); - TF_copy_u32(&packet[84], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])); - TF_copy_u8(&packet[88], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]))); - TF_copy_u32(&packet[89], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_cycle); - TF_copy_u16(&packet[93], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code)); - TF_copy_i8(&packet[95], (int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.sts)); - TF_copy_u32(&packet[96], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_cycle); - TF_copy_u16(&packet[100], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code)); - TF_copy_i8(&packet[102], (int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.sts)); - TF_copy_u32(&packet[103], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet)))); - TF_copy_u16(&packet[107], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet)))); - TF_copy_u32(&packet[109], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])); - TF_copy_u8(&packet[113], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))); - TF_copy_u32(&packet[114], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])); - TF_copy_u8(&packet[118], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))); - TF_copy_u8(&packet[119], (uint8_t)(((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error << 7 & 0x80) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout << 6 & 0x40) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error << 5 & 0x20) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout << 4 & 0x10) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error << 3 & 0x08) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout << 2 & 0x04) | (0 << 1 & 0x02) | (0 & 0x01) )); - TF_copy_u8(&packet[120], (uint8_t)((wdt_config->is_wdt_enable << 7 & 0x80) | (wdt_config->is_clear_enable << 6 & 0x40) | 0x00)); - TF_copy_u16(&packet[121], block_command_table->pos.block); - TF_copy_u8(&packet[123], (uint8_t)(block_command_table->pos.cmd)); - TF_copy_u32(&packet[124], ((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)))); - TF_copy_u16(&packet[128], (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)))); - TF_copy_u32(&packet[130], event_logger->statistics.record_counter_total); - TF_copy_u16(&packet[134], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_HIGH]); - TF_copy_u16(&packet[136], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_MIDDLE]); - TF_copy_u16(&packet[138], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_LOW]); - TF_copy_u16(&packet[140], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_EL]); - TF_copy_u16(&packet[142], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_EH]); - TF_copy_u8(&packet[144], (uint8_t)event_logger->latest_event.group); - TF_copy_u32(&packet[145], event_logger->latest_event.local); - TF_copy_u8(&packet[149], (uint8_t)event_logger->latest_event.err_level); - TF_copy_u32(&packet[150], event_logger->latest_event.time.total_cycle); - TF_copy_u8(&packet[154], (uint8_t)event_logger->latest_event.time.step); - TF_copy_u32(&packet[155], event_logger->latest_event.note); - TF_copy_u8(&packet[159], (uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->group); - TF_copy_u32(&packet[160], EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->local); - TF_copy_u32(&packet[164], EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->time.total_cycle); - TF_copy_u8(&packet[168], (uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->time.step); - TF_copy_u16(&packet[169], (uint16_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->note); - TF_copy_u32(&packet[171], event_handler->log_table.respond_counter); - TF_copy_u8(&packet[175], (uint8_t)(gs_command_dispatcher->error_counter)); - TF_copy_u32(&packet[176], GIT_REV_CORE_SHORT); - TF_copy_u32(&packet[180], GIT_REV_USER_SHORT); - TF_copy_u8(&packet[184], (uint8_t)(block_command_table->pos.block)); - TF_copy_u8(&packet[185], (uint8_t)(block_command_table->pos.cmd)); - TF_copy_u32(&packet[186], ((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)))); - TF_copy_u16(&packet[190], (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)))); - TF_copy_u32(&packet[192], 0); - TF_copy_u32(&packet[196], 0); - TF_copy_u32(&packet[200], 0); - TF_copy_u32(&packet[204], 0); - TF_copy_u32(&packet[208], 0); - TF_copy_u32(&packet[212], 0); - TF_copy_u32(&packet[216], 0); - TF_copy_u32(&packet[220], 0); - TF_copy_u32(&packet[224], 0); - TF_copy_u32(&packet[228], 0); - TF_copy_u32(&packet[232], 0); - TF_copy_u32(&packet[236], 0); - TF_copy_u32(&packet[240], 0); - TF_copy_u32(&packet[244], 0); - TF_copy_u32(&packet[248], 0); - TF_copy_u32(&packet[252], 0); - TF_copy_u32(&packet[256], 0); - TF_copy_u32(&packet[260], 0); - TF_copy_u32(&packet[264], 0); - TF_copy_u32(&packet[268], 0); - TF_copy_u32(&packet[272], 0); - TF_copy_u32(&packet[276], 0); - TF_copy_u32(&packet[280], 0); - TF_copy_u32(&packet[284], 0); - TF_copy_u32(&packet[288], 0); - TF_copy_u32(&packet[292], 0); - TF_copy_u32(&packet[296], 0); - TF_copy_u32(&packet[300], 0); - TF_copy_u32(&packet[304], 0); - TF_copy_u32(&packet[308], 0); - TF_copy_u32(&packet[312], 0); - TF_copy_u32(&packet[316], 0); - TF_copy_u32(&packet[320], 0); - TF_copy_u32(&packet[324], 0); - TF_copy_u32(&packet[328], 0); - TF_copy_u32(&packet[332], 0); - TF_copy_u32(&packet[336], 0); - TF_copy_u32(&packet[340], 0); - TF_copy_u32(&packet[344], 0); - TF_copy_u32(&packet[348], 0); - TF_copy_u32(&packet[352], 0); - TF_copy_u32(&packet[356], 0); - TF_copy_u32(&packet[360], 0); - TF_copy_u32(&packet[364], 0); - TF_copy_u32(&packet[368], 0); - TF_copy_u32(&packet[372], 0); - TF_copy_u32(&packet[376], 0); - TF_copy_u32(&packet[380], 0); - TF_copy_u32(&packet[384], 0); - TF_copy_u32(&packet[388], 0); - TF_copy_u32(&packet[392], 0); - TF_copy_u32(&packet[396], 0); - TF_copy_u32(&packet[400], 0); - TF_copy_u32(&packet[404], 0); - TF_copy_u32(&packet[408], 0); - TF_copy_u32(&packet[412], 0); - TF_copy_u32(&packet[416], 0); - TF_copy_u32(&packet[420], 0); - TF_copy_u32(&packet[424], 0); - TF_copy_u32(&packet[428], 0); + TF_copy_u8(&packet[52], (uint8_t)(gs_command_dispatcher->prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[53], gs_command_dispatcher->prev.cmd_ret.err_code); + TF_copy_u32(&packet[57], (uint32_t)(gs_command_dispatcher->prev_err.time.total_cycle)); + TF_copy_u16(&packet[61], (uint16_t)(gs_command_dispatcher->prev_err.code)); + TF_copy_u8(&packet[63], (uint8_t)(gs_command_dispatcher->prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[64], gs_command_dispatcher->prev_err.cmd_ret.err_code); + TF_copy_u32(&packet[68], (uint32_t)(gs_command_dispatcher->error_counter)); + TF_copy_u32(&packet[72], PL_count_executed_nodes(&PH_rt_cmd_list)); + TF_copy_u32(&packet[76], (uint32_t)(realtime_command_dispatcher->prev.time.total_cycle)); + TF_copy_u16(&packet[80], (uint16_t)(realtime_command_dispatcher->prev.code)); + TF_copy_u8(&packet[82], (uint8_t)(realtime_command_dispatcher->prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[83], realtime_command_dispatcher->prev.cmd_ret.err_code); + TF_copy_u32(&packet[87], (uint32_t)(realtime_command_dispatcher->prev_err.time.total_cycle)); + TF_copy_u16(&packet[91], (uint16_t)(realtime_command_dispatcher->prev_err.code)); + TF_copy_u8(&packet[93], (uint8_t)(realtime_command_dispatcher->prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[94], realtime_command_dispatcher->prev_err.cmd_ret.err_code); + TF_copy_u32(&packet[98], (uint32_t)(realtime_command_dispatcher->error_counter)); + TF_copy_u32(&packet[102], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])); + TF_copy_u8(&packet[106], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]))); + TF_copy_u32(&packet[107], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_cycle)); + TF_copy_u16(&packet[111], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code)); + TF_copy_u8(&packet[113], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[114], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.err_code); + TF_copy_u32(&packet[118], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_cycle)); + TF_copy_u16(&packet[122], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code)); + TF_copy_u8(&packet[124], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[125], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.err_code); + TF_copy_u8(&packet[129], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_counter)); + TF_copy_u32(&packet[130], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet)))); + TF_copy_u16(&packet[134], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet)))); + TF_copy_u32(&packet[136], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])); + TF_copy_u8(&packet[140], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))); + TF_copy_u32(&packet[141], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])); + TF_copy_u8(&packet[145], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))); + TF_copy_u8(&packet[146], (uint8_t)(((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error << 7 & 0x80) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout << 6 & 0x40) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error << 5 & 0x20) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout << 4 & 0x10) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error << 3 & 0x08) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout << 2 & 0x04) | (0 << 1 & 0x02) | (0 & 0x01) )); + TF_copy_u8(&packet[147], (uint8_t)((wdt_config->is_wdt_enable << 7 & 0x80) | (wdt_config->is_clear_enable << 6 & 0x40) | 0x00)); + TF_copy_u16(&packet[148], block_command_table->pos.block); + TF_copy_u8(&packet[150], (uint8_t)(block_command_table->pos.cmd)); + TF_copy_u32(&packet[151], ((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)))); + TF_copy_u16(&packet[155], (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)))); + TF_copy_u32(&packet[157], event_logger->statistics.record_counter_total); + TF_copy_u16(&packet[161], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_HIGH]); + TF_copy_u16(&packet[163], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_MIDDLE]); + TF_copy_u16(&packet[165], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_LOW]); + TF_copy_u16(&packet[167], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_EL]); + TF_copy_u16(&packet[169], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_EH]); + TF_copy_u8(&packet[171], (uint8_t)event_logger->latest_event.group); + TF_copy_u32(&packet[172], event_logger->latest_event.local); + TF_copy_u8(&packet[176], (uint8_t)event_logger->latest_event.err_level); + TF_copy_u32(&packet[177], event_logger->latest_event.time.total_cycle); + TF_copy_u8(&packet[181], (uint8_t)event_logger->latest_event.time.step); + TF_copy_u32(&packet[182], event_logger->latest_event.note); + TF_copy_u8(&packet[186], (uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->group); + TF_copy_u32(&packet[187], EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->local); + TF_copy_u32(&packet[191], EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->time.total_cycle); + TF_copy_u8(&packet[195], (uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->time.step); + TF_copy_u16(&packet[196], (uint16_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->note); + TF_copy_u32(&packet[198], event_handler->log_table.respond_counter); + TF_copy_u32(&packet[202], GIT_REV_CORE_SHORT); + TF_copy_u32(&packet[206], GIT_REV_USER_SHORT); + TF_copy_u8(&packet[210], (uint8_t)(block_command_table->pos.block)); + TF_copy_u8(&packet[211], (uint8_t)(block_command_table->pos.cmd)); + TF_copy_u32(&packet[212], ((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)))); + TF_copy_u16(&packet[216], (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)))); + TF_copy_u32(&packet[218], 0); + TF_copy_u32(&packet[222], 0); + TF_copy_u32(&packet[226], 0); + TF_copy_u32(&packet[230], 0); + TF_copy_u32(&packet[234], 0); + TF_copy_u32(&packet[238], 0); + TF_copy_u32(&packet[242], 0); + TF_copy_u32(&packet[246], 0); + TF_copy_u32(&packet[250], 0); + TF_copy_u32(&packet[254], 0); + TF_copy_u32(&packet[258], 0); + TF_copy_u32(&packet[262], 0); + TF_copy_u32(&packet[266], 0); + TF_copy_u32(&packet[270], 0); + TF_copy_u32(&packet[274], 0); + TF_copy_u32(&packet[278], 0); + TF_copy_u32(&packet[282], 0); + TF_copy_u32(&packet[286], 0); + TF_copy_u32(&packet[290], 0); + TF_copy_u32(&packet[294], 0); + TF_copy_u32(&packet[298], 0); + TF_copy_u32(&packet[302], 0); + TF_copy_u32(&packet[306], 0); + TF_copy_u32(&packet[310], 0); + TF_copy_u32(&packet[314], 0); + TF_copy_u32(&packet[318], 0); + TF_copy_u32(&packet[322], 0); + TF_copy_u32(&packet[326], 0); + TF_copy_u32(&packet[330], 0); + TF_copy_u32(&packet[334], 0); + TF_copy_u32(&packet[338], 0); + TF_copy_u32(&packet[342], 0); + TF_copy_u32(&packet[346], 0); + TF_copy_u32(&packet[350], 0); + TF_copy_u32(&packet[354], 0); + TF_copy_u32(&packet[358], 0); + TF_copy_u32(&packet[362], 0); + TF_copy_u32(&packet[366], 0); + TF_copy_u32(&packet[370], 0); + TF_copy_u32(&packet[374], 0); + TF_copy_u32(&packet[378], 0); + TF_copy_u32(&packet[382], 0); + TF_copy_u32(&packet[386], 0); + TF_copy_u32(&packet[390], 0); + TF_copy_u32(&packet[394], 0); + TF_copy_u32(&packet[398], 0); + TF_copy_u32(&packet[402], 0); + TF_copy_u32(&packet[406], 0); + TF_copy_u32(&packet[410], 0); + TF_copy_u32(&packet[414], 0); + TF_copy_u32(&packet[418], 0); #endif - *len = 432; + *len = 422; return TF_TLM_FUNC_ACK_SUCCESS; } diff --git a/Examples/2nd_obc_user/src/src_user/TlmCmd/user_packet_handler.c b/Examples/2nd_obc_user/src/src_user/TlmCmd/user_packet_handler.c index 9df2f9f77..a214f74e9 100644 --- a/Examples/2nd_obc_user/src/src_user/TlmCmd/user_packet_handler.c +++ b/Examples/2nd_obc_user/src/src_user/TlmCmd/user_packet_handler.c @@ -26,13 +26,14 @@ PH_ACK PH_user_analyze_cmd(const CommonCmdPacket* packet) } -CCP_EXEC_STS PH_user_cmd_router(const CommonCmdPacket* packet) +CCP_CmdRet PH_user_cmd_router(const CommonCmdPacket* packet) { - switch (CCP_get_apid(packet)) + APID apid = CCP_get_apid(packet); + switch (apid) { default: - // 該当する配送先が定義されていない場合。 - return CCP_EXEC_ROUTING_FAILED; + // 該当する配送先が定義されていない場合 + return CCP_make_cmd_ret(CCP_EXEC_ROUTING_FAILED, apid); } } diff --git a/Examples/2nd_obc_user/src/src_user/TlmCmd/user_packet_handler.h b/Examples/2nd_obc_user/src/src_user/TlmCmd/user_packet_handler.h index 963fed1c4..13506c396 100644 --- a/Examples/2nd_obc_user/src/src_user/TlmCmd/user_packet_handler.h +++ b/Examples/2nd_obc_user/src/src_user/TlmCmd/user_packet_handler.h @@ -7,6 +7,7 @@ #include #include +#include #include /** @@ -33,15 +34,15 @@ void PH_user_init(void); PH_ACK PH_user_analyze_cmd(const CommonCmdPacket* packet); /** - * @brief PH の cmd_router_ のユーザー処理関数 + * @brief PH の PH_dispatch_command のユーザー処理関数 * * C2A を搭載したコンポに Cmd が転送される. * つまり,転送対象 OBC にとっては RTC 扱いになる - * ここから Driver を叩いて送信まで行うことになる(実行時間は cmdExec と同じだけ許容されているので OK) + * ここから Driver を叩いて送信まで行うことになる(実行時間は CA_execute_cmd と同じだけ許容されているので OK) * @param packet: CCP - * @retval CCP_EXEC_SUCCESS など: 無事に転送された.転送先の結果を返す - * @retval CCP_EXEC_ROUTING_FAILED: 転送失敗(詳細エラーは DriverSuper を参照) + * @retval CCP_CmdRet{CCP_EXEC_SUCCESS, *} など: 無事に転送された.転送先の結果を返す + * @retval CCP_CmdRet{CCP_EXEC_ROUTING_FAILED, *}: 転送失敗(詳細エラーは DriverSuper を参照) */ -CCP_EXEC_STS PH_user_cmd_router(const CommonCmdPacket* packet); +CCP_CmdRet PH_user_cmd_router(const CommonCmdPacket* packet); #endif diff --git a/Examples/2nd_obc_user/sync_with_minimum_user.bat b/Examples/2nd_obc_user/sync_with_minimum_user.bat index 787d5623f..5d125aa8a 100644 --- a/Examples/2nd_obc_user/sync_with_minimum_user.bat +++ b/Examples/2nd_obc_user/sync_with_minimum_user.bat @@ -19,6 +19,7 @@ call :sync_file ".\src\src_user\IfWrapper\Sils\wdt_sils.cpp" "..\minimum_user\sr call :sync_file ".\src\src_user\IfWrapper\SilsMockup\README.md" "..\minimum_user\src\src_user\IfWrapper\SilsMockup\README.md" call :sync_file ".\src\src_user\IfWrapper\SilsMockup\uart_sils.c" "..\minimum_user\src\src_user\IfWrapper\SilsMockup\uart_sils.c" call :sync_file ".\src\src_user\IfWrapper\SilsMockup\wdt_sils.c" "..\minimum_user\src\src_user\IfWrapper\SilsMockup\wdt_sils.c" +call :sync_file ".\src\src_user\Settings\DriverSuper\driver_buffer_define.h" "..\minimum_user\src\src_user\Settings\DriverSuper\driver_buffer_define.h" call :sync_file ".\src\src_user\Settings\TlmCmd\common_cmd_packet_define.c" "..\minimum_user\src\src_user\Settings\TlmCmd\common_cmd_packet_define.c" call :sync_file ".\src\src_user\Settings\TlmCmd\common_tlm_cmd_packet_define.h" "..\minimum_user\src\src_user\Settings\TlmCmd\common_tlm_cmd_packet_define.h" call :sync_file ".\src\src_user\TlmCmd\block_command_user_settings.c" "..\minimum_user\src\src_user\TlmCmd\block_command_user_settings.c" @@ -28,7 +29,6 @@ call :sync_file ".\src\src_user\TlmCmd\common_tlm_cmd_packet.c" "..\minimum_user call :sync_file ".\src\src_user\TlmCmd\common_tlm_packet.c" "..\minimum_user\src\src_user\TlmCmd\common_tlm_packet.c" call :sync_file ".\src\src_user\Test\utils\wings_utils.py" "..\minimum_user\src\src_user\Test\utils\wings_utils.py" -call :sync_file ".\src\src_user\Test\authorization.json.temp" "..\minimum_user\src\src_user\Test\authorization.json.temp" call :sync_file ".\src\src_user\Test\pytest.ini" "..\minimum_user\src\src_user\Test\pytest.ini" diff --git a/Examples/minimum_user/CMakeLists.txt b/Examples/minimum_user/CMakeLists.txt index df05c0895..c6e996763 100644 --- a/Examples/minimum_user/CMakeLists.txt +++ b/Examples/minimum_user/CMakeLists.txt @@ -16,7 +16,6 @@ option(USE_SCI_COM_WINGS "Use SCI_COM_WINGS" ON) # そちらのバッファが詰まってSILSの動作が止まることがあるので注意すること! option(USE_SCI_COM_UART "Use SCI_COM_UART" OFF) - option(USE_SILS_MOCKUP "Use SILS mockup for build C2A with minimal user in C89 only" OFF) option(BUILD_C2A_AS_SILS_FW "Build C2A as SILS firmware" ON) @@ -53,7 +52,6 @@ add_subdirectory(${C2A_USER_DIR}/TlmCmd) set(C2A_SRCS ${C2A_USER_DIR}/c2a_main.c - ${C2A_CORE_DIR}/System/AnomalyLogger/anomaly_logger.c # ここでは保守のため, deprecated だがビルドする ) if(BUILD_C2A_AS_CXX) diff --git a/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_aobc.c b/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_aobc.c index 17760bbaf..fc09e4a9c 100644 --- a/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_aobc.c +++ b/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_aobc.c @@ -9,8 +9,15 @@ #include "../../Drivers/Aocs/aobc.h" #include "../../TlmCmd/user_packet_handler.h" #include +#include #include "../../Settings/port_config.h" +#include "../../Settings/DriverSuper/driver_buffer_define.h" +static void DI_AOBC_init_(void); +static void DI_AOBC_update_(void); + +static void DI_AOBC_cmd_dispatcher_init_(void); +static void DI_AOBC_cmd_dispatcher_(void); static AOBC_Driver aobc_driver_; const AOBC_Driver* const aobc_driver = &aobc_driver_; @@ -18,11 +25,9 @@ const AOBC_Driver* const aobc_driver = &aobc_driver_; static CommandDispatcher DI_AOBC_cdis_; const CommandDispatcher* const DI_AOBC_cdis = &DI_AOBC_cdis_; -static void DI_AOBC_init_(void); -static void DI_AOBC_update_(void); - -static void DI_AOBC_cmd_dispatcher_init_(void); -static void DI_AOBC_cmd_dispatcher_(void); +// バッファ +static DS_StreamRecBuffer DI_AOBC_rx_buffer_; +static uint8_t DI_AOBC_rx_buffer_allocation_[DS_STREAM_REC_BUFFER_SIZE_DEFAULT]; AppInfo DI_AOBC_update(void) @@ -33,11 +38,21 @@ AppInfo DI_AOBC_update(void) static void DI_AOBC_init_(void) { - int ret = AOBC_init(&aobc_driver_, PORT_CH_RS422_AOBC); + DS_ERR_CODE ret1; + DS_INIT_ERR_CODE ret2; + + ret1 = DS_init_stream_rec_buffer(&DI_AOBC_rx_buffer_, + DI_AOBC_rx_buffer_allocation_, + sizeof(DI_AOBC_rx_buffer_allocation_)); + if (ret1 != DS_ERR_CODE_OK) + { + Printf("AOBC buffer init Failed ! %d \n", ret1); + } - if (ret != 0) + ret2 = AOBC_init(&aobc_driver_, PORT_CH_RS422_AOBC, &DI_AOBC_rx_buffer_); + if (ret2 != DS_INIT_OK) { - Printf("AOBC init Failed ! %d \n", ret); + Printf("AOBC init Failed ! %d \n", ret2); } } @@ -73,7 +88,7 @@ static void DI_AOBC_cmd_dispatcher_(void) } -CCP_EXEC_STS DI_AOBC_dispatch_command(const CommonCmdPacket* packet) +CCP_CmdRet DI_AOBC_dispatch_command(const CommonCmdPacket* packet) { DS_CMD_ERR_CODE ret; CommonCmdPacket* pckt = (CommonCmdPacket*)packet; // const_cast @@ -95,26 +110,27 @@ CCP_EXEC_STS DI_AOBC_dispatch_command(const CommonCmdPacket* packet) CCP_set_dest_type(pckt, CCP_DEST_TYPE_TO_ME); ret = AOBC_send_cmd(&aobc_driver_, pckt); - return DS_conv_cmd_err_to_ccp_exec_sts(ret); + // FIXME: ここも一旦握りつぶす(後で直す) + return DS_conv_cmd_err_to_ccp_cmd_ret(ret); } -CCP_EXEC_STS Cmd_DI_AOBC_CDIS_CLEAR_ALL_REALTIME(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_DI_AOBC_CDIS_CLEAR_ALL_REALTIME(const CommonCmdPacket* packet) { (void)packet; CDIS_clear_command_list(&DI_AOBC_cdis_); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_DI_AOBC_CDIS_CLEAR_ERR_LOG(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_DI_AOBC_CDIS_CLEAR_ERR_LOG(const CommonCmdPacket* packet) { (void)packet; // 記録されたエラー情報を解除 CDIS_clear_error_status(&DI_AOBC_cdis_); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_aobc.h b/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_aobc.h index 7962e24ce..87fcefe48 100644 --- a/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_aobc.h +++ b/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_aobc.h @@ -35,13 +35,13 @@ AppInfo DI_AOBC_cmd_dispatcher(void); * @note AOBC が自身のコマンドと解釈できるよう,Execution Type を上書きするため, packet を const cast する.[TODO] const cast やめたい * @note この関数を呼んでも良いのは,user_packet_handler のみ! * @param packet: CommonCmdPacket packet - * @retval CCP_EXEC_SUCCESS: 無事に転送された + * @retval CCP_CmdRet{CCP_EXEC_SUCCESS, *}: 無事に転送された * @retval それ以外: 転送失敗(DS_CMD_ERR_CODE を CCP_EXEC_STS に変換して返す.詳細エラーは DriverSuper を参照) */ -CCP_EXEC_STS DI_AOBC_dispatch_command(const CommonCmdPacket* packet); +CCP_CmdRet DI_AOBC_dispatch_command(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_DI_AOBC_CDIS_CLEAR_ALL_REALTIME(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DI_AOBC_CDIS_CLEAR_ALL_REALTIME(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_DI_AOBC_CDIS_CLEAR_ERR_LOG(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DI_AOBC_CDIS_CLEAR_ERR_LOG(const CommonCmdPacket* packet); #endif diff --git a/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_gs.c b/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_gs.c index 5508dcca7..6e5159d63 100644 --- a/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_gs.c +++ b/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_gs.c @@ -3,21 +3,16 @@ * @file * @brief GS Driver のインスタンス化 */ - #include "di_gs.h" - #include +#include #include +#include #include "../../Drivers/Com/gs_validate.h" #include "../../Settings/port_config.h" +#include "../../Settings/DriverSuper/driver_buffer_define.h" -static GS_Driver gs_driver_; -const GS_Driver* const gs_driver = &gs_driver_; - -static DI_GS_TlmPacketHandler DI_GS_ms_tlm_packet_handler_; // mission -const DI_GS_TlmPacketHandler* const DI_GS_ms_tlm_packet_handler = &DI_GS_ms_tlm_packet_handler_; -static DI_GS_TlmPacketHandler DI_GS_rp_tlm_packet_handler_; // replay tlm -const DI_GS_TlmPacketHandler* const DI_GS_rp_tlm_packet_handler = &DI_GS_rp_tlm_packet_handler_; +static RESULT DI_GS_init_(void); // 以下 init と update の定義 static void DI_GS_cmd_packet_handler_init_(void); @@ -30,6 +25,61 @@ static void DI_GS_rpt_packet_handler_(void); static void DI_GS_set_t2m_flush_interval_(cycle_t flush_interval, DI_GS_TlmPacketHandler* gs_tlm_packet_handler); +static GS_Driver gs_driver_; +const GS_Driver* const gs_driver = &gs_driver_; + +static DI_GS_TlmPacketHandler DI_GS_ms_tlm_packet_handler_; // mission +const DI_GS_TlmPacketHandler* const DI_GS_ms_tlm_packet_handler = &DI_GS_ms_tlm_packet_handler_; +static DI_GS_TlmPacketHandler DI_GS_rp_tlm_packet_handler_; // replay tlm +const DI_GS_TlmPacketHandler* const DI_GS_rp_tlm_packet_handler = &DI_GS_rp_tlm_packet_handler_; + +// バッファ +static DS_StreamRecBuffer DI_GS_ccsds_rx_buffer_[GS_RX_HEADER_NUM]; +static uint8_t DI_GS_ccsds_rx_buffer_allocation_[GS_RX_HEADER_NUM][DS_STREAM_REC_BUFFER_SIZE_DEFAULT]; +static DS_StreamRecBuffer DI_GS_uart_rx_buffer_[GS_RX_HEADER_NUM]; +static uint8_t DI_GS_uart_rx_buffer_allocation_[GS_RX_HEADER_NUM][DS_STREAM_REC_BUFFER_SIZE_DEFAULT]; + + +static RESULT DI_GS_init_(void) +{ + int stream; + DS_INIT_ERR_CODE ret; + DS_StreamRecBuffer* ccsds_rx_buffers[DS_STREAM_MAX]; + DS_StreamRecBuffer* uart_rx_buffers[DS_STREAM_MAX]; + DS_nullify_stream_rec_buffers(ccsds_rx_buffers); + DS_nullify_stream_rec_buffers(uart_rx_buffers); + + // GS_RX_HEADER_NUM > DS_STREAM_MAX のアサーションは gs.c でやっているのでここではしない + for (stream = 0; stream < GS_RX_HEADER_NUM; ++stream) + { + DS_ERR_CODE ret1; + DS_ERR_CODE ret2; + ret1 = DS_init_stream_rec_buffer(&DI_GS_ccsds_rx_buffer_[stream], + DI_GS_ccsds_rx_buffer_allocation_[stream], + sizeof(DI_GS_ccsds_rx_buffer_allocation_[stream])); + ret2 = DS_init_stream_rec_buffer(&DI_GS_uart_rx_buffer_[stream], + DI_GS_uart_rx_buffer_allocation_[stream], + sizeof(DI_GS_uart_rx_buffer_allocation_[stream])); + if (ret1 != DS_ERR_CODE_OK || ret2 != DS_ERR_CODE_OK) + { + Printf("GS buffer init Failed ! %d, %d \n", ret1, ret2); + return RESULT_ERR; + } + ccsds_rx_buffers[stream] = &DI_GS_ccsds_rx_buffer_[stream]; + uart_rx_buffers[stream] = &DI_GS_uart_rx_buffer_[stream]; + } + + ret = GS_init(&gs_driver_, PORT_CH_RS422_MOBC_EXT, ccsds_rx_buffers, uart_rx_buffers); + + if (ret != DS_INIT_OK) + { + Printf("!! GS Init Error %d !!\n", ret); + return RESULT_ERR; + } + + return RESULT_OK; +} + AppInfo DI_GS_cmd_packet_handler(void) { return AI_create_app_info("GS_CMD", DI_GS_cmd_packet_handler_init_, DI_GS_cmd_packet_handler_); @@ -47,12 +97,7 @@ AppInfo DI_GS_rpt_packet_handler(void) static void DI_GS_cmd_packet_handler_init_(void) { - int ret = GS_init(&gs_driver_, PORT_CH_RS422_MOBC_EXT); - - if (ret != 0) - { - Printf("!! GS Init Error %d !!\n", ret); - } + DI_GS_init_(); } static void DI_GS_cmd_packet_handler_(void) @@ -130,85 +175,85 @@ static void DI_GS_set_t2m_flush_interval_(cycle_t flush_interval, DI_GS_TlmPacke gs_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval = flush_interval; } -CCP_EXEC_STS Cmd_DI_GS_CCSDS_TX_START(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_DI_GS_DRIVER_RESET(const CommonCmdPacket* packet) { (void)packet; - gs_driver_.is_ccsds_tx_valid = 1; + if (DI_GS_init_() != RESULT_OK) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_DI_GS_CCSDS_TX_STOP(const CommonCmdPacket* packet) -{ - (void)packet; - gs_driver_.is_ccsds_tx_valid = 0; - - return CCP_EXEC_SUCCESS; -} - -CCP_EXEC_STS Cmd_DI_GS_DRIVER_RESET(const CommonCmdPacket* packet) -{ - (void)packet; - if (GS_init(&gs_driver_, PORT_CH_RS422_MOBC_EXT)) return CCP_EXEC_ILLEGAL_CONTEXT; - - return CCP_EXEC_SUCCESS; -} - -CCP_EXEC_STS Cmd_DI_GS_SET_MS_FLUSH_INTERVAL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_DI_GS_SET_MS_FLUSH_INTERVAL(const CommonCmdPacket* packet) { cycle_t flush_interval; - endian_memcpy(&flush_interval, CCP_get_param_head(packet), sizeof(cycle_t)); + ENDIAN_memcpy(&flush_interval, CCP_get_param_head(packet), sizeof(cycle_t)); DI_GS_set_t2m_flush_interval_(flush_interval, &DI_GS_ms_tlm_packet_handler_); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_DI_GS_SET_RP_FLUSH_INTERVAL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_DI_GS_SET_RP_FLUSH_INTERVAL(const CommonCmdPacket* packet) { cycle_t flush_interval; - endian_memcpy(&flush_interval, CCP_get_param_head(packet), sizeof(cycle_t)); + ENDIAN_memcpy(&flush_interval, CCP_get_param_head(packet), sizeof(cycle_t)); DI_GS_set_t2m_flush_interval_(flush_interval, &DI_GS_rp_tlm_packet_handler_); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_DI_GS_SET_FARM_PW(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_DI_GS_SET_FARM_PW(const CommonCmdPacket* packet) { uint8_t pw = CCP_get_param_head(packet)[0]; - if (pw < 1 || pw > 127) return CCP_EXEC_ILLEGAL_PARAMETER; + if (pw < 1 || pw > 127) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); GS_set_farm_pw(pw); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_DI_GS_SET_INFO(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_DI_GS_SET_INFO(const CommonCmdPacket* packet) { uint8_t which = CCP_get_param_head(packet)[0]; - if (which >= GS_PORT_TYPE_NUM) return CCP_EXEC_ILLEGAL_PARAMETER; + if (which >= GS_PORT_TYPE_NUM) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); gs_driver_.latest_info = &gs_driver_.info[(GS_PORT_TYPE)which]; gs_driver_.tlm_tx_port_type = (GS_PORT_TYPE)which; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_DI_GS_CCSDS_GET_BUFFER(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_DI_GS_CCSDS_GET_BUFFER(const CommonCmdPacket* packet) { (void)packet; gs_driver_.ccsds_info.buffer_num = CCSDS_get_buffer_num(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_DI_GS_CCSDS_SET_RATE(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_DI_GS_CCSDS_SET_RATE(const CommonCmdPacket* packet) { uint32_t ui_rate = (uint32_t)CCP_get_param_head(packet)[0]; - if (ui_rate == 0) return CCP_EXEC_ILLEGAL_PARAMETER; + if (ui_rate == 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); CCSDS_set_rate(ui_rate, &gs_driver_.driver_ccsds.ccsds_config); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); +} + +CCP_CmdRet Cmd_DI_GS_UART_TLM_ON(const CommonCmdPacket* packet) +{ + (void)packet; + gs_driver_.driver_uart.is_tlm_on = 1; + + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); +} + +CCP_CmdRet Cmd_DI_GS_UART_TLM_OFF(const CommonCmdPacket* packet) +{ + (void)packet; + gs_driver_.driver_uart.is_tlm_on = 0; + + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_gs.h b/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_gs.h index 483dcf391..035a494ae 100644 --- a/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_gs.h +++ b/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_gs.h @@ -5,10 +5,11 @@ #ifndef DI_GS_H_ #define DI_GS_H_ +#include + #include "../../Drivers/Com/gs.h" #include "../../TlmCmd/Ccsds/tcp_to_m_pdu.h" #include "../../TlmCmd/Ccsds/vcdu.h" -#include "../../Library/stdint.h" #include /** @@ -32,15 +33,16 @@ AppInfo DI_GS_cmd_packet_handler(void); AppInfo DI_GS_mst_packet_handler(void); AppInfo DI_GS_rpt_packet_handler(void); -CCP_EXEC_STS Cmd_DI_GS_CCSDS_TX_START(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_DI_GS_CCSDS_TX_STOP(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_DI_GS_DRIVER_RESET(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_DI_GS_SET_MS_FLUSH_INTERVAL(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_DI_GS_SET_RP_FLUSH_INTERVAL(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_DI_GS_SET_FARM_PW(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_DI_GS_SET_INFO(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DI_GS_DRIVER_RESET(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DI_GS_SET_MS_FLUSH_INTERVAL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DI_GS_SET_RP_FLUSH_INTERVAL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DI_GS_SET_FARM_PW(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DI_GS_SET_INFO(const CommonCmdPacket* packet); + +CCP_CmdRet Cmd_DI_GS_CCSDS_GET_BUFFER(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DI_GS_CCSDS_SET_RATE(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_DI_GS_CCSDS_GET_BUFFER(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_DI_GS_CCSDS_SET_RATE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DI_GS_UART_TLM_ON(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_DI_GS_UART_TLM_OFF(const CommonCmdPacket* packet); #endif diff --git a/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_uart_test.c b/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_uart_test.c index bb73da028..47dd8e9e5 100644 --- a/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_uart_test.c +++ b/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_uart_test.c @@ -4,16 +4,11 @@ * @brief UART と DriverSuper テスト用 */ #include "di_uart_test.h" - #include // for NULL - #include +#include #include "../../Settings/port_config.h" - - -static UART_TEST_Driver uart_test_instance_; -const UART_TEST_Driver* uart_test_instance; - +#include "../../Settings/DriverSuper/driver_buffer_define.h" static void UART_TEST_init_by_AM_(void); static void UART_TEST_init_(void); @@ -25,6 +20,15 @@ static void UART_TEST_update_(void); // static int UART_TEST_unset_rec_flag_(uint32_t no); // static int UART_TEST_is_rec_flag_up_(uint32_t no); +static UART_TEST_Driver uart_test_driver_; +const UART_TEST_Driver* const uart_test_driver = &uart_test_driver_; + +// バッファ +static DS_StreamRecBuffer DI_UART_TEST_rx_buffer_0_; +static DS_StreamRecBuffer DI_UART_TEST_rx_buffer_1_; +static uint8_t DI_UART_TEST_rx_buffer_allocation_0_[DS_STREAM_REC_BUFFER_SIZE_DEFAULT]; +static uint8_t DI_UART_TEST_rx_buffer_allocation_1_[DS_STREAM_REC_BUFFER_SIZE_DEFAULT]; + // !!!!!!!!!! 注意 !!!!!!!!!! // このDriverは,AM_initialize_app_ では初期化されない!! @@ -37,18 +41,45 @@ AppInfo UART_TEST_update(void) static void UART_TEST_init_by_AM_(void) { - uart_test_instance = &uart_test_instance_; + // ひとまず何もしない } static void UART_TEST_init_(void) { - DS_INIT_ERR_CODE ret; + DS_ERR_CODE ret1; + DS_INIT_ERR_CODE ret2; + DS_StreamRecBuffer* rx_buffers[DS_STREAM_MAX]; + DS_nullify_stream_rec_buffers(rx_buffers); + + ret1 = DS_init_stream_rec_buffer(&DI_UART_TEST_rx_buffer_0_, + DI_UART_TEST_rx_buffer_allocation_0_, + sizeof(DI_UART_TEST_rx_buffer_allocation_0_)); + if (ret1 != DS_ERR_CODE_OK) + { + Printf("UART_TEST buffer0 init Failed ! %d \n", ret1); + } + ret1 = DS_init_stream_rec_buffer(&DI_UART_TEST_rx_buffer_1_, + DI_UART_TEST_rx_buffer_allocation_1_, + sizeof(DI_UART_TEST_rx_buffer_allocation_1_)); + if (ret1 != DS_ERR_CODE_OK) + { + Printf("UART_TEST buffer1 init Failed ! %d \n", ret1); + } + + if (DS_STREAM_MAX < 2) + { + Printf("UART_TEST init Failed ! Lack of streams \n"); + return; + } + + rx_buffers[0] = &DI_UART_TEST_rx_buffer_0_; + rx_buffers[1] = &DI_UART_TEST_rx_buffer_1_; - ret = UART_TEST_init(&uart_test_instance_, PORT_CH_UART_TEST); - if (ret != DS_INIT_OK) + ret2 = UART_TEST_init(&uart_test_driver_, PORT_CH_UART_TEST, rx_buffers); + if (ret2 != DS_INIT_OK) { - Printf("UART_TEST init Failed! Err:%d \n", ret); + Printf("UART_TEST init Failed! Err:%d \n", ret2); } Printf("######################### \n"); @@ -61,34 +92,34 @@ static void UART_TEST_update_(void) { DS_REC_ERR_CODE ret; - ret = UART_TEST_rec(&uart_test_instance_); + ret = UART_TEST_rec(&uart_test_driver_); // TODO: エラー処理 (void)ret; } -CCP_EXEC_STS Cmd_UART_TEST_INIT_DI(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_UART_TEST_INIT_DI(const CommonCmdPacket* packet) { (void)packet; UART_TEST_init_(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_UART_TEST_UPDATE(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_UART_TEST_UPDATE(const CommonCmdPacket* packet) { (void)packet; UART_TEST_update_(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_UART_TEST_SEND_TEST(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_UART_TEST_SEND_TEST(const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); uint8_t id; @@ -96,8 +127,8 @@ CCP_EXEC_STS Cmd_UART_TEST_SEND_TEST(const CommonCmdPacket* packet) id = param[0]; - ret = UART_TEST_send(&uart_test_instance_, id); - return DS_conv_cmd_err_to_ccp_exec_sts(ret); + ret = UART_TEST_send(&uart_test_driver_, id); + return DS_conv_cmd_err_to_ccp_cmd_ret(ret); } #pragma section diff --git a/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_uart_test.h b/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_uart_test.h index 2088365cf..8f4de9848 100644 --- a/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_uart_test.h +++ b/Examples/minimum_user/src/src_user/Applications/DriverInstances/di_uart_test.h @@ -9,16 +9,16 @@ #include #include -extern const UART_TEST_Driver* uart_test_instance; +extern const UART_TEST_Driver* const uart_test_driver; // アプリケーション AppInfo UART_TEST_update(void); -CCP_EXEC_STS Cmd_UART_TEST_INIT_DI(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_UART_TEST_INIT_DI(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_UART_TEST_UPDATE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_UART_TEST_UPDATE(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_UART_TEST_SEND_TEST(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_UART_TEST_SEND_TEST(const CommonCmdPacket* packet); #endif diff --git a/Examples/minimum_user/src/src_user/Applications/UserDefined/debug_apps.c b/Examples/minimum_user/src/src_user/Applications/UserDefined/debug_apps.c index 7e092933f..a05338e20 100644 --- a/Examples/minimum_user/src/src_user/Applications/UserDefined/debug_apps.c +++ b/Examples/minimum_user/src/src_user/Applications/UserDefined/debug_apps.c @@ -2,12 +2,12 @@ #include "debug_apps.h" #include // for NULL +#include #include #include #include #include -#include #include #include #include @@ -21,7 +21,6 @@ // #include #include "../../Library/git_revision.h" #include "../../Library/vt100.h" -#include "../../Library/stdint.h" void APP_DBG_flush_screen_(void); void APP_DBG_print_time_stamp_(void); @@ -89,10 +88,13 @@ void APP_DBG_print_time_stamp_(void) void APP_DBG_print_cmd_status_(void) { VT100_erase_line(); - Printf("CMD: GS %3d, RT %3d, Ack %3d, Code 0x%02x, Sts %3d\n", + Printf("CMD: GS %3d, RT %3d, Ack %2d, ID 0x%02x, Sts %1d, EC %d\n", (PL_count_executed_nodes(&PH_gs_cmd_list) & 0xff), (PL_count_executed_nodes(&PH_rt_cmd_list) & 0xff), - gs_driver->info[gs_driver->tlm_tx_port_type].rx.cmd_ack, gs_command_dispatcher->prev.code, gs_command_dispatcher->prev.sts); + gs_driver->info[gs_driver->tlm_tx_port_type].rx.cmd_ack, + gs_command_dispatcher->prev.code, + gs_command_dispatcher->prev.cmd_ret.exec_sts, + gs_command_dispatcher->prev.cmd_ret.err_code); } void APP_DBG_print_event_logger0_(void) diff --git a/Examples/minimum_user/src/src_user/Applications/app_headers.h b/Examples/minimum_user/src/src_user/Applications/app_headers.h index eaa1a2bf0..96f1c7b06 100644 --- a/Examples/minimum_user/src/src_user/Applications/app_headers.h +++ b/Examples/minimum_user/src/src_user/Applications/app_headers.h @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/Examples/minimum_user/src/src_user/Applications/app_registry.c b/Examples/minimum_user/src/src_user/Applications/app_registry.c index 6fcc03b32..c4490ff11 100644 --- a/Examples/minimum_user/src/src_user/Applications/app_registry.c +++ b/Examples/minimum_user/src/src_user/Applications/app_registry.c @@ -26,12 +26,11 @@ void AR_load_initial_settings(void) add_application_(AR_DI_AOBC, DI_AOBC_update); add_application_(AR_DI_AOBC_CDIS, DI_AOBC_cmd_dispatcher); add_application_(AR_EVENT_UTILITY, EVENT_UTIL_create_app); - add_application_(AR_ANOMALY_HANDLER, AH_create_app); add_application_(AR_MEM_DUMP, MEM_create_app); add_application_(AR_TELEMETRY_MANAGER, TLM_MGR_create_app); add_application_(AR_DIVIDED_CMD_UTILITY, DCU_create_app); add_application_(AR_UTILITY_CMD, UTIL_CMD_create_app); - add_application_(AR_UTILITY_COUNTER, UTIL_COUNTER_create_app); + // add_application_(AR_UTILITY_COUNTER, UTIL_COUNTER_create_app); add_application_(AR_APP_DBG_FLUSH_SCREEN, APP_DBG_flush_screen); add_application_(AR_APP_DBG_PRINT_TIMESTAMP, APP_DBG_print_time_stamp); add_application_(AR_APP_DBG_PRINT_CMD_STATUS, APP_DBG_print_cmd_status); diff --git a/Examples/minimum_user/src/src_user/Applications/app_registry.h b/Examples/minimum_user/src/src_user/Applications/app_registry.h index 865daf991..19cf9d451 100644 --- a/Examples/minimum_user/src/src_user/Applications/app_registry.h +++ b/Examples/minimum_user/src/src_user/Applications/app_registry.h @@ -21,7 +21,6 @@ typedef enum AR_TLC_DISPATCHER_MIS, #endif AR_EVENT_UTILITY, - AR_ANOMALY_HANDLER, AR_MEM_DUMP, AR_TELEMETRY_MANAGER, AR_DIVIDED_CMD_UTILITY, diff --git a/Examples/minimum_user/src/src_user/Drivers/Aocs/aobc.c b/Examples/minimum_user/src/src_user/Drivers/Aocs/aobc.c index a40f73bad..0d7d00581 100644 --- a/Examples/minimum_user/src/src_user/Drivers/Aocs/aobc.c +++ b/Examples/minimum_user/src/src_user/Drivers/Aocs/aobc.c @@ -9,23 +9,21 @@ #include "./aobc_telemetry_buffer.h" #include #include -#include #include #include #include #define AOBC_STREAM_TLM_CMD (0) //!< テレコマで使うストリーム -static DS_ERR_CODE AOBC_load_driver_super_init_settings_(DriverSuper* p_super); -static DS_ERR_CODE AOBC_analyze_rec_data_(DS_StreamConfig* p_stream_config, - void* p_driver); - static uint8_t AOBC_tx_frame_[EB90_FRAME_HEADER_SIZE + CTCP_MAX_LEN + EB90_FRAME_FOOTER_SIZE]; +static DS_ERR_CODE AOBC_load_driver_super_init_settings_(DriverSuper* p_super); +static DS_ERR_CODE AOBC_analyze_rec_data_(DS_StreamConfig* p_stream_config, + void* p_driver); -DS_INIT_ERR_CODE AOBC_init(AOBC_Driver* aobc_driver, uint8_t ch) +DS_INIT_ERR_CODE AOBC_init(AOBC_Driver* aobc_driver, uint8_t ch, DS_StreamRecBuffer* rx_buffer) { DS_ERR_CODE ret; @@ -40,6 +38,7 @@ DS_INIT_ERR_CODE AOBC_init(AOBC_Driver* aobc_driver, uint8_t ch) ret = DS_init(&(aobc_driver->driver.super), &(aobc_driver->driver.uart_config), + rx_buffer, AOBC_load_driver_super_init_settings_); if (ret != DS_ERR_CODE_OK) return DS_INIT_DS_INIT_ERR; return DS_INIT_OK; diff --git a/Examples/minimum_user/src/src_user/Drivers/Aocs/aobc.h b/Examples/minimum_user/src/src_user/Drivers/Aocs/aobc.h index a5f8bc1f3..f1ac3e42c 100644 --- a/Examples/minimum_user/src/src_user/Drivers/Aocs/aobc.h +++ b/Examples/minimum_user/src/src_user/Drivers/Aocs/aobc.h @@ -78,10 +78,11 @@ struct AOBC_Driver * * AOBC_Driver 構造体のポインタを渡すことでポートを初期化し, AOBC_Driver の各メンバも初期化する * @param aobc_driver: 初期化する AOBC_Driver 構造体へのポインタ - * @param ch : AOBC が接続されている UART ポート番号 + * @param ch: AOBC が接続されている UART ポート番号 + * @param rx_buffer: 受信バッファ * @return DS_INIT_ERR_CODE */ -DS_INIT_ERR_CODE AOBC_init(AOBC_Driver* aobc_driver, uint8_t ch); +DS_INIT_ERR_CODE AOBC_init(AOBC_Driver* aobc_driver, uint8_t ch, DS_StreamRecBuffer* rx_buffer); /** * @brief AOBC のデータ(テレメ)受信 @@ -91,9 +92,9 @@ DS_INIT_ERR_CODE AOBC_init(AOBC_Driver* aobc_driver, uint8_t ch); DS_REC_ERR_CODE AOBC_rec(AOBC_Driver* aobc_driver); /** - * @brief AOB Cへのコマンド送信 + * @brief AOBC へのコマンド送信 * @param aobc_driver: AOBC_Driver 構造体へのポインタ - * @param packet : 送信する packet + * @param packet: 送信する packet * @return DS_CMD_ERR_CODE * @note これを受信した AOBC C2A は, packet をそのまま PH_analyze_cmd_packet に流せばよい. */ diff --git a/Examples/minimum_user/src/src_user/Drivers/Aocs/aobc_telemetry_buffer.c b/Examples/minimum_user/src/src_user/Drivers/Aocs/aobc_telemetry_buffer.c index 5a0c313ed..8606e4ad9 100644 --- a/Examples/minimum_user/src/src_user/Drivers/Aocs/aobc_telemetry_buffer.c +++ b/Examples/minimum_user/src/src_user/Drivers/Aocs/aobc_telemetry_buffer.c @@ -65,110 +65,121 @@ static DS_ERR_CODE AOBC_analyze_tlm_aobc_aobc_(const CommonTlmPacket* packet, AO // TODO: CRC チェック // MOBC 内部でテレメデータへアクセスしやすいようにするための構造体へのパース - endian_memcpy(&temp_u16, &(f[0]), 2); + ENDIAN_memcpy(&temp_u16, &(f[0]), 2); temp_u16 >>= 13; temp_u16 &= 0x7; aobc_driver->tlm_data.aobc_aobc.ph.ver = temp_u16; - endian_memcpy(&temp_u16, &(f[0]), 2); + ENDIAN_memcpy(&temp_u16, &(f[0]), 2); temp_u16 >>= 12; temp_u16 &= 0x1; aobc_driver->tlm_data.aobc_aobc.ph.type = temp_u16; - endian_memcpy(&temp_u16, &(f[0]), 2); + ENDIAN_memcpy(&temp_u16, &(f[0]), 2); temp_u16 >>= 11; temp_u16 &= 0x1; aobc_driver->tlm_data.aobc_aobc.ph.sh_flag = temp_u16; - endian_memcpy(&temp_u16, &(f[0]), 2); + ENDIAN_memcpy(&temp_u16, &(f[0]), 2); temp_u16 >>= 0; temp_u16 &= 0x7ff; aobc_driver->tlm_data.aobc_aobc.ph.apid = temp_u16; - endian_memcpy(&temp_u16, &(f[2]), 2); + ENDIAN_memcpy(&temp_u16, &(f[2]), 2); temp_u16 >>= 14; temp_u16 &= 0x3; aobc_driver->tlm_data.aobc_aobc.ph.seq_flag = temp_u16; - endian_memcpy(&temp_u16, &(f[2]), 2); + ENDIAN_memcpy(&temp_u16, &(f[2]), 2); temp_u16 >>= 0; temp_u16 &= 0x3fff; aobc_driver->tlm_data.aobc_aobc.ph.seq_count = temp_u16; - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.ph.packet_len), &(f[4]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.sh.ver), &(f[6]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.sh.ti), &(f[7]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.sh.tlm_id), &(f[11]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.sh.global_time), &(f[12]), 8); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.sh.on_board_subnet_time), &(f[20]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.sh.dest_flags), &(f[24]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.sh.dr_partition), &(f[25]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tm_mode_time), &(f[26]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tm_utl_unixtime_epoch), &(f[30]), 8); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tm_cycles_per_sec_fix_ratio), &(f[38]), 8); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.mm_sts), &(f[46]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.mm_opsmode), &(f[47]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.mm_opsmode_prev), &(f[48]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tdsp_current_id), &(f[49]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tdsp_cmd_last_err_time_master), &(f[50]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tdsp_cmd_last_err_time_step), &(f[54]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tdsp_cmd_last_err_id), &(f[55]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tdsp_cmd_last_err_sts), &(f[57]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd_counter), &(f[61]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd_last_exec_time), &(f[65]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd_last_exec_id), &(f[69]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd_last_exec_sts), &(f[71]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd_last_err_time), &(f[75]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd_last_err_id), &(f[79]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd_last_err_sts), &(f[81]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd_err_counter), &(f[85]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd_counter), &(f[89]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd_last_exec_time), &(f[93]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd_last_exec_id), &(f[97]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd_last_exec_sts), &(f[99]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd_last_err_time), &(f[103]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd_last_err_id), &(f[107]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd_last_err_sts), &(f[109]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd_err_counter), &(f[113]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.counter), &(f[117]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.queued), &(f[121]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.last_exec_time), &(f[122]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.last_exec_id), &(f[126]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.last_exec_sts), &(f[128]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.last_err_time), &(f[132]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.last_err_id), &(f[136]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.last_err_sts), &(f[138]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.err_counter), &(f[142]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.soe_flag), &(f[146]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.lockout_flag), &(f[147]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.next_time), &(f[148]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.next_id), &(f[152]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.counter), &(f[154]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.queued), &(f[158]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.last_exec_time), &(f[159]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.last_exec_id), &(f[163]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.last_exec_sts), &(f[165]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.last_err_time), &(f[169]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.last_err_id), &(f[173]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.last_err_sts), &(f[175]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.err_counter), &(f[179]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.soe_flag), &(f[183]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.lockout_flag), &(f[184]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.next_time), &(f[185]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.next_id), &(f[189]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.counter), &(f[191]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.queued), &(f[195]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.last_exec_time), &(f[196]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.last_exec_id), &(f[200]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.last_exec_sts), &(f[202]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.last_err_time), &(f[206]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.last_err_id), &(f[210]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.last_err_sts), &(f[212]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.err_counter), &(f[216]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.soe_flag), &(f[220]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.lockout_flag), &(f[221]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.next_time), &(f[222]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.next_id), &(f[226]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.bct_blk_ptr), &(f[228]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.bct_cmd_ptr), &(f[229]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.bct_regd_time), &(f[230]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.bct_regd_id), &(f[234]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.ms_tlm_counter), &(f[236]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_aobc.ms_tlm_queued), &(f[240]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.ph.packet_len), &(f[4]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.sh.ver), &(f[6]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.sh.ti), &(f[7]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.sh.tlm_id), &(f[11]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.sh.global_time), &(f[12]), 8); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.sh.on_board_subnet_time), &(f[20]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.sh.dest_flags), &(f[24]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.sh.dest_info), &(f[25]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tm_mode_time), &(f[26]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tm_utl_unixtime_epoch), &(f[30]), 8); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tm_cycles_per_sec_fix_ratio), &(f[38]), 8); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.mm_sts), &(f[46]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.mm_opsmode), &(f[47]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.mm_opsmode_prev), &(f[48]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tdsp.current_id), &(f[49]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tdsp.last_err.time.total_cycle), &(f[50]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tdsp.last_err.time.step), &(f[54]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tdsp.last_err.id), &(f[55]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tdsp.last_err.exec_sts), &(f[57]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tdsp.last_err.err_code), &(f[58]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd.counter), &(f[62]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd.last_exec.time), &(f[66]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd.last_exec.id), &(f[70]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd.last_exec.exec_sts), &(f[72]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd.last_exec.err_code), &(f[73]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd.last_err.time), &(f[77]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd.last_err.id), &(f[81]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd.last_err.exec_sts), &(f[83]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd.last_err.err_code), &(f[84]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.gs_cmd.err_counter), &(f[88]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd.counter), &(f[92]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd.last_exec.time), &(f[96]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd.last_exec.id), &(f[100]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd.last_exec.exec_sts), &(f[102]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd.last_exec.err_code), &(f[103]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd.last_err.time), &(f[107]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd.last_err.id), &(f[111]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd.last_err.exec_sts), &(f[113]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd.last_err.err_code), &(f[114]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.rt_cmd.err_counter), &(f[118]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.counter), &(f[122]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.queued), &(f[126]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.last_exec.time), &(f[127]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.last_exec.id), &(f[131]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.last_exec.exec_sts), &(f[133]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.last_exec.err_code), &(f[134]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.last_err.time), &(f[138]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.last_err.id), &(f[142]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.last_err.exec_sts), &(f[144]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.last_err.err_code), &(f[145]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.err_counter), &(f[149]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.soe_flag), &(f[153]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.lockout_flag), &(f[154]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.next_time), &(f[155]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_gs.next_id), &(f[159]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.counter), &(f[161]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.queued), &(f[165]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.last_exec.time), &(f[166]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.last_exec.id), &(f[170]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.last_exec.exec_sts), &(f[172]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.last_exec.err_code), &(f[173]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.last_err.time), &(f[177]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.last_err.id), &(f[181]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.last_err.exec_sts), &(f[183]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.last_err.err_code), &(f[184]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.err_counter), &(f[188]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.soe_flag), &(f[192]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.lockout_flag), &(f[193]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.next_time), &(f[194]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_bc.next_id), &(f[198]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.counter), &(f[200]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.queued), &(f[204]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.last_exec.time), &(f[205]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.last_exec.id), &(f[209]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.last_exec.exec_sts), &(f[211]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.last_exec.err_code), &(f[212]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.last_err.time), &(f[216]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.last_err.id), &(f[220]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.last_err.exec_sts), &(f[222]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.last_err.err_code), &(f[223]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.err_counter), &(f[227]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.soe_flag), &(f[231]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.lockout_flag), &(f[232]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.next_time), &(f[233]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.tlc_tlm.next_id), &(f[237]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.bct_blk_ptr), &(f[239]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.bct_cmd_ptr), &(f[240]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.bct_regd_time), &(f[241]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.bct_regd_id), &(f[245]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.ms_tlm_counter), &(f[247]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_aobc.ms_tlm_queued), &(f[251]), 1); // TODO: ビットフィールドをつかっている系は,様々なパターンがあり得るので,今後,バグが出ないか注視する // ワーニング回避 @@ -202,203 +213,202 @@ static DS_ERR_CODE AOBC_analyze_tlm_aobc_hk_(const CommonTlmPacket* packet, AOBC // TODO: CRC チェック // MOBC 内部でテレメデータへアクセスしやすいようにするための構造体へのパース - endian_memcpy(&temp_u16, &(f[0]), 2); + ENDIAN_memcpy(&temp_u16, &(f[0]), 2); temp_u16 >>= 13; temp_u16 &= 0x7; aobc_driver->tlm_data.aobc_hk.ph.ver = temp_u16; - endian_memcpy(&temp_u16, &(f[0]), 2); + ENDIAN_memcpy(&temp_u16, &(f[0]), 2); temp_u16 >>= 12; temp_u16 &= 0x1; aobc_driver->tlm_data.aobc_hk.ph.type = temp_u16; - endian_memcpy(&temp_u16, &(f[0]), 2); + ENDIAN_memcpy(&temp_u16, &(f[0]), 2); temp_u16 >>= 11; temp_u16 &= 0x1; aobc_driver->tlm_data.aobc_hk.ph.sh_flag = temp_u16; - endian_memcpy(&temp_u16, &(f[0]), 2); + ENDIAN_memcpy(&temp_u16, &(f[0]), 2); temp_u16 >>= 0; temp_u16 &= 0x7ff; aobc_driver->tlm_data.aobc_hk.ph.apid = temp_u16; - endian_memcpy(&temp_u16, &(f[2]), 2); + ENDIAN_memcpy(&temp_u16, &(f[2]), 2); temp_u16 >>= 14; temp_u16 &= 0x3; aobc_driver->tlm_data.aobc_hk.ph.seq_flag = temp_u16; - endian_memcpy(&temp_u16, &(f[2]), 2); + ENDIAN_memcpy(&temp_u16, &(f[2]), 2); temp_u16 >>= 0; temp_u16 &= 0x3fff; aobc_driver->tlm_data.aobc_hk.ph.seq_count = temp_u16; - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.ph.packet_len), &(f[4]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.sh.ver), &(f[6]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.sh.ti), &(f[7]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.sh.tlm_id), &(f[11]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.sh.global_time), &(f[12]), 8); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.sh.on_board_subnet_time), &(f[20]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.sh.dest_flags), &(f[24]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.sh.dr_partition), &(f[25]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tm_mode_time), &(f[26]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tm_unixtime_at_ti0), &(f[30]), 8); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_mm_opsmode), &(f[38]), 1); - endian_memcpy(&temp_u8, &(f[39]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.ph.packet_len), &(f[4]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.sh.ver), &(f[6]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.sh.ti), &(f[7]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.sh.tlm_id), &(f[11]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.sh.global_time), &(f[12]), 8); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.sh.on_board_subnet_time), &(f[20]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.sh.dest_flags), &(f[24]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.sh.dest_info), &(f[25]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tm_mode_time), &(f[26]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tm_unixtime_at_ti0), &(f[30]), 8); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.mm_opsmode), &(f[38]), 1); + ENDIAN_memcpy(&temp_u8, &(f[39]), 1); temp_u8 >>= 7; temp_u8 &= 0x1; - aobc_driver->tlm_data.aobc_hk.obc_mm_sts = temp_u8; - endian_memcpy(&temp_u8, &(f[39]), 1); + aobc_driver->tlm_data.aobc_hk.obc.mm_sts = temp_u8; + ENDIAN_memcpy(&temp_u8, &(f[39]), 1); temp_u8 >>= 0; temp_u8 &= 0x7f; - aobc_driver->tlm_data.aobc_hk.obc_mm_opsmode_prev = temp_u8; - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tdsp_current_id), &(f[40]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_gs_cmd_counter), &(f[42]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_gs_cmd_last_exec_time), &(f[46]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_gs_cmd_last_exec_id), &(f[50]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_gs_cmd_last_exec_sts), &(f[52]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_gs_cmd_last_err_time), &(f[53]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_gs_cmd_last_err_id), &(f[57]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_gs_cmd_last_err_sts), &(f[59]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_rt_cmd_counter), &(f[60]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_rt_cmd_last_exec_time), &(f[64]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_rt_cmd_last_exec_id), &(f[68]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_rt_cmd_last_exec_sts), &(f[70]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_rt_cmd_last_err_time), &(f[74]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_rt_cmd_last_err_id), &(f[78]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_rt_cmd_last_err_sts), &(f[80]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tlc_gs.counter), &(f[84]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tlc_gs.queued), &(f[88]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tlc_gs.last_exec_time), &(f[89]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tlc_gs.last_exec_id), &(f[93]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tlc_gs.last_exec_sts), &(f[95]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tlc_gs.last_err_time), &(f[96]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tlc_gs.last_err_id), &(f[100]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tlc_gs.last_err_sts), &(f[102]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tlc_gs.next_time), &(f[103]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tlc_gs.next_id), &(f[107]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tlc_bc.counter), &(f[109]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tlc_bc.queued), &(f[113]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tlc_tlm.counter), &(f[114]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_tlc_tlm.queued), &(f[118]), 1); - endian_memcpy(&temp_u8, &(f[119]), 1); + aobc_driver->tlm_data.aobc_hk.obc.mm_opsmode_prev = temp_u8; + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tdsp.current_id), &(f[40]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.gs_cmd.counter), &(f[42]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.gs_cmd.last_exec.time), &(f[46]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.gs_cmd.last_exec.id), &(f[50]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.gs_cmd.last_exec.exec_sts), &(f[52]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.gs_cmd.last_exec.err_code), &(f[53]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.gs_cmd.last_err.time), &(f[57]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.gs_cmd.last_err.id), &(f[61]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.gs_cmd.last_err.exec_sts), &(f[63]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.gs_cmd.last_err.err_code), &(f[64]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.gs_cmd.err_counter), &(f[68]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.rt_cmd.counter), &(f[72]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.rt_cmd.last_exec.time), &(f[76]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.rt_cmd.last_exec.id), &(f[80]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.rt_cmd.last_exec.exec_sts), &(f[82]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.rt_cmd.last_err.err_code), &(f[83]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.rt_cmd.last_err.time), &(f[87]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.rt_cmd.last_err.id), &(f[91]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.rt_cmd.last_err.exec_sts), &(f[93]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.rt_cmd.last_exec.err_code), &(f[94]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.rt_cmd.err_counter), &(f[98]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_gs.counter), &(f[102]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_gs.queued), &(f[106]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_gs.last_exec.time), &(f[107]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_gs.last_exec.id), &(f[111]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_gs.last_exec.exec_sts), &(f[113]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_gs.last_exec.err_code), &(f[114]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_gs.last_err.time), &(f[118]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_gs.last_err.id), &(f[122]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_gs.last_err.exec_sts), &(f[124]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_gs.last_err.err_code), &(f[125]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_gs.err_counter), &(f[129]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_gs.next_time), &(f[130]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_gs.next_id), &(f[134]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_bc.counter), &(f[136]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_bc.queued), &(f[140]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_tlm.counter), &(f[141]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.tlc_tlm.queued), &(f[145]), 1); + ENDIAN_memcpy(&temp_u8, &(f[146]), 1); temp_u8 >>= 7; temp_u8 &= 0x1; - aobc_driver->tlm_data.aobc_hk.obc_tlc_gs.soe_flag = temp_u8; - endian_memcpy(&temp_u8, &(f[119]), 1); + aobc_driver->tlm_data.aobc_hk.obc.tlc_gs.soe_flag = temp_u8; + ENDIAN_memcpy(&temp_u8, &(f[146]), 1); temp_u8 >>= 6; temp_u8 &= 0x1; - aobc_driver->tlm_data.aobc_hk.obc_tlc_gs.lockout_flag = temp_u8; - endian_memcpy(&temp_u8, &(f[119]), 1); + aobc_driver->tlm_data.aobc_hk.obc.tlc_gs.lockout_flag = temp_u8; + ENDIAN_memcpy(&temp_u8, &(f[146]), 1); temp_u8 >>= 5; temp_u8 &= 0x1; - aobc_driver->tlm_data.aobc_hk.obc_tlc_bc.soe_flag = temp_u8; - endian_memcpy(&temp_u8, &(f[119]), 1); + aobc_driver->tlm_data.aobc_hk.obc.tlc_bc.soe_flag = temp_u8; + ENDIAN_memcpy(&temp_u8, &(f[146]), 1); temp_u8 >>= 4; temp_u8 &= 0x1; - aobc_driver->tlm_data.aobc_hk.obc_tlc_bc.lockout_flag = temp_u8; - endian_memcpy(&temp_u8, &(f[119]), 1); + aobc_driver->tlm_data.aobc_hk.obc.tlc_bc.lockout_flag = temp_u8; + ENDIAN_memcpy(&temp_u8, &(f[146]), 1); temp_u8 >>= 3; temp_u8 &= 0x1; - aobc_driver->tlm_data.aobc_hk.obc_tlc_tlm.soe_flag = temp_u8; - endian_memcpy(&temp_u8, &(f[119]), 1); + aobc_driver->tlm_data.aobc_hk.obc.tlc_tlm.soe_flag = temp_u8; + ENDIAN_memcpy(&temp_u8, &(f[146]), 1); temp_u8 >>= 2; temp_u8 &= 0x1; - aobc_driver->tlm_data.aobc_hk.obc_tlc_tlm.lockout_flag = temp_u8; - endian_memcpy(&temp_u8, &(f[120]), 1); + aobc_driver->tlm_data.aobc_hk.obc.tlc_tlm.lockout_flag = temp_u8; + ENDIAN_memcpy(&temp_u8, &(f[147]), 1); temp_u8 >>= 7; temp_u8 &= 0x1; aobc_driver->tlm_data.aobc_hk.wdt.is_enable = temp_u8; - endian_memcpy(&temp_u8, &(f[120]), 1); + ENDIAN_memcpy(&temp_u8, &(f[147]), 1); temp_u8 >>= 6; temp_u8 &= 0x1; aobc_driver->tlm_data.aobc_hk.wdt.is_clear_enable = temp_u8; - endian_memcpy(&temp_u8, &(f[120]), 1); + ENDIAN_memcpy(&temp_u8, &(f[147]), 1); temp_u8 >>= 0; temp_u8 &= 0x3f; aobc_driver->tlm_data.aobc_hk.dummy_data0 = temp_u8; - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_bct_blk_ptr), &(f[121]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_bct_cmd_ptr), &(f[123]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_bct_regd_time), &(f[124]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_bct_regd_id), &(f[128]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.statistics.record_counter_total), &(f[130]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.statistics.record_counters_high), &(f[134]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.statistics.record_counters_middle), &(f[136]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.statistics.record_counters_low), &(f[138]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.statistics.record_counters_el), &(f[140]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.statistics.record_counters_eh), &(f[142]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_event.group), &(f[144]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_event.local), &(f[145]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_event.err_level), &(f[149]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_event.time.total_cycle), &(f[150]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_event.time.step), &(f[154]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_event.note), &(f[155]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_high_event.group), &(f[159]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_high_event.local), &(f[160]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_high_event.time.total_cycle), &(f[164]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_high_event.time.step), &(f[168]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_high_event.note), &(f[169]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.eh.log_table.respond_counter), &(f[171]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc_gs_cmd_err_counter), &(f[175]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.git_rev_core), &(f[176]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.git_rev_user), &(f[180]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.bct_blk_ptr), &(f[184]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.bct_cmd_ptr), &(f[185]), 1); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.bct_regd_time), &(f[186]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.bct_regd_id), &(f[190]), 2); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data1), &(f[192]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data2), &(f[196]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data3), &(f[200]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data4), &(f[204]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data5), &(f[208]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data6), &(f[212]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data7), &(f[216]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data8), &(f[220]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data9), &(f[224]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data10), &(f[228]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data11), &(f[232]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data12), &(f[236]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data13), &(f[240]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data14), &(f[244]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data15), &(f[248]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data16), &(f[252]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data17), &(f[256]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data18), &(f[260]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data19), &(f[264]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data20), &(f[268]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data21), &(f[272]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data22), &(f[276]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data23), &(f[280]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data24), &(f[284]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data25), &(f[288]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data26), &(f[292]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data27), &(f[296]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data28), &(f[300]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data29), &(f[304]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data30), &(f[308]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data31), &(f[312]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data32), &(f[316]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data33), &(f[320]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data34), &(f[324]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data35), &(f[328]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data36), &(f[332]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data37), &(f[336]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data38), &(f[340]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data39), &(f[344]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data40), &(f[348]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data41), &(f[352]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data42), &(f[356]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data43), &(f[360]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data44), &(f[364]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data45), &(f[368]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data46), &(f[372]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data47), &(f[376]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data48), &(f[380]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data49), &(f[384]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data50), &(f[388]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data51), &(f[392]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data52), &(f[396]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data53), &(f[400]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data54), &(f[404]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data55), &(f[408]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data56), &(f[412]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data57), &(f[416]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data58), &(f[420]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data59), &(f[424]), 4); - endian_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data60), &(f[428]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.bct_blk_ptr), &(f[148]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.bct_cmd_ptr), &(f[150]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.bct_regd_time), &(f[151]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.obc.bct_regd_id), &(f[155]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.statistics.record_counter_total), &(f[157]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.statistics.record_counters_high), &(f[161]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.statistics.record_counters_middle), &(f[163]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.statistics.record_counters_low), &(f[165]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.statistics.record_counters_el), &(f[167]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.statistics.record_counters_eh), &(f[169]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_event.group), &(f[171]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_event.local), &(f[172]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_event.err_level), &(f[176]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_event.time.total_cycle), &(f[177]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_event.time.step), &(f[181]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_event.note), &(f[182]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_high_event.group), &(f[186]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_high_event.local), &(f[187]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_high_event.time.total_cycle), &(f[191]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_high_event.time.step), &(f[195]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.el.latest_high_event.note), &(f[196]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.eh.log_table.respond_counter), &(f[198]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.git_rev_core), &(f[202]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.git_rev_user), &(f[206]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.bct_blk_ptr), &(f[210]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.bct_cmd_ptr), &(f[211]), 1); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.bct_regd_time), &(f[212]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.bct_regd_id), &(f[216]), 2); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data1), &(f[218]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data2), &(f[222]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data3), &(f[226]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data4), &(f[230]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data5), &(f[234]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data6), &(f[238]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data7), &(f[242]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data8), &(f[246]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data9), &(f[250]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data10), &(f[254]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data11), &(f[258]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data12), &(f[262]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data13), &(f[266]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data14), &(f[270]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data15), &(f[274]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data16), &(f[278]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data17), &(f[282]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data18), &(f[286]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data19), &(f[290]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data20), &(f[294]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data21), &(f[298]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data22), &(f[302]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data23), &(f[306]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data24), &(f[310]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data25), &(f[314]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data26), &(f[318]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data27), &(f[322]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data28), &(f[326]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data29), &(f[330]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data30), &(f[334]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data31), &(f[338]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data32), &(f[342]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data33), &(f[346]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data34), &(f[350]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data35), &(f[354]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data36), &(f[358]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data37), &(f[362]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data38), &(f[366]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data39), &(f[370]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data40), &(f[374]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data41), &(f[378]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data42), &(f[382]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data43), &(f[386]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data44), &(f[390]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data45), &(f[394]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data46), &(f[398]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data47), &(f[402]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data48), &(f[406]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data49), &(f[410]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data50), &(f[414]), 4); + ENDIAN_memcpy(&(aobc_driver->tlm_data.aobc_hk.dummy_data51), &(f[418]), 4); // TODO: ビットフィールドをつかっている系は,様々なパターンがあり得るので,今後,バグが出ないか注視する // ワーニング回避 diff --git a/Examples/minimum_user/src/src_user/Drivers/Aocs/aobc_telemetry_data_definitions.h b/Examples/minimum_user/src/src_user/Drivers/Aocs/aobc_telemetry_data_definitions.h index 7b0442b12..f598b8ef9 100644 --- a/Examples/minimum_user/src/src_user/Drivers/Aocs/aobc_telemetry_data_definitions.h +++ b/Examples/minimum_user/src/src_user/Drivers/Aocs/aobc_telemetry_data_definitions.h @@ -28,7 +28,7 @@ typedef struct double global_time; uint32_t on_board_subnet_time; uint8_t dest_flags; - uint8_t dr_partition; + uint8_t dest_info; } sh; uint32_t tm_mode_time; double tm_utl_unixtime_epoch; @@ -36,37 +36,77 @@ typedef struct uint8_t mm_sts; uint8_t mm_opsmode; uint8_t mm_opsmode_prev; - uint8_t tdsp_current_id; - uint32_t tdsp_cmd_last_err_time_master; - uint8_t tdsp_cmd_last_err_time_step; - uint16_t tdsp_cmd_last_err_id; - int32_t tdsp_cmd_last_err_sts; - uint32_t gs_cmd_counter; - uint32_t gs_cmd_last_exec_time; - uint16_t gs_cmd_last_exec_id; - int32_t gs_cmd_last_exec_sts; - uint32_t gs_cmd_last_err_time; - uint16_t gs_cmd_last_err_id; - int32_t gs_cmd_last_err_sts; - uint32_t gs_cmd_err_counter; - uint32_t rt_cmd_counter; - uint32_t rt_cmd_last_exec_time; - uint16_t rt_cmd_last_exec_id; - int32_t rt_cmd_last_exec_sts; - uint32_t rt_cmd_last_err_time; - uint16_t rt_cmd_last_err_id; - int32_t rt_cmd_last_err_sts; - uint32_t rt_cmd_err_counter; + struct + { + uint8_t current_id; + struct + { + struct + { + uint32_t total_cycle; + uint8_t step; + } time; + uint16_t id; + uint8_t exec_sts; + uint32_t err_code; + } last_err; + } tdsp; + struct + { + uint32_t counter; + struct + { + uint32_t time; + uint16_t id; + uint8_t exec_sts; + uint32_t err_code; + } last_exec; + struct + { + uint32_t time; + uint16_t id; + uint8_t exec_sts; + uint32_t err_code; + } last_err; + uint32_t err_counter; + } gs_cmd; + struct + { + uint32_t counter; + struct + { + uint32_t time; + uint16_t id; + uint8_t exec_sts; + uint32_t err_code; + } last_exec; + struct + { + uint32_t time; + uint16_t id; + uint8_t exec_sts; + uint32_t err_code; + } last_err; + uint32_t err_counter; + } rt_cmd; struct { uint32_t counter; uint8_t queued; - uint32_t last_exec_time; - uint16_t last_exec_id; - int32_t last_exec_sts; - uint32_t last_err_time; - uint16_t last_err_id; - int32_t last_err_sts; + struct + { + uint32_t time; + uint16_t id; + uint8_t exec_sts; + uint32_t err_code; + } last_exec; + struct + { + uint32_t time; + uint16_t id; + uint8_t exec_sts; + uint32_t err_code; + } last_err; uint32_t err_counter; uint8_t soe_flag; uint8_t lockout_flag; @@ -77,12 +117,20 @@ typedef struct { uint32_t counter; uint8_t queued; - uint32_t last_exec_time; - uint16_t last_exec_id; - int32_t last_exec_sts; - uint32_t last_err_time; - uint16_t last_err_id; - int32_t last_err_sts; + struct + { + uint32_t time; + uint16_t id; + uint8_t exec_sts; + uint32_t err_code; + } last_exec; + struct + { + uint32_t time; + uint16_t id; + uint8_t exec_sts; + uint32_t err_code; + } last_err; uint32_t err_counter; uint8_t soe_flag; uint8_t lockout_flag; @@ -93,12 +141,20 @@ typedef struct { uint32_t counter; uint8_t queued; - uint32_t last_exec_time; - uint16_t last_exec_id; - int32_t last_exec_sts; - uint32_t last_err_time; - uint16_t last_err_id; - int32_t last_err_sts; + struct + { + uint32_t time; + uint16_t id; + uint8_t exec_sts; + uint32_t err_code; + } last_exec; + struct + { + uint32_t time; + uint16_t id; + uint8_t exec_sts; + uint32_t err_code; + } last_err; uint32_t err_counter; uint8_t soe_flag; uint8_t lockout_flag; @@ -132,67 +188,106 @@ typedef struct double global_time; uint32_t on_board_subnet_time; uint8_t dest_flags; - uint8_t dr_partition; + uint8_t dest_info; } sh; - uint32_t obc_tm_mode_time; - double obc_tm_unixtime_at_ti0; - uint8_t obc_mm_opsmode; - uint8_t obc_mm_sts; - uint8_t obc_mm_opsmode_prev; - uint16_t obc_tdsp_current_id; - uint32_t obc_gs_cmd_counter; - uint32_t obc_gs_cmd_last_exec_time; - uint16_t obc_gs_cmd_last_exec_id; - int8_t obc_gs_cmd_last_exec_sts; - uint32_t obc_gs_cmd_last_err_time; - uint16_t obc_gs_cmd_last_err_id; - int8_t obc_gs_cmd_last_err_sts; - uint32_t obc_rt_cmd_counter; - uint32_t obc_rt_cmd_last_exec_time; - uint16_t obc_rt_cmd_last_exec_id; - int32_t obc_rt_cmd_last_exec_sts; - uint32_t obc_rt_cmd_last_err_time; - uint16_t obc_rt_cmd_last_err_id; - int32_t obc_rt_cmd_last_err_sts; struct { - uint32_t counter; - uint8_t queued; - uint32_t last_exec_time; - uint16_t last_exec_id; - int8_t last_exec_sts; - uint32_t last_err_time; - uint16_t last_err_id; - int8_t last_err_sts; - uint32_t next_time; - uint16_t next_id; - uint8_t soe_flag; - uint8_t lockout_flag; - } obc_tlc_gs; - struct - { - uint32_t counter; - uint8_t queued; - uint8_t soe_flag; - uint8_t lockout_flag; - } obc_tlc_bc; - struct - { - uint32_t counter; - uint8_t queued; - uint8_t soe_flag; - uint8_t lockout_flag; - } obc_tlc_tlm; + uint32_t tm_mode_time; + double tm_unixtime_at_ti0; + uint8_t mm_opsmode; + uint8_t mm_sts; + uint8_t mm_opsmode_prev; + struct + { + uint16_t current_id; + } tdsp; + struct + { + uint32_t counter; + struct + { + uint32_t time; + uint16_t id; + uint8_t exec_sts; + uint32_t err_code; + } last_exec; + struct + { + uint32_t time; + uint16_t id; + uint8_t exec_sts; + uint32_t err_code; + } last_err; + uint32_t err_counter; + } gs_cmd; + struct + { + uint32_t counter; + struct + { + uint32_t time; + uint16_t id; + uint8_t exec_sts; + uint32_t err_code; + } last_exec; + struct + { + uint32_t err_code; + uint32_t time; + uint16_t id; + uint8_t exec_sts; + } last_err; + uint32_t err_counter; + } rt_cmd; + struct + { + uint32_t counter; + uint8_t queued; + struct + { + uint32_t time; + uint16_t id; + uint8_t exec_sts; + uint32_t err_code; + } last_exec; + struct + { + uint32_t time; + uint16_t id; + uint8_t exec_sts; + uint32_t err_code; + } last_err; + uint8_t err_counter; + uint32_t next_time; + uint16_t next_id; + uint8_t soe_flag; + uint8_t lockout_flag; + } tlc_gs; + struct + { + uint32_t counter; + uint8_t queued; + uint8_t soe_flag; + uint8_t lockout_flag; + } tlc_bc; + struct + { + uint32_t counter; + uint8_t queued; + uint8_t soe_flag; + uint8_t lockout_flag; + } tlc_tlm; + uint16_t bct_blk_ptr; + uint8_t bct_cmd_ptr; + uint32_t bct_regd_time; + uint16_t bct_regd_id; + } obc; struct { uint8_t is_enable; uint8_t is_clear_enable; } wdt; uint8_t dummy_data0; - uint16_t obc_bct_blk_ptr; - uint8_t obc_bct_cmd_ptr; - uint32_t obc_bct_regd_time; - uint16_t obc_bct_regd_id; struct { struct @@ -235,7 +330,6 @@ typedef struct uint32_t respond_counter; } log_table; } eh; - uint8_t obc_gs_cmd_err_counter; uint32_t git_rev_core; uint32_t git_rev_user; uint8_t bct_blk_ptr; @@ -293,15 +387,6 @@ typedef struct uint32_t dummy_data49; uint32_t dummy_data50; uint32_t dummy_data51; - uint32_t dummy_data52; - uint32_t dummy_data53; - uint32_t dummy_data54; - uint32_t dummy_data55; - uint32_t dummy_data56; - uint32_t dummy_data57; - uint32_t dummy_data58; - uint32_t dummy_data59; - uint32_t dummy_data60; } aobc_hk; } AOBC_TlmData; diff --git a/Examples/minimum_user/src/src_user/Drivers/Com/gs.c b/Examples/minimum_user/src/src_user/Drivers/Com/gs.c index f1458c88d..2c400cb0e 100644 --- a/Examples/minimum_user/src/src_user/Drivers/Com/gs.c +++ b/Examples/minimum_user/src/src_user/Drivers/Com/gs.c @@ -7,18 +7,18 @@ #include "gs.h" #include +#include + #include "../../IfWrapper/ccsds_user.h" #include "../../TlmCmd/Ccsds/tc_transfer_frame.h" #include #include #include -#include "../../Library/stdint.h" + #define GS_RX_HEADER_SIZE (2) #define GS_RX_FRAMELENGTH_TYPE_SIZE (2) -#define GS_TX_stream (0) // どれでも良いがとりあえず 0 で - -#define GS_RX_HEADER_NUM (3) +#define GS_TX_STREAM (0) // どれでも良いがとりあえず 0 で #if GS_RX_HEADER_NUM > DS_STREAM_MAX #error GS RX HEADER NUM TOO MANY @@ -56,10 +56,14 @@ static void GS_load_default_driver_super_init_settings_(DriverSuper* p_super); */ static DS_ERR_CODE GS_analyze_rec_data_(DS_StreamConfig* p_stream_config, void* p_driver); -DS_INIT_ERR_CODE GS_init(GS_Driver* gs_driver, uint8_t uart_ch) +DS_INIT_ERR_CODE GS_init(GS_Driver* gs_driver, + uint8_t uart_ch, + DS_StreamRecBuffer* ccsds_rx_buffers[DS_STREAM_MAX], + DS_StreamRecBuffer* uart_rx_buffers[DS_STREAM_MAX]) { DS_ERR_CODE ret_uart, ret_ccsds; int i; + int stream; memset(gs_driver, 0x00, sizeof(GS_Driver)); @@ -78,22 +82,23 @@ DS_INIT_ERR_CODE GS_init(GS_Driver* gs_driver, uint8_t uart_ch) GS_rx_header_[0][0] |= (uint8_t)((TCTF_TYPE_AD & 0x0f) << 4); GS_rx_header_[1][0] |= (uint8_t)((TCTF_TYPE_BD & 0x0f) << 4); GS_rx_header_[2][0] |= (uint8_t)((TCTF_TYPE_BC & 0x0f) << 4); - for (i = 0; i < GS_RX_HEADER_NUM; ++i) + for (stream = 0; stream < GS_RX_HEADER_NUM; ++stream) { - GS_rx_header_[i][0] |= (uint8_t)((TCTF_SCID_SAMPLE_SATELLITE & 0x3ff) >> 8); - GS_rx_header_[i][1] |= (uint8_t)(TCTF_SCID_SAMPLE_SATELLITE & 0xff); + GS_rx_header_[stream][0] |= (uint8_t)((TCTF_SCID_SAMPLE_SATELLITE & 0x3ff) >> 8); + GS_rx_header_[stream][1] |= (uint8_t)(TCTF_SCID_SAMPLE_SATELLITE & 0xff); } - ret_ccsds = DS_init(&gs_driver->driver_ccsds.super, &gs_driver->driver_ccsds.ccsds_config, GS_load_ccsds_driver_super_init_settings_); - ret_uart = DS_init(&gs_driver->driver_uart.super, &gs_driver->driver_uart.uart_config, GS_load_uart_driver_super_init_settings_); + ret_ccsds = DS_init_streams(&gs_driver->driver_ccsds.super, + &gs_driver->driver_ccsds.ccsds_config, + ccsds_rx_buffers, + GS_load_ccsds_driver_super_init_settings_); + ret_uart = DS_init_streams(&gs_driver->driver_uart.super, + &gs_driver->driver_uart.uart_config, + uart_rx_buffers, + GS_load_uart_driver_super_init_settings_); if (ret_ccsds != DS_ERR_CODE_OK || ret_uart != DS_ERR_CODE_OK) return DS_INIT_DS_INIT_ERR; gs_driver->latest_info = &gs_driver->info[GS_PORT_TYPE_CCSDS]; gs_driver->tlm_tx_port_type = GS_PORT_TYPE_CCSDS; - gs_driver->is_ccsds_tx_valid = 0; - -#ifdef SILS_FW - gs_driver->is_ccsds_tx_valid = 1; // SILS でこれが最初から ON になってないと何も降りてこない -#endif for (i = 0; i < GS_PORT_TYPE_NUM; ++i) { @@ -114,6 +119,7 @@ DS_INIT_ERR_CODE GS_init(GS_Driver* gs_driver, uint8_t uart_ch) } gs_driver->ccsds_info.buffer_num = 8; + gs_driver->driver_uart.is_tlm_on = 1; return DS_INIT_OK; } @@ -176,7 +182,7 @@ DS_REC_ERR_CODE GS_rec_tctf(GS_Driver* gs_driver) // TODO: これはエラー情報をきちんと把握したいので,アノマリ発行を入れる gs_driver->info[i].rx.rec_status = DS_receive(ds); - gs_driver->info[i].rx.ret_from_if_rx = ds->config.rec_status_.ret_from_if_rx; + gs_driver->info[i].rx.ret_from_if_rx = DSC_get_rec_status(ds)->ret_from_if_rx; if (gs_driver->info[i].rx.rec_status != DS_ERR_CODE_OK) continue; @@ -250,7 +256,6 @@ static DS_ERR_CODE GS_analyze_rec_data_(DS_StreamConfig* p_stream_config, void* DS_CMD_ERR_CODE GS_send_vcdu(GS_Driver* gs_driver, const VCDU* vcdu) { - int i; DS_ERR_CODE ret_ccsds = DS_ERR_CODE_OK; DS_ERR_CODE ret_uart = DS_ERR_CODE_OK; size_t vcdu_size = sizeof(VCDU); @@ -258,39 +263,37 @@ DS_CMD_ERR_CODE GS_send_vcdu(GS_Driver* gs_driver, const VCDU* vcdu) // パディングが無ければ元を GS_tx_frame_ にコピーさせる (444Byte) のコピーが無駄 if (vcdu_size == VCDU_LEN) { - DSSC_set_tx_frame(&gs_driver->driver_ccsds.super.stream_config[GS_TX_stream], (uint8_t*)vcdu); - DSSC_set_tx_frame(&gs_driver->driver_uart.super.stream_config[GS_TX_stream], (uint8_t*)vcdu); + DSSC_set_tx_frame(&gs_driver->driver_ccsds.super.stream_config[GS_TX_STREAM], (uint8_t*)vcdu); + DSSC_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_); // 送信元にセット 消したいなぁ... - DSSC_set_tx_frame(&gs_driver->driver_ccsds.super.stream_config[GS_TX_stream], GS_tx_frame_); - DSSC_set_tx_frame(&gs_driver->driver_uart.super.stream_config[GS_TX_stream], GS_tx_frame_); + DSSC_set_tx_frame(&gs_driver->driver_ccsds.super.stream_config[GS_TX_STREAM], GS_tx_frame_); + DSSC_set_tx_frame(&gs_driver->driver_uart.super.stream_config[GS_TX_STREAM], GS_tx_frame_); } - for (i = 0; i < GS_PORT_TYPE_NUM; ++i) + // CCSDS + gs_driver->ccsds_info.buffer_num = CCSDS_get_buffer_num(); + if (gs_driver->ccsds_info.buffer_num) { - if (i == GS_PORT_TYPE_CCSDS) - { - // CCSDS 無効, 又は バッファー空きが無いで下の処理は端折る - // FIXME: 一杯だった時の処理 - gs_driver->ccsds_info.buffer_num = CCSDS_get_buffer_num(); - if (!gs_driver->is_ccsds_tx_valid || !gs_driver->ccsds_info.buffer_num) continue; - } + 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); + + // DS 側の名称が cmd なだけで送信しているのは TLM + ret_ccsds = DS_send_general_cmd(&gs_driver->driver_ccsds.super, GS_TX_STREAM); + } - gs_driver->info[i].tx.send_cycle = TMGR_get_master_total_cycle(); - gs_driver->info[i].tx.vcid = VCDU_get_vcid(vcdu); - gs_driver->info[i].tx.vcdu_counter = VCDU_get_vcdu_counter(vcdu); + // UART + 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); // DS 側の名称が cmd なだけで送信しているのは TLM - if (i == GS_PORT_TYPE_CCSDS) - { - ret_ccsds = DS_send_general_cmd(&gs_driver->driver_ccsds.super, GS_TX_stream); - } - else - { - ret_uart = DS_send_general_cmd(&gs_driver->driver_uart.super, GS_TX_stream); - } + ret_uart = DS_send_general_cmd(&gs_driver->driver_uart.super, GS_TX_STREAM); } if (ret_ccsds != DS_ERR_CODE_OK || ret_uart != DS_ERR_CODE_OK) diff --git a/Examples/minimum_user/src/src_user/Drivers/Com/gs.h b/Examples/minimum_user/src/src_user/Drivers/Com/gs.h index 438204c92..e47070dcd 100644 --- a/Examples/minimum_user/src/src_user/Drivers/Com/gs.h +++ b/Examples/minimum_user/src/src_user/Drivers/Com/gs.h @@ -13,6 +13,8 @@ #include "../../TlmCmd/Ccsds/vcdu.h" #include "gs_validate.h" +#define GS_RX_HEADER_NUM (3) + /** * @enum GS_PORT_TYPE * @brief GS の通信ポートは CCSDS と UART の 2 つある @@ -74,21 +76,27 @@ typedef struct { DriverSuper super; UART_Config uart_config; + uint8_t is_tlm_on; //!< UART に TLM を流すかどうか, CCSDS では許容でも UART に TLM を送りすぎると詰まってしまうため } driver_uart; GS_Info info[GS_PORT_TYPE_NUM]; //!< CCSDS 用と UART 用 2 つ const GS_Info* latest_info; CCSDS_Info ccsds_info; GS_PORT_TYPE tlm_tx_port_type; - uint8_t is_ccsds_tx_valid; //!< CCSDS TX が有効になっているか (地上試験で突然電波を出すと危険なので) } GS_Driver; /** * @brief Driver の初期化 - * @param[in] uart_ch: 有線通信時の CH + * @param[in] gs_driver: ドライバー + * @param[in] uart_ch: 有線通信時の CH + * @param[in] ccsds_rx_buffers: CCSDS 用受信バッファ + * @param[in] uart_rx_buffers: UART 用受信バッファ * @return DS_INIT_ERR_CODE */ -DS_INIT_ERR_CODE GS_init(GS_Driver* gs_driver, uint8_t uart_ch); +DS_INIT_ERR_CODE GS_init(GS_Driver* gs_driver, + uint8_t uart_ch, + DS_StreamRecBuffer* ccsds_rx_buffers[DS_STREAM_MAX], + DS_StreamRecBuffer* uart_rx_buffers[DS_STREAM_MAX]); /** * @brief 地上から CMD を受信する. 形式は TC Transer Frame @@ -102,7 +110,7 @@ DS_REC_ERR_CODE GS_rec_tctf(GS_Driver* gs_driver); * @note DS_send_general_cmd が使われているが, これは DS は MOBC コンポ間を想定しているため, MOBC から見るとコンポに cmd を送信している様に見える, が 今回は MOBC から地上に TLM を送信している * @note TLM 送信, 形式は VCDU * @param[in] gs_driver: ドライバー - * @param[in] vcdu: 送信する VCDU. 場合によってはそのまま DS に渡すので, local変数ではなくstaticな変数を渡すこと + * @param[in] vcdu: 送信する VCDU. 場合によってはそのまま DS に渡すので, local変数ではなくstaticな変数を渡すこと * @return DS_CMD_ERR_CODE: 送信結果 */ DS_CMD_ERR_CODE GS_send_vcdu(GS_Driver* gs_driver, const VCDU* vcdu); diff --git a/Examples/minimum_user/src/src_user/Drivers/Com/gs_validate.h b/Examples/minimum_user/src/src_user/Drivers/Com/gs_validate.h index f3f80c8b2..385158f36 100644 --- a/Examples/minimum_user/src/src_user/Drivers/Com/gs_validate.h +++ b/Examples/minimum_user/src/src_user/Drivers/Com/gs_validate.h @@ -12,8 +12,9 @@ #ifndef GS_VALIDATE_H_ #define GS_VALIDATE_H_ +#include + #include "../../TlmCmd/Ccsds/tc_transfer_frame.h" -#include "../../Library/stdint.h" /** * @enum GS_VALIDATE_ERR diff --git a/Examples/minimum_user/src/src_user/Drivers/Etc/uart_test.c b/Examples/minimum_user/src/src_user/Drivers/Etc/uart_test.c index fcbd98902..c940352d0 100644 --- a/Examples/minimum_user/src/src_user/Drivers/Etc/uart_test.c +++ b/Examples/minimum_user/src/src_user/Drivers/Etc/uart_test.c @@ -6,18 +6,15 @@ #include "uart_test.h" #include -#include #include #include "../../Settings/sils_define.h" #include "string.h" // for memcpy #include // SILSでのprint - // ヘッダーフッター -#define UART_TEST_HEADER_SIZE 8 -#define UART_TEST_FOOTER_SIZE 2 -#define UART_TEST_TX_FRAME_SIZE_MAX 16 - +#define UART_TEST_HEADER_SIZE (8) +#define UART_TEST_FOOTER_SIZE (2) +#define UART_TEST_TX_FRAME_SIZE_MAX (16) static const uint8_t UART_TEST_header_[UART_TEST_HEADER_SIZE] = {0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7}; static const uint8_t UART_TEST_footer_[UART_TEST_FOOTER_SIZE] = {0xBF, 0xBE}; @@ -25,25 +22,26 @@ static const uint8_t UART_TEST_footer_[UART_TEST_FOOTER_SIZE] = {0xBF, 0xBE}; #define UART_TEST_STREAM_FIX (0) //!< 固定長 #define UART_TEST_STREAM_VAR (1) //!< 可変長 +static uint8_t UART_TEST_tx_frame_[UART_TEST_TX_FRAME_SIZE_MAX]; static DS_ERR_CODE UART_TEST_load_driver_super_init_settings_(DriverSuper* p_super); static DS_ERR_CODE UART_TEST_analyze_rec_data_(DS_StreamConfig* p_stream_config, void* p_driver); -static uint8_t UART_TEST_tx_frame_[UART_TEST_TX_FRAME_SIZE_MAX]; - - -DS_INIT_ERR_CODE UART_TEST_init(UART_TEST_Driver* uart_test_instance, unsigned char ch) +DS_INIT_ERR_CODE UART_TEST_init(UART_TEST_Driver* uart_test_driver, uint8_t ch, DS_StreamRecBuffer* rx_buffers[DS_STREAM_MAX]) { DS_ERR_CODE ret; - uart_test_instance->driver.uart_config.ch = ch; - uart_test_instance->driver.uart_config.baudrate = 38400; - uart_test_instance->driver.uart_config.parity_settings = PARITY_SETTINGS_NONE; - uart_test_instance->driver.uart_config.data_length = UART_DATA_LENGTH_8BIT; - uart_test_instance->driver.uart_config.stop_bit = UART_STOP_BIT_1BIT; + uart_test_driver->driver.uart_config.ch = ch; + uart_test_driver->driver.uart_config.baudrate = 38400; + uart_test_driver->driver.uart_config.parity_settings = PARITY_SETTINGS_NONE; + uart_test_driver->driver.uart_config.data_length = UART_DATA_LENGTH_8BIT; + uart_test_driver->driver.uart_config.stop_bit = UART_STOP_BIT_1BIT; - ret = DS_init(&(uart_test_instance->driver.super), &(uart_test_instance->driver.uart_config), UART_TEST_load_driver_super_init_settings_); + ret = DS_init_streams(&(uart_test_driver->driver.super), + &(uart_test_driver->driver.uart_config), + rx_buffers, + UART_TEST_load_driver_super_init_settings_); if (ret != DS_ERR_CODE_OK) return DS_INIT_DS_INIT_ERR; return DS_INIT_OK; } @@ -70,7 +68,6 @@ static DS_ERR_CODE UART_TEST_load_driver_super_init_settings_(DriverSuper* p_sup DSSC_set_rx_frame_size(p_stream_config, 12); DSSC_set_data_analyzer(p_stream_config, UART_TEST_analyze_rec_data_); - // stream1の設定 p_stream_config = &(p_super->stream_config[UART_TEST_STREAM_VAR]); DSSC_enable(p_stream_config); @@ -93,25 +90,25 @@ static DS_ERR_CODE UART_TEST_load_driver_super_init_settings_(DriverSuper* p_sup } -DS_REC_ERR_CODE UART_TEST_rec(UART_TEST_Driver* uart_test_instance) +DS_REC_ERR_CODE UART_TEST_rec(UART_TEST_Driver* uart_test_driver) { DS_ERR_CODE ret; DS_StreamConfig* p_stream_config; - ret = DS_receive(&(uart_test_instance->driver.super)); + ret = DS_receive(&(uart_test_driver->driver.super)); if (ret != DS_ERR_CODE_OK) return DS_REC_DS_RECEIVE_ERR; - p_stream_config = &(uart_test_instance->driver.super.stream_config[UART_TEST_STREAM_FIX]); + p_stream_config = &(uart_test_driver->driver.super.stream_config[UART_TEST_STREAM_FIX]); if (DSSC_get_rec_status(p_stream_config)->status_code == DS_STREAM_REC_STATUS_FIXED_FRAME) { - ret = DS_analyze_rec_data(&(uart_test_instance->driver.super), UART_TEST_STREAM_FIX, uart_test_instance); + ret = DS_analyze_rec_data(&(uart_test_driver->driver.super), UART_TEST_STREAM_FIX, uart_test_driver); } - p_stream_config = &(uart_test_instance->driver.super.stream_config[UART_TEST_STREAM_VAR]); + p_stream_config = &(uart_test_driver->driver.super.stream_config[UART_TEST_STREAM_VAR]); if (DSSC_get_rec_status(p_stream_config)->status_code == DS_STREAM_REC_STATUS_FIXED_FRAME) { - ret = DS_analyze_rec_data(&(uart_test_instance->driver.super), UART_TEST_STREAM_VAR, uart_test_instance); + ret = DS_analyze_rec_data(&(uart_test_driver->driver.super), UART_TEST_STREAM_VAR, uart_test_driver); } // 返り値ぐだぐだだけど,まあテストコードなので... @@ -123,10 +120,10 @@ DS_REC_ERR_CODE UART_TEST_rec(UART_TEST_Driver* uart_test_instance) static DS_ERR_CODE UART_TEST_analyze_rec_data_(DS_StreamConfig* p_stream_config, void* p_driver) { - UART_TEST_Driver* uart_test_instance = (UART_TEST_Driver*)p_driver; + UART_TEST_Driver* uart_test_driver = (UART_TEST_Driver*)p_driver; uint16_t i; - (void)(uart_test_instance); + (void)(uart_test_driver); #ifndef SILS_FW Printf("DEC DATA: %d\n", DSSC_get_rec_status(p_stream_config)->fixed_frame_len); @@ -147,12 +144,12 @@ static DS_ERR_CODE UART_TEST_analyze_rec_data_(DS_StreamConfig* p_stream_config, } -DS_CMD_ERR_CODE UART_TEST_send(UART_TEST_Driver* uart_test_instance, uint8_t id) +DS_CMD_ERR_CODE UART_TEST_send(UART_TEST_Driver* uart_test_driver, uint8_t id) { DS_ERR_CODE ret; DS_StreamConfig* p_stream_config; - p_stream_config = &(uart_test_instance->driver.super.stream_config[UART_TEST_STREAM_FIX]); + p_stream_config = &(uart_test_driver->driver.super.stream_config[UART_TEST_STREAM_FIX]); switch (id) { @@ -198,7 +195,7 @@ DS_CMD_ERR_CODE UART_TEST_send(UART_TEST_Driver* uart_test_instance, uint8_t id) break; } - ret = DS_send_general_cmd(&(uart_test_instance->driver.super), UART_TEST_STREAM_FIX); + ret = DS_send_general_cmd(&(uart_test_driver->driver.super), UART_TEST_STREAM_FIX); if (ret == DS_ERR_CODE_OK) { return DS_CMD_OK; diff --git a/Examples/minimum_user/src/src_user/Drivers/Etc/uart_test.h b/Examples/minimum_user/src/src_user/Drivers/Etc/uart_test.h index 3d0a40c61..92f857603 100644 --- a/Examples/minimum_user/src/src_user/Drivers/Etc/uart_test.h +++ b/Examples/minimum_user/src/src_user/Drivers/Etc/uart_test.h @@ -38,25 +38,26 @@ typedef struct * @brief UART_TEST初期化 * * UART_TEST_Driver構造体のポインタを渡すことでポートを初期化し,UART_TEST_Driverの各メンバも初期化する - * @param *uart_test_instance : 初期化するUART_TEST_Driver構造体へのポインタ - * @param ch : UART_TESTが接続されているUARTポート番号 + * @param uart_test_driver: 初期化するUART_TEST_Driver構造体へのポインタ + * @param ch: UART_TESTが接続されているUARTポート番号 + * @param rx_buffers: 受信バッファ * @return DS_INIT_ERR_CODE */ -DS_INIT_ERR_CODE UART_TEST_init(UART_TEST_Driver* uart_test_instance, unsigned char ch); +DS_INIT_ERR_CODE UART_TEST_init(UART_TEST_Driver* uart_test_driver, uint8_t ch, DS_StreamRecBuffer* rx_buffers[DS_STREAM_MAX]); /** * @brief UART_TESTのデータ(テレメ)受信 - * @param *uart_test_instance : UART_TEST_Driver構造体へのポインタ + * @param uart_test_driver: UART_TEST_Driver構造体へのポインタ * @return DS_REC_ERR_CODE */ -DS_REC_ERR_CODE UART_TEST_rec(UART_TEST_Driver* uart_test_instance); +DS_REC_ERR_CODE UART_TEST_rec(UART_TEST_Driver* uart_test_driver); /** * @brief UART_TESTへのコマンド送信 - * @param *uart_test_instance : UART_TEST_Driver構造体へのポインタ - * @param id : Cmd id + * @param uart_test_driver: UART_TEST_Driver構造体へのポインタ + * @param id: Cmd id * @return DS_CMD_ERR_CODE */ -DS_CMD_ERR_CODE UART_TEST_send(UART_TEST_Driver* uart_test_instance, uint8_t id); +DS_CMD_ERR_CODE UART_TEST_send(UART_TEST_Driver* uart_test_driver, uint8_t id); #endif diff --git a/Examples/minimum_user/src/src_user/IfWrapper/CMakeLists.txt b/Examples/minimum_user/src/src_user/IfWrapper/CMakeLists.txt index 89328307f..bd5328f01 100644 --- a/Examples/minimum_user/src/src_user/IfWrapper/CMakeLists.txt +++ b/Examples/minimum_user/src/src_user/IfWrapper/CMakeLists.txt @@ -13,6 +13,7 @@ if(USE_SILS_MOCKUP) #target_sources(${PROJECT_NAME} PRIVATE list(APPEND C2A_SRCS SilsMockup/ccsds_sils.c + SilsMockup/i2c_sils.c SilsMockup/uart_sils.c SilsMockup/wdt_sils.c ) @@ -20,6 +21,7 @@ else() #target_sources(${PROJECT_NAME} PUBLIC list(APPEND C2A_SRCS Sils/ccsds_sils.cpp + Sils/i2c_sils.cpp Sils/uart_sils.cpp Sils/wdt_sils.cpp ) diff --git a/Examples/minimum_user/src/src_user/IfWrapper/Sils/i2c_sils.cpp b/Examples/minimum_user/src/src_user/IfWrapper/Sils/i2c_sils.cpp new file mode 100644 index 000000000..f363a1727 --- /dev/null +++ b/Examples/minimum_user/src/src_user/IfWrapper/Sils/i2c_sils.cpp @@ -0,0 +1,47 @@ +#pragma section REPRO +#include + +int I2C_init(void* my_i2c_v) +{ + (void)my_i2c_v; + return 0; +} + +int I2C_rx(void* my_i2c_v, void* data_v, int buffer_size) +{ + (void*)my_i2c_v; + (void*)data_v; + (void)buffer_size; + return 0; +} + +int I2C_tx(void* my_i2c_v, void* data_v, int data_size) +{ + (void*)my_i2c_v; + (void*)data_v; + (void)data_size; + return 0; +} + +int I2C_reopen(void* my_i2c_v, int reason) +{ + (void*)my_i2c_v; + (void)reason; + return 0; +} + +void I2C_set_stop_flag(void* my_i2c_v, const unsigned char stop_flag) +{ + (void*)my_i2c_v; + (void)stop_flag; + return; +} + +void I2C_set_rx_length(void* my_i2c_v, const uint32_t rx_length) +{ + (void*)my_i2c_v; + (void)rx_length; + return; +} + +#pragma section diff --git a/Examples/minimum_user/src/src_user/IfWrapper/SilsMockup/i2c_sils.c b/Examples/minimum_user/src/src_user/IfWrapper/SilsMockup/i2c_sils.c new file mode 100644 index 000000000..c42ff135d --- /dev/null +++ b/Examples/minimum_user/src/src_user/IfWrapper/SilsMockup/i2c_sils.c @@ -0,0 +1,47 @@ +#pragma section REPRO +#include + +int I2C_init(void* my_i2c_v) +{ + (void)my_i2c_v; + return 0; +} + +int I2C_rx(void* my_i2c_v, void* data_v, int buffer_size) +{ + (void)my_i2c_v; + (void)data_v; + (void)buffer_size; + return 0; +} + +int I2C_tx(void* my_i2c_v, void* data_v, int data_size) +{ + (void)my_i2c_v; + (void)data_v; + (void)data_size; + return 0; +} + +int I2C_reopen(void* my_i2c_v, int reason) +{ + (void)my_i2c_v; + (void)reason; + return 0; +} + +void I2C_set_stop_flag(void* my_i2c_v, const unsigned char stop_flag) +{ + (void)my_i2c_v; + (void)stop_flag; + return; +} + +void I2C_set_rx_length(void* my_i2c_v, const uint32_t rx_length) +{ + (void)my_i2c_v; + (void)rx_length; + return; +} + +#pragma section diff --git a/Examples/minimum_user/src/src_user/IfWrapper/ccsds_user.h b/Examples/minimum_user/src/src_user/IfWrapper/ccsds_user.h index bc637f647..317ee7145 100644 --- a/Examples/minimum_user/src/src_user/IfWrapper/ccsds_user.h +++ b/Examples/minimum_user/src/src_user/IfWrapper/ccsds_user.h @@ -5,8 +5,8 @@ #ifndef CCSDS_USER_H_ #define CCSDS_USER_H_ +#include #include -#include "../Library/stdint.h" #define CCSDS_FIFO_SIZE (8) // 現在使っている CCSDS API の設計上決まっている diff --git a/Examples/minimum_user/src/src_user/Library/git_revision.h b/Examples/minimum_user/src/src_user/Library/git_revision.h index 58703af43..9da4eabed 100644 --- a/Examples/minimum_user/src/src_user/Library/git_revision.h +++ b/Examples/minimum_user/src/src_user/Library/git_revision.h @@ -5,7 +5,7 @@ #ifndef GIT_REVISION_H_ #define GIT_REVISION_H_ -#include "stdint.h" +#include extern const char GIT_REV_CORE[41]; extern const uint32_t GIT_REV_CORE_SHORT; diff --git a/Examples/minimum_user/src/src_user/Library/stdint.h b/Examples/minimum_user/src/src_user/Library/stdint.h deleted file mode 100644 index a7de58d8b..000000000 --- a/Examples/minimum_user/src/src_user/Library/stdint.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef STDINT_H_ -#define STDINT_H_ - -#include "../Settings/sils_define.h" - -// HEWや外部ライブラリヘッダーとの重複typedefをガード -#ifndef _TYPEDEFINE_H_ - -#ifndef SILS_FW -// HEWに標準ヘッダstdint.hに相当するヘッダがなかったため、必要機能を自前で定義。 -// bit幅指定の整数型をひとまず定義 - -typedef signed char int8_t; -typedef signed short int16_t; -typedef signed long int32_t; -typedef signed long long int int64_t; - -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned long uint32_t; -typedef unsigned long long int uint64_t; - -#else -#include -#endif // SILS_FW - -#endif // _TYPEDEFINE_H_ -#endif // STDINT_H_ diff --git a/Examples/minimum_user/src/src_user/Settings/Applications/AnomalyHandlerRules/ah_rules.h b/Examples/minimum_user/src/src_user/Settings/Applications/AnomalyHandlerRules/ah_rules.h deleted file mode 100644 index 660436f69..000000000 --- a/Examples/minimum_user/src/src_user/Settings/Applications/AnomalyHandlerRules/ah_rules.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef AH_RULES_H_ -#define AH_RULES_H_ -/** - * @file - * @brief AHのユーザー定義部分をCoreから分離 - */ - -// 現時点で,最大数は128個! -typedef enum -{ - AH_RULE_SAMPLE -} AH_RULE_NUM; - -enum -{ - AL_RULE_INACTIVE = 0, - AL_RULE_ACTIVE = 1 -}; - -void AH_Rule_default_load(void); - -#endif diff --git a/Examples/minimum_user/src/src_user/Settings/Applications/AnomalyHandlerRules/ahr_default_load.c b/Examples/minimum_user/src/src_user/Settings/Applications/AnomalyHandlerRules/ahr_default_load.c deleted file mode 100644 index b142f9521..000000000 --- a/Examples/minimum_user/src/src_user/Settings/Applications/AnomalyHandlerRules/ahr_default_load.c +++ /dev/null @@ -1,9 +0,0 @@ -#pragma section REPRO -#include -// ah_rules.h はここではincludeしない! - -void AH_Rule_default_load(void) -{ -} - -#pragma section diff --git a/Examples/minimum_user/src/src_user/Settings/Applications/anomaly_handler_params.h b/Examples/minimum_user/src/src_user/Settings/Applications/anomaly_handler_params.h deleted file mode 100644 index 7b3441f47..000000000 --- a/Examples/minimum_user/src/src_user/Settings/Applications/anomaly_handler_params.h +++ /dev/null @@ -1,24 +0,0 @@ -/** - * @file - * @brief AHのCoreAppパラメタのオーバーライド用ヘッダー - */ -#ifndef ANOMALY_HANDLER_PARAMS_H_ -#define ANOMALY_HANDLER_PARAMS_H_ - -#undef AH_TLM_PAGE_SIZE -#undef AH_TLM_PAGE_MAX -#undef AH_MAX_RULES - -#define AH_TLM_PAGE_SIZE (32) -#define AH_TLM_PAGE_MAX (4) -#define AH_MAX_RULES (AH_TLM_PAGE_SIZE * AH_TLM_PAGE_MAX) - -#undef AH_LOG_TLM_PAGE_SIZE -#undef AH_LOG_TLM_PAGE_MAX -#undef AH_LOG_MAX - -#define AH_LOG_TLM_PAGE_SIZE (32) -#define AH_LOG_TLM_PAGE_MAX (4) -#define AH_LOG_MAX (AH_LOG_TLM_PAGE_SIZE * AH_LOG_TLM_PAGE_MAX) - -#endif diff --git a/Examples/minimum_user/src/src_user/Settings/CMakeLists.txt b/Examples/minimum_user/src/src_user/Settings/CMakeLists.txt index 4b7ab17a2..73963f69c 100644 --- a/Examples/minimum_user/src/src_user/Settings/CMakeLists.txt +++ b/Examples/minimum_user/src/src_user/Settings/CMakeLists.txt @@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.13) project(C2A_USER_SETTINGS) set(C2A_SRCS - Applications/AnomalyHandlerRules/ahr_default_load.c Modes/mode_definitions.c Modes/TaskLists/tl_initial.c Modes/TaskLists/Elements/tl_elem_debug_display.c @@ -13,7 +12,6 @@ set(C2A_SRCS Modes/Transitions/sl_initial.c Modes/Transitions/sl_nop.c Modes/Transitions/sequence_items.c - System/anomaly_logger_settings.c System/event_logger_settings.c System/EventHandlerRules/event_handler_rules.c System/EventHandlerRules/event_handler_rule_test.c diff --git a/Examples/minimum_user/src/src_user/Settings/DriverSuper/driver_buffer_define.h b/Examples/minimum_user/src/src_user/Settings/DriverSuper/driver_buffer_define.h new file mode 100644 index 000000000..03ef3305a --- /dev/null +++ b/Examples/minimum_user/src/src_user/Settings/DriverSuper/driver_buffer_define.h @@ -0,0 +1,14 @@ +/** + * @file + * @brief Driver の各種バッファサイズなどの定義 + */ +#ifndef DRIVER_BUFFER_DEFINE_H_ +#define DRIVER_BUFFER_DEFINE_H_ + +#include "./driver_super_params.h" + +#define DS_STREAM_REC_BUFFER_SIZE_DEFAULT (DS_IF_RX_BUFFER_SIZE * 2) /*!< DS_StreamRecBuffer のバッファサイズのデフォルト値 + UART などの非同期通信はメモリに余力があれば DS_IF_RX_BUFFER_SIZE * 2 を推奨 + 詳細は dirver_super.c の @note を参照 */ + +#endif diff --git a/Examples/minimum_user/src/src_user/Settings/DriverSuper/driver_super_params.h b/Examples/minimum_user/src/src_user/Settings/DriverSuper/driver_super_params.h index e4dbd43fa..1599d14dc 100644 --- a/Examples/minimum_user/src/src_user/Settings/DriverSuper/driver_super_params.h +++ b/Examples/minimum_user/src/src_user/Settings/DriverSuper/driver_super_params.h @@ -6,11 +6,9 @@ #define DRIVER_SUPER_PARAMS_H_ #undef DS_STREAM_MAX -#undef DS_RX_BUFFER_SIZE_MAX -#undef DS_RX_FRAME_SIZE_MAX +#undef DS_IF_RX_BUFFER_SIZE -#define DS_STREAM_MAX (3) -#define DS_RX_BUFFER_SIZE_MAX (1024) -#define DS_RX_FRAME_SIZE_MAX (1024) +#define DS_STREAM_MAX (3) +#define DS_IF_RX_BUFFER_SIZE (1024) #endif diff --git a/Examples/minimum_user/src/src_user/Settings/Modes/TaskLists/tl_initial.c b/Examples/minimum_user/src/src_user/Settings/Modes/TaskLists/tl_initial.c index 537ab750d..41c63cb4a 100644 --- a/Examples/minimum_user/src/src_user/Settings/Modes/TaskLists/tl_initial.c +++ b/Examples/minimum_user/src/src_user/Settings/Modes/TaskLists/tl_initial.c @@ -8,13 +8,12 @@ void BCL_load_tl_initial(void) { - BCL_tool_register_rotate ( 0, BC_AR_GS_RELATED_PROCESS); - BCL_tool_register_app ( 4, AR_TLC_DISPATCHER_GS); - BCL_tool_register_combine( 6, BC_AC_TLM_CMD_HIRATE); + BCL_tool_register_combine( 0, BC_AR_GS_RELATED_PROCESS); + BCL_tool_register_app ( 8, AR_TLC_DISPATCHER_GS); + BCL_tool_register_combine(10, BC_AC_TLM_CMD_HIRATE); BCL_tool_register_rotate (30, BC_AR_DRIVERS_UPDATE_INI); BCL_tool_register_app (40, AR_EVENT_UTILITY); BCL_tool_register_app (50, AR_DI_AOBC_CDIS); - BCL_tool_register_app (70, AR_ANOMALY_HANDLER); BCL_tool_register_rotate (95, BC_AR_DEBUG_DISPLAY_INI); } diff --git a/Examples/minimum_user/src/src_user/Settings/Modes/Transitions/sequence_items.c b/Examples/minimum_user/src/src_user/Settings/Modes/Transitions/sequence_items.c index 802ae8228..f5c8d0b9e 100644 --- a/Examples/minimum_user/src/src_user/Settings/Modes/Transitions/sequence_items.c +++ b/Examples/minimum_user/src/src_user/Settings/Modes/Transitions/sequence_items.c @@ -1,9 +1,7 @@ #pragma section REPRO #include "sequence_items.h" #include "../../../TlmCmd/block_command_definitions.h" -#include #include -#include "../../../Settings/System/anomaly_logger_group.h" #include "../mode_definitions.h" diff --git a/Examples/minimum_user/src/src_user/Settings/Modes/Transitions/sequence_items.h b/Examples/minimum_user/src/src_user/Settings/Modes/Transitions/sequence_items.h index 144f1293f..891a88749 100644 --- a/Examples/minimum_user/src/src_user/Settings/Modes/Transitions/sequence_items.h +++ b/Examples/minimum_user/src/src_user/Settings/Modes/Transitions/sequence_items.h @@ -2,7 +2,7 @@ #define SEQUENCE_ITEMS_H_ #include -#include +#include // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // SIを使うことはもう非推奨!!! diff --git a/Examples/minimum_user/src/src_user/Settings/Modes/Transitions/sl_initial.c b/Examples/minimum_user/src/src_user/Settings/Modes/Transitions/sl_initial.c index 1866e4f40..5a91cefca 100644 --- a/Examples/minimum_user/src/src_user/Settings/Modes/Transitions/sl_initial.c +++ b/Examples/minimum_user/src/src_user/Settings/Modes/Transitions/sl_initial.c @@ -6,7 +6,7 @@ #include "../../../Drivers/Com/gs.h" -#include +#include #include #include diff --git a/Examples/minimum_user/src/src_user/Settings/System/EventHandlerRules/event_handler_rules.h b/Examples/minimum_user/src/src_user/Settings/System/EventHandlerRules/event_handler_rules.h index 171a12f29..6549533e9 100644 --- a/Examples/minimum_user/src/src_user/Settings/System/EventHandlerRules/event_handler_rules.h +++ b/Examples/minimum_user/src/src_user/Settings/System/EventHandlerRules/event_handler_rules.h @@ -6,7 +6,7 @@ #define EVENT_HANDLER_RULES_H_ /** - * @enum AH_RULE_ID + * @enum EH_RULE_ID * @brief EH_Rule の ID * @note 最大数は EH_RULE_MAX で規定 * @note uint16_t を想定 diff --git a/Examples/minimum_user/src/src_user/Settings/System/anomaly_logger_define.h b/Examples/minimum_user/src/src_user/Settings/System/anomaly_logger_define.h deleted file mode 100644 index 25a8047b9..000000000 --- a/Examples/minimum_user/src/src_user/Settings/System/anomaly_logger_define.h +++ /dev/null @@ -1,12 +0,0 @@ -/** - * @file - * @brief AL (と AH) を有効化するかどうかの定義 - * @note AL, AH は EL, EH の新規実装によって deprecated であり,基本的には使うべきではない - */ -#ifndef ANOMALY_LOGGER_DEFINE_H_ -#define ANOMALY_LOGGER_DEFINE_H_ - -// ここでは Core 開発のため有効化している -#define AL_ENABLE - -#endif diff --git a/Examples/minimum_user/src/src_user/Settings/System/anomaly_logger_group.h b/Examples/minimum_user/src/src_user/Settings/System/anomaly_logger_group.h deleted file mode 100644 index 0e6930326..000000000 --- a/Examples/minimum_user/src/src_user/Settings/System/anomaly_logger_group.h +++ /dev/null @@ -1,22 +0,0 @@ -#ifndef ANOMALY_LOGGER_GROUP_H_ -#define ANOMALY_LOGGER_GROUP_H_ - -// #include -// ↑anomaly_logger.hからincludeされるべきであって,こっちからはincludeしない - -// anomaly_logger.h で,コア部のAL_GROUPを既に定義している. -typedef enum -{ - // C2A CORE: 0-9 - // anomaly_logger.h のAL_GROUP参照 - - // OBC: 10-29 - AL_GROUP_UART = 10, - AL_GROUP_UTIL_CNT, - AL_GROUP_SAMPLE, - - // とりあえず最大値は0xffに! - AL_GROUP_MAX = 0x100 // これはいじらない!(あと,8の倍数であることを要請) -} AL_GROUP; - -#endif diff --git a/Examples/minimum_user/src/src_user/Settings/System/anomaly_logger_params.h b/Examples/minimum_user/src/src_user/Settings/System/anomaly_logger_params.h deleted file mode 100644 index 46637753a..000000000 --- a/Examples/minimum_user/src/src_user/Settings/System/anomaly_logger_params.h +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @file - * @brief ALのCoreパラメタのオーバーライド用ヘッダー - */ -#ifndef ANOMALY_LOGGER_PARAMS_H_ -#define ANOMALY_LOGGER_PARAMS_H_ - -#undef AL_TLM_PAGE_SIZE -#undef AL_TLM_PAGE_MAX -#undef AL_RECORD_MAX - -#define AL_TLM_PAGE_SIZE (32) -#define AL_TLM_PAGE_MAX (4) -#define AL_RECORD_MAX (AL_TLM_PAGE_SIZE * AL_TLM_PAGE_MAX) - -#define AL_DISALBE_AT_C2A_CORE - -#endif diff --git a/Examples/minimum_user/src/src_user/Settings/System/anomaly_logger_settings.c b/Examples/minimum_user/src/src_user/Settings/System/anomaly_logger_settings.c deleted file mode 100644 index cee3c6453..000000000 --- a/Examples/minimum_user/src/src_user/Settings/System/anomaly_logger_settings.c +++ /dev/null @@ -1,11 +0,0 @@ -#pragma section REPRO - -#include "anomaly_logger_settings.h" -#include -#include "anomaly_logger_group.h" - -void AL_load_default_settings(void) -{ -} - -#pragma section diff --git a/Examples/minimum_user/src/src_user/Settings/System/anomaly_logger_settings.h b/Examples/minimum_user/src/src_user/Settings/System/anomaly_logger_settings.h deleted file mode 100644 index 46b8122fb..000000000 --- a/Examples/minimum_user/src/src_user/Settings/System/anomaly_logger_settings.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ANOMALY_LOGGER_SETTINGS_H_ -#define ANOMALY_LOGGER_SETTINGS_H_ - -void AL_load_default_settings(void); - -#endif diff --git a/Examples/minimum_user/src/src_user/Settings/System/event_logger_group.h b/Examples/minimum_user/src/src_user/Settings/System/event_logger_group.h index d8079d949..c98d82098 100644 --- a/Examples/minimum_user/src/src_user/Settings/System/event_logger_group.h +++ b/Examples/minimum_user/src/src_user/Settings/System/event_logger_group.h @@ -14,11 +14,11 @@ */ typedef enum { - // C2A CORE: 0-19 + // C2A CORE: 0-49 // src_core/System/EventManager/event_logger.h の EL_CORE_GROUP にて定義 - // CDH: 20-39 - EL_GROUP_UART = 20, // TODO + // CDH: 50-69 + EL_GROUP_UART = 50, // TODO EL_GROUP_UART_REOPEN, // TEST diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/Ccsds/apid_define.c b/Examples/minimum_user/src/src_user/Settings/TlmCmd/Ccsds/apid_define.c index 491c21ed4..06db3e0fe 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/Ccsds/apid_define.c +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/Ccsds/apid_define.c @@ -5,6 +5,7 @@ * @note common_tlm_cmd_packet.h などから include されることを前提 */ #include "apid_define.h" +#include "../common_tlm_packet_define.h" APID APID_get_apid_from_uint16(uint16_t apid) { @@ -30,6 +31,7 @@ int APID_is_other_obc_tlm_apid(APID apid) { switch (apid) { + // FIXME: 2nd obc の場合は変更しなければいけないが, https://github.com/ut-issl/c2a-core/issues/489 で消えるので一旦このまま case APID_AOBC_TLM: // FALLTHROUGH case APID_TOBC_TLM: return 1; diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h b/Examples/minimum_user/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h index faf8b6191..f715fe5e3 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/Ccsds/apid_define.h @@ -6,7 +6,7 @@ #ifndef APID_DEFINE_H_ #define APID_DEFINE_H_ -#include "../../../Library/stdint.h" +#include /** * @enum APID diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_MOBC_CMD_DB.xlsm b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_MOBC_CMD_DB.xlsm index 686b24376..7924e1c9a 100644 Binary files a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_MOBC_CMD_DB.xlsm and b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_MOBC_CMD_DB.xlsm differ diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_MOBC_CMD_DB_BCT.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_MOBC_CMD_DB_BCT.csv index 7920e38db..b82f29f6e 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_MOBC_CMD_DB_BCT.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_MOBC_CMD_DB_BCT.csv @@ -16,7 +16,7 @@ Comment,Name,ShortName,BCID,エイリアス,,,,,Danger Flag,Description,Note ,BC_AC_TLM_CMD_HIRATE,,50,,,,,,danger,, **,==== 各系領域 ====,,,,,,,,,, *,./C2A/TlmCmd/NormalBlockCommandDefinition/で定義,,,,,,,,,, -*,アノマリハンドラはBC_AH_など,接頭辞を適切につけること!,,,,,,,,,, +*,イベントハンドラはBC_EH_など,接頭辞を適切につけること!,,,,,,,,,, **,CDH:60-79,,,,,,,,,, ,BC_HK_CYCLIC_TLM,BC_HK10S,60,○,○,○,○,○,,, ,BC_RESERVED_FOR_HK,,77,,,,,,,EM電気試験でのコマンドファイルとのバッティングを防ぐ, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_MOBC_CMD_DB_CMD_DB.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_MOBC_CMD_DB_CMD_DB.csv index e97e2ca97..4dfdb9735 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_MOBC_CMD_DB_CMD_DB.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/CMD_DB/SAMPLE_MOBC_CMD_DB_CMD_DB.csv @@ -59,115 +59,99 @@ Comment,,,,,Type,Description,Type,Description,Type,Description,Type,Description, ,Cmd_MEM_LOAD,OBC,0x002D,2,uint32_t,開始アドレス,raw,HEXBINARY,,,,,,,,,,,開始アドレス、データを指定,第2パラメータの指定は仮設定 ,Cmd_MEM_SET_DESTINATION,OBC,0x002E,1,uint32_t,コピー先アドレス,,,,,,,,,,,,,コピー先設定, ,Cmd_MEM_COPY_REGION_SEQ,OBC,0x002F,1,uint32_t,コピー幅,,,,,,,,,,,,,領域コピー, -**,AnomalyLogger用,,,,,,,,,,,,,,,,,,, -,Cmd_AL_ADD_ANOMALY,OBC,0x0030,2,uint32_t,group,uint32_t,local,,,,,,,,,,,アノマリーコード(group@@ local)を発生させる, -,Cmd_AL_CLEAR_LIST,OBC,0x0031,0,,,,,,,,,,,,,,,AnomalyListをクリアする, -,Cmd_AL_SET_PAGE_FOR_TLM,OBC,0x0032,1,uint8_t,page no,,,,,,,,,,,,,テレメトリ生成用ページ番号設定, -,Cmd_AL_INIT_LOGGING_ENA_FLAG,OBC,0x0033,0,,,,,,,,,,,,,,,ロギングのフラグを初期化(全有効化), -,Cmd_AL_ENABLE_LOGGING,OBC,0x0034,1,uint32_t,group,,,,,,,,,,,,,ロギングを有効化, -,Cmd_AL_DISABLE_LOGGING,OBC,0x0035,1,uint32_t,group,,,,,,,,,,,,,ロギングを無効化, -,Cmd_AL_SET_THRES_OF_NEARLY_FULL,OBC,0x0036,1,uint16_t,,,,,,,,,,,,,,AL_NEARLY_FULLアノマリを出すしきい値設定, -**,AnomalyHandler用,,,,,,,,,,,,,,,,,,, -,Cmd_AH_REGISTER_RULE,OBC,0x0037,6,uint8_t,id,uint8_t,group,uint8_t,local,uint8_t,cond,uint8_t,threshold,uint16_t,bc_index,,,AHパラメタを設定する, -,Cmd_AH_ACTIVATE_RULE,OBC,0x0038,1,uint8_t,id,,,,,,,,,,,,,idで指定したルールを有効化する, -,Cmd_AH_INACTIVATE_RULE,OBC,0x0039,1,uint8_t,id,,,,,,,,,,,,,idで指定したルールを無効化する, -,Cmd_AH_CLEAR_LOG,OBC,0x003A,0,,,,,,,,,,,,,,,アノマリ記録と関連情報を初期化する, -,Cmd_AH_SET_PAGE_FOR_TLM,OBC,0x003B,1,uint8_t,page no,,,,,,,,,,,,,テレメトリ生成用ページ番号設定, -,Cmd_AHRES_LOG_CLEAR,OBC,0x003C,0,,,,,,,,,,,,,,,アノマリ対処ログをクリア, -,Cmd_AHRES_LOG_SET_PAGE_FOR_TLM,OBC,0x003D,1,uint8_t,page no,,,,,,,,,,,,,アノマリ対処ログテレメトリ生成用ページ番号設定, **,EventLogger,,,,,,,,,,,,,,,,,,, -,Cmd_EL_INIT,OBC,0x003E,0,,,,,,,,,,,,,,,EL初期化, -,Cmd_EL_CLEAR_LOG_ALL,OBC,0x003F,0,,,,,,,,,,,,,,,全ログ削除, -,Cmd_EL_CLEAR_LOG_BY_ERR_LEVEL,OBC,0x0040,1,uint8_t,err_level,,,,,,,,,,,,,エラーレベル指定ログ削除, -,Cmd_EL_CLEAR_STATISTICS,OBC,0x0041,0,,,,,,,,,,,,,,,統計情報削除, -,Cmd_EL_CLEAR_TLOG,OBC,0x0042,1,uint8_t,err_level,,,,,,,,,,,,,TLog削除, -,Cmd_EL_CLEAR_CLOG,OBC,0x0043,1,uint8_t,err_level,,,,,,,,,,,,,CLog削除, -,Cmd_EL_RECORD_EVENT,OBC,0x0044,4,uint32_t,group,uint32_t,local,uint8_t,err_level,uint32_t,note,,,,,,,イベント記録, -,Cmd_EL_TLOG_SET_PAGE_FOR_TLM,OBC,0x0045,2,uint8_t,page_no,uint8_t,err_level,,,,,,,,,,,TLogのダウンリンクテレメ設定, -,Cmd_EL_CLOG_SET_PAGE_FOR_TLM,OBC,0x0046,2,uint8_t,page_no,uint8_t,err_level,,,,,,,,,,,CLogのダウンリンクテレメ設定, -,Cmd_EL_INIT_LOGGING_SETTINGS,OBC,0x0047,0,,,,,,,,,,,,,,,ログ設定を初期化, -,Cmd_EL_ENABLE_LOGGING,OBC,0x0048,1,uint32_t,group,,,,,,,,,,,,,ロギングを有効化, -,Cmd_EL_DISABLE_LOGGING,OBC,0x0049,1,uint32_t,group,,,,,,,,,,,,,ロギングを無効化, -,Cmd_EL_ENABLE_LOGGING_ALL,OBC,0x004A,0,,,,,,,,,,,,,,,すべてのロギングを有効化, -,Cmd_EL_DISABLE_LOGGING_ALL,OBC,0x004B,0,,,,,,,,,,,,,,,すべてのロギングを無効化, -,Cmd_EL_ENABLE_TLOG_OVERWRITE,OBC,0x004C,1,uint8_t,err_level,,,,,,,,,,,,,TLogのログ上書きを有効化, -,Cmd_EL_DISABLE_TLOG_OVERWRITE,OBC,0x004D,1,uint8_t,err_level,,,,,,,,,,,,,TLogのログ上書きを無効化, -,Cmd_EL_ENABLE_TLOG_OVERWRITE_ALL,OBC,0x004E,0,,,,,,,,,,,,,,,すべてのTLogのログ上書きを有効化, -,Cmd_EL_DISABLE_TLOG_OVERWRITE_ALL,OBC,0x004F,0,,,,,,,,,,,,,,,すべてのTLogのログ上書きを無効化, +,Cmd_EL_INIT,OBC,0x0030,0,,,,,,,,,,,,,,,EL初期化, +,Cmd_EL_CLEAR_LOG_ALL,OBC,0x0031,0,,,,,,,,,,,,,,,全ログ削除, +,Cmd_EL_CLEAR_LOG_BY_ERR_LEVEL,OBC,0x0032,1,uint8_t,err_level,,,,,,,,,,,,,エラーレベル指定ログ削除, +,Cmd_EL_CLEAR_STATISTICS,OBC,0x0033,0,,,,,,,,,,,,,,,統計情報削除, +,Cmd_EL_CLEAR_TLOG,OBC,0x0034,1,uint8_t,err_level,,,,,,,,,,,,,TLog削除, +,Cmd_EL_CLEAR_CLOG,OBC,0x0035,1,uint8_t,err_level,,,,,,,,,,,,,CLog削除, +,Cmd_EL_RECORD_EVENT,OBC,0x0036,4,uint32_t,group,uint32_t,local,uint8_t,err_level,uint32_t,note,,,,,,,イベント記録, +,Cmd_EL_TLOG_SET_PAGE_FOR_TLM,OBC,0x0037,2,uint8_t,page_no,uint8_t,err_level,,,,,,,,,,,TLogのダウンリンクテレメ設定, +,Cmd_EL_CLOG_SET_PAGE_FOR_TLM,OBC,0x0038,2,uint8_t,page_no,uint8_t,err_level,,,,,,,,,,,CLogのダウンリンクテレメ設定, +,Cmd_EL_INIT_LOGGING_SETTINGS,OBC,0x0039,0,,,,,,,,,,,,,,,ログ設定を初期化, +,Cmd_EL_ENABLE_LOGGING,OBC,0x003A,1,uint32_t,group,,,,,,,,,,,,,ロギングを有効化, +,Cmd_EL_DISABLE_LOGGING,OBC,0x003B,1,uint32_t,group,,,,,,,,,,,,,ロギングを無効化, +,Cmd_EL_ENABLE_LOGGING_ALL,OBC,0x003C,0,,,,,,,,,,,,,,,すべてのロギングを有効化, +,Cmd_EL_DISABLE_LOGGING_ALL,OBC,0x003D,0,,,,,,,,,,,,,,,すべてのロギングを無効化, +,Cmd_EL_ENABLE_TLOG_OVERWRITE,OBC,0x003E,1,uint8_t,err_level,,,,,,,,,,,,,TLogのログ上書きを有効化, +,Cmd_EL_DISABLE_TLOG_OVERWRITE,OBC,0x003F,1,uint8_t,err_level,,,,,,,,,,,,,TLogのログ上書きを無効化, +,Cmd_EL_ENABLE_TLOG_OVERWRITE_ALL,OBC,0x0040,0,,,,,,,,,,,,,,,すべてのTLogのログ上書きを有効化, +,Cmd_EL_DISABLE_TLOG_OVERWRITE_ALL,OBC,0x0041,0,,,,,,,,,,,,,,,すべてのTLogのログ上書きを無効化, **,EventHandler,,,,,,,,,,,,,,,,,,, -,Cmd_EH_INIT,OBC,0x0050,0,,,,,,,,,,,,,,,EHの初期化, -,Cmd_EH_CLEAR_ALL_RULE,OBC,0x0051,0,,,,,,,,,,,,,,,EHのすべてのルールをクリア, -,Cmd_EH_LOAD_DEFAULT_RULE,OBC,0x0052,0,,,,,,,,,,,,,,,EHのデフォルトルールを読み込み, -,Cmd_EH_SET_REGISTER_RULE_EVENT_PARAM,OBC,0x0053,6,uint16_t,rule id,uint32_t,event group,uint32_t,event local,uint8_t,event err level,uint8_t,should_match_err_level,uint16_t,deploy bc index,,,登録するEHルールのイベントパラメータを設定, -,Cmd_EH_SET_REGISTER_RULE_CONDITION_PARAM,OBC,0x0054,4,uint8_t,condition type,uint16_t,count_threshold,uint32_t,time_threshold [ms],uint8_t,is_active,,,,,,,登録するEHルールの対応条件パラメタを設定, -,Cmd_EH_REGISTER_RULE,OBC,0x0055,0,,,,,,,,,,,,,,,設定したパラメタでEHルールを登録, -,Cmd_EH_DELETE_RULE,OBC,0x0056,1,uint16_t,rule id,,,,,,,,,,,,,指定したルールを削除, -,Cmd_EH_INIT_RULE,OBC,0x0057,1,uint16_t,rule id,,,,,,,,,,,,,指定したルールを初期化(ルールを有効化し,ルールカウンタも初期化), -,Cmd_EH_INIT_RULE_FOR_MULTI_LEVEL,OBC,0x0058,1,uint16_t,rule id,,,,,,,,,,,,,指定したルールを初期化(ルールを有効化し,ルールカウンタも初期化)(多段EH対応用), -,Cmd_EH_ACTIVATE_RULE,OBC,0x0059,1,uint16_t,rule id,,,,,,,,,,,,,指定したルールを有効化, -,Cmd_EH_INACTIVATE_RULE,OBC,0x005A,1,uint16_t,rule id,,,,,,,,,,,,,指定したルールを無効化, -,Cmd_EH_ACTIVATE_RULE_FOR_MULTI_LEVEL,OBC,0x005B,1,uint16_t,rule id,,,,,,,,,,,,,指定したルールを有効化(多段EH対応用), -,Cmd_EH_INACTIVATE_RULE_FOR_MULTI_LEVEL,OBC,0x005C,1,uint16_t,rule id,,,,,,,,,,,,,指定したルールを無効化(多段EH対応用), -,Cmd_EH_SET_RULE_COUNTER,OBC,0x005D,2,uint16_t,rule id,uint16_t,counter,,,,,,,,,,,EH_Rule の counter をセット, -,Cmd_EH_CLEAR_RULE_COUNTER,OBC,0x005E,1,uint16_t,rule id,,,,,,,,,,,,,EH_Rule の counter を0 クリア, -,Cmd_EH_CLEAR_RULE_COUNTER_BY_EVENT,OBC,0x005F,3,uint32_t,group,uint32_t,local,uint8_t,err_level,,,,,,,,,EH_Rule の counter を EL_Event 指定で 0 クリア, -,Cmd_EH_CLEAR_LOG,OBC,0x0060,0,,,,,,,,,,,,,,,EHの対応ログをクリア, -,Cmd_EH_SET_MAX_RESPONSE_NUM,OBC,0x0061,1,uint8_t,max_response_num,,,,,,,,,,,,,一度のEH実行で対応するイベントの最大数を設定, -,Cmd_EH_SET_MAX_CHECK_EVENT_NUM,OBC,0x0062,1,uint16_t,max_check_event_num,,,,,,,,,,,,,一度のEH実行でチェックするイベントの最大数を設定, -,Cmd_EH_SET_MAX_MULTI_LEVEL_NUM,OBC,0x0063,1,uint8_t,max_multi_level_num,,,,,,,,,,,,,設定可能な最大段数を設定, -,Cmd_EH_SET_PAGE_OF_RULE_TABLE_FOR_TLM,OBC,0x0064,1,uint8_t,page_no,,,,,,,,,,,,,EHルールテーブルのテレメページの設定, -,Cmd_EH_SET_PAGE_OF_RULE_SORTED_IDX_FOR_TLM,OBC,0x0065,1,uint8_t,page_no,,,,,,,,,,,,,EHルールのソート済みテーブルのテレメページの設定, -,Cmd_EH_SET_PAGE_OF_LOG_TABLE_FOR_TLM,OBC,0x0066,1,uint8_t,page_no,,,,,,,,,,,,,EHログテーブルのテレメページの設定, -,Cmd_EH_SET_TARGET_ID_OF_RULE_TABLE_FOR_TLM,OBC,0x0067,1,uint16_t,rule id,,,,,,,,,,,,,EHテレメに表示するルールのID設定, -,Cmd_EH_MATCH_EVENT_COUNTER_TO_EL,OBC,0x0068,0,,,,,,,,,,,,,,,イベント発生を検知するためのEHカウンタをELカウンタに強制定期に合わせる, -,Cmd_EH_INIT_RULE_BY_EVENT_GROUP,OBC,0x0069,1,uint32_t,group,,,,,,,,,,,,,Cmd_EH_INIT_RULE の by_event_group コマンド.想定外のものまで操作されないか注意すること, -,Cmd_EH_INIT_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL,OBC,0x006A,1,uint32_t,group,,,,,,,,,,,,,Cmd_EH_INIT_RULE_FOR_MULTI_LEVEL の by_event_group コマンド.想定外のものまで操作されないか注意すること, -,Cmd_EH_ACTIVATE_RULE_BY_EVENT_GROUP,OBC,0x006B,1,uint32_t,group,,,,,,,,,,,,,Cmd_EH_ACTIVATE_RULE の by_event_group コマンド.想定外のものまで操作されないか注意すること, -,Cmd_EH_INACTIVATE_RULE_BY_EVENT_GROUP,OBC,0x006C,1,uint32_t,group,,,,,,,,,,,,,Cmd_EH_INACTIVATE_RULE の by_event_group コマンド.想定外のものまで操作されないか注意すること, -,Cmd_EH_ACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL,OBC,0x006D,1,uint32_t,group,,,,,,,,,,,,,Cmd_EH_ACTIVATE_RULE_FOR_MULTI_LEVEL の by_event_group コマンド.想定外のものまで操作されないか注意すること, -,Cmd_EH_INACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL,OBC,0x006E,1,uint32_t,group,,,,,,,,,,,,,Cmd_EH_INACTIVATE_RULE_FOR_MULTI_LEVEL の by_event_group コマンド.想定外のものまで操作されないか注意すること, +,Cmd_EH_INIT,OBC,0x0042,0,,,,,,,,,,,,,,,EHの初期化, +,Cmd_EH_CLEAR_ALL_RULE,OBC,0x0043,0,,,,,,,,,,,,,,,EHのすべてのルールをクリア, +,Cmd_EH_LOAD_DEFAULT_RULE,OBC,0x0044,0,,,,,,,,,,,,,,,EHのデフォルトルールを読み込み, +,Cmd_EH_SET_REGISTER_RULE_EVENT_PARAM,OBC,0x0045,6,uint16_t,rule id,uint32_t,event group,uint32_t,event local,uint8_t,event err level,uint8_t,should_match_err_level,uint16_t,deploy bc index,,,登録するEHルールのイベントパラメータを設定, +,Cmd_EH_SET_REGISTER_RULE_CONDITION_PARAM,OBC,0x0046,4,uint8_t,condition type,uint16_t,count_threshold,uint32_t,time_threshold [ms],uint8_t,is_active,,,,,,,登録するEHルールの対応条件パラメタを設定, +,Cmd_EH_REGISTER_RULE,OBC,0x0047,0,,,,,,,,,,,,,,,設定したパラメタでEHルールを登録, +,Cmd_EH_DELETE_RULE,OBC,0x0048,1,uint16_t,rule id,,,,,,,,,,,,,指定したルールを削除, +,Cmd_EH_INIT_RULE,OBC,0x0049,1,uint16_t,rule id,,,,,,,,,,,,,指定したルールを初期化(ルールを有効化し,ルールカウンタも初期化), +,Cmd_EH_INIT_RULE_FOR_MULTI_LEVEL,OBC,0x004A,1,uint16_t,rule id,,,,,,,,,,,,,指定したルールを初期化(ルールを有効化し,ルールカウンタも初期化)(多段EH対応用), +,Cmd_EH_ACTIVATE_RULE,OBC,0x004B,1,uint16_t,rule id,,,,,,,,,,,,,指定したルールを有効化, +,Cmd_EH_INACTIVATE_RULE,OBC,0x004C,1,uint16_t,rule id,,,,,,,,,,,,,指定したルールを無効化, +,Cmd_EH_ACTIVATE_RULE_FOR_MULTI_LEVEL,OBC,0x004D,1,uint16_t,rule id,,,,,,,,,,,,,指定したルールを有効化(多段EH対応用), +,Cmd_EH_INACTIVATE_RULE_FOR_MULTI_LEVEL,OBC,0x004E,1,uint16_t,rule id,,,,,,,,,,,,,指定したルールを無効化(多段EH対応用), +,Cmd_EH_SET_RULE_COUNTER,OBC,0x004F,2,uint16_t,rule id,uint16_t,counter,,,,,,,,,,,EH_Rule の counter をセット, +,Cmd_EH_CLEAR_RULE_COUNTER,OBC,0x0050,1,uint16_t,rule id,,,,,,,,,,,,,EH_Rule の counter を0 クリア, +,Cmd_EH_CLEAR_RULE_COUNTER_BY_EVENT,OBC,0x0051,3,uint32_t,group,uint32_t,local,uint8_t,err_level,,,,,,,,,EH_Rule の counter を EL_Event 指定で 0 クリア, +,Cmd_EH_CLEAR_LOG,OBC,0x0052,0,,,,,,,,,,,,,,,EHの対応ログをクリア, +,Cmd_EH_SET_MAX_RESPONSE_NUM,OBC,0x0053,1,uint8_t,max_response_num,,,,,,,,,,,,,一度のEH実行で対応するイベントの最大数を設定, +,Cmd_EH_SET_MAX_CHECK_EVENT_NUM,OBC,0x0054,1,uint16_t,max_check_event_num,,,,,,,,,,,,,一度のEH実行でチェックするイベントの最大数を設定, +,Cmd_EH_SET_MAX_MULTI_LEVEL_NUM,OBC,0x0055,1,uint8_t,max_multi_level_num,,,,,,,,,,,,,設定可能な最大段数を設定, +,Cmd_EH_SET_PAGE_OF_RULE_TABLE_FOR_TLM,OBC,0x0056,1,uint8_t,page_no,,,,,,,,,,,,,EHルールテーブルのテレメページの設定, +,Cmd_EH_SET_PAGE_OF_RULE_SORTED_IDX_FOR_TLM,OBC,0x0057,1,uint8_t,page_no,,,,,,,,,,,,,EHルールのソート済みテーブルのテレメページの設定, +,Cmd_EH_SET_PAGE_OF_LOG_TABLE_FOR_TLM,OBC,0x0058,1,uint8_t,page_no,,,,,,,,,,,,,EHログテーブルのテレメページの設定, +,Cmd_EH_SET_TARGET_ID_OF_RULE_TABLE_FOR_TLM,OBC,0x0059,1,uint16_t,rule id,,,,,,,,,,,,,EHテレメに表示するルールのID設定, +,Cmd_EH_MATCH_EVENT_COUNTER_TO_EL,OBC,0x005A,0,,,,,,,,,,,,,,,イベント発生を検知するためのEHカウンタをELカウンタに強制定期に合わせる, +,Cmd_EH_INIT_RULE_BY_EVENT_GROUP,OBC,0x005B,1,uint32_t,group,,,,,,,,,,,,,Cmd_EH_INIT_RULE の by_event_group コマンド.想定外のものまで操作されないか注意すること, +,Cmd_EH_INIT_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL,OBC,0x005C,1,uint32_t,group,,,,,,,,,,,,,Cmd_EH_INIT_RULE_FOR_MULTI_LEVEL の by_event_group コマンド.想定外のものまで操作されないか注意すること, +,Cmd_EH_ACTIVATE_RULE_BY_EVENT_GROUP,OBC,0x005D,1,uint32_t,group,,,,,,,,,,,,,Cmd_EH_ACTIVATE_RULE の by_event_group コマンド.想定外のものまで操作されないか注意すること, +,Cmd_EH_INACTIVATE_RULE_BY_EVENT_GROUP,OBC,0x005E,1,uint32_t,group,,,,,,,,,,,,,Cmd_EH_INACTIVATE_RULE の by_event_group コマンド.想定外のものまで操作されないか注意すること, +,Cmd_EH_ACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL,OBC,0x005F,1,uint32_t,group,,,,,,,,,,,,,Cmd_EH_ACTIVATE_RULE_FOR_MULTI_LEVEL の by_event_group コマンド.想定外のものまで操作されないか注意すること, +,Cmd_EH_INACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL,OBC,0x0060,1,uint32_t,group,,,,,,,,,,,,,Cmd_EH_INACTIVATE_RULE_FOR_MULTI_LEVEL の by_event_group コマンド.想定外のものまで操作されないか注意すること, **,EventUtility,,,,,,,,,,,,,,,,,,, -,Cmd_EVENT_UTIL_ENABLE_EH_EXEC,OBC,0x006F,0,,,,,,,,,,,,,,,EHの実行を有効に, -,Cmd_EVENT_UTIL_DISABLE_EH_EXEC,OBC,0x0070,0,,,,,,,,,,,,,,,EHの実行を無効に, -,Cmd_EVENT_UTIL_EXEC_EH,OBC,0x0071,0,,,,,,,,,,,,,,,EHを単発で実行, +,Cmd_EVENT_UTIL_ENABLE_EH_EXEC,OBC,0x0061,0,,,,,,,,,,,,,,,EHの実行を有効に, +,Cmd_EVENT_UTIL_DISABLE_EH_EXEC,OBC,0x0062,0,,,,,,,,,,,,,,,EHの実行を無効に, +,Cmd_EVENT_UTIL_EXEC_EH,OBC,0x0063,0,,,,,,,,,,,,,,,EHを単発で実行, **,Telemetry Frame@@ Command Analyze,,,,,,,,,,,,,,,,,,, -,Cmd_TF_INIT,OBC,0x0072,0,,,,,,,,,,,,,,,TFの初期化, -,Cmd_CA_INIT,OBC,0x0073,0,,,,,,,,,,,,,,,CAの初期化, -,Cmd_TF_REGISTER_TLM,OBC,0x0074,2,uint8_t,index,uint32_t,tlm_func,,,,,,,,,,,テレメトリ登録コマンド, -,Cmd_CA_REGISTER_CMD,OBC,0x0075,3,uint16_t,index,uint32_t,cmd_func,raw,param_info,,,,,,,,,コマンド登録コマンド, -,Cmd_TF_SET_PAGE_FOR_TLM,OBC,0x0076,1,uint8_t,page_no,,,,,,,,,,,,,テレメトリ定義テーブルページ番号設定, -,Cmd_CA_SET_PAGE_FOR_TLM,OBC,0x0077,1,uint8_t,page_no,,,,,,,,,,,,,コマンド定義テーブルページ番号設定, +,Cmd_TF_INIT,OBC,0x0064,0,,,,,,,,,,,,,,,TFの初期化, +,Cmd_CA_INIT,OBC,0x0065,0,,,,,,,,,,,,,,,CAの初期化, +,Cmd_TF_REGISTER_TLM,OBC,0x0066,2,uint8_t,index,uint32_t,tlm_func,,,,,,,,,,,テレメトリ登録コマンド, +,Cmd_CA_REGISTER_CMD,OBC,0x0067,3,uint16_t,index,uint32_t,cmd_func,raw,param_info,,,,,,,,,コマンド登録コマンド, +,Cmd_TF_SET_PAGE_FOR_TLM,OBC,0x0068,1,uint8_t,page_no,,,,,,,,,,,,,テレメトリ定義テーブルページ番号設定, +,Cmd_CA_SET_PAGE_FOR_TLM,OBC,0x0069,1,uint8_t,page_no,,,,,,,,,,,,,コマンド定義テーブルページ番号設定, **,Tlm Manager コマンド,,,,,,,,,,,,,,,,,,, -,Cmd_TLM_MGR_INIT,OBC,0x0078,0,,,,,,,,,,,,,,,初期化, -,Cmd_TLM_MGR_INIT_MASTER_BC,OBC,0x0079,0,,,,,,,,,,,,,,,master bc の初期化, -,Cmd_TLM_MGR_CLEAR_HK_TLM,OBC,0x007A,0,,,,,,,,,,,,,,,HKテレメを初期化, -,Cmd_TLM_MGR_CLEAR_SYSTEM_TLM,OBC,0x007B,0,,,,,,,,,,,,,,,systemテレメを初期化, -,Cmd_TLM_MGR_CLEAR_USER_TLM,OBC,0x007C,0,,,,,,,,,,,,,,,high_freq_tlm@@ low_freq_tlm を初期化, -,Cmd_TLM_MGR_START_TLM,OBC,0x007D,0,,,,,,,,,,,,,,,TLM送出開始, -,Cmd_TLM_MGR_STOP_TLM,OBC,0x007E,0,,,,,,,,,,,,,,,TLM送出一時停止, -,Cmd_TLM_MGR_CLEAR_TLM_TL,OBC,0x007F,0,,,,,,,,,,,,,,,TLM送出用TLをクリア, -,Cmd_TLM_MGR_REGISTER_HK_TLM,OBC,0x0080,3,uint8_t,category,uint8_t,TLM_ID,uint8_t,送出回数,,,,,,,,,HKテレメを登録, -,Cmd_TLM_MGR_REGISTER_SYSTEM_TLM,OBC,0x0081,3,uint8_t,category,uint8_t,TLM_ID,uint8_t,送出回数,,,,,,,,,systemテレメを登録, -,Cmd_TLM_MGR_REGISTER_HIGH_FREQ_TLM,OBC,0x0082,3,uint8_t,category,uint8_t,TLM_ID,uint8_t,送出回数,,,,,,,,,high_freq_tlm を登録, -,Cmd_TLM_MGR_REGISTER_LOW_FREQ_TLM,OBC,0x0083,3,uint8_t,category,uint8_t,TLM_ID,uint8_t,送出回数,,,,,,,,,low_freq_tlm を登録, +,Cmd_TLM_MGR_INIT,OBC,0x006A,0,,,,,,,,,,,,,,,初期化, +,Cmd_TLM_MGR_INIT_MASTER_BC,OBC,0x006B,0,,,,,,,,,,,,,,,master bc の初期化, +,Cmd_TLM_MGR_CLEAR_HK_TLM,OBC,0x006C,0,,,,,,,,,,,,,,,HKテレメを初期化, +,Cmd_TLM_MGR_CLEAR_SYSTEM_TLM,OBC,0x006D,0,,,,,,,,,,,,,,,systemテレメを初期化, +,Cmd_TLM_MGR_CLEAR_USER_TLM,OBC,0x006E,0,,,,,,,,,,,,,,,high_freq_tlm@@ low_freq_tlm を初期化, +,Cmd_TLM_MGR_START_TLM,OBC,0x006F,0,,,,,,,,,,,,,,,TLM送出開始, +,Cmd_TLM_MGR_STOP_TLM,OBC,0x0070,0,,,,,,,,,,,,,,,TLM送出一時停止, +,Cmd_TLM_MGR_CLEAR_TLM_TL,OBC,0x0071,0,,,,,,,,,,,,,,,TLM送出用TLをクリア, +,Cmd_TLM_MGR_REGISTER_HK_TLM,OBC,0x0072,3,uint8_t,category,uint8_t,TLM_ID,uint8_t,送出回数,,,,,,,,,HKテレメを登録, +,Cmd_TLM_MGR_REGISTER_SYSTEM_TLM,OBC,0x0073,3,uint8_t,category,uint8_t,TLM_ID,uint8_t,送出回数,,,,,,,,,systemテレメを登録, +,Cmd_TLM_MGR_REGISTER_HIGH_FREQ_TLM,OBC,0x0074,3,uint8_t,category,uint8_t,TLM_ID,uint8_t,送出回数,,,,,,,,,high_freq_tlm を登録, +,Cmd_TLM_MGR_REGISTER_LOW_FREQ_TLM,OBC,0x0075,3,uint8_t,category,uint8_t,TLM_ID,uint8_t,送出回数,,,,,,,,,low_freq_tlm を登録, **,Divided Cmd Utility コマンド,,,,,,,,,,,,,,,,,,, -,Cmd_DCU_ABORT_CMD,OBC,0x0084,1,uint16_t,Cmd ID,,,,,,,,,,,,,実行中の分割コマンドを停止する, -,Cmd_DCU_DOWN_ABORT_FLAG,OBC,0x0085,1,uint16_t,Cmd ID,,,,,,,,,,,,,エラー,またはコマンドによって中断ステータスとなっているコマンドを,実行可能状態に戻す, -,Cmd_DCU_CLEAR_LOG,OBC,0x0086,0,,,,,,,,,,,,,,,ログをクリアする, +,Cmd_DCU_ABORT_CMD,OBC,0x0076,1,uint16_t,Cmd ID,,,,,,,,,,,,,実行中の分割コマンドを停止する, +,Cmd_DCU_DOWN_ABORT_FLAG,OBC,0x0077,1,uint16_t,Cmd ID,,,,,,,,,,,,,エラー,またはコマンドによって中断ステータスとなっているコマンドを,実行可能状態に戻す, +,Cmd_DCU_CLEAR_LOG,OBC,0x0078,0,,,,,,,,,,,,,,,ログをクリアする, **,Test App コマンド,,,,,,,,,,,,,,,,,,, -,Cmd_TEST_CCP_REGISTER_TLC_ASAP,OBC,0x0087,1,uint32_t,ti,,,,,,,,,,,,,CCP_register_tlc_asap のテスト用コマンド, -,Cmd_TEST_CCP_GET_RAW_PARAM_INFO,OBC,0x0088,3,uint16_t,raw data len,uint8_t,first data,raw,raw data,,,,,,,,,CCP UTIL の ParamGenerator のテスト, +,Cmd_TEST_CCP_REGISTER_TLC_ASAP,OBC,0x0079,1,uint32_t,ti,,,,,,,,,,,,,CCP_register_tlc_asap のテスト用コマンド, +,Cmd_TEST_CCP_GET_RAW_PARAM_INFO,OBC,0x007A,3,uint16_t,raw data len,uint8_t,first data,raw,raw data,,,,,,,,,CCP UTIL の ParamGenerator のテスト, **,,,,,,,,,,,,,,,,,,,, * CDH,GS用,,,,,,,,,,,,,,,,,,, -,Cmd_DI_GS_CCSDS_TX_START,OBC,0x0100,0,,,,,,,,,,,,,,,CCSDS 通信を有効に, -,Cmd_DI_GS_CCSDS_TX_STOP,OBC,0x0101,0,,,,,,,,,,,,,danger,,CCSDS通信を無効に, -,Cmd_DI_GS_DRIVER_RESET,OBC,0x0102,0,,,,,,,,,,,,,,,MS VCDUの排出間隔設定, -,Cmd_DI_GS_SET_MS_FLUSH_INTERVAL,OBC,0x0103,1,uint32_t,排出間隔,,,,,,,,,,,,,MS VCDUの排出間隔設定, -,Cmd_DI_GS_SET_RP_FLUSH_INTERVAL,OBC,0x0104,1,uint32_t,排出間隔,,,,,,,,,,,,,RP VCDUの排出間隔設定, -,Cmd_DI_GS_SET_FARM_PW,OBC,0x0105,1,uint8_t,positive_window_width,,,,,,,,,,,,,FARM-1のPositive Window Width設定, -,Cmd_DI_GS_SET_INFO,OBC,0x0106,1,uint8_t,TLM選択,,,,,,,,,,,,,GS送信TLMが0ならCCSDSに@@ 1ならUARTの情報が出てくる, -,Cmd_DI_GS_CCSDS_GET_BUFFER,OBC,0x0107,0,,,,,,,,,,,,,,,, -,Cmd_DI_GS_CCSDS_SET_RATE,OBC,0x0108,1,uint8_t,bps セットパラメータ,,,,,,,,,,,danger,,40M/パラメータ が bps になる.初期値は 0xAD で 230.4 Kbps (微妙に対応していない), +,Cmd_DI_GS_DRIVER_RESET,OBC,0x0100,0,,,,,,,,,,,,,,,MS VCDUの排出間隔設定, +,Cmd_DI_GS_SET_MS_FLUSH_INTERVAL,OBC,0x0101,1,uint32_t,排出間隔,,,,,,,,,,,,,MS VCDUの排出間隔設定, +,Cmd_DI_GS_SET_RP_FLUSH_INTERVAL,OBC,0x0102,1,uint32_t,排出間隔,,,,,,,,,,,,,RP VCDUの排出間隔設定, +,Cmd_DI_GS_SET_FARM_PW,OBC,0x0103,1,uint8_t,positive_window_width,,,,,,,,,,,,,FARM-1のPositive Window Width設定, +,Cmd_DI_GS_SET_INFO,OBC,0x0104,1,uint8_t,TLM選択,,,,,,,,,,,,,GS送信TLMが0ならCCSDSに@@ 1ならUARTの情報が出てくる, +,Cmd_DI_GS_CCSDS_GET_BUFFER,OBC,0x0105,0,,,,,,,,,,,,,,,, +,Cmd_DI_GS_CCSDS_SET_RATE,OBC,0x0106,1,uint8_t,bps セットパラメータ,,,,,,,,,,,danger,,40M/パラメータ が bps になる.初期値は 0xAD で 230.4 Kbps (微妙に対応していない), +,Cmd_DI_GS_UART_TLM_ON,OBC,0x0107,0,,,,,,,,,,,,,,,TLM の UART への送出を行う, +,Cmd_DI_GS_UART_TLM_OFF,OBC,0x0108,0,,,,,,,,,,,,,,,TLM の UART への送出を止める, **,WDT用コマンド,,,,,,,,,,,,,,,,,,, ,Cmd_WDT_INIT,OBC,0x0109,0,,,,,,,,,,,,,,,WDT初期化.WDTがアプリイニシャライザを持たなくなったので追加, ,Cmd_WDT_ENABLE,OBC,0x010A,0,,,,,,,,,,,,,,,WDT有効化, @@ -201,9 +185,9 @@ Comment,,,,,Type,Description,Type,Description,Type,Description,Type,Description, ,Cmd_UTIL_CMD_SEND,OBC,0x03E1,1,uint8_t,,,,,,,,,,,,,,引数のCHに汎用コマンドのバッファにあるデータを送信する, ,Cmd_UTIL_CMD_RESET,OBC,0x03E2,0,,,,,,,,,,,,,,,汎用コマンドのバッファをクリアする, **,汎用カウンタ用コマンド,,,,,,,,,,,,,,,,,,, -,Cmd_UTIL_COUNTER_INCREMENT,OBC,0x03E3,1,uint8_t,,,,,,,,,,,,,,引数の汎用カウンタをインクリメントする, -,Cmd_UTIL_COUNTER_RESET,OBC,0x03E4,1,uint8_t,,,,,,,,,,,,,,引数の汎用カウンタをリセットする.0xffでALL_CLR, -,Cmd_UTIL_COUNTER_SET_PARAM,OBC,0x03E5,3,uint8_t,,uint32_t,,uint8_t,,,,,,,,,,引数の汎用カウンタの閾値・アノマリ発行有無を設定する, +*,Cmd_UTIL_COUNTER_INCREMENT,OBC,,1,uint8_t,,,,,,,,,,,,,,引数の汎用カウンタをインクリメントする, +*,Cmd_UTIL_COUNTER_RESET,OBC,,1,uint8_t,,,,,,,,,,,,,,引数の汎用カウンタをリセットする.0xffでALL_CLR, +*,Cmd_UTIL_COUNTER_SET_PARAM,OBC,,3,uint8_t,,uint32_t,,uint8_t,,,,,,,,,,引数の汎用カウンタの閾値・アノマリ発行有無を設定する, **,,,,,,,,,,,,,,,,,,,, * NonOrder,これ以下はコマンドIDが自動で割り振られない!,,,,,,,,,,,,,,,,,,, **,CmdCodeSibGeneratorによって,RTのみ生成,,,,,,,,,,,,,,,,,,, @@ -998,3 +982,19 @@ Comment,,,,,Type,Description,Type,Description,Type,Description,Type,Description, ,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB.xlsm b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB.xlsm index 4942a05c8..49d77c03d 100644 Binary files a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB.xlsm and b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB.xlsm differ diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_AM.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_AM.csv index 0bff0857d..41e16a407 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_AM.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_AM.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,PAGE_NO,uint8_t,(uint8_t)(app_manager->page_no),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,,,,,,,,, ,APP0_INITIALIZER,uint32_t,(uint32_t)(app_manager->ais[offset+0].initializer),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)))),HEX,,,,,,,,, ,APP0_ENTRYPOINT,uint32_t,(uint32_t)(app_manager->ais[offset+0].entry_point),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)))),HEX,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_APP_TIME.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_APP_TIME.csv index 87e7552cc..26af111ce 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_APP_TIME.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_APP_TIME.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,APP0_INIT_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[0].init_duration),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,,,,,,,,, ,APP0_PREV_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[0].prev),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,,,,,,,,, ,APP0_MIN_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[0].min),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/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_BL.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_BL.csv index fa65113f9..a6905b797 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_BL.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_BL.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,BLOCK_NO,uint16_t,block,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,,,,,,,,テレメトリを生成したブロック番号, ,CMD_POS,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,,,,,,,,, ,BLOCK_LENGTH,uint8_t,BCT_get_bc_length(block),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/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_CA.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_CA.csv index fcf60844b..713313950 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_CA.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_CA.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,PAGE_NO,uint8_t,(uint8_t)(command_analyze->tlm_page_no),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,,,,,,,,, ,CMD0.FUNC,uint32_t,(uint32_t)(command_analyze->cmd_table[offset+0].cmd_func),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)))),HEX,,,,,,,,, ,CMD0.PARAM0_SIZE,uint8_t,(uint8_t)(((command_analyze->cmd_table[offset+0].param_size_infos[0].packed_info.bit.first & 0x0f) << 4) | (command_analyze->cmd_table[offset+0].param_size_infos[0].packed_info.bit.second & 0x0f)),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),4,STATUS,,,,,,,0=NONE@@1=1BYTE@@2=2BYTE@@3=4BYTE@@4=8BYTE@@15=RAW@@*=N/A,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_DCU.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_DCU.csv index 7b6cc4971..d14373277 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_DCU.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_DCU.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,EXEC_LOG_ORDER0,uint8_t,divided_cmd_utility->exec_log_order[0],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,,,,,,,,, ,EXEC_LOG_ORDER1,uint8_t,divided_cmd_utility->exec_log_order[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,,,,,,,,, ,EXEC_LOG_ORDER2,uint8_t,divided_cmd_utility->exec_log_order[2],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/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EH.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EH.csv index 16e1bbdd8..623f7eff8 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EH.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EH.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,EVENT_UTIL.IS_ENABLED_EH_EXECUTION,uint8_t,event_utility->is_enabled_eh_execution,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=DISABLE@@ 1=ENABLE@@ *=N/A,, ,EL_EVENT_COUNTER.COUNTER_TOTAL,uint32_t,event_handler->el_event_counter.counter_total,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,,,,,,,,, ,EL_EVENT_COUNTER.COUNTERS.EL_ERROR_LEVEL_HIGH,uint32_t,event_handler->el_event_counter.counters[EL_ERROR_LEVEL_HIGH],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/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EH_INDEX.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EH_INDEX.csv index fe2bf1055..2aa32fd00 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EH_INDEX.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EH_INDEX.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,TLM_INFO.RULE_SORTED_INDEX.PAGE_NO,uint8_t,event_handler->tlm_info.rule_sorted_index.page_no,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,,,,,,,,, ,IDX0.GROUP,uint8_t,(uint8_t)event_handler->sorted_idxes[0 + offset].group,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,,,,,,,,, ,IDX0.LOCAL,uint32_t,event_handler->sorted_idxes[0 + offset].local,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/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EH_LOG.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EH_LOG.csv index 0c5d06d68..e581d0fa9 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EH_LOG.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EH_LOG.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,TLM_INFO.LOG.PAGE_NO,uint8_t,event_handler->tlm_info.log.page_no,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,,,,,,,,, ,LOG_TABLE.RESPOND_COUNTER,uint32_t,event_handler->log_table.respond_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,,,,,,,,, ,LOG_TABLE.LOG_WP,uint16_t,event_handler->log_table.log_wp,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/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EH_RULE.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EH_RULE.csv index a559fe017..7e72d1c95 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EH_RULE.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EH_RULE.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,TLM_INFO.RULE.PAGE_NO,uint8_t,event_handler->tlm_info.rule.page_no,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,,,,,,,,, ,RULE_TABLE.REGISTERED_RULE_NUM,uint16_t,event_handler->rule_table.registered_rule_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,,,,,,,,, ,RULE0.SETTINGS.EVENT.GROUP,uint8_t,(uint8_t)rules[0 + offset].settings.event.group,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/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EL.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EL.csv index 7cd83982d..05abebc3e 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EL.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EL.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,STATISTICS.RECORD_COUNTER_TOTAL,uint32_t,event_logger->statistics.record_counter_total,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,,,,,,,,, ,STATISTICS.RECORD_COUNTERS_HIGH,uint32_t,event_logger->statistics.record_counters[EL_ERROR_LEVEL_HIGH],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,,,,,,,,, ,STATISTICS.RECORD_COUNTERS_MIDDLE,uint32_t,event_logger->statistics.record_counters[EL_ERROR_LEVEL_MIDDLE],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/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EL_CLOG.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EL_CLOG.csv index cf260da8a..df19c8fa7 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EL_CLOG.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EL_CLOG.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,TLM_INFO.CLOG.PAGE_NO,uint8_t,event_logger->tlm_info.clog.page_no,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,,,,,,,,, ,TLM_INFO.CLOG.ERR_LEVEL,uint8_t,(uint8_t)err_level,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=HIGH@@ 1=MIDDLE@@ 2=LOW@@ 3=EL@@ 4=EH@@ *=N/A,, ,STATISTICS.RECORD_COUNTER_TOTAL,uint32_t,event_logger->statistics.record_counter_total,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/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EL_TLOG.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EL_TLOG.csv index 8386eeb28..e996c254e 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EL_TLOG.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_EL_TLOG.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,TLM_INFO.TLOG.PAGE_NO,uint8_t,event_logger->tlm_info.tlog.page_no,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,,,,,,,,, ,TLM_INFO.TLOG.ERR_LEVEL,uint8_t,(uint8_t)((err_level << 4 & 0xf0) | (event_logger->tlogs[err_level].is_enable_overwrite << 3 & 0x08) | ( event_logger->tlogs[err_level].is_table_overflow << 2 & 0x04)),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),4,STATUS,,,,,,,0=HIGH@@ 1=MIDDLE@@ 2=LOW@@ 3=EL@@ 4=EH@@ *=N/A,, ,TLOGS.IS_ENABLE_OVERWRITE,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,NONE,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_GIT_REV.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_GIT_REV.csv index 5c7b112dc..afa86251e 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_GIT_REV.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_GIT_REV.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,CORE0,uint8_t,(uint8_t)GIT_REV_CORE[0],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)))),HEX,,,,,,,,, ,CORE1,uint8_t,(uint8_t)GIT_REV_CORE[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)))),HEX,,,,,,,,, ,CORE2,uint8_t,(uint8_t)GIT_REV_CORE[2],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)))),HEX,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_GS.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_GS.csv index 5b09bad2a..d8c24c704 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_GS.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_GS.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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.RX.REC_STATUS,uint8_t,(uint8_t)gs_driver->info[0].rx.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=OK@@ 1=ERROR,, ,CCSDS.RX.RET_FROM_IF_RX,int32_t,(int32_t)gs_driver->info[0].rx.ret_from_if_rx,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.RX.LAST_DEST_TYPE,uint8_t,(uint8_t)gs_driver->info[0].rx.last_dest_type,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=ME@@ 1=MOBC@@ 2=AOBC@@ 3=TOBC@@ 4=UNKNOWN,, @@ -29,11 +29,10 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,CCSDS.TCTF.AD_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[0].rx.tctf.ad_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.TCTF.BC_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[0].rx.tctf.bc_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.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.IS_VALID,uint8_t,gs_driver->is_ccsds_tx_valid,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=INVALID@@ 1=VALID,, ,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.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.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,,,,,,,,, ,UART.PARITY,uint8_t,(uint8_t)gs_driver->driver_uart.uart_config.parity_settings,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=NONE@@ 1=ODD@@ 2=EVEN@@ 3=MARK@@ 4 =SPACE,, @@ -51,6 +50,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,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.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,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_HK.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_HK.csv index 9bf489e6f..78419235c 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_HK.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_HK.csv @@ -19,62 +19,71 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, -,OBC_TM_MODE_TIME,uint32_t,TMGR_get_master_clock().mode_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,,,,,,,,, -,OBC_TM_UNIXTIME_AT_TI0,double,TMGR_get_unixtime_at_ti0(),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,,,,,,,,, -,OBC_MM_OPSMODE,uint8_t,(uint8_t)(mode_manager->current_id),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=START_UP@@1=INITIAL@@2=GND_TEST@@3=WDFAR@@4=RTC_HIGH_RATE@@5=5@@6=6@@7=7@@8=8@@9=9@@10=10@@11=11@@12=12@@13=13@@14=14@@15=15@@16=MAX@@*=N/A,, -,OBC_MM_STS,uint8_t,(uint8_t)( ((uint8_t)(mode_manager->stat) << 7 & 0x80) | ((uint8_t)(mode_manager->previous_id) & 0x7F) ),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=FINISHED@@1=PROGRESS@@*=N/A,, -,OBC_MM_OPSMODE_PREV,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),7,STATUS,,,,,,,0=START_UP@@1=INITIAL@@2=GND_TEST@@3=WDFAR@@4=RTC_HIGH_RATE@@5=5@@6=6@@7=7@@8=8@@9=9@@10=10@@11=11@@12=12@@13=13@@14=14@@15=15@@16=MAX@@*=N/A,, -,OBC_TDSP_CURRENT_ID,uint16_t,TDSP_info->task_list_id,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,,,,,,,,, -,OBC_TCTF_LAST_RECV_ACK,uint8_t,(uint8_t)gs_driver->latest_info->rx.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=ERROR,TC Transer Frame 受信処理結果, -,OBC_TCTF_LAST_RECV_TIME,uint32_t,(uint32_t)gs_driver->latest_info->rx.last_rec_time,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,,,,,,,,最新TC Transer Frame受信時刻, -,OBC_TCP_LAST_RECV_ACK,uint8_t,(uint8_t)(gs_driver->latest_info->rx.cmd_ack),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=FORWARDED@@ 2=LIST_FULL@@ 3=PACKET_NOT_FOUND@@ 4=INVALID_PACKET@@ 5=TLC_SUCCESS@@ 6=TLC_PAST_TIME@@ 7=TLC_ALREADY_EXISTS@@ 8=BC_SUCCESS@@ 9=BC_INVALID_BLOCK_NO@@ 10=BC_ISORATED_CMD@@ 11=BC_CMD_TOO_LONG@@ 12=UNKNOWN,最新TCPacket受信処理結果, -,OBC_GS_CMD_COUNTER,uint32_t,PL_count_executed_nodes(&PH_gs_cmd_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,,,,,,,,地上局コマンドカウンタ, -,OBC_GS_CMD_LAST_EXEC_TIME,uint32_t,gs_command_dispatcher->prev.time.total_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,,,,,,,,最新地上局コマンド実行時刻, -,OBC_GS_CMD_LAST_EXEC_ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev.code),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,,,,,,,,最新地上局コマンドID, -,OBC_GS_CMD_LAST_EXEC_STS,int8_t,(int8_t)(gs_command_dispatcher->prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, -,OBC_GS_CMD_LAST_ERR_TIME,uint32_t,gs_command_dispatcher->prev_err.time.total_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,,,,,,,,地上局異常コマンド実行時刻, -,OBC_GS_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev_err.code),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,,,,,,,,地上局異常コマンドID, -,OBC_GS_CMD_LAST_ERR_STS,int8_t,(int8_t)(gs_command_dispatcher->prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,地上局異常コマンド実行結果, -,OBC_TLC_GS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]),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,,,,,,,,バス用TLのコマンドカウンタ, -,OBC_TLC_GS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])),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,,,,,,,,バス用TLの登録コマンド数, -,OBC_TLC_GS.LAST_EXEC_TIME,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_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,,,,,,,,バス用TLの最新コマンド実行時刻, -,OBC_TLC_GS.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code),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,,,,,,,,バス用TLの最新コマンドID, -,OBC_TLC_GS.LAST_EXEC_STS,int8_t,(int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,バス用TLの最新コマンド実行結果, -,OBC_TLC_GS.LAST_ERR_TIME,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_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,,,,,,,,バス用TLの異常コマンド実行時刻, -,OBC_TLC_GS.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code),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,,,,,,,,バス用TLの異常コマンドID, -,OBC_TLC_GS.LAST_ERR_STS,int8_t,(int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,バス用TLの異常コマンド実行結果, -,OBC_TLC_GS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),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,,,,,,,,バス用TLの次コマンド実行時刻,変数指定が大変なことに… -,OBC_TLC_GS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),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,,,,,,,,バス用TLの次コマンドID,変数指定が大変なことに… -,OBC_TLC_BC.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]),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,,,,,,,,BC用TLのコマンドカウンタ, -,OBC_TLC_BC.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])),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,,,,,,,,BC用TLの登録コマンド数, -,OBC_TLC_TLM.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]),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,,,,,,,,テレメ用TLのコマンドカウンタ, -,OBC_TLC_TLM.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])),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,,,,,,,,テレメ用TLの登録コマンド数, -,OBC_TLC_MIS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]),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,,,,,,,,ミッション用TLのコマンドカウンタ, -,OBC_TLC_MIS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])),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,,,,,,,,ミッション用TLの登録コマンド数, -,OBC_TLC_MIS.LAST_EXEC_TIME,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.time.total_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,,,,,,,,ミッション用TLの最新コマンド実行時刻, -,OBC_TLC_MIS.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.code),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,,,,,,,,ミッション用TLの最新コマンドID, -,OBC_TLC_MIS.LAST_EXEC_STS,int8_t,(int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,ミッション用TLの最新コマンド実行結果, -,OBC_TLC_MIS.LAST_ERR_TIME,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.time.total_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,,,,,,,,ミッション用TLの異常コマンド実行時刻, -,OBC_TLC_MIS.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.code),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,,,,,,,,ミッション用TLの異常コマンドID, -,OBC_TLC_MIS.LAST_ERR_STS,int8_t,(int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,ミッション用TLの異常コマンド実行結果, -,OBC_TLC_MIS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet))),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,,,,,,,,ミッション用TLの次コマンド実行時刻,変数指定が大変なことに… -,OBC_TLC_MIS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet))),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,,,,,,,,ミッション用TLの次コマンドID,変数指定が大変なことに… -,OBC_TLC_GS.SOE_FLAG,uint8_t,(uint8_t)(((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error << 7 & 0x80) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout << 6 & 0x40) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error << 5 & 0x20) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout << 4 & 0x10) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error << 3 & 0x08) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout << 2 & 0x04) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].stop_on_error << 1 & 0x02) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].lockout & 0x01) ),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,OBC_TLC_GS.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),1,STATUS,,,,,,,0=NO@@ 1=YES,, -,OBC_TLC_BC.SOE_FLAG,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,OBC_TLC_BC.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),1,STATUS,,,,,,,0=NO@@ 1=YES,, -,OBC_TLC_TLM.SOE_FLAG,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,OBC_TLC_TLM.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),1,STATUS,,,,,,,0=NO@@ 1=YES,, -,OBC_TLC_MIS.SOE_FLAG,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,OBC_TLC_MIS.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),1,STATUS,,,,,,,0=NO@@ 1=YES,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, +,OBC.TM_MODE_TIME,uint32_t,TMGR_get_master_clock().mode_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,,,,,,,,, +,OBC.TM_UNIXTIME_AT_TI0,double,TMGR_get_unixtime_at_ti0(),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,,,,,,,,, +,OBC.MM_OPSMODE,uint8_t,(uint8_t)(mode_manager->current_id),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=START_UP@@1=INITIAL@@2=GND_TEST@@3=WDFAR@@4=RTC_HIGH_RATE@@5=5@@6=6@@7=7@@8=8@@9=9@@10=10@@11=11@@12=12@@13=13@@14=14@@15=15@@16=MAX@@*=N/A,, +,OBC.MM_STS,uint8_t,(uint8_t)( ((uint8_t)(mode_manager->stat) << 7 & 0x80) | ((uint8_t)(mode_manager->previous_id) & 0x7F) ),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=FINISHED@@1=PROGRESS@@*=N/A,, +,OBC.MM_OPSMODE_PREV,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),7,STATUS,,,,,,,0=START_UP@@1=INITIAL@@2=GND_TEST@@3=WDFAR@@4=RTC_HIGH_RATE@@5=5@@6=6@@7=7@@8=8@@9=9@@10=10@@11=11@@12=12@@13=13@@14=14@@15=15@@16=MAX@@*=N/A,, +,OBC.TDSP.CURRENT_ID,uint16_t,task_dispathcer->task_list_id,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,,,,,,,,, +,OBC.TCTF_LAST_RECV_ACK,uint8_t,(uint8_t)gs_driver->latest_info->rx.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=ERROR,TC Transer Frame 受信処理結果, +,OBC.TCTF_LAST_RECV_TIME,uint32_t,(uint32_t)gs_driver->latest_info->rx.last_rec_time,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,,,,,,,,最新TC Transer Frame受信時刻, +,OBC.TCP_LAST_RECV_ACK,uint8_t,(uint8_t)(gs_driver->latest_info->rx.cmd_ack),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=FORWARDED@@ 2=LIST_FULL@@ 3=PACKET_NOT_FOUND@@ 4=INVALID_PACKET@@ 5=TLC_SUCCESS@@ 6=TLC_PAST_TIME@@ 7=TLC_ALREADY_EXISTS@@ 8=BC_SUCCESS@@ 9=BC_INVALID_BLOCK_NO@@ 10=BC_ISORATED_CMD@@ 11=BC_CMD_TOO_LONG@@ 12=UNKNOWN,最新TCPacket受信処理結果, +,OBC.GS_CMD.COUNTER,uint32_t,PL_count_executed_nodes(&PH_gs_cmd_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,,,,,,,,地上局コマンドカウンタ, +,OBC.GS_CMD.LAST_EXEC.TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev.time.total_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,,,,,,,,最新地上局コマンド実行時刻, +,OBC.GS_CMD.LAST_EXEC.ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev.code),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,,,,,,,,最新地上局コマンドID, +,OBC.GS_CMD.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(gs_command_dispatcher->prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, +,OBC.GS_CMD.LAST_EXEC.ERR_CODE,uint32_t,gs_command_dispatcher->prev.cmd_ret.err_code,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,,,,,,,,, +,OBC.GS_CMD.LAST_ERR.TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev_err.time.total_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,,,,,,,,最新地上局コマンド実行時刻, +,OBC.GS_CMD.LAST_ERR.ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev_err.code),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,,,,,,,,最新地上局コマンドID, +,OBC.GS_CMD.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(gs_command_dispatcher->prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, +,OBC.GS_CMD.LAST_ERR.ERR_CODE,uint32_t,gs_command_dispatcher->prev_err.cmd_ret.err_code,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,,,,,,,,, +,OBC.GS_CMD.ERR_COUNTER,uint32_t,(uint32_t)(gs_command_dispatcher->error_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,,,,,,,,地上局コマンド実行異常カウンタ, +,OBC.TLC_GS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]),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コマンドカウンタ, +,OBC.TLC_GS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])),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登録コマンド数, +,OBC.TLC_GS.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_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,,,,,,,,最新TL0コマンド実行時刻, +,OBC.TLC_GS.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code),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コマンドID, +,OBC.TLC_GS.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, +,OBC.TLC_GS.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.err_code,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,,,,,,,,, +,OBC.TLC_GS.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_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,,,,,,,,最新TL0コマンド実行時刻, +,OBC.TLC_GS.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code),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コマンドID, +,OBC.TLC_GS.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, +,OBC.TLC_GS.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.err_code,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,,,,,,,,, +,OBC.TLC_GS.ERR_COUNTER,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_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,,,,,,,,最新TL0コマンド実行異常カウンタ, +,OBC.TLC_GS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),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コマンド実行時刻,変数指定が大変なことに… +,OBC.TLC_GS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),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コマンドID,変数指定が大変なことに… +,OBC.TLC_BC.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]),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,,,,,,,,TL1コマンドカウンタ, +,OBC.TLC_BC.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])),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,,,,,,,,TL1登録コマンド数, +,OBC.TLC_TLM.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]),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,,,,,,,,TL2コマンドカウンタ, +,OBC.TLC_TLM.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])),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,,,,,,,,TL2登録コマンド数, +,OBC.TLC_MIS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]),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,,,,,,,,TL3コマンドカウンタ, +,OBC.TLC_MIS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])),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,,,,,,,,TL3登録コマンド数, +,OBC.TLC_MIS.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.time.total_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,,,,,,,,最新TL3コマンド実行時刻, +,OBC.TLC_MIS.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.code),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,,,,,,,,最新TL3コマンドID, +,OBC.TLC_MIS.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL3コマンド実行結果, +,OBC.TLC_MIS.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.cmd_ret.err_code,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,,,,,,,,, +,OBC.TLC_MIS.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.time.total_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,,,,,,,,最新TL3コマンド実行時刻, +,OBC.TLC_MIS.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.code),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,,,,,,,,最新TL3コマンドID, +,OBC.TLC_MIS.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL3コマンド実行結果, +,OBC.TLC_MIS.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.cmd_ret.err_code,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,,,,,,,,, +,OBC.TLC_MIS.ERR_COUNTER,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].error_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,,,,,,,,最新TL3コマンド実行異常カウンタ, +,OBC.TLC_MIS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet))),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,,,,,,,,次TL3コマンド実行時刻,変数指定が大変なことに… +,OBC.TLC_MIS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet))),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,,,,,,,,次TL3コマンドID,変数指定が大変なことに… +,OBC.TLC_GS.SOE_FLAG,uint8_t,(uint8_t)(((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error << 7 & 0x80) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout << 6 & 0x40) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error << 5 & 0x20) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout << 4 & 0x10) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error << 3 & 0x08) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout << 2 & 0x04) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].stop_on_error << 1 & 0x02) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].lockout & 0x01) ),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,OBC.TLC_GS.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),1,STATUS,,,,,,,0=NO@@ 1=YES,, +,OBC.TLC_BC.SOE_FLAG,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,OBC.TLC_BC.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),1,STATUS,,,,,,,0=NO@@ 1=YES,, +,OBC.TLC_TLM.SOE_FLAG,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,OBC.TLC_TLM.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),1,STATUS,,,,,,,0=NO@@ 1=YES,, +,OBC.TLC_MIS.SOE_FLAG,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,OBC.TLC_MIS.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),1,STATUS,,,,,,,0=NO@@ 1=YES,, ,WDT.IS_ENABLE,uint8_t,(uint8_t)((wdt_config->is_wdt_enable << 7 & 0x80) | (wdt_config->is_clear_enable << 6 & 0x40) | 0x00),PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, ,WDT.IS_CLEAR_ENABLE,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),1,STATUS,,,,,,,0=DIS@@ 1=ENA,, ,DUMMY_DATA0,||,||,PACKET,=R[-1]C+INT((R[-1]C[1]+R[-1]C[2])/8),=MOD((R[-1]C+R[-1]C[1])@@8),6,NONE,,,,,,,,, -,OBC_BCT_BLK_PTR,uint16_t,block_command_table->pos.block,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 ブロックポインタ, -,OBC_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 コマンドポインタ, -,OBC_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 登録コマンド時刻,変数指定が大変なことに… -,OBC_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,変数指定が大変なことに… +,OBC.BCT_BLK_PTR,uint16_t,block_command_table->pos.block,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 ブロックポインタ, +,OBC.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 コマンドポインタ, +,OBC.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 登録コマンド時刻,変数指定が大変なことに… +,OBC.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,変数指定が大変なことに… ,EL.STATISTICS.RECORD_COUNTER_TOTAL,uint32_t,event_logger->statistics.record_counter_total,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,,,,,,,,, ,EL.STATISTICS.RECORD_COUNTERS_HIGH,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_HIGH],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,,,,,,,,,データサイズ減らすためにu16 ,EL.STATISTICS.RECORD_COUNTERS_MIDDLE,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_MIDDLE],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,,,,,,,,,データサイズ減らすためにu16 @@ -93,17 +102,6 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,EL.LATEST_HIGH_EVENT.TIME.STEP,uint8_t,(uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->time.step,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,,,,,,,,, ,EL.LATEST_HIGH_EVENT.NOTE,uint16_t,(uint16_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->note,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,,,,,,,,,u8にしてもよい ,EH.LOG_TABLE.RESPOND_COUNTER,uint32_t,event_handler->log_table.respond_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,,,,,,,,, -,ANOMALY_MOBC_AL_COUNTER,uint32_t,(uint32_t)anomaly_logger->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,,,,,,,,, -,ANOMALY_MOBC_AL_LATEST_TIME_MASTER,uint32_t,(uint32_t)anomaly_logger->records[(anomaly_logger->header == 0) ? 0 : anomaly_logger->header - 1].time.total_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,,,,,,,,, -,ANOMALY_MOBC_AL_LATEST_TIME_STEP,uint8_t,(uint8_t)(anomaly_logger->records[(anomaly_logger->header == 0) ? 0 : anomaly_logger->header - 1].time.step & 0x000000ff),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,,,,,,,,, -,ANOMALY_MOBC_AL_LATEST_CODE_GROUP,uint8_t,(uint8_t)(anomaly_logger->records[(anomaly_logger->header == 0) ? 0 : anomaly_logger->header - 1].code.group & 0x000000ff),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,,,,,,,,, -,ANOMALY_MOBC_AL_LATEST_CODE_LOCAL,uint32_t,anomaly_logger->records[(anomaly_logger->header == 0) ? 0 : anomaly_logger->header - 1].code.local,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,,,,,,,,, -,ANOMALY_MOBC_AL_LATEST_RUN_LENGTH,uint8_t,(uint8_t)(anomaly_logger->records[(anomaly_logger->header == 0) ? 0 : anomaly_logger->header - 1].run_length & 0x000000ff),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,,,,,,,,, -,ANOMALY_MOBC_AL_HEADER,uint8_t,(uint8_t)(anomaly_logger->header),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,,,,,,,,, -,OBC_AH_ACTION_COUNTER,uint8_t,(uint8_t)(anomaly_handler->action_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,,,,,,,,アノマリ対応発生回数, -,OBC_AH_LATEST_ID,uint8_t,(uint8_t)(anomaly_handler->latest_id),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,,,,,,,,アノマリ対応ID, -,OBC_AH_RESPOND_AT,uint32_t,(uint32_t)(anomaly_handler->respond_at.total_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,,,,,,,,アノマリ対応実施時刻, -,OBC_GS_CMD_ERR_COUNTER,uint8_t,(uint8_t)(gs_command_dispatcher->error_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,,,,,,,,アノマリ対応発生回数, ,DCU.EXEC_LOGS0.CMD_CODE,uint16_t,(uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].cmd_code),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)))),HEX,,,,,,,,, ,DCU.EXEC_LOGS0.STATUS,uint8_t,(uint8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].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=FINISHED@@ 1=PROGRESS@@ 2=ABORTED_BY_ERR@@ 3=ABORTED_BY_CMD@@ *=N/A,, ,DCU.EXEC_LOGS0.EXEC_COUNTER,uint16_t,(uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].exec_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,,,,,,,,, @@ -161,6 +159,8 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,DUMMY_DATA43,uint32_t,0,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,,,,,,,,, ,DUMMY_DATA44,uint32_t,0,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,,,,,,,,, ,DUMMY_DATA45,uint32_t,0,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,,,,,,,,, +,DUMMY_DATA46,uint32_t,0,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,,,,,,,,, +,DUMMY_DATA47,uint32_t,0,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/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_MEM.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_MEM.csv index 5c25158aa..3451f6d61 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_MEM.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_MEM.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,MEM.BEGIN,uint32_t,memory_dump->begin,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)))),HEX,,,,,,,,メモリ操作領域開始アドレス, ,MEM.END,uint32_t,memory_dump->end,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)))),HEX,,,,,,,,メモリ操作領域終端アドレス, ,MEM.ADU_SIZE,uint32_t,memory_dump->adu_size,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,,,,,,,,メモリ操作領域サイズ = ADUサイズ,CCSDSパケットヘッダに設定される diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_MM.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_MM.csv index 083b9e91f..8f4b1ca5a 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_MM.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_MM.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,CURRENT_MODE,uint8_t,(uint8_t)(mode_manager->current_id),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,,,,,,,,, ,PREVIOSU_MODE,uint8_t,(uint8_t)(mode_manager->previous_id),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,,,,,,,,, ,TRANSITION_STATUS,uint8_t,(uint8_t)(mode_manager->stat),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/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_MOBC.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_MOBC.csv index 116029e9f..2cab34b08 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_MOBC.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_MOBC.csv @@ -19,92 +19,105 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,TM_MODE_TIME,uint32_t,(uint32_t)(TMGR_get_master_clock().mode_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,,,,,,,,モード遷移後経過時刻, ,TM_UTL_UNIXTIME_EPOCH,double,TMGR_get_utl_unixtime_epoch(),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,,,,,,,,UTL_cmdで用いるunixtimeの紀元, ,TM_CYCLES_PER_SEC_FIX_RATIO,double,(double)(time_manager->unixtime_info_.cycle_correction),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,,,,,,,,CYCLES_PER_SECの補正倍率. 初期値は1.0, ,MM_STS,uint8_t,(uint8_t)(mode_manager->stat),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,,,,,,,,モード遷移実行状態, ,MM_OPSMODE,uint8_t,(uint8_t)(mode_manager->current_id),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,,,,,,,,現状モード番号, ,MM_OPSMODE_PREV,uint8_t,(uint8_t)(mode_manager->previous_id),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,,,,,,,,直前モード番号, -,TDSP_CURRENT_ID,uint8_t,(uint8_t)(TDSP_info->task_list_id),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,,,,,,,,現状 TaskList ID, -,TDSP_CMD_LAST_ERR_TIME_MASTER,uint32_t,(uint32_t)(TDSP_info->tskd.prev_err.time.total_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,,,,,,,,最新内部コマンド実行時刻, -,TDSP_CMD_LAST_ERR_TIME_STEP,uint8_t,(uint8_t)(TDSP_info->tskd.prev_err.time.step),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,,,,,,,,, -,TDSP_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(TDSP_info->tskd.prev_err.code),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,,,,,,,,最新内部コマンドID, -,TDSP_CMD_LAST_ERR_STS,int32_t,(int32_t)(TDSP_info->tskd.prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,TDSP.CURRENT_ID,uint8_t,(uint8_t)(task_dispathcer->task_list_id),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,,,,,,,,現状 TaskList ID, +,TDSP.LAST_ERR.TIME.TOTAL_CYCLE,uint32_t,(uint32_t)(task_dispathcer->tskd.prev_err.time.total_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,,,,,,,,最新内部コマンド実行時刻, +,TDSP.LAST_ERR.TIME.STEP,uint8_t,(uint8_t)(task_dispathcer->tskd.prev_err.time.step),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,,,,,,,,, +,TDSP.LAST_ERR.ID,uint16_t,(uint16_t)(task_dispathcer->tskd.prev_err.code),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,,,,,,,,最新内部コマンドID, +,TDSP.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(task_dispathcer->tskd.prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,TDSP.LAST_ERR.ERR_CODE,uint32_t,task_dispathcer->tskd.prev_err.cmd_ret.err_code,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,,,,,,,,, ,GS_RET_FROM_IF_RX,int32_t,(int32_t)gs_driver->latest_info->rx.ret_from_if_rx,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,,,,,,,,, ,TCTF_LAST_RECV_ACK,uint8_t,(uint8_t)gs_driver->latest_info->rx.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:G@@ 1=ERROR:R,TC Transer Frame DS処理結果, ,TCTF_LAST_RECV_TIME,uint32_t,(uint32_t)gs_driver->latest_info->rx.last_rec_time,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,,,,,,,,最新TC Transer Frame受信時刻, ,TCTF_FARM_PW,uint8_t,(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,,,,,,,,FARM-1 Positive Window Width, ,TCP_LAST_RECV_ACK,uint8_t,(uint8_t)gs_driver->latest_info->rx.cmd_ack,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=FORWARDED@@ 2=LIST_FULL@@ 3=PACKET_NOT_FOUND@@ 4=INVALID_PACKET@@ 5=TLC_SUCCESS@@ 6=TLC_PAST_TIME@@ 7=TLC_ALREADY_EXISTS@@ 8=BC_SUCCESS@@ 9=BC_INVALID_BLOCK_NO@@ 10=BC_ISORATED_CMD@@ 11=BC_CMD_TOO_LONG@@ 12=UNKNOWN,最新TCPacket受信処理結果, ,TLM_TX_PORT_TYPE,uint8_t,(uint8_t)gs_driver->tlm_tx_port_type,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=CCSDS@@ 1=UART,TLM の送信情報がUARTのものかGSのものか, -,GS_CMD_COUNTER,uint32_t,PL_count_executed_nodes(&PH_gs_cmd_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,,,,,,,,地上局コマンドカウンタ, -,GS_CMD_LAST_EXEC_TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev.time.total_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,,,,,,,,最新地上局コマンド実行時刻, -,GS_CMD_LAST_EXEC_ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev.code),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,,,,,,,,最新地上局コマンドID, -,GS_CMD_LAST_EXEC_STS,int32_t,(int32_t)(gs_command_dispatcher->prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, -,GS_CMD_LAST_ERR_TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev_err.time.total_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,,,,,,,,最新地上局コマンド実行時刻, -,GS_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev_err.code),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,,,,,,,,最新地上局コマンドID, -,GS_CMD_LAST_ERR_STS,int32_t,(int32_t)(gs_command_dispatcher->prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, -,GS_CMD_ERR_COUNTER,uint32_t,(uint32_t)(gs_command_dispatcher->error_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_CMD_COUNTER,uint32_t,PL_count_executed_nodes(&PH_rt_cmd_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,,,,,,,,内部コマンドカウンタ, -,RT_CMD_LAST_EXEC_TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev.time.total_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,,,,,,,,最新内部コマンド実行時刻, -,RT_CMD_LAST_EXEC_ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev.code),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,,,,,,,,最新内部コマンドID, -,RT_CMD_LAST_EXEC_STS,int32_t,(int32_t)(realtime_command_dispatcher->prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, -,RT_CMD_LAST_ERR_TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev_err.time.total_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,,,,,,,,最新内部コマンド実行時刻, -,RT_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev_err.code),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,,,,,,,,最新内部コマンドID, -,RT_CMD_LAST_ERR_STS,int32_t,(int32_t)(realtime_command_dispatcher->prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, -,RT_CMD_ERR_COUNTER,uint32_t,(uint32_t)(realtime_command_dispatcher->error_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,,,,,,,,地上局コマンド実行異常カウンタ, +,GS_CMD.COUNTER,uint32_t,PL_count_executed_nodes(&PH_gs_cmd_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,,,,,,,,地上局コマンドカウンタ, +,GS_CMD.LAST_EXEC.TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev.time.total_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,,,,,,,,最新地上局コマンド実行時刻, +,GS_CMD.LAST_EXEC.ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev.code),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,,,,,,,,最新地上局コマンドID, +,GS_CMD.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(gs_command_dispatcher->prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, +,GS_CMD.LAST_EXEC.ERR_CODE,uint32_t,gs_command_dispatcher->prev.cmd_ret.err_code,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,,,,,,,,, +,GS_CMD.LAST_ERR.TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev_err.time.total_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,,,,,,,,最新地上局コマンド実行時刻, +,GS_CMD.LAST_ERR.ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev_err.code),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,,,,,,,,最新地上局コマンドID, +,GS_CMD.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(gs_command_dispatcher->prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, +,GS_CMD.LAST_ERR.ERR_CODE,uint32_t,gs_command_dispatcher->prev_err.cmd_ret.err_code,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,,,,,,,,, +,GS_CMD.ERR_COUNTER,uint32_t,(uint32_t)(gs_command_dispatcher->error_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_CMD.COUNTER,uint32_t,PL_count_executed_nodes(&PH_rt_cmd_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,,,,,,,,内部コマンドカウンタ, +,RT_CMD.LAST_EXEC.TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev.time.total_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,,,,,,,,最新内部コマンド実行時刻, +,RT_CMD.LAST_EXEC.ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev.code),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,,,,,,,,最新内部コマンドID, +,RT_CMD.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(realtime_command_dispatcher->prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,RT_CMD.LAST_EXEC.ERR_CODE,uint32_t,realtime_command_dispatcher->prev.cmd_ret.err_code,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_CMD.LAST_ERR.TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev_err.time.total_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,,,,,,,,最新内部コマンド実行時刻, +,RT_CMD.LAST_ERR.ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev_err.code),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,,,,,,,,最新内部コマンドID, +,RT_CMD.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(realtime_command_dispatcher->prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,RT_CMD.LAST_ERR.ERR_CODE,uint32_t,realtime_command_dispatcher->prev_err.cmd_ret.err_code,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_CMD.ERR_COUNTER,uint32_t,(uint32_t)(realtime_command_dispatcher->error_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,,,,,,,,地上局コマンド実行異常カウンタ, ,TLC_GS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]),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コマンドカウンタ, ,TLC_GS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])),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登録コマンド数, -,TLC_GS.LAST_EXEC_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_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,,,,,,,,最新TL0コマンド実行時刻, -,TLC_GS.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code),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コマンドID, -,TLC_GS.LAST_EXEC_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, -,TLC_GS.LAST_ERR_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_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,,,,,,,,最新TL0コマンド実行時刻, -,TLC_GS.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code),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コマンドID, -,TLC_GS.LAST_ERR_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, -,TLC_GS.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_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,,,,,,,,地上局コマンド実行異常カウンタ, +,TLC_GS.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_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,,,,,,,,最新TL0コマンド実行時刻, +,TLC_GS.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code),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コマンドID, +,TLC_GS.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, +,TLC_GS.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.err_code,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,,,,,,,,, +,TLC_GS.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_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,,,,,,,,最新TL0コマンド実行時刻, +,TLC_GS.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code),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コマンドID, +,TLC_GS.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, +,TLC_GS.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.err_code,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,,,,,,,,, +,TLC_GS.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_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,,,,,,,,最新TL0コマンド実行異常カウンタ, ,TLC_GS.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error),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=FALSE@@ 1=TRUE,, ,TLC_GS.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout),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=FALSE:G@@ 1=TRUE:R,, ,TLC_GS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),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コマンド実行時刻,変数指定が大変なことに… ,TLC_GS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),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コマンドID,変数指定が大変なことに… ,TLC_BC.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]),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,,,,,,,,TL1コマンドカウンタ, ,TLC_BC.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])),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,,,,,,,,TL1登録コマンド数, -,TLC_BC.LAST_EXEC_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.time.total_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,,,,,,,,最新TL1コマンド実行時刻, -,TLC_BC.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.code),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,,,,,,,,最新TL1コマンドID, -,TLC_BC.LAST_EXEC_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, -,TLC_BC.LAST_ERR_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.time.total_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,,,,,,,,最新TL1コマンド実行時刻, -,TLC_BC.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.code),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,,,,,,,,最新TL1コマンドID, -,TLC_BC.LAST_ERR_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, -,TLC_BC.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].error_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,,,,,,,,地上局コマンド実行異常カウンタ, +,TLC_BC.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.time.total_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,,,,,,,,最新TL1コマンド実行時刻, +,TLC_BC.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.code),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,,,,,,,,最新TL1コマンドID, +,TLC_BC.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, +,TLC_BC.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.cmd_ret.err_code,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,,,,,,,,, +,TLC_BC.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.time.total_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,,,,,,,,最新TL1コマンド実行時刻, +,TLC_BC.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.code),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,,,,,,,,最新TL1コマンドID, +,TLC_BC.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, +,TLC_BC.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.cmd_ret.err_code,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,,,,,,,,, +,TLC_BC.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].error_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,,,,,,,,最新TL1コマンド実行異常カウンタ, ,TLC_BC.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error),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=FALSE@@ 1=TRUE,, ,TLC_BC.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout),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=FALSE:G@@ 1=TRUE:R,, ,TLC_BC.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet))),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,,,,,,,,次TL1コマンド実行時刻,変数指定が大変なことに… ,TLC_BC.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet))),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,,,,,,,,次TL1コマンドID,変数指定が大変なことに… -,TLC_TLM.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]),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,,,,,,,,TL1コマンドカウンタ, -,TLC_TLM.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])),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,,,,,,,,TL1登録コマンド数, -,TLC_TLM.LAST_EXEC_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.time.total_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,,,,,,,,最新TL1コマンド実行時刻, -,TLC_TLM.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.code),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,,,,,,,,最新TL1コマンドID, -,TLC_TLM.LAST_EXEC_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, -,TLC_TLM.LAST_ERR_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.time.total_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,,,,,,,,最新TL1コマンド実行時刻, -,TLC_TLM.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.code),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,,,,,,,,最新TL1コマンドID, -,TLC_TLM.LAST_ERR_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, -,TLC_TLM.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].error_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,,,,,,,,地上局コマンド実行異常カウンタ, +,TLC_TLM.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]),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,,,,,,,,TL2コマンドカウンタ, +,TLC_TLM.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])),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,,,,,,,,TL2登録コマンド数, +,TLC_TLM.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.time.total_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,,,,,,,,最新TL2コマンド実行時刻, +,TLC_TLM.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.code),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,,,,,,,,最新TL2コマンドID, +,TLC_TLM.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL2コマンド実行結果, +,TLC_TLM.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.cmd_ret.err_code,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,,,,,,,,, +,TLC_TLM.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.time.total_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,,,,,,,,最新TL2コマンド実行時刻, +,TLC_TLM.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.code),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,,,,,,,,最新TL2コマンドID, +,TLC_TLM.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL2コマンド実行結果, +,TLC_TLM.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.cmd_ret.err_code,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,,,,,,,,, +,TLC_TLM.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].error_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,,,,,,,,最新TL2実行異常カウンタ, ,TLC_TLM.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error),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=FALSE@@ 1=TRUE,, ,TLC_TLM.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout),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=FALSE:G@@ 1=TRUE:R,, -,TLC_TLM.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet))),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,,,,,,,,次TL1コマンド実行時刻,変数指定が大変なことに… -,TLC_TLM.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet))),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,,,,,,,,次TL1コマンドID,変数指定が大変なことに… -,TLC_MIS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]),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コマンドカウンタ, -,TLC_MIS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])),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登録コマンド数, -,TLC_MIS.LAST_EXEC_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.time.total_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,,,,,,,,最新TL0コマンド実行時刻, -,TLC_MIS.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.code),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コマンドID, -,TLC_MIS.LAST_EXEC_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, -,TLC_MIS.LAST_ERR_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.time.total_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,,,,,,,,最新TL0コマンド実行時刻, -,TLC_MIS.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.code),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コマンドID, -,TLC_MIS.LAST_ERR_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, -,TLC_MIS.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].error_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,,,,,,,,地上局コマンド実行異常カウンタ, +,TLC_TLM.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet))),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,,,,,,,,次TL2コマンド実行時刻,変数指定が大変なことに… +,TLC_TLM.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet))),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,,,,,,,,次TL2コマンドID,変数指定が大変なことに… +,TLC_MIS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]),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,,,,,,,,TL3コマンドカウンタ, +,TLC_MIS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])),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,,,,,,,,TL3登録コマンド数, +,TLC_MIS.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.time.total_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,,,,,,,,最新TL3コマンド実行時刻, +,TLC_MIS.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.code),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,,,,,,,,最新TL3コマンドID, +,TLC_MIS.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL3コマンド実行結果, +,TLC_MIS.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.cmd_ret.err_code,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,,,,,,,,, +,TLC_MIS.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.time.total_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,,,,,,,,最新TL3コマンド実行時刻, +,TLC_MIS.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.code),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,,,,,,,,最新TL3コマンドID, +,TLC_MIS.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.cmd_ret.exec_sts),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=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL3コマンド実行結果, +,TLC_MIS.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.cmd_ret.err_code,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,,,,,,,,, +,TLC_MIS.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].error_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,,,,,,,,最新TL3コマンド実行異常カウンタ, ,TLC_MIS.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].stop_on_error),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=FALSE@@ 1=TRUE,, ,TLC_MIS.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].lockout),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=FALSE:G@@ 1=TRUE:R,, -,TLC_MIS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet))),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コマンド実行時刻,変数指定が大変なことに… -,TLC_MIS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet))),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コマンドID,変数指定が大変なことに… +,TLC_MIS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet))),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,,,,,,,,次TL3コマンド実行時刻,変数指定が大変なことに… +,TLC_MIS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet))),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,,,,,,,,次TL3コマンドID,変数指定が大変なことに… ,BCT_BLK_PTR,uint8_t,(uint8_t)(block_command_table->pos.block),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_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 登録コマンド時刻,変数指定が大変なことに… @@ -485,16 +498,3 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_TF.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_TF.csv index 276bcb5c1..530899df6 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_TF.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_TF.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,PAGE_NO,uint8_t,page,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,,,,,,,,, ,TLM0,uint32_t,(uint32_t)(telemetry_frame->tlm_table[offset+0].tlm_func),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)))),HEX,,,,,,,,, ,TLM1,uint32_t,(uint32_t)(telemetry_frame->tlm_table[offset+1].tlm_func),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)))),HEX,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_TL.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_TL.csv index c744bc237..2b280e80e 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_TL.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_TL.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,LINE_NO,uint8_t,TLCD_update_tl_list_for_tlm(timeline_command_dispatcher->tlm_info_.id),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,,,,,,,,テレメトリを生成したライン番号, ,PAGE_NO,uint8_t,timeline_command_dispatcher->tlm_info_.page_no,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,,,,,,,,, ,UPDATED_AT,uint32_t,timeline_command_dispatcher->tlm_info_.updated_at,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/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_TLM_MGR.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_TLM_MGR.csv index d77505b68..c225cd792 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_TLM_MGR.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_TLM_MGR.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, ,MASTER_BC_ID,uint16_t,telemetry_manager->master_bc_id,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,,,,,,,,, ,BC_INFO0.BC_ID,uint16_t,telemetry_manager->bc_info[0].bc_id,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,,,,,,,,, ,BC_INFO0.BC_TYPE,uint8_t,(uint8_t)telemetry_manager->bc_info[0].bc_type,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=MASTER@@ 1=HK_TLM@@ 2=SYSTEM_TLM@@ 3=HIGH_FREQ_TLM@@ 4=LOW_FREQ_TLM@@ 5=RESERVE,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_UART_TEST.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_UART_TEST.csv index 491f00e04..dfc95c979 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_UART_TEST.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/SAMPLE_MOBC_TLM_DB_UART_TEST.csv @@ -19,21 +19,21 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,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,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,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,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,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)))),HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,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,,,,,,,,, -,DRIVER.REC_STATUS.RET_FROM_IF_RX,uint8_t,(uint8_t)(uart_test_instance->driver.super.config.rec_status_.ret_from_if_rx),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,,,,,,,,, -,DRIVER.RX_COUNT,uint32_t,uart_test_instance->driver.super.config.rx_count_,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,,,,,,,,, -,DRIVER0.REC_STATUS.STATUS_CODE,uint8_t,(uint8_t)(uart_test_instance->driver.super.stream_config[0].rec_status_.status_code),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=FINDING_HEADER@@1=RECEIVING_HEADER@@2=RECEIVING_FRAMELENGTH@@3=RECEIVING_DATA@@4=RECEIVING_FOOTER@@5=FIXED_FRAME@@6=DISABLE@@7=RX_FRAME_TOO_LONG@@8=RX_ERR@@9=VALIDATE_ERR@@10=OTHER_ERR,, -,DRIVER0.REC_STATUS.FIXED_FRAME_LEN,uint16_t,uart_test_instance->driver.super.stream_config[0].rec_status_.fixed_frame_len,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,,,,,,,,, -,DRIVER0.RX_FRAME_FIX_COUNT,uint32_t,uart_test_instance->driver.super.stream_config[0].rx_frame_fix_count_,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,,,,,,,,, -,DRIVER0.RX_FRAME_REC_LEN,uint16_t,uart_test_instance->driver.super.stream_config[0].rx_frame_rec_len_,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,,,,,,,,, -,DRIVER0.IS_RX_BUFFER_CARRY_OVER,uint8_t,uart_test_instance->driver.super.stream_config[0].is_rx_buffer_carry_over_,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,,,,,,,,, -,DRIVER1.REC_STATUS.STATUS_CODE,uint8_t,(uint8_t)(uart_test_instance->driver.super.stream_config[1].rec_status_.status_code),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=FINDING_HEADER@@1=RECEIVING_HEADER@@2=RECEIVING_FRAMELENGTH@@3=RECEIVING_DATA@@4=RECEIVING_FOOTER@@5=FIXED_FRAME@@6=DISABLE@@7=RX_FRAME_TOO_LONG@@8=RX_ERR@@9=VALIDATE_ERR@@10=OTHER_ERR,, -,DRIVER1.REC_STATUS.FIXED_FRAME_LEN,uint16_t,uart_test_instance->driver.super.stream_config[1].rec_status_.fixed_frame_len,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,,,,,,,,, -,DRIVER1.RX_FRAME_FIX_COUNT,uint32_t,uart_test_instance->driver.super.stream_config[1].rx_frame_fix_count_,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,,,,,,,,, -,DRIVER1.RX_FRAME_REC_LEN,uint16_t,uart_test_instance->driver.super.stream_config[1].rx_frame_rec_len_,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,,,,,,,,, -,DRIVER1.IS_RX_BUFFER_CARRY_OVER,uint8_t,uart_test_instance->driver.super.stream_config[1].is_rx_buffer_carry_over_,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,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, +,SH.DEST_INFO,uint8_t,,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,,,,,,,,, +,DRIVER.INFO.REC_STATUS.RET_FROM_IF_RX,uint8_t,(uint8_t)(uart_test_driver->driver.super.config.info.rec_status_.ret_from_if_rx),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,,,,,,,,, +,DRIVER.INFO.RX_COUNT,uint32_t,uart_test_driver->driver.super.config.info.rx_count_,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,,,,,,,,, +,DRIVER0.INFO.REC_STATUS.STATUS_CODE,uint8_t,(uint8_t)(uart_test_driver->driver.super.stream_config[0].info.rec_status_.status_code),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=FINDING_HEADER@@1=RECEIVING_HEADER@@2=RECEIVING_FRAMELENGTH@@3=RECEIVING_DATA@@4=RECEIVING_FOOTER@@5=FIXED_FRAME@@6=DISABLE@@7=RX_FRAME_TOO_LONG@@8=RX_ERR@@9=VALIDATE_ERR@@10=OTHER_ERR,, +,DRIVER0.INFO.REC_STATUS.FIXED_FRAME_LEN,uint16_t,uart_test_driver->driver.super.stream_config[0].info.rec_status_.fixed_frame_len,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,,,,,,,,, +,DRIVER0.INFO.RX_FRAME_FIX_COUNT,uint32_t,uart_test_driver->driver.super.stream_config[0].info.rx_frame_fix_count_,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,,,,,,,,, +,DRIVER0.SETTINGS.RX_BUFFER.SIZE,uint16_t,uart_test_driver->driver.super.stream_config[0].settings.rx_buffer_->size,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,,,,,,,,, +,DRIVER0.SETTINGS.RX_BUFFER.CONFIRMED_FRAME_LEN,uint16_t,uart_test_driver->driver.super.stream_config[0].settings.rx_buffer_->confirmed_frame_len,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,,,,,,,,, +,DRIVER0.SETTINGS.RX_BUFFER.IS_FRAME_FIXED,uint8_t,uart_test_driver->driver.super.stream_config[0].settings.rx_buffer_->is_frame_fixed,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,,,,,,,,, +,DRIVER1.INFO.REC_STATUS.STATUS_CODE,uint8_t,(uint8_t)(uart_test_driver->driver.super.stream_config[1].info.rec_status_.status_code),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=FINDING_HEADER@@1=RECEIVING_HEADER@@2=RECEIVING_FRAMELENGTH@@3=RECEIVING_DATA@@4=RECEIVING_FOOTER@@5=FIXED_FRAME@@6=DISABLE@@7=RX_FRAME_TOO_LONG@@8=RX_ERR@@9=VALIDATE_ERR@@10=OTHER_ERR,, +,DRIVER1.INFO.REC_STATUS.FIXED_FRAME_LEN,uint16_t,uart_test_driver->driver.super.stream_config[1].info.rec_status_.fixed_frame_len,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,,,,,,,,, +,DRIVER1.INFO.RX_FRAME_FIX_COUNT,uint32_t,uart_test_driver->driver.super.stream_config[1].info.rx_frame_fix_count_,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,,,,,,,,, +,DRIVER1.SETTINGS.RX_BUFFER.SIZE,uint16_t,uart_test_driver->driver.super.stream_config[1].settings.rx_buffer_->size,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,,,,,,,,, +,DRIVER1.SETTINGS.RX_BUFFER.CONFIRMED_FRAME_LEN,uint16_t,uart_test_driver->driver.super.stream_config[1].settings.rx_buffer_->confirmed_frame_len,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,,,,,,,,, +,DRIVER1.SETTINGS.RX_BUFFER.IS_FRAME_FIXED,uint8_t,uart_test_driver->driver.super.stream_config[1].settings.rx_buffer_->is_frame_fixed,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/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_AM.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_AM.csv index c5d8d2cc3..fe31a342d 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_AM.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_AM.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,PAGE_NO,uint8_t,(uint8_t)(app_manager->page_no),PACKET,26,0,8,NONE,,,,,,,,, ,APP0_INITIALIZER,uint32_t,(uint32_t)(app_manager->ais[offset+0].initializer),PACKET,27,0,32,HEX,,,,,,,,, ,APP0_ENTRYPOINT,uint32_t,(uint32_t)(app_manager->ais[offset+0].entry_point),PACKET,31,0,32,HEX,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_APP_TIME.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_APP_TIME.csv index ad3dbdc7f..b253178d9 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_APP_TIME.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_APP_TIME.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,APP0_INIT_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[0].init_duration),PACKET,26,0,8,NONE,,,,,,,,, ,APP0_PREV_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[0].prev),PACKET,27,0,8,NONE,,,,,,,,, ,APP0_MIN_PROC_TIME,uint8_t,(uint8_t)(app_manager->ais[0].min),PACKET,28,0,8,NONE,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_BL.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_BL.csv index 1c02c279f..6a341c1d9 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_BL.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_BL.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,BLOCK_NO,uint16_t,block,PACKET,26,0,16,NONE,,,,,,,,テレメトリを生成したブロック番号, ,CMD_POS,uint8_t,block_command_table->pos.cmd,PACKET,28,0,8,NONE,,,,,,,,, ,BLOCK_LENGTH,uint8_t,BCT_get_bc_length(block),PACKET,29,0,8,NONE,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_CA.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_CA.csv index 2b926f195..ec00cac4f 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_CA.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_CA.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,PAGE_NO,uint8_t,(uint8_t)(command_analyze->tlm_page_no),PACKET,26,0,8,NONE,,,,,,,,, ,CMD0.FUNC,uint32_t,(uint32_t)(command_analyze->cmd_table[offset+0].cmd_func),PACKET,27,0,32,HEX,,,,,,,,, ,CMD0.PARAM0_SIZE,uint8_t,(uint8_t)(((command_analyze->cmd_table[offset+0].param_size_infos[0].packed_info.bit.first & 0x0f) << 4) | (command_analyze->cmd_table[offset+0].param_size_infos[0].packed_info.bit.second & 0x0f)),PACKET,31,0,4,STATUS,,,,,,,0=NONE@@1=1BYTE@@2=2BYTE@@3=4BYTE@@4=8BYTE@@15=RAW@@*=N/A,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_DCU.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_DCU.csv index bb46aeb1b..f129408dd 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_DCU.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_DCU.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,EXEC_LOG_ORDER0,uint8_t,divided_cmd_utility->exec_log_order[0],PACKET,26,0,8,NONE,,,,,,,,, ,EXEC_LOG_ORDER1,uint8_t,divided_cmd_utility->exec_log_order[1],PACKET,27,0,8,NONE,,,,,,,,, ,EXEC_LOG_ORDER2,uint8_t,divided_cmd_utility->exec_log_order[2],PACKET,28,0,8,NONE,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EH.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EH.csv index dda192c35..4aea164a6 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EH.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EH.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,EVENT_UTIL.IS_ENABLED_EH_EXECUTION,uint8_t,event_utility->is_enabled_eh_execution,PACKET,26,0,8,STATUS,,,,,,,0=DISABLE@@ 1=ENABLE@@ *=N/A,, ,EL_EVENT_COUNTER.COUNTER_TOTAL,uint32_t,event_handler->el_event_counter.counter_total,PACKET,27,0,32,NONE,,,,,,,,, ,EL_EVENT_COUNTER.COUNTERS.EL_ERROR_LEVEL_HIGH,uint32_t,event_handler->el_event_counter.counters[EL_ERROR_LEVEL_HIGH],PACKET,31,0,32,NONE,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EH_INDEX.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EH_INDEX.csv index 02e4a8fe1..b1cc3d28d 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EH_INDEX.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EH_INDEX.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,TLM_INFO.RULE_SORTED_INDEX.PAGE_NO,uint8_t,event_handler->tlm_info.rule_sorted_index.page_no,PACKET,26,0,8,NONE,,,,,,,,, ,IDX0.GROUP,uint8_t,(uint8_t)event_handler->sorted_idxes[0 + offset].group,PACKET,27,0,8,NONE,,,,,,,,, ,IDX0.LOCAL,uint32_t,event_handler->sorted_idxes[0 + offset].local,PACKET,28,0,32,NONE,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EH_LOG.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EH_LOG.csv index b5bc4dcd9..dbf4f5a33 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EH_LOG.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EH_LOG.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,TLM_INFO.LOG.PAGE_NO,uint8_t,event_handler->tlm_info.log.page_no,PACKET,26,0,8,NONE,,,,,,,,, ,LOG_TABLE.RESPOND_COUNTER,uint32_t,event_handler->log_table.respond_counter,PACKET,27,0,32,NONE,,,,,,,,, ,LOG_TABLE.LOG_WP,uint16_t,event_handler->log_table.log_wp,PACKET,31,0,16,NONE,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EH_RULE.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EH_RULE.csv index 0cff2c1ff..d37392c8b 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EH_RULE.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EH_RULE.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,TLM_INFO.RULE.PAGE_NO,uint8_t,event_handler->tlm_info.rule.page_no,PACKET,26,0,8,NONE,,,,,,,,, ,RULE_TABLE.REGISTERED_RULE_NUM,uint16_t,event_handler->rule_table.registered_rule_num,PACKET,27,0,16,NONE,,,,,,,,, ,RULE0.SETTINGS.EVENT.GROUP,uint8_t,(uint8_t)rules[0 + offset].settings.event.group,PACKET,29,0,8,NONE,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EL.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EL.csv index 5bffeed29..9f5011540 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EL.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EL.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,STATISTICS.RECORD_COUNTER_TOTAL,uint32_t,event_logger->statistics.record_counter_total,PACKET,26,0,32,NONE,,,,,,,,, ,STATISTICS.RECORD_COUNTERS_HIGH,uint32_t,event_logger->statistics.record_counters[EL_ERROR_LEVEL_HIGH],PACKET,30,0,32,NONE,,,,,,,,, ,STATISTICS.RECORD_COUNTERS_MIDDLE,uint32_t,event_logger->statistics.record_counters[EL_ERROR_LEVEL_MIDDLE],PACKET,34,0,32,NONE,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EL_CLOG.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EL_CLOG.csv index 6ceda7f5c..73f8295d5 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EL_CLOG.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EL_CLOG.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,TLM_INFO.CLOG.PAGE_NO,uint8_t,event_logger->tlm_info.clog.page_no,PACKET,26,0,8,NONE,,,,,,,,, ,TLM_INFO.CLOG.ERR_LEVEL,uint8_t,(uint8_t)err_level,PACKET,27,0,8,STATUS,,,,,,,0=HIGH@@ 1=MIDDLE@@ 2=LOW@@ 3=EL@@ 4=EH@@ *=N/A,, ,STATISTICS.RECORD_COUNTER_TOTAL,uint32_t,event_logger->statistics.record_counter_total,PACKET,28,0,32,NONE,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EL_TLOG.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EL_TLOG.csv index 713f4f1d8..bcdf56d2e 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EL_TLOG.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_EL_TLOG.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,TLM_INFO.TLOG.PAGE_NO,uint8_t,event_logger->tlm_info.tlog.page_no,PACKET,26,0,8,NONE,,,,,,,,, ,TLM_INFO.TLOG.ERR_LEVEL,uint8_t,(uint8_t)((err_level << 4 & 0xf0) | (event_logger->tlogs[err_level].is_enable_overwrite << 3 & 0x08) | ( event_logger->tlogs[err_level].is_table_overflow << 2 & 0x04)),PACKET,27,0,4,STATUS,,,,,,,0=HIGH@@ 1=MIDDLE@@ 2=LOW@@ 3=EL@@ 4=EH@@ *=N/A,, ,TLOGS.IS_ENABLE_OVERWRITE,,,PACKET,27,4,1,NONE,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_GIT_REV.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_GIT_REV.csv index 5c4dd232c..ea2ebe39f 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_GIT_REV.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_GIT_REV.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,CORE0,uint8_t,(uint8_t)GIT_REV_CORE[0],PACKET,26,0,8,HEX,,,,,,,,, ,CORE1,uint8_t,(uint8_t)GIT_REV_CORE[1],PACKET,27,0,8,HEX,,,,,,,,, ,CORE2,uint8_t,(uint8_t)GIT_REV_CORE[2],PACKET,28,0,8,HEX,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_GS.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_GS.csv index ebbe8f222..a94ec19c7 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_GS.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_GS.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,CCSDS.RX.REC_STATUS,uint8_t,(uint8_t)gs_driver->info[0].rx.rec_status,PACKET,26,0,8,STATUS,,,,,,,0=OK@@ 1=ERROR,, ,CCSDS.RX.RET_FROM_IF_RX,int32_t,(int32_t)gs_driver->info[0].rx.ret_from_if_rx,PACKET,27,0,32,NONE,,,,,,,,, ,CCSDS.RX.LAST_DEST_TYPE,uint8_t,(uint8_t)gs_driver->info[0].rx.last_dest_type,PACKET,31,0,8,STATUS,,,,,,,0=ME@@ 1=MOBC@@ 2=AOBC@@ 3=TOBC@@ 4=UNKNOWN,, @@ -29,28 +29,28 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,CCSDS.TCTF.AD_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[0].rx.tctf.ad_rec_status,PACKET,38,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.TCTF.BC_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[0].rx.tctf.bc_rec_status,PACKET,39,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.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.IS_VALID,uint8_t,gs_driver->is_ccsds_tx_valid,PACKET,41,0,8,STATUS,,,,,,,0=INVALID@@ 1=VALID,, -,CCSDS.TX.SEND_CYCLE,uint32_t,(uint32_t)gs_driver->info[0].tx.send_cycle,PACKET,42,0,32,NONE,,,,,,,,, -,CCSDS.TX.VCID,uint8_t,(uint8_t)gs_driver->info[0].tx.vcid,PACKET,46,0,8,STATUS,,,,,,,1=REALTIME@@2=REPLAY@@63=FILL@@*=UNKNOWN,, -,CCSDS.TX.VCDU_COUNTER,uint32_t,gs_driver->info[0].tx.vcdu_counter,PACKET,47,0,32,NONE,,,,,,,,, -,CCSDS.TX.BUFFER_AVAILABLE,uint8_t,gs_driver->ccsds_info.buffer_num,PACKET,51,0,8,NONE,,,,,,,,, -,UART.CH,uint8_t,gs_driver->driver_uart.uart_config.ch,PACKET,52,0,8,NONE,,,,,,,,, -,UART.BAUDRATE,uint32_t,gs_driver->driver_uart.uart_config.baudrate,PACKET,53,0,32,NONE,,,,,,,,, -,UART.PARITY,uint8_t,(uint8_t)gs_driver->driver_uart.uart_config.parity_settings,PACKET,57,0,8,STATUS,,,,,,,0=NONE@@ 1=ODD@@ 2=EVEN@@ 3=MARK@@ 4 =SPACE,, -,UART.DATA_LENGTH,uint8_t,(uint8_t)gs_driver->driver_uart.uart_config.data_length,PACKET,58,0,8,STATUS,,,,,,,0=7bit@@ 1 =8bit,, -,UART.STOP_BIT,uint8_t,(uint8_t)gs_driver->driver_uart.uart_config.stop_bit,PACKET,59,0,8,STATUS,,,,,,,0=1bit@@ 1=1.5bit@@ 2=2bit,, -,UART.RX.REC_STATUS,uint8_t,(uint8_t)gs_driver->info[1].rx.rec_status,PACKET,60,0,8,STATUS,,,,,,,0=OK@@ 1=ERROR,, -,UART.RX.RET_FROM_IF_RX,int32_t,(int32_t)gs_driver->info[1].rx.ret_from_if_rx,PACKET,61,0,32,NONE,,,,,,,,, -,UART.RX.LAST_DEST_TYPE,uint8_t,(uint8_t)gs_driver->info[1].rx.last_dest_type,PACKET,65,0,8,STATUS,,,,,,,0=ME@@ 1=MOBC@@ 2=AOBC@@ 3=TOBC@@ 4=UNKNOWN,, -,UART.RX.LAST_REC_TIME,uint32_t,(uint32_t)gs_driver->info[1].rx.last_rec_time,PACKET,66,0,32,NONE,,,,,,,,, -,UART.RX.CMD_ACK,uint8_t,(uint8_t)gs_driver->info[1].rx.cmd_ack,PACKET,70,0,8,STATUS,,,,,,,0=SUCCESS@@ 1=FORWARDED@@ 2=LIST_FULL@@ 3=PACKET_NOT_FOUND@@ 4=INVALID_PACKET@@ 5=TLC_SUCCESS@@ 6=TLC_PAST_TIME@@ 7=TLC_ALREADY_EXISTS@@ 8=BC_SUCCESS@@ 9=BC_INVALID_BLOCK_NO@@ 10=BC_ISORATED_CMD@@ 11=BC_CMD_TOO_LONG@@ 12=UNKNOWN,, -,UART.TCTF.LAST_REC_TCTF_TYPE,uint8_t,(uint8_t)gs_driver->info[1].rx.tctf.last_rec_tctf_type,PACKET,71,0,8,STATUS,,,,,,,0=AD@@ 2=BD@@ 3=BC@@ *=UNKNOWN,, -,UART.TCTF.AD_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[1].rx.tctf.ad_rec_status,PACKET,72,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.TCTF.BC_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[1].rx.tctf.bc_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.TCTF.BD_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[1].rx.tctf.bd_rec_status,PACKET,74,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,75,0,32,NONE,,,,,,,,, -,UART.TX.VCID,uint8_t,(uint8_t)gs_driver->info[1].tx.vcid,PACKET,79,0,8,STATUS,,,,,,,1=REALTIME@@2=REPLAY@@63=FILL@@*=UNKNOWN,, -,UART.TX.VCDU_COUNTER,uint32_t,gs_driver->info[1].tx.vcdu_counter,PACKET,80,0,32,NONE,,,,,,,,, +,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.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,,,,,,,,, +,UART.PARITY,uint8_t,(uint8_t)gs_driver->driver_uart.uart_config.parity_settings,PACKET,56,0,8,STATUS,,,,,,,0=NONE@@ 1=ODD@@ 2=EVEN@@ 3=MARK@@ 4 =SPACE,, +,UART.DATA_LENGTH,uint8_t,(uint8_t)gs_driver->driver_uart.uart_config.data_length,PACKET,57,0,8,STATUS,,,,,,,0=7bit@@ 1 =8bit,, +,UART.STOP_BIT,uint8_t,(uint8_t)gs_driver->driver_uart.uart_config.stop_bit,PACKET,58,0,8,STATUS,,,,,,,0=1bit@@ 1=1.5bit@@ 2=2bit,, +,UART.RX.REC_STATUS,uint8_t,(uint8_t)gs_driver->info[1].rx.rec_status,PACKET,59,0,8,STATUS,,,,,,,0=OK@@ 1=ERROR,, +,UART.RX.RET_FROM_IF_RX,int32_t,(int32_t)gs_driver->info[1].rx.ret_from_if_rx,PACKET,60,0,32,NONE,,,,,,,,, +,UART.RX.LAST_DEST_TYPE,uint8_t,(uint8_t)gs_driver->info[1].rx.last_dest_type,PACKET,64,0,8,STATUS,,,,,,,0=ME@@ 1=MOBC@@ 2=AOBC@@ 3=TOBC@@ 4=UNKNOWN,, +,UART.RX.LAST_REC_TIME,uint32_t,(uint32_t)gs_driver->info[1].rx.last_rec_time,PACKET,65,0,32,NONE,,,,,,,,, +,UART.RX.CMD_ACK,uint8_t,(uint8_t)gs_driver->info[1].rx.cmd_ack,PACKET,69,0,8,STATUS,,,,,,,0=SUCCESS@@ 1=FORWARDED@@ 2=LIST_FULL@@ 3=PACKET_NOT_FOUND@@ 4=INVALID_PACKET@@ 5=TLC_SUCCESS@@ 6=TLC_PAST_TIME@@ 7=TLC_ALREADY_EXISTS@@ 8=BC_SUCCESS@@ 9=BC_INVALID_BLOCK_NO@@ 10=BC_ISORATED_CMD@@ 11=BC_CMD_TOO_LONG@@ 12=UNKNOWN,, +,UART.TCTF.LAST_REC_TCTF_TYPE,uint8_t,(uint8_t)gs_driver->info[1].rx.tctf.last_rec_tctf_type,PACKET,70,0,8,STATUS,,,,,,,0=AD@@ 2=BD@@ 3=BC@@ *=UNKNOWN,, +,UART.TCTF.AD_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[1].rx.tctf.ad_rec_status,PACKET,71,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.TCTF.BC_REC_STATUS,uint8_t,(uint8_t)gs_driver->info[1].rx.tctf.bc_rec_status,PACKET,72,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.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.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,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_HK.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_HK.csv index feef20d01..3247bda27 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_HK.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_HK.csv @@ -19,148 +19,148 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, -,OBC_TM_MODE_TIME,uint32_t,TMGR_get_master_clock().mode_cycle,PACKET,26,0,32,NONE,,,,,,,,, -,OBC_TM_UNIXTIME_AT_TI0,double,TMGR_get_unixtime_at_ti0(),PACKET,30,0,64,NONE,,,,,,,,, -,OBC_MM_OPSMODE,uint8_t,(uint8_t)(mode_manager->current_id),PACKET,38,0,8,STATUS,,,,,,,0=START_UP@@1=INITIAL@@2=GND_TEST@@3=WDFAR@@4=RTC_HIGH_RATE@@5=5@@6=6@@7=7@@8=8@@9=9@@10=10@@11=11@@12=12@@13=13@@14=14@@15=15@@16=MAX@@*=N/A,, -,OBC_MM_STS,uint8_t,(uint8_t)( ((uint8_t)(mode_manager->stat) << 7 & 0x80) | ((uint8_t)(mode_manager->previous_id) & 0x7F) ),PACKET,39,0,1,STATUS,,,,,,,0=FINISHED@@1=PROGRESS@@*=N/A,, -,OBC_MM_OPSMODE_PREV,,,PACKET,39,1,7,STATUS,,,,,,,0=START_UP@@1=INITIAL@@2=GND_TEST@@3=WDFAR@@4=RTC_HIGH_RATE@@5=5@@6=6@@7=7@@8=8@@9=9@@10=10@@11=11@@12=12@@13=13@@14=14@@15=15@@16=MAX@@*=N/A,, -,OBC_TDSP_CURRENT_ID,uint16_t,TDSP_info->task_list_id,PACKET,40,0,16,NONE,,,,,,,,, -,OBC_TCTF_LAST_RECV_ACK,uint8_t,(uint8_t)gs_driver->latest_info->rx.rec_status,PACKET,42,0,8,STATUS,,,,,,,0=SUCCESS@@ 1=ERROR,TC Transer Frame 受信処理結果, -,OBC_TCTF_LAST_RECV_TIME,uint32_t,(uint32_t)gs_driver->latest_info->rx.last_rec_time,PACKET,43,0,32,NONE,,,,,,,,最新TC Transer Frame受信時刻, -,OBC_TCP_LAST_RECV_ACK,uint8_t,(uint8_t)(gs_driver->latest_info->rx.cmd_ack),PACKET,47,0,8,STATUS,,,,,,,0=SUCCESS@@ 1=FORWARDED@@ 2=LIST_FULL@@ 3=PACKET_NOT_FOUND@@ 4=INVALID_PACKET@@ 5=TLC_SUCCESS@@ 6=TLC_PAST_TIME@@ 7=TLC_ALREADY_EXISTS@@ 8=BC_SUCCESS@@ 9=BC_INVALID_BLOCK_NO@@ 10=BC_ISORATED_CMD@@ 11=BC_CMD_TOO_LONG@@ 12=UNKNOWN,最新TCPacket受信処理結果, -,OBC_GS_CMD_COUNTER,uint32_t,PL_count_executed_nodes(&PH_gs_cmd_list),PACKET,48,0,32,NONE,,,,,,,,地上局コマンドカウンタ, -,OBC_GS_CMD_LAST_EXEC_TIME,uint32_t,gs_command_dispatcher->prev.time.total_cycle,PACKET,52,0,32,NONE,,,,,,,,最新地上局コマンド実行時刻, -,OBC_GS_CMD_LAST_EXEC_ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev.code),PACKET,56,0,16,NONE,,,,,,,,最新地上局コマンドID, -,OBC_GS_CMD_LAST_EXEC_STS,int8_t,(int8_t)(gs_command_dispatcher->prev.sts),PACKET,58,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, -,OBC_GS_CMD_LAST_ERR_TIME,uint32_t,gs_command_dispatcher->prev_err.time.total_cycle,PACKET,59,0,32,NONE,,,,,,,,地上局異常コマンド実行時刻, -,OBC_GS_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev_err.code),PACKET,63,0,16,NONE,,,,,,,,地上局異常コマンドID, -,OBC_GS_CMD_LAST_ERR_STS,int8_t,(int8_t)(gs_command_dispatcher->prev_err.sts),PACKET,65,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,地上局異常コマンド実行結果, -,OBC_TLC_GS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]),PACKET,66,0,32,NONE,,,,,,,,バス用TLのコマンドカウンタ, -,OBC_TLC_GS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])),PACKET,70,0,8,NONE,,,,,,,,バス用TLの登録コマンド数, -,OBC_TLC_GS.LAST_EXEC_TIME,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_cycle,PACKET,71,0,32,NONE,,,,,,,,バス用TLの最新コマンド実行時刻, -,OBC_TLC_GS.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code),PACKET,75,0,16,NONE,,,,,,,,バス用TLの最新コマンドID, -,OBC_TLC_GS.LAST_EXEC_STS,int8_t,(int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.sts),PACKET,77,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,バス用TLの最新コマンド実行結果, -,OBC_TLC_GS.LAST_ERR_TIME,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_cycle,PACKET,78,0,32,NONE,,,,,,,,バス用TLの異常コマンド実行時刻, -,OBC_TLC_GS.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code),PACKET,82,0,16,NONE,,,,,,,,バス用TLの異常コマンドID, -,OBC_TLC_GS.LAST_ERR_STS,int8_t,(int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.sts),PACKET,84,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,バス用TLの異常コマンド実行結果, -,OBC_TLC_GS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),PACKET,85,0,32,NONE,,,,,,,,バス用TLの次コマンド実行時刻,変数指定が大変なことに… -,OBC_TLC_GS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),PACKET,89,0,16,NONE,,,,,,,,バス用TLの次コマンドID,変数指定が大変なことに… -,OBC_TLC_BC.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]),PACKET,91,0,32,NONE,,,,,,,,BC用TLのコマンドカウンタ, -,OBC_TLC_BC.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])),PACKET,95,0,8,NONE,,,,,,,,BC用TLの登録コマンド数, -,OBC_TLC_TLM.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]),PACKET,96,0,32,NONE,,,,,,,,テレメ用TLのコマンドカウンタ, -,OBC_TLC_TLM.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])),PACKET,100,0,8,NONE,,,,,,,,テレメ用TLの登録コマンド数, -,OBC_TLC_MIS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]),PACKET,101,0,32,NONE,,,,,,,,ミッション用TLのコマンドカウンタ, -,OBC_TLC_MIS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])),PACKET,105,0,8,NONE,,,,,,,,ミッション用TLの登録コマンド数, -,OBC_TLC_MIS.LAST_EXEC_TIME,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.time.total_cycle,PACKET,106,0,32,NONE,,,,,,,,ミッション用TLの最新コマンド実行時刻, -,OBC_TLC_MIS.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.code),PACKET,110,0,16,NONE,,,,,,,,ミッション用TLの最新コマンドID, -,OBC_TLC_MIS.LAST_EXEC_STS,int8_t,(int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.sts),PACKET,112,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,ミッション用TLの最新コマンド実行結果, -,OBC_TLC_MIS.LAST_ERR_TIME,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.time.total_cycle,PACKET,113,0,32,NONE,,,,,,,,ミッション用TLの異常コマンド実行時刻, -,OBC_TLC_MIS.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.code),PACKET,117,0,16,NONE,,,,,,,,ミッション用TLの異常コマンドID, -,OBC_TLC_MIS.LAST_ERR_STS,int8_t,(int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.sts),PACKET,119,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,ミッション用TLの異常コマンド実行結果, -,OBC_TLC_MIS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet))),PACKET,120,0,32,NONE,,,,,,,,ミッション用TLの次コマンド実行時刻,変数指定が大変なことに… -,OBC_TLC_MIS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet))),PACKET,124,0,16,NONE,,,,,,,,ミッション用TLの次コマンドID,変数指定が大変なことに… -,OBC_TLC_GS.SOE_FLAG,uint8_t,(uint8_t)(((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error << 7 & 0x80) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout << 6 & 0x40) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error << 5 & 0x20) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout << 4 & 0x10) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error << 3 & 0x08) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout << 2 & 0x04) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].stop_on_error << 1 & 0x02) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].lockout & 0x01) ),PACKET,126,0,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,OBC_TLC_GS.LOCKOUT_FLAG,,,PACKET,126,1,1,STATUS,,,,,,,0=NO@@ 1=YES,, -,OBC_TLC_BC.SOE_FLAG,,,PACKET,126,2,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,OBC_TLC_BC.LOCKOUT_FLAG,,,PACKET,126,3,1,STATUS,,,,,,,0=NO@@ 1=YES,, -,OBC_TLC_TLM.SOE_FLAG,,,PACKET,126,4,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,OBC_TLC_TLM.LOCKOUT_FLAG,,,PACKET,126,5,1,STATUS,,,,,,,0=NO@@ 1=YES,, -,OBC_TLC_MIS.SOE_FLAG,,,PACKET,126,6,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,OBC_TLC_MIS.LOCKOUT_FLAG,,,PACKET,126,7,1,STATUS,,,,,,,0=NO@@ 1=YES,, -,WDT.IS_ENABLE,uint8_t,(uint8_t)((wdt_config->is_wdt_enable << 7 & 0x80) | (wdt_config->is_clear_enable << 6 & 0x40) | 0x00),PACKET,127,0,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,WDT.IS_CLEAR_ENABLE,,,PACKET,127,1,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, -,DUMMY_DATA0,,,PACKET,127,2,6,NONE,,,,,,,,, -,OBC_BCT_BLK_PTR,uint16_t,block_command_table->pos.block,PACKET,128,0,16,NONE,,,,,,,,BCT ブロックポインタ, -,OBC_BCT_CMD_PTR,uint8_t,(uint8_t)(block_command_table->pos.cmd),PACKET,130,0,8,NONE,,,,,,,,BCT コマンドポインタ, -,OBC_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,131,0,32,NONE,,,,,,,,BCT 登録コマンド時刻,変数指定が大変なことに… -,OBC_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,135,0,16,NONE,,,,,,,,BCT 登録コマンドID,変数指定が大変なことに… -,EL.STATISTICS.RECORD_COUNTER_TOTAL,uint32_t,event_logger->statistics.record_counter_total,PACKET,137,0,32,NONE,,,,,,,,, -,EL.STATISTICS.RECORD_COUNTERS_HIGH,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_HIGH],PACKET,141,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 -,EL.STATISTICS.RECORD_COUNTERS_MIDDLE,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_MIDDLE],PACKET,143,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 -,EL.STATISTICS.RECORD_COUNTERS_LOW,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_LOW],PACKET,145,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 -,EL.STATISTICS.RECORD_COUNTERS_EL,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_EL],PACKET,147,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 -,EL.STATISTICS.RECORD_COUNTERS_EH,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_EH],PACKET,149,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 -,EL.LATEST_EVENT.GROUP,uint8_t,(uint8_t)event_logger->latest_event.group,PACKET,151,0,8,NONE,,,,,,,,, -,EL.LATEST_EVENT.LOCAL,uint32_t,event_logger->latest_event.local,PACKET,152,0,32,NONE,,,,,,,,, -,EL.LATEST_EVENT.ERR_LEVEL,uint8_t,(uint8_t)event_logger->latest_event.err_level,PACKET,156,0,8,STATUS,,,,,,,0=HIGH@@ 1=MIDDLE@@ 2=LOW@@ 3=EL@@ 4=EH@@ *=N/A,, -,EL.LATEST_EVENT.TIME.TOTAL_CYCLE,uint32_t,event_logger->latest_event.time.total_cycle,PACKET,157,0,32,NONE,,,,,,,,, -,EL.LATEST_EVENT.TIME.STEP,uint8_t,(uint8_t)event_logger->latest_event.time.step,PACKET,161,0,8,NONE,,,,,,,,, -,EL.LATEST_EVENT.NOTE,uint32_t,event_logger->latest_event.note,PACKET,162,0,32,NONE,,,,,,,,,u8にしてもよい -,EL.LATEST_HIGH_EVENT.GROUP,uint8_t,(uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->group,PACKET,166,0,8,NONE,,,,,,,,, -,EL.LATEST_HIGH_EVENT.LOCAL,uint32_t,EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->local,PACKET,167,0,32,NONE,,,,,,,,, -,EL.LATEST_HIGH_EVENT.TIME.TOTAL_CYCLE,uint32_t,EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->time.total_cycle,PACKET,171,0,32,NONE,,,,,,,,, -,EL.LATEST_HIGH_EVENT.TIME.STEP,uint8_t,(uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->time.step,PACKET,175,0,8,NONE,,,,,,,,, -,EL.LATEST_HIGH_EVENT.NOTE,uint16_t,(uint16_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->note,PACKET,176,0,16,NONE,,,,,,,,,u8にしてもよい -,EH.LOG_TABLE.RESPOND_COUNTER,uint32_t,event_handler->log_table.respond_counter,PACKET,178,0,32,NONE,,,,,,,,, -,ANOMALY_MOBC_AL_COUNTER,uint32_t,(uint32_t)anomaly_logger->counter,PACKET,182,0,32,NONE,,,,,,,,, -,ANOMALY_MOBC_AL_LATEST_TIME_MASTER,uint32_t,(uint32_t)anomaly_logger->records[(anomaly_logger->header == 0) ? 0 : anomaly_logger->header - 1].time.total_cycle,PACKET,186,0,32,NONE,,,,,,,,, -,ANOMALY_MOBC_AL_LATEST_TIME_STEP,uint8_t,(uint8_t)(anomaly_logger->records[(anomaly_logger->header == 0) ? 0 : anomaly_logger->header - 1].time.step & 0x000000ff),PACKET,190,0,8,NONE,,,,,,,,, -,ANOMALY_MOBC_AL_LATEST_CODE_GROUP,uint8_t,(uint8_t)(anomaly_logger->records[(anomaly_logger->header == 0) ? 0 : anomaly_logger->header - 1].code.group & 0x000000ff),PACKET,191,0,8,NONE,,,,,,,,, -,ANOMALY_MOBC_AL_LATEST_CODE_LOCAL,uint32_t,anomaly_logger->records[(anomaly_logger->header == 0) ? 0 : anomaly_logger->header - 1].code.local,PACKET,192,0,32,NONE,,,,,,,,, -,ANOMALY_MOBC_AL_LATEST_RUN_LENGTH,uint8_t,(uint8_t)(anomaly_logger->records[(anomaly_logger->header == 0) ? 0 : anomaly_logger->header - 1].run_length & 0x000000ff),PACKET,196,0,8,NONE,,,,,,,,, -,ANOMALY_MOBC_AL_HEADER,uint8_t,(uint8_t)(anomaly_logger->header),PACKET,197,0,8,NONE,,,,,,,,, -,OBC_AH_ACTION_COUNTER,uint8_t,(uint8_t)(anomaly_handler->action_counter),PACKET,198,0,8,NONE,,,,,,,,アノマリ対応発生回数, -,OBC_AH_LATEST_ID,uint8_t,(uint8_t)(anomaly_handler->latest_id),PACKET,199,0,8,NONE,,,,,,,,アノマリ対応ID, -,OBC_AH_RESPOND_AT,uint32_t,(uint32_t)(anomaly_handler->respond_at.total_cycle),PACKET,200,0,32,NONE,,,,,,,,アノマリ対応実施時刻, -,OBC_GS_CMD_ERR_COUNTER,uint8_t,(uint8_t)(gs_command_dispatcher->error_counter),PACKET,204,0,8,NONE,,,,,,,,アノマリ対応発生回数, -,DCU.EXEC_LOGS0.CMD_CODE,uint16_t,(uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].cmd_code),PACKET,205,0,16,HEX,,,,,,,,, -,DCU.EXEC_LOGS0.STATUS,uint8_t,(uint8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].status),PACKET,207,0,8,STATUS,,,,,,,0=FINISHED@@ 1=PROGRESS@@ 2=ABORTED_BY_ERR@@ 3=ABORTED_BY_CMD@@ *=N/A,, -,DCU.EXEC_LOGS0.EXEC_COUNTER,uint16_t,(uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].exec_counter),PACKET,208,0,16,NONE,,,,,,,,, -,DCU.EXEC_LOGS0.LAST_EXEC_STS,int8_t,(int8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].last_exec_sts),PACKET,210,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,, -,DCU.EXEC_LOGS0.LAST_EXEC_TIME.TOTAL_CYCLE,uint32_t,divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].last_exec_time.total_cycle,PACKET,211,0,32,NONE,,,,,,,,, -,DCU.EXEC_LOGS1.CMD_CODE,uint16_t,(uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].cmd_code),PACKET,215,0,16,HEX,,,,,,,,, -,DCU.EXEC_LOGS1.STATUS,uint8_t,(uint8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].status),PACKET,217,0,8,STATUS,,,,,,,0=FINISHED@@ 1=PROGRESS@@ 2=ABORTED_BY_ERR@@ 3=ABORTED_BY_CMD@@ *=N/A,, -,DCU.EXEC_LOGS1.EXEC_COUNTER,uint16_t,(uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].exec_counter),PACKET,218,0,16,NONE,,,,,,,,, -,DCU.EXEC_LOGS1.LAST_EXEC_STS,int8_t,(int8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].last_exec_sts),PACKET,220,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,, -,DCU.EXEC_LOGS1.LAST_EXEC_TIME.TOTAL_CYCLE,uint32_t,divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].last_exec_time.total_cycle,PACKET,221,0,32,NONE,,,,,,,,, -,GIT_REV_CORE,uint32_t,GIT_REV_CORE_SHORT,PACKET,225,0,32,HEX,,,,,,,,, -,GIT_REV_USER,uint32_t,GIT_REV_USER_SHORT,PACKET,229,0,32,HEX,,,,,,,,, -,DUMMY_DATA1,uint32_t,0,PACKET,233,0,32,NONE,,,,,,,,, -,DUMMY_DATA2,uint32_t,0,PACKET,237,0,32,NONE,,,,,,,,, -,DUMMY_DATA3,uint32_t,0,PACKET,241,0,32,NONE,,,,,,,,, -,DUMMY_DATA4,uint32_t,0,PACKET,245,0,32,NONE,,,,,,,,, -,DUMMY_DATA5,uint32_t,0,PACKET,249,0,32,NONE,,,,,,,,, -,DUMMY_DATA6,uint32_t,0,PACKET,253,0,32,NONE,,,,,,,,, -,DUMMY_DATA7,uint32_t,0,PACKET,257,0,32,NONE,,,,,,,,, -,DUMMY_DATA8,uint32_t,0,PACKET,261,0,32,NONE,,,,,,,,, -,DUMMY_DATA9,uint32_t,0,PACKET,265,0,32,NONE,,,,,,,,, -,DUMMY_DATA10,uint32_t,0,PACKET,269,0,32,NONE,,,,,,,,, -,DUMMY_DATA11,uint32_t,0,PACKET,273,0,32,NONE,,,,,,,,, -,DUMMY_DATA12,uint32_t,0,PACKET,277,0,32,NONE,,,,,,,,, -,DUMMY_DATA13,uint32_t,0,PACKET,281,0,32,NONE,,,,,,,,, -,DUMMY_DATA14,uint32_t,0,PACKET,285,0,32,NONE,,,,,,,,, -,DUMMY_DATA15,uint32_t,0,PACKET,289,0,32,NONE,,,,,,,,, -,DUMMY_DATA16,uint32_t,0,PACKET,293,0,32,NONE,,,,,,,,, -,DUMMY_DATA17,uint32_t,0,PACKET,297,0,32,NONE,,,,,,,,, -,DUMMY_DATA18,uint32_t,0,PACKET,301,0,32,NONE,,,,,,,,, -,DUMMY_DATA19,uint32_t,0,PACKET,305,0,32,NONE,,,,,,,,, -,DUMMY_DATA20,uint32_t,0,PACKET,309,0,32,NONE,,,,,,,,, -,DUMMY_DATA21,uint32_t,0,PACKET,313,0,32,NONE,,,,,,,,, -,DUMMY_DATA22,uint32_t,0,PACKET,317,0,32,NONE,,,,,,,,, -,DUMMY_DATA23,uint32_t,0,PACKET,321,0,32,NONE,,,,,,,,, -,DUMMY_DATA24,uint32_t,0,PACKET,325,0,32,NONE,,,,,,,,, -,DUMMY_DATA25,uint32_t,0,PACKET,329,0,32,NONE,,,,,,,,, -,DUMMY_DATA26,uint32_t,0,PACKET,333,0,32,NONE,,,,,,,,, -,DUMMY_DATA27,uint32_t,0,PACKET,337,0,32,NONE,,,,,,,,, -,DUMMY_DATA28,uint32_t,0,PACKET,341,0,32,NONE,,,,,,,,, -,DUMMY_DATA29,uint32_t,0,PACKET,345,0,32,NONE,,,,,,,,, -,DUMMY_DATA30,uint32_t,0,PACKET,349,0,32,NONE,,,,,,,,, -,DUMMY_DATA31,uint32_t,0,PACKET,353,0,32,NONE,,,,,,,,, -,DUMMY_DATA32,uint32_t,0,PACKET,357,0,32,NONE,,,,,,,,, -,DUMMY_DATA33,uint32_t,0,PACKET,361,0,32,NONE,,,,,,,,, -,DUMMY_DATA34,uint32_t,0,PACKET,365,0,32,NONE,,,,,,,,, -,DUMMY_DATA35,uint32_t,0,PACKET,369,0,32,NONE,,,,,,,,, -,DUMMY_DATA36,uint32_t,0,PACKET,373,0,32,NONE,,,,,,,,, -,DUMMY_DATA37,uint32_t,0,PACKET,377,0,32,NONE,,,,,,,,, -,DUMMY_DATA38,uint32_t,0,PACKET,381,0,32,NONE,,,,,,,,, -,DUMMY_DATA39,uint32_t,0,PACKET,385,0,32,NONE,,,,,,,,, -,DUMMY_DATA40,uint32_t,0,PACKET,389,0,32,NONE,,,,,,,,, -,DUMMY_DATA41,uint32_t,0,PACKET,393,0,32,NONE,,,,,,,,, -,DUMMY_DATA42,uint32_t,0,PACKET,397,0,32,NONE,,,,,,,,, -,DUMMY_DATA43,uint32_t,0,PACKET,401,0,32,NONE,,,,,,,,, -,DUMMY_DATA44,uint32_t,0,PACKET,405,0,32,NONE,,,,,,,,, -,DUMMY_DATA45,uint32_t,0,PACKET,409,0,32,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,OBC.TM_MODE_TIME,uint32_t,TMGR_get_master_clock().mode_cycle,PACKET,26,0,32,NONE,,,,,,,,, +,OBC.TM_UNIXTIME_AT_TI0,double,TMGR_get_unixtime_at_ti0(),PACKET,30,0,64,NONE,,,,,,,,, +,OBC.MM_OPSMODE,uint8_t,(uint8_t)(mode_manager->current_id),PACKET,38,0,8,STATUS,,,,,,,0=START_UP@@1=INITIAL@@2=GND_TEST@@3=WDFAR@@4=RTC_HIGH_RATE@@5=5@@6=6@@7=7@@8=8@@9=9@@10=10@@11=11@@12=12@@13=13@@14=14@@15=15@@16=MAX@@*=N/A,, +,OBC.MM_STS,uint8_t,(uint8_t)( ((uint8_t)(mode_manager->stat) << 7 & 0x80) | ((uint8_t)(mode_manager->previous_id) & 0x7F) ),PACKET,39,0,1,STATUS,,,,,,,0=FINISHED@@1=PROGRESS@@*=N/A,, +,OBC.MM_OPSMODE_PREV,,,PACKET,39,1,7,STATUS,,,,,,,0=START_UP@@1=INITIAL@@2=GND_TEST@@3=WDFAR@@4=RTC_HIGH_RATE@@5=5@@6=6@@7=7@@8=8@@9=9@@10=10@@11=11@@12=12@@13=13@@14=14@@15=15@@16=MAX@@*=N/A,, +,OBC.TDSP.CURRENT_ID,uint16_t,task_dispathcer->task_list_id,PACKET,40,0,16,NONE,,,,,,,,, +,OBC.TCTF_LAST_RECV_ACK,uint8_t,(uint8_t)gs_driver->latest_info->rx.rec_status,PACKET,42,0,8,STATUS,,,,,,,0=SUCCESS@@ 1=ERROR,TC Transer Frame 受信処理結果, +,OBC.TCTF_LAST_RECV_TIME,uint32_t,(uint32_t)gs_driver->latest_info->rx.last_rec_time,PACKET,43,0,32,NONE,,,,,,,,最新TC Transer Frame受信時刻, +,OBC.TCP_LAST_RECV_ACK,uint8_t,(uint8_t)(gs_driver->latest_info->rx.cmd_ack),PACKET,47,0,8,STATUS,,,,,,,0=SUCCESS@@ 1=FORWARDED@@ 2=LIST_FULL@@ 3=PACKET_NOT_FOUND@@ 4=INVALID_PACKET@@ 5=TLC_SUCCESS@@ 6=TLC_PAST_TIME@@ 7=TLC_ALREADY_EXISTS@@ 8=BC_SUCCESS@@ 9=BC_INVALID_BLOCK_NO@@ 10=BC_ISORATED_CMD@@ 11=BC_CMD_TOO_LONG@@ 12=UNKNOWN,最新TCPacket受信処理結果, +,OBC.GS_CMD.COUNTER,uint32_t,PL_count_executed_nodes(&PH_gs_cmd_list),PACKET,48,0,32,NONE,,,,,,,,地上局コマンドカウンタ, +,OBC.GS_CMD.LAST_EXEC.TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev.time.total_cycle),PACKET,52,0,32,NONE,,,,,,,,最新地上局コマンド実行時刻, +,OBC.GS_CMD.LAST_EXEC.ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev.code),PACKET,56,0,16,NONE,,,,,,,,最新地上局コマンドID, +,OBC.GS_CMD.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(gs_command_dispatcher->prev.cmd_ret.exec_sts),PACKET,58,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, +,OBC.GS_CMD.LAST_EXEC.ERR_CODE,uint32_t,gs_command_dispatcher->prev.cmd_ret.err_code,PACKET,59,0,32,NONE,,,,,,,,, +,OBC.GS_CMD.LAST_ERR.TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev_err.time.total_cycle),PACKET,63,0,32,NONE,,,,,,,,最新地上局コマンド実行時刻, +,OBC.GS_CMD.LAST_ERR.ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev_err.code),PACKET,67,0,16,NONE,,,,,,,,最新地上局コマンドID, +,OBC.GS_CMD.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(gs_command_dispatcher->prev_err.cmd_ret.exec_sts),PACKET,69,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, +,OBC.GS_CMD.LAST_ERR.ERR_CODE,uint32_t,gs_command_dispatcher->prev_err.cmd_ret.err_code,PACKET,70,0,32,NONE,,,,,,,,, +,OBC.GS_CMD.ERR_COUNTER,uint32_t,(uint32_t)(gs_command_dispatcher->error_counter),PACKET,74,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, +,OBC.TLC_GS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]),PACKET,78,0,32,NONE,,,,,,,,TL0コマンドカウンタ, +,OBC.TLC_GS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])),PACKET,82,0,8,NONE,,,,,,,,TL0登録コマンド数, +,OBC.TLC_GS.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_cycle),PACKET,83,0,32,NONE,,,,,,,,最新TL0コマンド実行時刻, +,OBC.TLC_GS.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code),PACKET,87,0,16,NONE,,,,,,,,最新TL0コマンドID, +,OBC.TLC_GS.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.exec_sts),PACKET,89,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, +,OBC.TLC_GS.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.err_code,PACKET,90,0,32,NONE,,,,,,,,, +,OBC.TLC_GS.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_cycle),PACKET,94,0,32,NONE,,,,,,,,最新TL0コマンド実行時刻, +,OBC.TLC_GS.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code),PACKET,98,0,16,NONE,,,,,,,,最新TL0コマンドID, +,OBC.TLC_GS.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.exec_sts),PACKET,100,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, +,OBC.TLC_GS.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.err_code,PACKET,101,0,32,NONE,,,,,,,,, +,OBC.TLC_GS.ERR_COUNTER,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_counter),PACKET,105,0,8,NONE,,,,,,,,最新TL0コマンド実行異常カウンタ, +,OBC.TLC_GS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),PACKET,106,0,32,NONE,,,,,,,,次TL0コマンド実行時刻,変数指定が大変なことに… +,OBC.TLC_GS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),PACKET,110,0,16,NONE,,,,,,,,次TL0コマンドID,変数指定が大変なことに… +,OBC.TLC_BC.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]),PACKET,112,0,32,NONE,,,,,,,,TL1コマンドカウンタ, +,OBC.TLC_BC.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])),PACKET,116,0,8,NONE,,,,,,,,TL1登録コマンド数, +,OBC.TLC_TLM.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]),PACKET,117,0,32,NONE,,,,,,,,TL2コマンドカウンタ, +,OBC.TLC_TLM.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])),PACKET,121,0,8,NONE,,,,,,,,TL2登録コマンド数, +,OBC.TLC_MIS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]),PACKET,122,0,32,NONE,,,,,,,,TL3コマンドカウンタ, +,OBC.TLC_MIS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])),PACKET,126,0,8,NONE,,,,,,,,TL3登録コマンド数, +,OBC.TLC_MIS.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.time.total_cycle),PACKET,127,0,32,NONE,,,,,,,,最新TL3コマンド実行時刻, +,OBC.TLC_MIS.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.code),PACKET,131,0,16,NONE,,,,,,,,最新TL3コマンドID, +,OBC.TLC_MIS.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.cmd_ret.exec_sts),PACKET,133,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL3コマンド実行結果, +,OBC.TLC_MIS.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.cmd_ret.err_code,PACKET,134,0,32,NONE,,,,,,,,, +,OBC.TLC_MIS.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.time.total_cycle),PACKET,138,0,32,NONE,,,,,,,,最新TL3コマンド実行時刻, +,OBC.TLC_MIS.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.code),PACKET,142,0,16,NONE,,,,,,,,最新TL3コマンドID, +,OBC.TLC_MIS.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.cmd_ret.exec_sts),PACKET,144,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL3コマンド実行結果, +,OBC.TLC_MIS.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.cmd_ret.err_code,PACKET,145,0,32,NONE,,,,,,,,, +,OBC.TLC_MIS.ERR_COUNTER,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].error_counter),PACKET,149,0,8,NONE,,,,,,,,最新TL3コマンド実行異常カウンタ, +,OBC.TLC_MIS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet))),PACKET,150,0,32,NONE,,,,,,,,次TL3コマンド実行時刻,変数指定が大変なことに… +,OBC.TLC_MIS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet))),PACKET,154,0,16,NONE,,,,,,,,次TL3コマンドID,変数指定が大変なことに… +,OBC.TLC_GS.SOE_FLAG,uint8_t,(uint8_t)(((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error << 7 & 0x80) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout << 6 & 0x40) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error << 5 & 0x20) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout << 4 & 0x10) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error << 3 & 0x08) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout << 2 & 0x04) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].stop_on_error << 1 & 0x02) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].lockout & 0x01) ),PACKET,156,0,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,OBC.TLC_GS.LOCKOUT_FLAG,,,PACKET,156,1,1,STATUS,,,,,,,0=NO@@ 1=YES,, +,OBC.TLC_BC.SOE_FLAG,,,PACKET,156,2,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,OBC.TLC_BC.LOCKOUT_FLAG,,,PACKET,156,3,1,STATUS,,,,,,,0=NO@@ 1=YES,, +,OBC.TLC_TLM.SOE_FLAG,,,PACKET,156,4,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,OBC.TLC_TLM.LOCKOUT_FLAG,,,PACKET,156,5,1,STATUS,,,,,,,0=NO@@ 1=YES,, +,OBC.TLC_MIS.SOE_FLAG,,,PACKET,156,6,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,OBC.TLC_MIS.LOCKOUT_FLAG,,,PACKET,156,7,1,STATUS,,,,,,,0=NO@@ 1=YES,, +,WDT.IS_ENABLE,uint8_t,(uint8_t)((wdt_config->is_wdt_enable << 7 & 0x80) | (wdt_config->is_clear_enable << 6 & 0x40) | 0x00),PACKET,157,0,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,WDT.IS_CLEAR_ENABLE,,,PACKET,157,1,1,STATUS,,,,,,,0=DIS@@ 1=ENA,, +,DUMMY_DATA0,,,PACKET,157,2,6,NONE,,,,,,,,, +,OBC.BCT_BLK_PTR,uint16_t,block_command_table->pos.block,PACKET,158,0,16,NONE,,,,,,,,BCT ブロックポインタ, +,OBC.BCT_CMD_PTR,uint8_t,(uint8_t)(block_command_table->pos.cmd),PACKET,160,0,8,NONE,,,,,,,,BCT コマンドポインタ, +,OBC.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,161,0,32,NONE,,,,,,,,BCT 登録コマンド時刻,変数指定が大変なことに… +,OBC.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,165,0,16,NONE,,,,,,,,BCT 登録コマンドID,変数指定が大変なことに… +,EL.STATISTICS.RECORD_COUNTER_TOTAL,uint32_t,event_logger->statistics.record_counter_total,PACKET,167,0,32,NONE,,,,,,,,, +,EL.STATISTICS.RECORD_COUNTERS_HIGH,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_HIGH],PACKET,171,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 +,EL.STATISTICS.RECORD_COUNTERS_MIDDLE,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_MIDDLE],PACKET,173,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 +,EL.STATISTICS.RECORD_COUNTERS_LOW,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_LOW],PACKET,175,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 +,EL.STATISTICS.RECORD_COUNTERS_EL,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_EL],PACKET,177,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 +,EL.STATISTICS.RECORD_COUNTERS_EH,uint16_t,(uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_EH],PACKET,179,0,16,NONE,,,,,,,,,データサイズ減らすためにu16 +,EL.LATEST_EVENT.GROUP,uint8_t,(uint8_t)event_logger->latest_event.group,PACKET,181,0,8,NONE,,,,,,,,, +,EL.LATEST_EVENT.LOCAL,uint32_t,event_logger->latest_event.local,PACKET,182,0,32,NONE,,,,,,,,, +,EL.LATEST_EVENT.ERR_LEVEL,uint8_t,(uint8_t)event_logger->latest_event.err_level,PACKET,186,0,8,STATUS,,,,,,,0=HIGH@@ 1=MIDDLE@@ 2=LOW@@ 3=EL@@ 4=EH@@ *=N/A,, +,EL.LATEST_EVENT.TIME.TOTAL_CYCLE,uint32_t,event_logger->latest_event.time.total_cycle,PACKET,187,0,32,NONE,,,,,,,,, +,EL.LATEST_EVENT.TIME.STEP,uint8_t,(uint8_t)event_logger->latest_event.time.step,PACKET,191,0,8,NONE,,,,,,,,, +,EL.LATEST_EVENT.NOTE,uint32_t,event_logger->latest_event.note,PACKET,192,0,32,NONE,,,,,,,,,u8にしてもよい +,EL.LATEST_HIGH_EVENT.GROUP,uint8_t,(uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->group,PACKET,196,0,8,NONE,,,,,,,,, +,EL.LATEST_HIGH_EVENT.LOCAL,uint32_t,EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->local,PACKET,197,0,32,NONE,,,,,,,,, +,EL.LATEST_HIGH_EVENT.TIME.TOTAL_CYCLE,uint32_t,EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->time.total_cycle,PACKET,201,0,32,NONE,,,,,,,,, +,EL.LATEST_HIGH_EVENT.TIME.STEP,uint8_t,(uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->time.step,PACKET,205,0,8,NONE,,,,,,,,, +,EL.LATEST_HIGH_EVENT.NOTE,uint16_t,(uint16_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH@@ 0)->note,PACKET,206,0,16,NONE,,,,,,,,,u8にしてもよい +,EH.LOG_TABLE.RESPOND_COUNTER,uint32_t,event_handler->log_table.respond_counter,PACKET,208,0,32,NONE,,,,,,,,, +,DCU.EXEC_LOGS0.CMD_CODE,uint16_t,(uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].cmd_code),PACKET,212,0,16,HEX,,,,,,,,, +,DCU.EXEC_LOGS0.STATUS,uint8_t,(uint8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].status),PACKET,214,0,8,STATUS,,,,,,,0=FINISHED@@ 1=PROGRESS@@ 2=ABORTED_BY_ERR@@ 3=ABORTED_BY_CMD@@ *=N/A,, +,DCU.EXEC_LOGS0.EXEC_COUNTER,uint16_t,(uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].exec_counter),PACKET,215,0,16,NONE,,,,,,,,, +,DCU.EXEC_LOGS0.LAST_EXEC_STS,int8_t,(int8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].last_exec_sts),PACKET,217,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,, +,DCU.EXEC_LOGS0.LAST_EXEC_TIME.TOTAL_CYCLE,uint32_t,divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].last_exec_time.total_cycle,PACKET,218,0,32,NONE,,,,,,,,, +,DCU.EXEC_LOGS1.CMD_CODE,uint16_t,(uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].cmd_code),PACKET,222,0,16,HEX,,,,,,,,, +,DCU.EXEC_LOGS1.STATUS,uint8_t,(uint8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].status),PACKET,224,0,8,STATUS,,,,,,,0=FINISHED@@ 1=PROGRESS@@ 2=ABORTED_BY_ERR@@ 3=ABORTED_BY_CMD@@ *=N/A,, +,DCU.EXEC_LOGS1.EXEC_COUNTER,uint16_t,(uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].exec_counter),PACKET,225,0,16,NONE,,,,,,,,, +,DCU.EXEC_LOGS1.LAST_EXEC_STS,int8_t,(int8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].last_exec_sts),PACKET,227,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,, +,DCU.EXEC_LOGS1.LAST_EXEC_TIME.TOTAL_CYCLE,uint32_t,divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].last_exec_time.total_cycle,PACKET,228,0,32,NONE,,,,,,,,, +,GIT_REV_CORE,uint32_t,GIT_REV_CORE_SHORT,PACKET,232,0,32,HEX,,,,,,,,, +,GIT_REV_USER,uint32_t,GIT_REV_USER_SHORT,PACKET,236,0,32,HEX,,,,,,,,, +,DUMMY_DATA1,uint32_t,0,PACKET,240,0,32,NONE,,,,,,,,, +,DUMMY_DATA2,uint32_t,0,PACKET,244,0,32,NONE,,,,,,,,, +,DUMMY_DATA3,uint32_t,0,PACKET,248,0,32,NONE,,,,,,,,, +,DUMMY_DATA4,uint32_t,0,PACKET,252,0,32,NONE,,,,,,,,, +,DUMMY_DATA5,uint32_t,0,PACKET,256,0,32,NONE,,,,,,,,, +,DUMMY_DATA6,uint32_t,0,PACKET,260,0,32,NONE,,,,,,,,, +,DUMMY_DATA7,uint32_t,0,PACKET,264,0,32,NONE,,,,,,,,, +,DUMMY_DATA8,uint32_t,0,PACKET,268,0,32,NONE,,,,,,,,, +,DUMMY_DATA9,uint32_t,0,PACKET,272,0,32,NONE,,,,,,,,, +,DUMMY_DATA10,uint32_t,0,PACKET,276,0,32,NONE,,,,,,,,, +,DUMMY_DATA11,uint32_t,0,PACKET,280,0,32,NONE,,,,,,,,, +,DUMMY_DATA12,uint32_t,0,PACKET,284,0,32,NONE,,,,,,,,, +,DUMMY_DATA13,uint32_t,0,PACKET,288,0,32,NONE,,,,,,,,, +,DUMMY_DATA14,uint32_t,0,PACKET,292,0,32,NONE,,,,,,,,, +,DUMMY_DATA15,uint32_t,0,PACKET,296,0,32,NONE,,,,,,,,, +,DUMMY_DATA16,uint32_t,0,PACKET,300,0,32,NONE,,,,,,,,, +,DUMMY_DATA17,uint32_t,0,PACKET,304,0,32,NONE,,,,,,,,, +,DUMMY_DATA18,uint32_t,0,PACKET,308,0,32,NONE,,,,,,,,, +,DUMMY_DATA19,uint32_t,0,PACKET,312,0,32,NONE,,,,,,,,, +,DUMMY_DATA20,uint32_t,0,PACKET,316,0,32,NONE,,,,,,,,, +,DUMMY_DATA21,uint32_t,0,PACKET,320,0,32,NONE,,,,,,,,, +,DUMMY_DATA22,uint32_t,0,PACKET,324,0,32,NONE,,,,,,,,, +,DUMMY_DATA23,uint32_t,0,PACKET,328,0,32,NONE,,,,,,,,, +,DUMMY_DATA24,uint32_t,0,PACKET,332,0,32,NONE,,,,,,,,, +,DUMMY_DATA25,uint32_t,0,PACKET,336,0,32,NONE,,,,,,,,, +,DUMMY_DATA26,uint32_t,0,PACKET,340,0,32,NONE,,,,,,,,, +,DUMMY_DATA27,uint32_t,0,PACKET,344,0,32,NONE,,,,,,,,, +,DUMMY_DATA28,uint32_t,0,PACKET,348,0,32,NONE,,,,,,,,, +,DUMMY_DATA29,uint32_t,0,PACKET,352,0,32,NONE,,,,,,,,, +,DUMMY_DATA30,uint32_t,0,PACKET,356,0,32,NONE,,,,,,,,, +,DUMMY_DATA31,uint32_t,0,PACKET,360,0,32,NONE,,,,,,,,, +,DUMMY_DATA32,uint32_t,0,PACKET,364,0,32,NONE,,,,,,,,, +,DUMMY_DATA33,uint32_t,0,PACKET,368,0,32,NONE,,,,,,,,, +,DUMMY_DATA34,uint32_t,0,PACKET,372,0,32,NONE,,,,,,,,, +,DUMMY_DATA35,uint32_t,0,PACKET,376,0,32,NONE,,,,,,,,, +,DUMMY_DATA36,uint32_t,0,PACKET,380,0,32,NONE,,,,,,,,, +,DUMMY_DATA37,uint32_t,0,PACKET,384,0,32,NONE,,,,,,,,, +,DUMMY_DATA38,uint32_t,0,PACKET,388,0,32,NONE,,,,,,,,, +,DUMMY_DATA39,uint32_t,0,PACKET,392,0,32,NONE,,,,,,,,, +,DUMMY_DATA40,uint32_t,0,PACKET,396,0,32,NONE,,,,,,,,, +,DUMMY_DATA41,uint32_t,0,PACKET,400,0,32,NONE,,,,,,,,, +,DUMMY_DATA42,uint32_t,0,PACKET,404,0,32,NONE,,,,,,,,, +,DUMMY_DATA43,uint32_t,0,PACKET,408,0,32,NONE,,,,,,,,, +,DUMMY_DATA44,uint32_t,0,PACKET,412,0,32,NONE,,,,,,,,, +,DUMMY_DATA45,uint32_t,0,PACKET,416,0,32,NONE,,,,,,,,, +,DUMMY_DATA46,uint32_t,0,PACKET,420,0,32,NONE,,,,,,,,, +,DUMMY_DATA47,uint32_t,0,PACKET,424,0,32,NONE,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MEM.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MEM.csv index 0ea18b957..38944766e 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MEM.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MEM.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,MEM.BEGIN,uint32_t,memory_dump->begin,PACKET,26,0,32,HEX,,,,,,,,メモリ操作領域開始アドレス, ,MEM.END,uint32_t,memory_dump->end,PACKET,30,0,32,HEX,,,,,,,,メモリ操作領域終端アドレス, ,MEM.ADU_SIZE,uint32_t,memory_dump->adu_size,PACKET,34,0,32,NONE,,,,,,,,メモリ操作領域サイズ = ADUサイズ,CCSDSパケットヘッダに設定される diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MM.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MM.csv index ee5eab29a..52db167b4 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MM.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MM.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,CURRENT_MODE,uint8_t,(uint8_t)(mode_manager->current_id),PACKET,26,0,8,NONE,,,,,,,,, ,PREVIOSU_MODE,uint8_t,(uint8_t)(mode_manager->previous_id),PACKET,27,0,8,NONE,,,,,,,,, ,TRANSITION_STATUS,uint8_t,(uint8_t)(mode_manager->stat),PACKET,28,0,8,NONE,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MOBC.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MOBC.csv index f8b2e8084..ff5180fc2 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MOBC.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_MOBC.csv @@ -19,122 +19,122 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,TM_MODE_TIME,uint32_t,(uint32_t)(TMGR_get_master_clock().mode_cycle),PACKET,26,0,32,NONE,,,,,,,,モード遷移後経過時刻, ,TM_UTL_UNIXTIME_EPOCH,double,TMGR_get_utl_unixtime_epoch(),PACKET,30,0,64,NONE,,,,,,,,UTL_cmdで用いるunixtimeの紀元, ,TM_CYCLES_PER_SEC_FIX_RATIO,double,(double)(time_manager->unixtime_info_.cycle_correction),PACKET,38,0,64,NONE,,,,,,,,CYCLES_PER_SECの補正倍率. 初期値は1.0, ,MM_STS,uint8_t,(uint8_t)(mode_manager->stat),PACKET,46,0,8,NONE,,,,,,,,モード遷移実行状態, ,MM_OPSMODE,uint8_t,(uint8_t)(mode_manager->current_id),PACKET,47,0,8,NONE,,,,,,,,現状モード番号, ,MM_OPSMODE_PREV,uint8_t,(uint8_t)(mode_manager->previous_id),PACKET,48,0,8,NONE,,,,,,,,直前モード番号, -,TDSP_CURRENT_ID,uint8_t,(uint8_t)(TDSP_info->task_list_id),PACKET,49,0,8,NONE,,,,,,,,現状 TaskList ID, -,TDSP_CMD_LAST_ERR_TIME_MASTER,uint32_t,(uint32_t)(TDSP_info->tskd.prev_err.time.total_cycle),PACKET,50,0,32,NONE,,,,,,,,最新内部コマンド実行時刻, -,TDSP_CMD_LAST_ERR_TIME_STEP,uint8_t,(uint8_t)(TDSP_info->tskd.prev_err.time.step),PACKET,54,0,8,NONE,,,,,,,,, -,TDSP_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(TDSP_info->tskd.prev_err.code),PACKET,55,0,16,NONE,,,,,,,,最新内部コマンドID, -,TDSP_CMD_LAST_ERR_STS,int32_t,(int32_t)(TDSP_info->tskd.prev_err.sts),PACKET,57,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, -,GS_RET_FROM_IF_RX,int32_t,(int32_t)gs_driver->latest_info->rx.ret_from_if_rx,PACKET,61,0,32,NONE,,,,,,,,, -,TCTF_LAST_RECV_ACK,uint8_t,(uint8_t)gs_driver->latest_info->rx.rec_status,PACKET,65,0,8,STATUS,,,,,,,0=SUCCESS:G@@ 1=ERROR:R,TC Transer Frame DS処理結果, -,TCTF_LAST_RECV_TIME,uint32_t,(uint32_t)gs_driver->latest_info->rx.last_rec_time,PACKET,66,0,32,NONE,,,,,,,,最新TC Transer Frame受信時刻, -,TCTF_FARM_PW,uint8_t,(uint8_t)gs_validate_info->positive_window_width,PACKET,70,0,8,NONE,,,,,,,,FARM-1 Positive Window Width, -,TCP_LAST_RECV_ACK,uint8_t,(uint8_t)gs_driver->latest_info->rx.cmd_ack,PACKET,71,0,8,STATUS,,,,,,,0=SUCCESS@@ 1=FORWARDED@@ 2=LIST_FULL@@ 3=PACKET_NOT_FOUND@@ 4=INVALID_PACKET@@ 5=TLC_SUCCESS@@ 6=TLC_PAST_TIME@@ 7=TLC_ALREADY_EXISTS@@ 8=BC_SUCCESS@@ 9=BC_INVALID_BLOCK_NO@@ 10=BC_ISORATED_CMD@@ 11=BC_CMD_TOO_LONG@@ 12=UNKNOWN,最新TCPacket受信処理結果, -,TLM_TX_PORT_TYPE,uint8_t,(uint8_t)gs_driver->tlm_tx_port_type,PACKET,72,0,8,STATUS,,,,,,,0=CCSDS@@ 1=UART,TLM の送信情報がUARTのものかGSのものか, -,GS_CMD_COUNTER,uint32_t,PL_count_executed_nodes(&PH_gs_cmd_list),PACKET,73,0,32,NONE,,,,,,,,地上局コマンドカウンタ, -,GS_CMD_LAST_EXEC_TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev.time.total_cycle),PACKET,77,0,32,NONE,,,,,,,,最新地上局コマンド実行時刻, -,GS_CMD_LAST_EXEC_ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev.code),PACKET,81,0,16,NONE,,,,,,,,最新地上局コマンドID, -,GS_CMD_LAST_EXEC_STS,int32_t,(int32_t)(gs_command_dispatcher->prev.sts),PACKET,83,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, -,GS_CMD_LAST_ERR_TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev_err.time.total_cycle),PACKET,87,0,32,NONE,,,,,,,,最新地上局コマンド実行時刻, -,GS_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev_err.code),PACKET,91,0,16,NONE,,,,,,,,最新地上局コマンドID, -,GS_CMD_LAST_ERR_STS,int32_t,(int32_t)(gs_command_dispatcher->prev_err.sts),PACKET,93,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, -,GS_CMD_ERR_COUNTER,uint32_t,(uint32_t)(gs_command_dispatcher->error_counter),PACKET,97,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, -,RT_CMD_COUNTER,uint32_t,PL_count_executed_nodes(&PH_rt_cmd_list),PACKET,101,0,32,NONE,,,,,,,,内部コマンドカウンタ, -,RT_CMD_LAST_EXEC_TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev.time.total_cycle),PACKET,105,0,32,NONE,,,,,,,,最新内部コマンド実行時刻, -,RT_CMD_LAST_EXEC_ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev.code),PACKET,109,0,16,NONE,,,,,,,,最新内部コマンドID, -,RT_CMD_LAST_EXEC_STS,int32_t,(int32_t)(realtime_command_dispatcher->prev.sts),PACKET,111,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, -,RT_CMD_LAST_ERR_TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev_err.time.total_cycle),PACKET,115,0,32,NONE,,,,,,,,最新内部コマンド実行時刻, -,RT_CMD_LAST_ERR_ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev_err.code),PACKET,119,0,16,NONE,,,,,,,,最新内部コマンドID, -,RT_CMD_LAST_ERR_STS,int32_t,(int32_t)(realtime_command_dispatcher->prev_err.sts),PACKET,121,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, -,RT_CMD_ERR_COUNTER,uint32_t,(uint32_t)(realtime_command_dispatcher->error_counter),PACKET,125,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, -,TLC_GS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]),PACKET,129,0,32,NONE,,,,,,,,TL0コマンドカウンタ, -,TLC_GS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])),PACKET,133,0,8,NONE,,,,,,,,TL0登録コマンド数, -,TLC_GS.LAST_EXEC_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_cycle),PACKET,134,0,32,NONE,,,,,,,,最新TL0コマンド実行時刻, -,TLC_GS.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code),PACKET,138,0,16,NONE,,,,,,,,最新TL0コマンドID, -,TLC_GS.LAST_EXEC_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.sts),PACKET,140,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, -,TLC_GS.LAST_ERR_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_cycle),PACKET,144,0,32,NONE,,,,,,,,最新TL0コマンド実行時刻, -,TLC_GS.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code),PACKET,148,0,16,NONE,,,,,,,,最新TL0コマンドID, -,TLC_GS.LAST_ERR_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.sts),PACKET,150,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, -,TLC_GS.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_counter),PACKET,154,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, -,TLC_GS.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error),PACKET,158,0,8,STATUS,,,,,,,0=FALSE@@ 1=TRUE,, -,TLC_GS.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout),PACKET,159,0,8,STATUS,,,,,,,0=FALSE:G@@ 1=TRUE:R,, -,TLC_GS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),PACKET,160,0,32,NONE,,,,,,,,次TL0コマンド実行時刻,変数指定が大変なことに… -,TLC_GS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),PACKET,164,0,16,NONE,,,,,,,,次TL0コマンドID,変数指定が大変なことに… -,TLC_BC.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]),PACKET,166,0,32,NONE,,,,,,,,TL1コマンドカウンタ, -,TLC_BC.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])),PACKET,170,0,8,NONE,,,,,,,,TL1登録コマンド数, -,TLC_BC.LAST_EXEC_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.time.total_cycle),PACKET,171,0,32,NONE,,,,,,,,最新TL1コマンド実行時刻, -,TLC_BC.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.code),PACKET,175,0,16,NONE,,,,,,,,最新TL1コマンドID, -,TLC_BC.LAST_EXEC_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.sts),PACKET,177,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, -,TLC_BC.LAST_ERR_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.time.total_cycle),PACKET,181,0,32,NONE,,,,,,,,最新TL1コマンド実行時刻, -,TLC_BC.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.code),PACKET,185,0,16,NONE,,,,,,,,最新TL1コマンドID, -,TLC_BC.LAST_ERR_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.sts),PACKET,187,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, -,TLC_BC.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].error_counter),PACKET,191,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, -,TLC_BC.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error),PACKET,195,0,8,STATUS,,,,,,,0=FALSE@@ 1=TRUE,, -,TLC_BC.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout),PACKET,196,0,8,STATUS,,,,,,,0=FALSE:G@@ 1=TRUE:R,, -,TLC_BC.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet))),PACKET,197,0,32,NONE,,,,,,,,次TL1コマンド実行時刻,変数指定が大変なことに… -,TLC_BC.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet))),PACKET,201,0,16,NONE,,,,,,,,次TL1コマンドID,変数指定が大変なことに… -,TLC_TLM.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]),PACKET,203,0,32,NONE,,,,,,,,TL1コマンドカウンタ, -,TLC_TLM.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])),PACKET,207,0,8,NONE,,,,,,,,TL1登録コマンド数, -,TLC_TLM.LAST_EXEC_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.time.total_cycle),PACKET,208,0,32,NONE,,,,,,,,最新TL1コマンド実行時刻, -,TLC_TLM.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.code),PACKET,212,0,16,NONE,,,,,,,,最新TL1コマンドID, -,TLC_TLM.LAST_EXEC_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.sts),PACKET,214,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, -,TLC_TLM.LAST_ERR_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.time.total_cycle),PACKET,218,0,32,NONE,,,,,,,,最新TL1コマンド実行時刻, -,TLC_TLM.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.code),PACKET,222,0,16,NONE,,,,,,,,最新TL1コマンドID, -,TLC_TLM.LAST_ERR_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.sts),PACKET,224,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, -,TLC_TLM.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].error_counter),PACKET,228,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, -,TLC_TLM.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error),PACKET,232,0,8,STATUS,,,,,,,0=FALSE@@ 1=TRUE,, -,TLC_TLM.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout),PACKET,233,0,8,STATUS,,,,,,,0=FALSE:G@@ 1=TRUE:R,, -,TLC_TLM.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet))),PACKET,234,0,32,NONE,,,,,,,,次TL1コマンド実行時刻,変数指定が大変なことに… -,TLC_TLM.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet))),PACKET,238,0,16,NONE,,,,,,,,次TL1コマンドID,変数指定が大変なことに… -,TLC_MIS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]),PACKET,240,0,32,NONE,,,,,,,,TL0コマンドカウンタ, -,TLC_MIS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])),PACKET,244,0,8,NONE,,,,,,,,TL0登録コマンド数, -,TLC_MIS.LAST_EXEC_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.time.total_cycle),PACKET,245,0,32,NONE,,,,,,,,最新TL0コマンド実行時刻, -,TLC_MIS.LAST_EXEC_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.code),PACKET,249,0,16,NONE,,,,,,,,最新TL0コマンドID, -,TLC_MIS.LAST_EXEC_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.sts),PACKET,251,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, -,TLC_MIS.LAST_ERR_TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.time.total_cycle),PACKET,255,0,32,NONE,,,,,,,,最新TL0コマンド実行時刻, -,TLC_MIS.LAST_ERR_ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.code),PACKET,259,0,16,NONE,,,,,,,,最新TL0コマンドID, -,TLC_MIS.LAST_ERR_STS,int32_t,(int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.sts),PACKET,261,0,32,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, -,TLC_MIS.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].error_counter),PACKET,265,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, -,TLC_MIS.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].stop_on_error),PACKET,269,0,8,STATUS,,,,,,,0=FALSE@@ 1=TRUE,, -,TLC_MIS.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].lockout),PACKET,270,0,8,STATUS,,,,,,,0=FALSE:G@@ 1=TRUE:R,, -,TLC_MIS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet))),PACKET,271,0,32,NONE,,,,,,,,次TL0コマンド実行時刻,変数指定が大変なことに… -,TLC_MIS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet))),PACKET,275,0,16,NONE,,,,,,,,次TL0コマンドID,変数指定が大変なことに… -,BCT_BLK_PTR,uint8_t,(uint8_t)(block_command_table->pos.block),PACKET,277,0,8,NONE,,,,,,,,BCT ブロックポインタ, -,BCT_CMD_PTR,uint8_t,(uint8_t)(block_command_table->pos.cmd),PACKET,278,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,279,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,283,0,16,NONE,,,,,,,,BCT 登録コマンドID,変数指定が大変なことに… -,MS_BUFFER_AVAILABLE,uint8_t,gs_driver->ccsds_info.buffer_num,PACKET,285,0,8,NONE,,,,,,,,CCSDS MS VCDU 使用量, -,MS_T2M_FLUSH_INTERVAL,uint32_t,(uint32_t)(DI_GS_ms_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval),PACKET,286,0,32,NONE,,,,,,,,TL0コマンドカウンタ, -,RP_T2M_FLUSH_INTERVAL,uint32_t,(uint32_t)(DI_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval),PACKET,290,0,32,NONE,,,,,,,,TL0コマンドカウンタ, -,MS_TLM_COUNTER,uint32_t,PL_count_executed_nodes(&PH_ms_tlm_list),PACKET,294,0,32,NONE,,,,,,,,TL0コマンドカウンタ, -,MS_TLM_QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_ms_tlm_list)),PACKET,298,0,8,NONE,,,,,,,,TL0登録コマンド数, -,ST_TLM_COUNTER,uint32_t,PL_count_executed_nodes(&PH_st_tlm_list),PACKET,299,0,32,NONE,,,,,,,,TL0コマンドカウンタ, -,ST_TLM_QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_st_tlm_list)),PACKET,303,0,8,NONE,,,,,,,,TL0登録コマンド数, -,RP_TLM_COUNTER,uint32_t,PL_count_executed_nodes(&PH_rp_tlm_list),PACKET,304,0,32,NONE,,,,,,,,TL0コマンドカウンタ, -,RP_TLM_QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_rp_tlm_list)),PACKET,308,0,8,NONE,,,,,,,,TL0登録コマンド数, -,TCI_TX_CYCLE,uint32_t,(uint32_t)gs_driver->latest_info->tx.send_cycle,PACKET,309,0,32,NONE,,,,,,,,時刻校正情報::送出サイクル, -,TCI_TX_BITRATE,uint32_t,gs_driver->driver_ccsds.ccsds_config.bitrate,PACKET,313,0,32,NONE,,,,,,,,時刻校正情報::送出ビットレート, -,TCI_VCID,uint8_t,(uint8_t)gs_driver->latest_info->tx.vcid,PACKET,317,0,8,NONE,,,,,,,,時刻構成情報::送出VCID, -,TCI_VCDU_COUNTER,uint32_t,gs_driver->latest_info->tx.vcdu_counter,PACKET,318,0,32,NONE,,,,,,,,時刻校正情報::送出VCDUカウンタ, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, +,TDSP.CURRENT_ID,uint8_t,(uint8_t)(task_dispathcer->task_list_id),PACKET,49,0,8,NONE,,,,,,,,現状 TaskList ID, +,TDSP.LAST_ERR.TIME.TOTAL_CYCLE,uint32_t,(uint32_t)(task_dispathcer->tskd.prev_err.time.total_cycle),PACKET,50,0,32,NONE,,,,,,,,最新内部コマンド実行時刻, +,TDSP.LAST_ERR.TIME.STEP,uint8_t,(uint8_t)(task_dispathcer->tskd.prev_err.time.step),PACKET,54,0,8,NONE,,,,,,,,, +,TDSP.LAST_ERR.ID,uint16_t,(uint16_t)(task_dispathcer->tskd.prev_err.code),PACKET,55,0,16,NONE,,,,,,,,最新内部コマンドID, +,TDSP.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(task_dispathcer->tskd.prev_err.cmd_ret.exec_sts),PACKET,57,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,TDSP.LAST_ERR.ERR_CODE,uint32_t,task_dispathcer->tskd.prev_err.cmd_ret.err_code,PACKET,58,0,32,NONE,,,,,,,,, +,GS_RET_FROM_IF_RX,int32_t,(int32_t)gs_driver->latest_info->rx.ret_from_if_rx,PACKET,62,0,32,NONE,,,,,,,,, +,TCTF_LAST_RECV_ACK,uint8_t,(uint8_t)gs_driver->latest_info->rx.rec_status,PACKET,66,0,8,STATUS,,,,,,,0=SUCCESS:G@@ 1=ERROR:R,TC Transer Frame DS処理結果, +,TCTF_LAST_RECV_TIME,uint32_t,(uint32_t)gs_driver->latest_info->rx.last_rec_time,PACKET,67,0,32,NONE,,,,,,,,最新TC Transer Frame受信時刻, +,TCTF_FARM_PW,uint8_t,(uint8_t)gs_validate_info->positive_window_width,PACKET,71,0,8,NONE,,,,,,,,FARM-1 Positive Window Width, +,TCP_LAST_RECV_ACK,uint8_t,(uint8_t)gs_driver->latest_info->rx.cmd_ack,PACKET,72,0,8,STATUS,,,,,,,0=SUCCESS@@ 1=FORWARDED@@ 2=LIST_FULL@@ 3=PACKET_NOT_FOUND@@ 4=INVALID_PACKET@@ 5=TLC_SUCCESS@@ 6=TLC_PAST_TIME@@ 7=TLC_ALREADY_EXISTS@@ 8=BC_SUCCESS@@ 9=BC_INVALID_BLOCK_NO@@ 10=BC_ISORATED_CMD@@ 11=BC_CMD_TOO_LONG@@ 12=UNKNOWN,最新TCPacket受信処理結果, +,TLM_TX_PORT_TYPE,uint8_t,(uint8_t)gs_driver->tlm_tx_port_type,PACKET,73,0,8,STATUS,,,,,,,0=CCSDS@@ 1=UART,TLM の送信情報がUARTのものかGSのものか, +,GS_CMD.COUNTER,uint32_t,PL_count_executed_nodes(&PH_gs_cmd_list),PACKET,74,0,32,NONE,,,,,,,,地上局コマンドカウンタ, +,GS_CMD.LAST_EXEC.TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev.time.total_cycle),PACKET,78,0,32,NONE,,,,,,,,最新地上局コマンド実行時刻, +,GS_CMD.LAST_EXEC.ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev.code),PACKET,82,0,16,NONE,,,,,,,,最新地上局コマンドID, +,GS_CMD.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(gs_command_dispatcher->prev.cmd_ret.exec_sts),PACKET,84,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, +,GS_CMD.LAST_EXEC.ERR_CODE,uint32_t,gs_command_dispatcher->prev.cmd_ret.err_code,PACKET,85,0,32,NONE,,,,,,,,, +,GS_CMD.LAST_ERR.TIME,uint32_t,(uint32_t)(gs_command_dispatcher->prev_err.time.total_cycle),PACKET,89,0,32,NONE,,,,,,,,最新地上局コマンド実行時刻, +,GS_CMD.LAST_ERR.ID,uint16_t,(uint16_t)(gs_command_dispatcher->prev_err.code),PACKET,93,0,16,NONE,,,,,,,,最新地上局コマンドID, +,GS_CMD.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(gs_command_dispatcher->prev_err.cmd_ret.exec_sts),PACKET,95,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新地上局コマンド実行結果, +,GS_CMD.LAST_ERR.ERR_CODE,uint32_t,gs_command_dispatcher->prev_err.cmd_ret.err_code,PACKET,96,0,32,NONE,,,,,,,,, +,GS_CMD.ERR_COUNTER,uint32_t,(uint32_t)(gs_command_dispatcher->error_counter),PACKET,100,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, +,RT_CMD.COUNTER,uint32_t,PL_count_executed_nodes(&PH_rt_cmd_list),PACKET,104,0,32,NONE,,,,,,,,内部コマンドカウンタ, +,RT_CMD.LAST_EXEC.TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev.time.total_cycle),PACKET,108,0,32,NONE,,,,,,,,最新内部コマンド実行時刻, +,RT_CMD.LAST_EXEC.ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev.code),PACKET,112,0,16,NONE,,,,,,,,最新内部コマンドID, +,RT_CMD.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(realtime_command_dispatcher->prev.cmd_ret.exec_sts),PACKET,114,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,RT_CMD.LAST_EXEC.ERR_CODE,uint32_t,realtime_command_dispatcher->prev.cmd_ret.err_code,PACKET,115,0,32,NONE,,,,,,,,, +,RT_CMD.LAST_ERR.TIME,uint32_t,(uint32_t)(realtime_command_dispatcher->prev_err.time.total_cycle),PACKET,119,0,32,NONE,,,,,,,,最新内部コマンド実行時刻, +,RT_CMD.LAST_ERR.ID,uint16_t,(uint16_t)(realtime_command_dispatcher->prev_err.code),PACKET,123,0,16,NONE,,,,,,,,最新内部コマンドID, +,RT_CMD.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(realtime_command_dispatcher->prev_err.cmd_ret.exec_sts),PACKET,125,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新内部コマンド実行結果, +,RT_CMD.LAST_ERR.ERR_CODE,uint32_t,realtime_command_dispatcher->prev_err.cmd_ret.err_code,PACKET,126,0,32,NONE,,,,,,,,, +,RT_CMD.ERR_COUNTER,uint32_t,(uint32_t)(realtime_command_dispatcher->error_counter),PACKET,130,0,32,NONE,,,,,,,,地上局コマンド実行異常カウンタ, +,TLC_GS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]),PACKET,134,0,32,NONE,,,,,,,,TL0コマンドカウンタ, +,TLC_GS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])),PACKET,138,0,8,NONE,,,,,,,,TL0登録コマンド数, +,TLC_GS.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_cycle),PACKET,139,0,32,NONE,,,,,,,,最新TL0コマンド実行時刻, +,TLC_GS.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code),PACKET,143,0,16,NONE,,,,,,,,最新TL0コマンドID, +,TLC_GS.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.exec_sts),PACKET,145,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, +,TLC_GS.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.err_code,PACKET,146,0,32,NONE,,,,,,,,, +,TLC_GS.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_cycle),PACKET,150,0,32,NONE,,,,,,,,最新TL0コマンド実行時刻, +,TLC_GS.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code),PACKET,154,0,16,NONE,,,,,,,,最新TL0コマンドID, +,TLC_GS.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.exec_sts),PACKET,156,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL0コマンド実行結果, +,TLC_GS.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.err_code,PACKET,157,0,32,NONE,,,,,,,,, +,TLC_GS.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_counter),PACKET,161,0,32,NONE,,,,,,,,最新TL0コマンド実行異常カウンタ, +,TLC_GS.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error),PACKET,165,0,8,STATUS,,,,,,,0=FALSE@@ 1=TRUE,, +,TLC_GS.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout),PACKET,166,0,8,STATUS,,,,,,,0=FALSE:G@@ 1=TRUE:R,, +,TLC_GS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),PACKET,167,0,32,NONE,,,,,,,,次TL0コマンド実行時刻,変数指定が大変なことに… +,TLC_GS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet))),PACKET,171,0,16,NONE,,,,,,,,次TL0コマンドID,変数指定が大変なことに… +,TLC_BC.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]),PACKET,173,0,32,NONE,,,,,,,,TL1コマンドカウンタ, +,TLC_BC.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])),PACKET,177,0,8,NONE,,,,,,,,TL1登録コマンド数, +,TLC_BC.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.time.total_cycle),PACKET,178,0,32,NONE,,,,,,,,最新TL1コマンド実行時刻, +,TLC_BC.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.code),PACKET,182,0,16,NONE,,,,,,,,最新TL1コマンドID, +,TLC_BC.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.cmd_ret.exec_sts),PACKET,184,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, +,TLC_BC.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.cmd_ret.err_code,PACKET,185,0,32,NONE,,,,,,,,, +,TLC_BC.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.time.total_cycle),PACKET,189,0,32,NONE,,,,,,,,最新TL1コマンド実行時刻, +,TLC_BC.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.code),PACKET,193,0,16,NONE,,,,,,,,最新TL1コマンドID, +,TLC_BC.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.cmd_ret.exec_sts),PACKET,195,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL1コマンド実行結果, +,TLC_BC.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.cmd_ret.err_code,PACKET,196,0,32,NONE,,,,,,,,, +,TLC_BC.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].error_counter),PACKET,200,0,32,NONE,,,,,,,,最新TL1コマンド実行異常カウンタ, +,TLC_BC.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error),PACKET,204,0,8,STATUS,,,,,,,0=FALSE@@ 1=TRUE,, +,TLC_BC.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout),PACKET,205,0,8,STATUS,,,,,,,0=FALSE:G@@ 1=TRUE:R,, +,TLC_BC.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet))),PACKET,206,0,32,NONE,,,,,,,,次TL1コマンド実行時刻,変数指定が大変なことに… +,TLC_BC.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet))),PACKET,210,0,16,NONE,,,,,,,,次TL1コマンドID,変数指定が大変なことに… +,TLC_TLM.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]),PACKET,212,0,32,NONE,,,,,,,,TL2コマンドカウンタ, +,TLC_TLM.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])),PACKET,216,0,8,NONE,,,,,,,,TL2登録コマンド数, +,TLC_TLM.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.time.total_cycle),PACKET,217,0,32,NONE,,,,,,,,最新TL2コマンド実行時刻, +,TLC_TLM.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.code),PACKET,221,0,16,NONE,,,,,,,,最新TL2コマンドID, +,TLC_TLM.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.cmd_ret.exec_sts),PACKET,223,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL2コマンド実行結果, +,TLC_TLM.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.cmd_ret.err_code,PACKET,224,0,32,NONE,,,,,,,,, +,TLC_TLM.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.time.total_cycle),PACKET,228,0,32,NONE,,,,,,,,最新TL2コマンド実行時刻, +,TLC_TLM.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.code),PACKET,232,0,16,NONE,,,,,,,,最新TL2コマンドID, +,TLC_TLM.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.cmd_ret.exec_sts),PACKET,234,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL2コマンド実行結果, +,TLC_TLM.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.cmd_ret.err_code,PACKET,235,0,32,NONE,,,,,,,,, +,TLC_TLM.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].error_counter),PACKET,239,0,32,NONE,,,,,,,,最新TL2実行異常カウンタ, +,TLC_TLM.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error),PACKET,243,0,8,STATUS,,,,,,,0=FALSE@@ 1=TRUE,, +,TLC_TLM.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout),PACKET,244,0,8,STATUS,,,,,,,0=FALSE:G@@ 1=TRUE:R,, +,TLC_TLM.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet))),PACKET,245,0,32,NONE,,,,,,,,次TL2コマンド実行時刻,変数指定が大変なことに… +,TLC_TLM.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet))),PACKET,249,0,16,NONE,,,,,,,,次TL2コマンドID,変数指定が大変なことに… +,TLC_MIS.COUNTER,uint32_t,PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]),PACKET,251,0,32,NONE,,,,,,,,TL3コマンドカウンタ, +,TLC_MIS.QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])),PACKET,255,0,8,NONE,,,,,,,,TL3登録コマンド数, +,TLC_MIS.LAST_EXEC.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.time.total_cycle),PACKET,256,0,32,NONE,,,,,,,,最新TL3コマンド実行時刻, +,TLC_MIS.LAST_EXEC.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.code),PACKET,260,0,16,NONE,,,,,,,,最新TL3コマンドID, +,TLC_MIS.LAST_EXEC.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.cmd_ret.exec_sts),PACKET,262,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL3コマンド実行結果, +,TLC_MIS.LAST_EXEC.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.cmd_ret.err_code,PACKET,263,0,32,NONE,,,,,,,,, +,TLC_MIS.LAST_ERR.TIME,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.time.total_cycle),PACKET,267,0,32,NONE,,,,,,,,最新TL3コマンド実行時刻, +,TLC_MIS.LAST_ERR.ID,uint16_t,(uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.code),PACKET,271,0,16,NONE,,,,,,,,最新TL3コマンドID, +,TLC_MIS.LAST_ERR.EXEC_STS,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.cmd_ret.exec_sts),PACKET,273,0,8,STATUS,,,,,,,0=SUC@@ 1=LEN@@ 2=PRM@@ 3=CNT@@ 4=NDF@@ 5=RUT@@ 6=FMT@@ *=ERR,最新TL3コマンド実行結果, +,TLC_MIS.LAST_ERR.ERR_CODE,uint32_t,timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.cmd_ret.err_code,PACKET,274,0,32,NONE,,,,,,,,, +,TLC_MIS.ERR_COUNTER,uint32_t,(uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].error_counter),PACKET,278,0,32,NONE,,,,,,,,最新TL3コマンド実行異常カウンタ, +,TLC_MIS.SOE_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].stop_on_error),PACKET,282,0,8,STATUS,,,,,,,0=FALSE@@ 1=TRUE,, +,TLC_MIS.LOCKOUT_FLAG,uint8_t,(uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].lockout),PACKET,283,0,8,STATUS,,,,,,,0=FALSE:G@@ 1=TRUE:R,, +,TLC_MIS.NEXT_TIME,uint32_t,(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet))),PACKET,284,0,32,NONE,,,,,,,,次TL3コマンド実行時刻,変数指定が大変なことに… +,TLC_MIS.NEXT_ID,uint16_t,(uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet))),PACKET,288,0,16,NONE,,,,,,,,次TL3コマンドID,変数指定が大変なことに… +,BCT_BLK_PTR,uint8_t,(uint8_t)(block_command_table->pos.block),PACKET,290,0,8,NONE,,,,,,,,BCT ブロックポインタ, +,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,変数指定が大変なことに… +,MS_BUFFER_AVAILABLE,uint8_t,gs_driver->ccsds_info.buffer_num,PACKET,298,0,8,NONE,,,,,,,,CCSDS MS VCDU 使用量, +,MS_T2M_FLUSH_INTERVAL,uint32_t,(uint32_t)(DI_GS_ms_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval),PACKET,299,0,32,NONE,,,,,,,,TL0コマンドカウンタ, +,RP_T2M_FLUSH_INTERVAL,uint32_t,(uint32_t)(DI_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval),PACKET,303,0,32,NONE,,,,,,,,TL0コマンドカウンタ, +,MS_TLM_COUNTER,uint32_t,PL_count_executed_nodes(&PH_ms_tlm_list),PACKET,307,0,32,NONE,,,,,,,,TL0コマンドカウンタ, +,MS_TLM_QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_ms_tlm_list)),PACKET,311,0,8,NONE,,,,,,,,TL0登録コマンド数, +,ST_TLM_COUNTER,uint32_t,PL_count_executed_nodes(&PH_st_tlm_list),PACKET,312,0,32,NONE,,,,,,,,TL0コマンドカウンタ, +,ST_TLM_QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_st_tlm_list)),PACKET,316,0,8,NONE,,,,,,,,TL0登録コマンド数, +,RP_TLM_COUNTER,uint32_t,PL_count_executed_nodes(&PH_rp_tlm_list),PACKET,317,0,32,NONE,,,,,,,,TL0コマンドカウンタ, +,RP_TLM_QUEUED,uint8_t,(uint8_t)(PL_count_active_nodes(&PH_rp_tlm_list)),PACKET,321,0,8,NONE,,,,,,,,TL0登録コマンド数, +,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カウンタ, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_TF.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_TF.csv index 7476ec73b..dde856303 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_TF.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_TF.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,PAGE_NO,uint8_t,page,PACKET,26,0,8,NONE,,,,,,,,, ,TLM0,uint32_t,(uint32_t)(telemetry_frame->tlm_table[offset+0].tlm_func),PACKET,27,0,32,HEX,,,,,,,,, ,TLM1,uint32_t,(uint32_t)(telemetry_frame->tlm_table[offset+1].tlm_func),PACKET,31,0,32,HEX,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_TL.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_TL.csv index 5d549d0b2..90ab44ac7 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_TL.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_TL.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,LINE_NO,uint8_t,TLCD_update_tl_list_for_tlm(timeline_command_dispatcher->tlm_info_.id),PACKET,26,0,8,NONE,,,,,,,,テレメトリを生成したライン番号, ,PAGE_NO,uint8_t,timeline_command_dispatcher->tlm_info_.page_no,PACKET,27,0,8,NONE,,,,,,,,, ,UPDATED_AT,uint32_t,timeline_command_dispatcher->tlm_info_.updated_at,PACKET,28,0,32,NONE,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_TLM_MGR.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_TLM_MGR.csv index 375301ea6..9a9aa50db 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_TLM_MGR.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_TLM_MGR.csv @@ -19,7 +19,7 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, ,MASTER_BC_ID,uint16_t,telemetry_manager->master_bc_id,PACKET,26,0,16,NONE,,,,,,,,, ,BC_INFO0.BC_ID,uint16_t,telemetry_manager->bc_info[0].bc_id,PACKET,28,0,16,NONE,,,,,,,,, ,BC_INFO0.BC_TYPE,uint8_t,(uint8_t)telemetry_manager->bc_info[0].bc_type,PACKET,30,0,8,STATUS,,,,,,,0=MASTER@@ 1=HK_TLM@@ 2=SYSTEM_TLM@@ 3=HIGH_FREQ_TLM@@ 4=LOW_FREQ_TLM@@ 5=RESERVE,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_UART_TEST.csv b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_UART_TEST.csv index d659b4438..d4b927056 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_UART_TEST.csv +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/DataBase/TLM_DB/calced_data/SAMPLE_MOBC_TLM_DB_UART_TEST.csv @@ -19,21 +19,21 @@ Comment,TLM Entry,Onboard Software Info.,,Extraction Info.,,,,Conversion Info.,, ,SH.GLOBAL_TIME,double,,PACKET,12,0,64,NONE,,,,,,,,, ,SH.ON_BOARD_SUBNET_TIME,uint32_t,,PACKET,20,0,32,NONE,,,,,,,,, ,SH.DEST_FLAGS,uint8_t,,PACKET,24,0,8,HEX,,,,,,,,, -,SH.DR_PARTITION,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, -,DRIVER.REC_STATUS.RET_FROM_IF_RX,uint8_t,(uint8_t)(uart_test_instance->driver.super.config.rec_status_.ret_from_if_rx),PACKET,26,0,8,NONE,,,,,,,,, -,DRIVER.RX_COUNT,uint32_t,uart_test_instance->driver.super.config.rx_count_,PACKET,27,0,32,NONE,,,,,,,,, -,DRIVER0.REC_STATUS.STATUS_CODE,uint8_t,(uint8_t)(uart_test_instance->driver.super.stream_config[0].rec_status_.status_code),PACKET,31,0,8,STATUS,,,,,,,0=FINDING_HEADER@@1=RECEIVING_HEADER@@2=RECEIVING_FRAMELENGTH@@3=RECEIVING_DATA@@4=RECEIVING_FOOTER@@5=FIXED_FRAME@@6=DISABLE@@7=RX_FRAME_TOO_LONG@@8=RX_ERR@@9=VALIDATE_ERR@@10=OTHER_ERR,, -,DRIVER0.REC_STATUS.FIXED_FRAME_LEN,uint16_t,uart_test_instance->driver.super.stream_config[0].rec_status_.fixed_frame_len,PACKET,32,0,16,NONE,,,,,,,,, -,DRIVER0.RX_FRAME_FIX_COUNT,uint32_t,uart_test_instance->driver.super.stream_config[0].rx_frame_fix_count_,PACKET,34,0,32,NONE,,,,,,,,, -,DRIVER0.RX_FRAME_REC_LEN,uint16_t,uart_test_instance->driver.super.stream_config[0].rx_frame_rec_len_,PACKET,38,0,16,NONE,,,,,,,,, -,DRIVER0.IS_RX_BUFFER_CARRY_OVER,uint8_t,uart_test_instance->driver.super.stream_config[0].is_rx_buffer_carry_over_,PACKET,40,0,8,NONE,,,,,,,,, -,DRIVER1.REC_STATUS.STATUS_CODE,uint8_t,(uint8_t)(uart_test_instance->driver.super.stream_config[1].rec_status_.status_code),PACKET,41,0,8,STATUS,,,,,,,0=FINDING_HEADER@@1=RECEIVING_HEADER@@2=RECEIVING_FRAMELENGTH@@3=RECEIVING_DATA@@4=RECEIVING_FOOTER@@5=FIXED_FRAME@@6=DISABLE@@7=RX_FRAME_TOO_LONG@@8=RX_ERR@@9=VALIDATE_ERR@@10=OTHER_ERR,, -,DRIVER1.REC_STATUS.FIXED_FRAME_LEN,uint16_t,uart_test_instance->driver.super.stream_config[1].rec_status_.fixed_frame_len,PACKET,42,0,16,NONE,,,,,,,,, -,DRIVER1.RX_FRAME_FIX_COUNT,uint32_t,uart_test_instance->driver.super.stream_config[1].rx_frame_fix_count_,PACKET,44,0,32,NONE,,,,,,,,, -,DRIVER1.RX_FRAME_REC_LEN,uint16_t,uart_test_instance->driver.super.stream_config[1].rx_frame_rec_len_,PACKET,48,0,16,NONE,,,,,,,,, -,DRIVER1.IS_RX_BUFFER_CARRY_OVER,uint8_t,uart_test_instance->driver.super.stream_config[1].is_rx_buffer_carry_over_,PACKET,50,0,8,NONE,,,,,,,,, -,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,, +,SH.DEST_INFO,uint8_t,,PACKET,25,0,8,NONE,,,,,,,,, +,DRIVER.INFO.REC_STATUS.RET_FROM_IF_RX,uint8_t,(uint8_t)(uart_test_driver->driver.super.config.info.rec_status_.ret_from_if_rx),PACKET,26,0,8,NONE,,,,,,,,, +,DRIVER.INFO.RX_COUNT,uint32_t,uart_test_driver->driver.super.config.info.rx_count_,PACKET,27,0,32,NONE,,,,,,,,, +,DRIVER0.INFO.REC_STATUS.STATUS_CODE,uint8_t,(uint8_t)(uart_test_driver->driver.super.stream_config[0].info.rec_status_.status_code),PACKET,31,0,8,STATUS,,,,,,,0=FINDING_HEADER@@1=RECEIVING_HEADER@@2=RECEIVING_FRAMELENGTH@@3=RECEIVING_DATA@@4=RECEIVING_FOOTER@@5=FIXED_FRAME@@6=DISABLE@@7=RX_FRAME_TOO_LONG@@8=RX_ERR@@9=VALIDATE_ERR@@10=OTHER_ERR,, +,DRIVER0.INFO.REC_STATUS.FIXED_FRAME_LEN,uint16_t,uart_test_driver->driver.super.stream_config[0].info.rec_status_.fixed_frame_len,PACKET,32,0,16,NONE,,,,,,,,, +,DRIVER0.INFO.RX_FRAME_FIX_COUNT,uint32_t,uart_test_driver->driver.super.stream_config[0].info.rx_frame_fix_count_,PACKET,34,0,32,NONE,,,,,,,,, +,DRIVER0.SETTINGS.RX_BUFFER.SIZE,uint16_t,uart_test_driver->driver.super.stream_config[0].settings.rx_buffer_->size,PACKET,38,0,16,NONE,,,,,,,,, +,DRIVER0.SETTINGS.RX_BUFFER.CONFIRMED_FRAME_LEN,uint16_t,uart_test_driver->driver.super.stream_config[0].settings.rx_buffer_->confirmed_frame_len,PACKET,40,0,16,NONE,,,,,,,,, +,DRIVER0.SETTINGS.RX_BUFFER.IS_FRAME_FIXED,uint8_t,uart_test_driver->driver.super.stream_config[0].settings.rx_buffer_->is_frame_fixed,PACKET,42,0,8,NONE,,,,,,,,, +,DRIVER1.INFO.REC_STATUS.STATUS_CODE,uint8_t,(uint8_t)(uart_test_driver->driver.super.stream_config[1].info.rec_status_.status_code),PACKET,43,0,8,STATUS,,,,,,,0=FINDING_HEADER@@1=RECEIVING_HEADER@@2=RECEIVING_FRAMELENGTH@@3=RECEIVING_DATA@@4=RECEIVING_FOOTER@@5=FIXED_FRAME@@6=DISABLE@@7=RX_FRAME_TOO_LONG@@8=RX_ERR@@9=VALIDATE_ERR@@10=OTHER_ERR,, +,DRIVER1.INFO.REC_STATUS.FIXED_FRAME_LEN,uint16_t,uart_test_driver->driver.super.stream_config[1].info.rec_status_.fixed_frame_len,PACKET,44,0,16,NONE,,,,,,,,, +,DRIVER1.INFO.RX_FRAME_FIX_COUNT,uint32_t,uart_test_driver->driver.super.stream_config[1].info.rx_frame_fix_count_,PACKET,46,0,32,NONE,,,,,,,,, +,DRIVER1.SETTINGS.RX_BUFFER.SIZE,uint16_t,uart_test_driver->driver.super.stream_config[1].settings.rx_buffer_->size,PACKET,50,0,16,NONE,,,,,,,,, +,DRIVER1.SETTINGS.RX_BUFFER.CONFIRMED_FRAME_LEN,uint16_t,uart_test_driver->driver.super.stream_config[1].settings.rx_buffer_->confirmed_frame_len,PACKET,52,0,16,NONE,,,,,,,,, +,DRIVER1.SETTINGS.RX_BUFFER.IS_FRAME_FIXED,uint8_t,uart_test_driver->driver.super.stream_config[1].settings.rx_buffer_->is_frame_fixed,PACKET,54,0,8,NONE,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,, diff --git a/Examples/minimum_user/src/src_user/Settings/TlmCmd/common_cmd_packet_define.h b/Examples/minimum_user/src/src_user/Settings/TlmCmd/common_cmd_packet_define.h index 36160c40f..0d59d74ee 100644 --- a/Examples/minimum_user/src/src_user/Settings/TlmCmd/common_cmd_packet_define.h +++ b/Examples/minimum_user/src/src_user/Settings/TlmCmd/common_cmd_packet_define.h @@ -22,6 +22,7 @@ typedef CmdSpacePacket CommonCmdPacket; * @brief コマンドの解釈の宛先を規定 * @note TO_ME: 自分自身 → 自分自身の TLC や BC として解釈.コマンド実行時に必要に応じて別 OBC へ配送 (この定義は C2A Core で使うため,どんな C2A でも必須) * @note TO_*: 転送先の TL や BC として解釈 (直接指定 OBC へ配送. GS から来たコマンドを自身のキューにいれない) + * なお,自分自身宛だった場合は,キューに入れる * @note 4bit を想定 */ typedef enum diff --git a/Examples/minimum_user/src/src_user/Test/README.md b/Examples/minimum_user/src/src_user/Test/README.md index 837bbf540..6e1ace325 100644 --- a/Examples/minimum_user/src/src_user/Test/README.md +++ b/Examples/minimum_user/src/src_user/Test/README.md @@ -48,14 +48,3 @@ or cd ./test/src_user/Applications/UserDefined/ pytest -m real -v test_tlm_mem_dump.py ``` - -## 認証情報について -wings と通信するにあたりに対して認証情報を渡す必要がある. `authorization.json.temp` と同じ key を持つ正しい `authorization.json` を誰かからもらうか,又はそれぞれの key に対応する環境変数を埋めること. 対応を下表に示す. - -| `authorization.json` の key | 環境変数 | -| :-------------------------- | :------------------ | -| client_id | WINGS_CLIENT_ID | -| client_secret | WINGS_CLIENT_SECRET | -| grant_type | WINGS_GRANT_TYPE | -| username | WINGS_USERNAME | -| password | WINGS_PASSWORD | diff --git a/Examples/minimum_user/src/src_user/Test/authorization.json.temp b/Examples/minimum_user/src/src_user/Test/authorization.json.temp deleted file mode 100644 index d9dd01841..000000000 --- a/Examples/minimum_user/src/src_user/Test/authorization.json.temp +++ /dev/null @@ -1,7 +0,0 @@ -{ - "client_id": "hoge_id", - "client_secret": "hoge_secret", - "grant_type": "hoge", - "username": "hoge@fuga", - "password": "piyopiyo" -} diff --git a/Examples/minimum_user/src/src_user/Test/test/conftest.py b/Examples/minimum_user/src/src_user/Test/test/conftest.py index 1799ad0d0..5cfd6072c 100644 --- a/Examples/minimum_user/src/src_user/Test/test/conftest.py +++ b/Examples/minimum_user/src/src_user/Test/test/conftest.py @@ -22,7 +22,6 @@ def increase_hk_frequency(): def _increase_hk_frequency(): - ope.send_rt_cmd( c2a_enum.Cmd_CODE_TLCD_CLEAR_ALL_TIMELINE, (2,), diff --git a/Examples/minimum_user/src/src_user/Test/test/src_core/Applications/test_timeline_command_dispatcher.py b/Examples/minimum_user/src/src_user/Test/test/src_core/Applications/test_timeline_command_dispatcher.py index 53f37eb85..9c370ed5b 100644 --- a/Examples/minimum_user/src/src_user/Test/test/src_core/Applications/test_timeline_command_dispatcher.py +++ b/Examples/minimum_user/src/src_user/Test/test/src_core/Applications/test_timeline_command_dispatcher.py @@ -52,7 +52,7 @@ def test_tlcd_set_flag(): c2a_enum.Tlm_CODE_HK, ) tlm_HK, rec_time = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) - assert tlm_HK["HK.OBC_TLC_GS.SOE_FLAG"] == "ENA" + assert tlm_HK["HK.OBC.TLC_GS.SOE_FLAG"] == "ENA" assert "SUC" == wings.util.send_rt_cmd_and_confirm( ope, c2a_enum.Cmd_CODE_TLCD_SET_SOE_FLAG, @@ -60,7 +60,7 @@ def test_tlcd_set_flag(): c2a_enum.Tlm_CODE_HK, ) tlm_HK, rec_time = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) - assert tlm_HK["HK.OBC_TLC_GS.SOE_FLAG"] == "DIS" + assert tlm_HK["HK.OBC.TLC_GS.SOE_FLAG"] == "DIS" # TL_GS の LOUT flag チェック assert "SUC" == wings.util.send_rt_cmd_and_confirm( @@ -70,7 +70,7 @@ def test_tlcd_set_flag(): c2a_enum.Tlm_CODE_HK, ) tlm_HK, rec_time = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) - assert tlm_HK["HK.OBC_TLC_GS.LOCKOUT_FLAG"] == "YES" + assert tlm_HK["HK.OBC.TLC_GS.LOCKOUT_FLAG"] == "YES" assert "SUC" == wings.util.send_rt_cmd_and_confirm( ope, c2a_enum.Cmd_CODE_TLCD_SET_LOUT_FLAG, @@ -78,7 +78,7 @@ def test_tlcd_set_flag(): c2a_enum.Tlm_CODE_HK, ) tlm_HK, rec_time = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) - assert tlm_HK["HK.OBC_TLC_GS.LOCKOUT_FLAG"] == "NO" + assert tlm_HK["HK.OBC.TLC_GS.LOCKOUT_FLAG"] == "NO" # TL_MIS の SOE flag チェック assert "SUC" == wings.util.send_rt_cmd_and_confirm( @@ -88,7 +88,7 @@ def test_tlcd_set_flag(): c2a_enum.Tlm_CODE_HK, ) tlm_HK, rec_time = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) - assert tlm_HK["HK.OBC_TLC_MIS.SOE_FLAG"] == "ENA" + assert tlm_HK["HK.OBC.TLC_MIS.SOE_FLAG"] == "ENA" assert "SUC" == wings.util.send_rt_cmd_and_confirm( ope, c2a_enum.Cmd_CODE_TLCD_SET_SOE_FLAG, @@ -96,7 +96,7 @@ def test_tlcd_set_flag(): c2a_enum.Tlm_CODE_HK, ) tlm_HK, rec_time = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) - assert tlm_HK["HK.OBC_TLC_MIS.SOE_FLAG"] == "DIS" + assert tlm_HK["HK.OBC.TLC_MIS.SOE_FLAG"] == "DIS" # TL_MIS の LOUT flag チェック assert "SUC" == wings.util.send_rt_cmd_and_confirm( @@ -106,7 +106,7 @@ def test_tlcd_set_flag(): c2a_enum.Tlm_CODE_HK, ) tlm_HK, rec_time = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) - assert tlm_HK["HK.OBC_TLC_MIS.LOCKOUT_FLAG"] == "YES" + assert tlm_HK["HK.OBC.TLC_MIS.LOCKOUT_FLAG"] == "YES" assert "SUC" == wings.util.send_rt_cmd_and_confirm( ope, c2a_enum.Cmd_CODE_TLCD_SET_LOUT_FLAG, @@ -114,7 +114,7 @@ def test_tlcd_set_flag(): c2a_enum.Tlm_CODE_HK, ) tlm_HK, rec_time = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) - assert tlm_HK["HK.OBC_TLC_MIS.LOCKOUT_FLAG"] == "NO" + assert tlm_HK["HK.OBC.TLC_MIS.LOCKOUT_FLAG"] == "NO" @pytest.mark.sils @@ -161,7 +161,6 @@ def test_tlcd_set_id_and_page_for_tlm(): @pytest.mark.sils @pytest.mark.real def test_tlcd_send_and_clear_tl(): - clear_tl_gs_and_tl_mis() tlm_TL = wings.util.generate_and_receive_tlm( diff --git a/Examples/minimum_user/src/src_user/Test/test/src_core/System/AnomalyLogger/test_anomaly_logger.py b/Examples/minimum_user/src/src_user/Test/test/src_core/System/AnomalyLogger/test_anomaly_logger.py deleted file mode 100644 index f51a71b71..000000000 --- a/Examples/minimum_user/src/src_user/Test/test/src_core/System/AnomalyLogger/test_anomaly_logger.py +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- - -import os -import sys - -# import time - -# import isslwings as wings -import pytest - -ROOT_PATH = "../../../../" -sys.path.append(os.path.dirname(__file__) + "/" + ROOT_PATH + "utils") -import c2a_enum_utils -import wings_utils - -c2a_enum = c2a_enum_utils.get_c2a_enum() -ope = wings_utils.get_wings_operation() - - -# 現在 AL は deprecated (後継は EL) なので,一旦コメントアウト - - -# 他をコメントアウトしてると, pytest がコケるので -@pytest.mark.sils -@pytest.mark.real -def test_al_nop(): - pass - - -# @pytest.mark.sils -# @pytest.mark.real -# def test_al_add_anomaly(): -# tlm_HK = wings.util.generate_and_receive_tlm( -# ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_HK -# ) -# al_counter = tlm_HK["HK.ANOMALY_MOBC_AL_COUNTER"] - -# wings.util.send_cmd_and_confirm( -# ope, c2a_enum.Cmd_CODE_AL_ADD_ANOMALY, (100, 1), c2a_enum.Tlm_CODE_HK -# ) -# tlm_HK = wings.util.generate_and_receive_tlm( -# ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_HK -# ) -# assert tlm_HK["HK.ANOMALY_MOBC_AL_COUNTER"] == al_counter + 1 -# assert tlm_HK["HK.ANOMALY_MOBC_AL_LATEST_CODE_GROUP"] == 100 -# assert tlm_HK["HK.ANOMALY_MOBC_AL_LATEST_CODE_LOCAL"] == 1 - - -# @pytest.mark.sils -# @pytest.mark.real -# def test_al_clear_list(): -# wings.util.send_cmd_and_confirm( -# ope, c2a_enum.Cmd_CODE_AL_ADD_ANOMALY, (100, 1), c2a_enum.Tlm_CODE_HK -# ) -# tlm_HK = wings.util.generate_and_receive_tlm( -# ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_HK -# ) -# assert tlm_HK["HK.ANOMALY_MOBC_AL_COUNTER"] != 0 -# assert tlm_HK["HK.ANOMALY_MOBC_AL_LATEST_CODE_GROUP"] == 100 -# assert tlm_HK["HK.ANOMALY_MOBC_AL_LATEST_CODE_LOCAL"] == 1 - -# wings.util.send_cmd_and_confirm( -# ope, c2a_enum.Cmd_CODE_AL_CLEAR_LIST, (), c2a_enum.Tlm_CODE_HK -# ) -# tlm_HK = wings.util.generate_and_receive_tlm( -# ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_HK -# ) -# assert tlm_HK["HK.ANOMALY_MOBC_AL_COUNTER"] == 0 -# assert tlm_HK["HK.ANOMALY_MOBC_AL_LATEST_CODE_GROUP"] == 0 -# assert tlm_HK["HK.ANOMALY_MOBC_AL_LATEST_CODE_LOCAL"] == 0 - - -# @pytest.mark.sils -# @pytest.mark.real -# def test_al_set_page_for_tlm(): -# wings.util.send_cmd_and_confirm( -# ope, c2a_enum.Cmd_CODE_AL_CLEAR_LIST, (), c2a_enum.Tlm_CODE_HK -# ) -# tlm_AL = wings.util.generate_and_receive_tlm( -# ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_AL -# ) -# assert tlm_AL["AL.COUNTER_AL"] == 0 -# assert tlm_AL["AL.PAGE_NO"] == 0 -# assert tlm_AL["AL.RECORD0_CODE_GROUP"] == 0 -# assert tlm_AL["AL.RECORD0_CODE_LOCAL"] == 0 - -# wings.util.send_cmd_and_confirm( -# ope, c2a_enum.Cmd_CODE_AL_SET_PAGE_FOR_TLM, (1,), c2a_enum.Tlm_CODE_HK -# ) -# tlm_AL = wings.util.generate_and_receive_tlm( -# ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_AL -# ) -# assert tlm_AL["AL.COUNTER_AL"] == 0 -# assert tlm_AL["AL.PAGE_NO"] == 1 -# assert tlm_AL["AL.RECORD0_CODE_GROUP"] == 0 -# assert tlm_AL["AL.RECORD0_CODE_LOCAL"] == 0 - -# for i in range(33): -# ope.send_rt_cmd(c2a_enum.Cmd_CODE_AL_ADD_ANOMALY, (100 + i, 0)) -# time.sleep(0.5) - -# tlm_AL = wings.util.generate_and_receive_tlm( -# ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_AL -# ) -# assert tlm_AL["AL.COUNTER_AL"] == 33 -# assert tlm_AL["AL.PAGE_NO"] == 1 -# assert tlm_AL["AL.RECORD0_CODE_GROUP"] == 132 -# assert tlm_AL["AL.RECORD0_CODE_LOCAL"] == 0 - - -# @pytest.mark.sils -# @pytest.mark.real -# def test_al_enable_disable_logging(): -# tlm_AL = wings.util.generate_and_receive_tlm( -# ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_AL -# ) -# assert tlm_AL["AL.IS_LOGGING_ENABLE0"] == 255 - -# wings.util.send_cmd_and_confirm( -# ope, c2a_enum.Cmd_CODE_AL_DISABLE_LOGGING, (0,), c2a_enum.Tlm_CODE_HK -# ) -# tlm_AL = wings.util.generate_and_receive_tlm( -# ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_AL -# ) -# assert tlm_AL["AL.IS_LOGGING_ENABLE0"] == 127 # 0b0111111 - -# wings.util.send_cmd_and_confirm( -# ope, c2a_enum.Cmd_CODE_AL_ENABLE_LOGGING, (0,), c2a_enum.Tlm_CODE_HK -# ) -# tlm_AL = wings.util.generate_and_receive_tlm( -# ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_AL -# ) -# assert tlm_AL["AL.IS_LOGGING_ENABLE0"] == 255 # 0b11111111 - - -# @pytest.mark.sils -# @pytest.mark.real -# def test_al_init_logging_ena_flag(): -# wings.util.send_cmd_and_confirm( -# ope, c2a_enum.Cmd_CODE_AL_DISABLE_LOGGING, (0,), c2a_enum.Tlm_CODE_HK -# ) -# tlm_AL = wings.util.generate_and_receive_tlm( -# ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_AL -# ) -# assert tlm_AL["AL.IS_LOGGING_ENABLE0"] == 127 # 0b0111111 - - -# @pytest.mark.sils -# @pytest.mark.real -# def test_al_set_thres_of_nearly_full(): -# wings.util.send_cmd_and_confirm( -# ope, c2a_enum.Cmd_CODE_AL_SET_THRES_OF_NEARLY_FULL, (100,), c2a_enum.Tlm_CODE_HK -# ) -# tlm_AL = wings.util.generate_and_receive_tlm( -# ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_AL -# ) -# assert tlm_AL["AL.THRES_OF_NEARLY_FULL"] == 100 - -# wings.util.send_cmd_and_confirm( -# ope, c2a_enum.Cmd_CODE_AL_INIT_LOGGING_ENA_FLAG, (), c2a_enum.Tlm_CODE_HK -# ) -# tlm_AL = wings.util.generate_and_receive_tlm( -# ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_AL -# ) -# assert tlm_AL["AL.IS_LOGGING_ENABLE0"] == 255 # 0b11111111 - - -if __name__ == "__main__": - pass diff --git a/Examples/minimum_user/src/src_user/Test/test/src_core/System/EventManager/test_event_logger.py b/Examples/minimum_user/src/src_user/Test/test/src_core/System/EventManager/test_event_logger.py index d217a6198..704442ae4 100644 --- a/Examples/minimum_user/src/src_user/Test/test/src_core/System/EventManager/test_event_logger.py +++ b/Examples/minimum_user/src/src_user/Test/test/src_core/System/EventManager/test_event_logger.py @@ -760,7 +760,14 @@ def initialize_el(): ret = wings.util.send_rt_cmd_and_confirm( ope, c2a_enum.Cmd_CODE_EL_DISABLE_LOGGING, - (c2a_enum.EL_CORE_GROUP_CDIS_EXEC_ERR,), + (c2a_enum.EL_CORE_GROUP_CDIS_EXEC_ERR_STS,), + c2a_enum.Tlm_CODE_HK, + ) + assert ret == "SUC" + ret = wings.util.send_rt_cmd_and_confirm( + ope, + c2a_enum.Cmd_CODE_EL_DISABLE_LOGGING, + (c2a_enum.EL_CORE_GROUP_CDIS_EXEC_ERR_CODE,), c2a_enum.Tlm_CODE_HK, ) assert ret == "SUC" diff --git a/Examples/minimum_user/src/src_user/Test/test/src_core/System/ModeManager/test_mode_manager.py b/Examples/minimum_user/src/src_user/Test/test/src_core/System/ModeManager/test_mode_manager.py index f50fe0a09..0e86aa7b5 100644 --- a/Examples/minimum_user/src/src_user/Test/test/src_core/System/ModeManager/test_mode_manager.py +++ b/Examples/minimum_user/src/src_user/Test/test/src_core/System/ModeManager/test_mode_manager.py @@ -47,7 +47,7 @@ def test_mm_nop(): # c2a_enum.Tlm_CODE_HK, # ) # tlm_HK, _ = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) -# assert tlm_HK["HK.OBC_GS_CMD_LAST_EXEC_STS"] == "" +# assert tlm_HK["HK.OBC.GS_CMD.LAST_EXEC.EXEC_STS"] == "" # # ===== 範囲外のブロックコマンド ===== # wings.util.send_cmd_and_confirm( @@ -57,7 +57,7 @@ def test_mm_nop(): # c2a_enum.Tlm_CODE_HK, # ) # tlm_HK, _ = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) -# assert tlm_HK["HK.OBC_GS_CMD_LAST_EXEC_STS"] == "ERR" +# assert tlm_HK["HK.OBC.GS_CMD.LAST_EXEC.EXEC_STS"] == "ERR" # # ===== 無効化されているブロックコマンド ===== # wings.util.send_cmd_and_confirm( @@ -73,7 +73,7 @@ def test_mm_nop(): # c2a_enum.Tlm_CODE_HK, # ) # tlm_HK, _ = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) -# assert tlm_HK["HK.OBC_GS_CMD_LAST_EXEC_STS"] == "ERR" +# assert tlm_HK["HK.OBC.GS_CMD.LAST_EXEC.EXEC_STS"] == "ERR" # # ===== 成功 ===== # wings.util.send_cmd_and_confirm( @@ -89,7 +89,7 @@ def test_mm_nop(): # c2a_enum.Tlm_CODE_HK, # ) # tlm_HK, _ = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) -# assert tlm_HK["HK.OBC_GS_CMD_LAST_EXEC_STS"] == "SUC" +# assert tlm_HK["HK.OBC.GS_CMD.LAST_EXEC.EXEC_STS"] == "SUC" # tlm_MM = wings.util.generate_and_receive_tlm( # ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_MM @@ -114,7 +114,7 @@ def test_mm_nop(): # c2a_enum.Tlm_CODE_HK, # ) # tlm_HK, _ = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) -# assert tlm_HK["HK.OBC_GS_CMD_LAST_EXEC_STS"] == "ERR" +# assert tlm_HK["HK.OBC.GS_CMD.LAST_EXEC.EXEC_STS"] == "ERR" # wings.util.send_cmd_and_confirm( # ope, @@ -123,7 +123,7 @@ def test_mm_nop(): # c2a_enum.Tlm_CODE_HK, # ) # tlm_HK, _ = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) -# assert tlm_HK["HK.OBC_GS_CMD_LAST_EXEC_STS"] == "ERR" +# assert tlm_HK["HK.OBC.GS_CMD.LAST_EXEC.EXEC_STS"] == "ERR" # # ===== 範囲外のブロックコマンド ===== # wings.util.send_cmd_and_confirm( @@ -133,7 +133,7 @@ def test_mm_nop(): # c2a_enum.Tlm_CODE_HK, # ) # tlm_HK, _ = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) -# assert tlm_HK["HK.OBC_GS_CMD_LAST_EXEC_STS"] == "ERR" +# assert tlm_HK["HK.OBC.GS_CMD.LAST_EXEC.EXEC_STS"] == "ERR" # # ===== 無効化されているブロックコマンド ===== # wings.util.send_cmd_and_confirm( @@ -149,7 +149,7 @@ def test_mm_nop(): # c2a_enum.Tlm_CODE_HK, # ) # tlm_HK, _ = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) -# assert tlm_HK["HK.OBC_GS_CMD_LAST_EXEC_STS"] == "ERR" +# assert tlm_HK["HK.OBC.GS_CMD.LAST_EXEC.EXEC_STS"] == "ERR" # # ===== 成功 ===== # wings.util.send_cmd_and_confirm( @@ -165,7 +165,7 @@ def test_mm_nop(): # c2a_enum.Tlm_CODE_HK, # ) # tlm_HK, _ = ope.get_latest_tlm(c2a_enum.Tlm_CODE_HK) -# assert tlm_HK["HK.OBC_GS_CMD_LAST_EXEC_STS"] == "SUC" +# assert tlm_HK["HK.OBC.GS_CMD.LAST_EXEC.EXEC_STS"] == "SUC" # tlm_MM = wings.util.generate_and_receive_tlm( # ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_MM @@ -196,7 +196,7 @@ def test_mm_nop(): # tlm_HK = wings.util.generate_and_receive_tlm( # ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_HK # ) -# assert tlm_HK["HK.OBC_GS_CMD_LAST_EXEC_STS"] == "ERR" +# assert tlm_HK["HK.OBC.GS_CMD.LAST_EXEC.EXEC_STS"] == "ERR" # # ===== 存在しないモード遷移 ===== # wings.util.send_cmd_and_confirm( @@ -208,7 +208,7 @@ def test_mm_nop(): # tlm_HK = wings.util.generate_and_receive_tlm( # ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_HK # ) -# assert tlm_HK["HK.OBC_GS_CMD_LAST_EXEC_STS"] == "ERR" +# assert tlm_HK["HK.OBC.GS_CMD.LAST_EXEC.EXEC_STS"] == "ERR" # # ===== 成功 ===== # wings.util.send_cmd_and_confirm( @@ -232,15 +232,15 @@ def test_mm_nop(): # tlm_HK = wings.util.generate_and_receive_tlm( # ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_HK # ) -# assert tlm_HK["HK.OBC_GS_CMD_LAST_EXEC_STS"] == "SUC" -# assert tlm_HK["HK.OBC_MM_OPSMODE"] == "RESERVE_3" -# assert tlm_HK["HK.OBC_MM_STS"] == "PROGRESS:G" +# assert tlm_HK["HK.OBC.GS_CMD.LAST_EXEC.EXEC_STS"] == "SUC" +# assert tlm_HK["HK.OBC.MM_OPSMODE"] == "RESERVE_3" +# assert tlm_HK["HK.OBC.MM_STS"] == "PROGRESS:G" # time.sleep(5) # tlm_HK = wings.util.generate_and_receive_tlm( # ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_HK # ) -# assert tlm_HK["HK.OBC_MM_STS"] == "FINISHED" +# assert tlm_HK["HK.OBC.MM_STS"] == "FINISHED" # # ===== 後処理 ===== # wings.util.send_cmd_and_confirm( @@ -258,15 +258,15 @@ def test_mm_nop(): # tlm_HK = wings.util.generate_and_receive_tlm( # ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_HK # ) -# assert tlm_HK["HK.OBC_GS_CMD_LAST_EXEC_STS"] == "SUC" -# assert tlm_HK["HK.OBC_MM_OPSMODE"] == "INITIAL" -# assert tlm_HK["HK.OBC_MM_STS"] == "PROGRESS:G" +# assert tlm_HK["HK.OBC.GS_CMD.LAST_EXEC.EXEC_STS"] == "SUC" +# assert tlm_HK["HK.OBC.MM_OPSMODE"] == "INITIAL" +# assert tlm_HK["HK.OBC.MM_STS"] == "PROGRESS:G" # time.sleep(5) # tlm_HK = wings.util.generate_and_receive_tlm( # ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_HK # ) -# assert tlm_HK["HK.OBC_MM_STS"] == "FINISHED" +# assert tlm_HK["HK.OBC.MM_STS"] == "FINISHED" # wings.util.send_cmd_and_confirm( # ope, @@ -277,7 +277,7 @@ def test_mm_nop(): # tlm_HK = wings.util.generate_and_receive_tlm( # ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_HK # ) -# assert tlm_HK["HK.OBC_GS_CMD_LAST_EXEC_STS"] == "SUC" +# assert tlm_HK["HK.OBC.GS_CMD.LAST_EXEC.EXEC_STS"] == "SUC" # wings.util.send_cmd_and_confirm( # ope, # c2a_enum.Cmd_CODE_MM_SET_TRANSITION_TABLE, @@ -287,7 +287,7 @@ def test_mm_nop(): # tlm_HK = wings.util.generate_and_receive_tlm( # ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_HK # ) -# assert tlm_HK["HK.OBC_GS_CMD_LAST_EXEC_STS"] == "SUC" +# assert tlm_HK["HK.OBC.GS_CMD.LAST_EXEC.EXEC_STS"] == "SUC" # @pytest.mark.sils diff --git a/Examples/minimum_user/src/src_user/Test/test/src_core/System/TimeManager/test_time_manager.py b/Examples/minimum_user/src/src_user/Test/test/src_core/System/TimeManager/test_time_manager.py index e96d2a321..5c07e4765 100644 --- a/Examples/minimum_user/src/src_user/Test/test/src_core/System/TimeManager/test_time_manager.py +++ b/Examples/minimum_user/src/src_user/Test/test/src_core/System/TimeManager/test_time_manager.py @@ -28,7 +28,6 @@ @pytest.mark.sils @pytest.mark.real def test_tmgr_set_time(): - assert "PRM" == wings.util.send_rt_cmd_and_confirm( ope, c2a_enum.Cmd_CODE_TMGR_SET_TIME, (0xFFFFFFFF,), c2a_enum.Tlm_CODE_HK ) @@ -52,7 +51,6 @@ def test_tmgr_set_time(): @pytest.mark.sils @pytest.mark.real def test_tmgr_set_unixtime(): - # unixtime_at_ti0 を current_unixtime とランダムな TI で更新 current_unixtime = time.time() ti = random.randrange(1000) @@ -72,8 +70,8 @@ def test_tmgr_set_unixtime(): - (ti / OBCT_CYCLES_PER_SEC) - (step / OBCT_CYCLES_PER_SEC / OBCT_STEPS_PER_CYCLE) ) - assert tlm_HK["HK.OBC_TM_UNIXTIME_AT_TI0"] < unixtime_at_ti0 + OBCT_STEP_IN_MSEC / 1000 - assert tlm_HK["HK.OBC_TM_UNIXTIME_AT_TI0"] > unixtime_at_ti0 - OBCT_STEP_IN_MSEC / 1000 + assert tlm_HK["HK.OBC.TM_UNIXTIME_AT_TI0"] < unixtime_at_ti0 + OBCT_STEP_IN_MSEC / 1000 + assert tlm_HK["HK.OBC.TM_UNIXTIME_AT_TI0"] > unixtime_at_ti0 - OBCT_STEP_IN_MSEC / 1000 # unixtime_at_ti0 < ti ではコマンドが通らないことを確認 assert "PRM" == wings.util.send_rt_cmd_and_confirm( @@ -87,7 +85,6 @@ def test_tmgr_set_unixtime(): @pytest.mark.sils @pytest.mark.real def test_tmgr_set_utl_unixtime_epoch(): - # 負の値ではコマンドが通らないことを確認 assert "PRM" == wings.util.send_rt_cmd_and_confirm( ope, c2a_enum.Cmd_CODE_TMGR_SET_UTL_UNIXTIME_EPOCH, (-10.0,), c2a_enum.Tlm_CODE_HK @@ -108,7 +105,6 @@ def test_tmgr_set_utl_unixtime_epoch(): @pytest.mark.sils @pytest.mark.real def test_tmgr_set_and_reset_cycle_correction(): - # 負の値ではコマンドが通らないことを確認 assert "PRM" == wings.util.send_rt_cmd_and_confirm( ope, c2a_enum.Cmd_CODE_TMGR_SET_CYCLE_CORRECTION, (-0.5,), c2a_enum.Tlm_CODE_HK diff --git a/Examples/minimum_user/src/src_user/Test/test/src_core/TlmCmd/test_block_command_loader.py b/Examples/minimum_user/src/src_user/Test/test/src_core/TlmCmd/test_block_command_loader.py index 312718aeb..9c732705a 100644 --- a/Examples/minimum_user/src/src_user/Test/test/src_core/TlmCmd/test_block_command_loader.py +++ b/Examples/minimum_user/src/src_user/Test/test/src_core/TlmCmd/test_block_command_loader.py @@ -34,7 +34,6 @@ @pytest.mark.sils @pytest.mark.real def test_bcl_prepare_param(): - # BC_TEST_BCL を BLテレメに降ろしてくる assert "SUC" == wings.util.send_rt_cmd_and_confirm( ope, diff --git a/Examples/minimum_user/src/src_user/Test/test/src_core/TlmCmd/test_command_dispatcher.py b/Examples/minimum_user/src/src_user/Test/test/src_core/TlmCmd/test_command_dispatcher.py index 42e7b76f4..a363ec4fc 100644 --- a/Examples/minimum_user/src/src_user/Test/test/src_core/TlmCmd/test_command_dispatcher.py +++ b/Examples/minimum_user/src/src_user/Test/test/src_core/TlmCmd/test_command_dispatcher.py @@ -23,7 +23,22 @@ @pytest.mark.sils @pytest.mark.real def test_cdis_exec_err(): + # === 以下の4つを無効パラメタでコマンド登録する + # RT Cmd_CODE_TMGR_UPDATE_UNIXTIME + # RT Cmd_CODE_AM_SET_PAGE_FOR_TLM + # TL Cmd_CODE_TMGR_UPDATE_UNIXTIME + # TL Cmd_CODE_AM_SET_PAGE_FOR_TLM + check_cdis_exec_err(c2a_enum.Cmd_CODE_TMGR_UPDATE_UNIXTIME, (-10, 0, 0)) + check_cdis_exec_err(c2a_enum.Cmd_CODE_AM_SET_PAGE_FOR_TLM, (AM_TLM_PAGE_MAX + 100,)) + + # === 最後にもう一度初期化 + assert "SUC" == wings.util.send_rt_cmd_and_confirm( + ope, c2a_enum.Cmd_CODE_EL_INIT, (), c2a_enum.Tlm_CODE_HK + ) + + +def check_cdis_exec_err(cmd_id, params): # === ELの初期化 assert "SUC" == wings.util.send_rt_cmd_and_confirm( ope, c2a_enum.Cmd_CODE_EL_INIT, (), c2a_enum.Tlm_CODE_HK @@ -33,54 +48,42 @@ def test_cdis_exec_err(): ) ti_now = tlm_EL["EL.SH.TI"] - # === 以下の4つを無効パラメタでコマンド登録する - # RT Cmd_CODE_TMGR_UPDATE_UNIXTIME - # RT Cmd_CODE_AM_SET_PAGE_FOR_TLM - # TL Cmd_CODE_TMGR_UPDATE_UNIXTIME - # TL Cmd_CODE_AM_SET_PAGE_FOR_TLM - assert "PRM" == wings.util.send_rt_cmd_and_confirm( - ope, c2a_enum.Cmd_CODE_TMGR_UPDATE_UNIXTIME, (-10, 0, 0), c2a_enum.Tlm_CODE_HK - ) - assert "PRM" == wings.util.send_rt_cmd_and_confirm( - ope, - c2a_enum.Cmd_CODE_AM_SET_PAGE_FOR_TLM, - (AM_TLM_PAGE_MAX + 100,), - c2a_enum.Tlm_CODE_HK, - ) - wings.util.send_tl_cmd(ope, ti_now + 50, c2a_enum.Cmd_CODE_TMGR_UPDATE_UNIXTIME, (-10, 0, 0)) - wings.util.send_tl_cmd( - ope, ti_now + 55, c2a_enum.Cmd_CODE_AM_SET_PAGE_FOR_TLM, (AM_TLM_PAGE_MAX + 100,) + # === 引数が不正な コマンドチェック + assert "PRM" == wings.util.send_rt_cmd_and_confirm(ope, cmd_id, params, c2a_enum.Tlm_CODE_HK) + wings.util.send_tl_cmd(ope, ti_now + 30, cmd_id, params) + time.sleep(3) + + # === ELのチェック + tlm_EL = wings.util.generate_and_receive_tlm( + ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_EL ) - time.sleep(5) # === ELのチェック tlm_EL = wings.util.generate_and_receive_tlm( ope, c2a_enum.Cmd_CODE_GENERATE_TLM, c2a_enum.Tlm_CODE_EL ) + # GS_cmd_dispatcher - assert tlm_EL["EL.TLOGS.LOW.EVENTS3.GROUP"] == c2a_enum.EL_CORE_GROUP_CDIS_EXEC_ERR - assert tlm_EL["EL.TLOGS.LOW.EVENTS2.GROUP"] == c2a_enum.EL_CORE_GROUP_CDIS_EXEC_ERR + assert tlm_EL["EL.TLOGS.LOW.EVENTS3.GROUP"] == c2a_enum.EL_CORE_GROUP_CDIS_EXEC_ERR_CODE + assert tlm_EL["EL.TLOGS.LOW.EVENTS3.NOTE"] == 0 + assert tlm_EL["EL.TLOGS.LOW.EVENTS2.GROUP"] == c2a_enum.EL_CORE_GROUP_CDIS_EXEC_ERR_STS + assert ( + tlm_EL["EL.TLOGS.LOW.EVENTS2.NOTE"] == (cmd_id << 16) | c2a_enum.CCP_EXEC_ILLEGAL_PARAMETER + ) assert tlm_EL["EL.TLOGS.LOW.EVENTS3.LOCAL"] == tlm_EL["EL.TLOGS.LOW.EVENTS2.LOCAL"] - note = (c2a_enum.Cmd_CODE_TMGR_UPDATE_UNIXTIME << 16) | c2a_enum.CCP_EXEC_ILLEGAL_PARAMETER - assert tlm_EL["EL.TLOGS.LOW.EVENTS3.NOTE"] == note - note = (c2a_enum.Cmd_CODE_AM_SET_PAGE_FOR_TLM << 16) | c2a_enum.CCP_EXEC_ILLEGAL_PARAMETER - assert tlm_EL["EL.TLOGS.LOW.EVENTS2.NOTE"] == note + # TL_cmd_dispatcher - assert tlm_EL["EL.TLOGS.LOW.EVENTS1.GROUP"] == c2a_enum.EL_CORE_GROUP_CDIS_EXEC_ERR - assert tlm_EL["EL.TLOGS.LOW.EVENTS0.GROUP"] == c2a_enum.EL_CORE_GROUP_CDIS_EXEC_ERR + assert tlm_EL["EL.TLOGS.LOW.EVENTS1.GROUP"] == c2a_enum.EL_CORE_GROUP_CDIS_EXEC_ERR_CODE + assert tlm_EL["EL.TLOGS.LOW.EVENTS1.NOTE"] == 0 + assert tlm_EL["EL.TLOGS.LOW.EVENTS0.GROUP"] == c2a_enum.EL_CORE_GROUP_CDIS_EXEC_ERR_STS + assert ( + tlm_EL["EL.TLOGS.LOW.EVENTS0.NOTE"] == (cmd_id << 16) | c2a_enum.CCP_EXEC_ILLEGAL_PARAMETER + ) assert tlm_EL["EL.TLOGS.LOW.EVENTS1.LOCAL"] == tlm_EL["EL.TLOGS.LOW.EVENTS0.LOCAL"] - note = (c2a_enum.Cmd_CODE_TMGR_UPDATE_UNIXTIME << 16) | c2a_enum.CCP_EXEC_ILLEGAL_PARAMETER - assert tlm_EL["EL.TLOGS.LOW.EVENTS1.NOTE"] == note - note = (c2a_enum.Cmd_CODE_AM_SET_PAGE_FOR_TLM << 16) | c2a_enum.CCP_EXEC_ILLEGAL_PARAMETER - assert tlm_EL["EL.TLOGS.LOW.EVENTS0.NOTE"] == note + # GSとTLをlocalで区別できているか assert tlm_EL["EL.TLOGS.LOW.EVENTS1.LOCAL"] != tlm_EL["EL.TLOGS.LOW.EVENTS3.LOCAL"] - # === 最後にもう一度初期化 - assert "SUC" == wings.util.send_rt_cmd_and_confirm( - ope, c2a_enum.Cmd_CODE_EL_INIT, (), c2a_enum.Tlm_CODE_HK - ) - if __name__ == "__main__": test_cdis_exec_err() diff --git a/Examples/minimum_user/src/src_user/Test/utils/wings_utils.py b/Examples/minimum_user/src/src_user/Test/utils/wings_utils.py index 82f4338e8..14ecfeab7 100644 --- a/Examples/minimum_user/src/src_user/Test/utils/wings_utils.py +++ b/Examples/minimum_user/src/src_user/Test/utils/wings_utils.py @@ -1,21 +1,7 @@ #!/usr/bin/env python3 # -*- coding: utf-8 -*- -import json -import os import isslwings as wings def get_wings_operation(): - authorization = dict( - client_id=os.environ.get("WINGS_CLIENT_ID"), - client_secret=os.environ.get("WINGS_CLIENT_SECRET"), - grant_type=os.environ.get("WINGS_GRANT_TYPE"), - username=os.environ.get("WINGS_USERNAME"), - password=os.environ.get("WINGS_PASSWORD"), - ) - - # 環境変数があればそちらを優先 - if None in authorization.values(): - with open(os.path.dirname(__file__) + "/../authorization.json") as f: - authorization = json.load(f) - return wings.Operation(authentication_info=authorization) + return wings.Operation() diff --git a/Examples/minimum_user/src/src_user/TlmCmd/Ccsds/m_pdu.h b/Examples/minimum_user/src/src_user/TlmCmd/Ccsds/m_pdu.h index c27c7a95c..4dc706687 100644 --- a/Examples/minimum_user/src/src_user/TlmCmd/Ccsds/m_pdu.h +++ b/Examples/minimum_user/src/src_user/TlmCmd/Ccsds/m_pdu.h @@ -2,9 +2,8 @@ #define M_PDU_H_ -#include "stddef.h" - -#include "../../Library/stdint.h" +#include +#include #define M_PDU_HEADER_SIZE (2u) diff --git a/Examples/minimum_user/src/src_user/TlmCmd/Ccsds/tc_segment.h b/Examples/minimum_user/src/src_user/TlmCmd/Ccsds/tc_segment.h index 0ba52404e..fad283615 100644 --- a/Examples/minimum_user/src/src_user/TlmCmd/Ccsds/tc_segment.h +++ b/Examples/minimum_user/src/src_user/TlmCmd/Ccsds/tc_segment.h @@ -19,7 +19,7 @@ #ifndef TC_SEGMENT_H_ #define TC_SEGMENT_H_ -#include "../../Library/stdint.h" +#include #include #include diff --git a/Examples/minimum_user/src/src_user/TlmCmd/Ccsds/tc_transfer_frame.h b/Examples/minimum_user/src/src_user/TlmCmd/Ccsds/tc_transfer_frame.h index 629ca2786..e16667f9e 100644 --- a/Examples/minimum_user/src/src_user/TlmCmd/Ccsds/tc_transfer_frame.h +++ b/Examples/minimum_user/src/src_user/TlmCmd/Ccsds/tc_transfer_frame.h @@ -29,8 +29,8 @@ #define TC_TRANSFER_FRAME_H_ #include +#include -#include "../../Library/stdint.h" #include "tc_segment.h" #define TCTF_MAX_LEN (1024) diff --git a/Examples/minimum_user/src/src_user/TlmCmd/Ccsds/vcdu.c b/Examples/minimum_user/src/src_user/TlmCmd/Ccsds/vcdu.c index d187f6183..f50924980 100644 --- a/Examples/minimum_user/src/src_user/TlmCmd/Ccsds/vcdu.c +++ b/Examples/minimum_user/src/src_user/TlmCmd/Ccsds/vcdu.c @@ -37,6 +37,7 @@ 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); } diff --git a/Examples/minimum_user/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_start_hk_tlm.c b/Examples/minimum_user/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_start_hk_tlm.c index 7509c6461..32c7f8ecb 100644 --- a/Examples/minimum_user/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_start_hk_tlm.c +++ b/Examples/minimum_user/src/src_user/TlmCmd/NormalBlockCommandDefinition/nbc_start_hk_tlm.c @@ -5,7 +5,7 @@ #include "../command_definitions.h" #include "../telemetry_definitions.h" -#include +#include #include diff --git a/Examples/minimum_user/src/src_user/TlmCmd/block_command_definitions.h b/Examples/minimum_user/src/src_user/TlmCmd/block_command_definitions.h index 860a46e11..c599608b4 100644 --- a/Examples/minimum_user/src/src_user/TlmCmd/block_command_definitions.h +++ b/Examples/minimum_user/src/src_user/TlmCmd/block_command_definitions.h @@ -29,7 +29,7 @@ typedef enum // ==== 各系領域 ==== // ./C2A/TlmCmd/NormalBlockCommandDefinition/で定義 - // アノマリハンドラはBC_AH_など,接頭辞を適切につけること! + // イベントハンドラはBC_EH_など,接頭辞を適切につけること! // CDH:60-79 BC_HK_CYCLIC_TLM = 60, diff --git a/Examples/minimum_user/src/src_user/TlmCmd/command_definitions.c b/Examples/minimum_user/src/src_user/TlmCmd/command_definitions.c index 6e70e8789..6639c5e0e 100644 --- a/Examples/minimum_user/src/src_user/TlmCmd/command_definitions.c +++ b/Examples/minimum_user/src/src_user/TlmCmd/command_definitions.c @@ -58,20 +58,6 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_MEM_LOAD].cmd_func = Cmd_MEM_LOAD; cmd_table[Cmd_CODE_MEM_SET_DESTINATION].cmd_func = Cmd_MEM_SET_DESTINATION; cmd_table[Cmd_CODE_MEM_COPY_REGION_SEQ].cmd_func = Cmd_MEM_COPY_REGION_SEQ; - cmd_table[Cmd_CODE_AL_ADD_ANOMALY].cmd_func = Cmd_AL_ADD_ANOMALY; - cmd_table[Cmd_CODE_AL_CLEAR_LIST].cmd_func = Cmd_AL_CLEAR_LIST; - cmd_table[Cmd_CODE_AL_SET_PAGE_FOR_TLM].cmd_func = Cmd_AL_SET_PAGE_FOR_TLM; - cmd_table[Cmd_CODE_AL_INIT_LOGGING_ENA_FLAG].cmd_func = Cmd_AL_INIT_LOGGING_ENA_FLAG; - cmd_table[Cmd_CODE_AL_ENABLE_LOGGING].cmd_func = Cmd_AL_ENABLE_LOGGING; - cmd_table[Cmd_CODE_AL_DISABLE_LOGGING].cmd_func = Cmd_AL_DISABLE_LOGGING; - cmd_table[Cmd_CODE_AL_SET_THRES_OF_NEARLY_FULL].cmd_func = Cmd_AL_SET_THRES_OF_NEARLY_FULL; - cmd_table[Cmd_CODE_AH_REGISTER_RULE].cmd_func = Cmd_AH_REGISTER_RULE; - cmd_table[Cmd_CODE_AH_ACTIVATE_RULE].cmd_func = Cmd_AH_ACTIVATE_RULE; - cmd_table[Cmd_CODE_AH_INACTIVATE_RULE].cmd_func = Cmd_AH_INACTIVATE_RULE; - cmd_table[Cmd_CODE_AH_CLEAR_LOG].cmd_func = Cmd_AH_CLEAR_LOG; - cmd_table[Cmd_CODE_AH_SET_PAGE_FOR_TLM].cmd_func = Cmd_AH_SET_PAGE_FOR_TLM; - cmd_table[Cmd_CODE_AHRES_LOG_CLEAR].cmd_func = Cmd_AHRES_LOG_CLEAR; - cmd_table[Cmd_CODE_AHRES_LOG_SET_PAGE_FOR_TLM].cmd_func = Cmd_AHRES_LOG_SET_PAGE_FOR_TLM; cmd_table[Cmd_CODE_EL_INIT].cmd_func = Cmd_EL_INIT; cmd_table[Cmd_CODE_EL_CLEAR_LOG_ALL].cmd_func = Cmd_EL_CLEAR_LOG_ALL; cmd_table[Cmd_CODE_EL_CLEAR_LOG_BY_ERR_LEVEL].cmd_func = Cmd_EL_CLEAR_LOG_BY_ERR_LEVEL; @@ -147,8 +133,6 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_DCU_CLEAR_LOG].cmd_func = Cmd_DCU_CLEAR_LOG; cmd_table[Cmd_CODE_TEST_CCP_REGISTER_TLC_ASAP].cmd_func = Cmd_TEST_CCP_REGISTER_TLC_ASAP; cmd_table[Cmd_CODE_TEST_CCP_GET_RAW_PARAM_INFO].cmd_func = Cmd_TEST_CCP_GET_RAW_PARAM_INFO; - cmd_table[Cmd_CODE_DI_GS_CCSDS_TX_START].cmd_func = Cmd_DI_GS_CCSDS_TX_START; - cmd_table[Cmd_CODE_DI_GS_CCSDS_TX_STOP].cmd_func = Cmd_DI_GS_CCSDS_TX_STOP; cmd_table[Cmd_CODE_DI_GS_DRIVER_RESET].cmd_func = Cmd_DI_GS_DRIVER_RESET; cmd_table[Cmd_CODE_DI_GS_SET_MS_FLUSH_INTERVAL].cmd_func = Cmd_DI_GS_SET_MS_FLUSH_INTERVAL; cmd_table[Cmd_CODE_DI_GS_SET_RP_FLUSH_INTERVAL].cmd_func = Cmd_DI_GS_SET_RP_FLUSH_INTERVAL; @@ -156,6 +140,8 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_DI_GS_SET_INFO].cmd_func = Cmd_DI_GS_SET_INFO; cmd_table[Cmd_CODE_DI_GS_CCSDS_GET_BUFFER].cmd_func = Cmd_DI_GS_CCSDS_GET_BUFFER; cmd_table[Cmd_CODE_DI_GS_CCSDS_SET_RATE].cmd_func = Cmd_DI_GS_CCSDS_SET_RATE; + cmd_table[Cmd_CODE_DI_GS_UART_TLM_ON].cmd_func = Cmd_DI_GS_UART_TLM_ON; + cmd_table[Cmd_CODE_DI_GS_UART_TLM_OFF].cmd_func = Cmd_DI_GS_UART_TLM_OFF; cmd_table[Cmd_CODE_WDT_INIT].cmd_func = Cmd_WDT_INIT; cmd_table[Cmd_CODE_WDT_ENABLE].cmd_func = Cmd_WDT_ENABLE; cmd_table[Cmd_CODE_WDT_DISABLE].cmd_func = Cmd_WDT_DISABLE; @@ -167,9 +153,6 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_UTIL_CMD_ADD].cmd_func = Cmd_UTIL_CMD_ADD; cmd_table[Cmd_CODE_UTIL_CMD_SEND].cmd_func = Cmd_UTIL_CMD_SEND; cmd_table[Cmd_CODE_UTIL_CMD_RESET].cmd_func = Cmd_UTIL_CMD_RESET; - cmd_table[Cmd_CODE_UTIL_COUNTER_INCREMENT].cmd_func = Cmd_UTIL_COUNTER_INCREMENT; - cmd_table[Cmd_CODE_UTIL_COUNTER_RESET].cmd_func = Cmd_UTIL_COUNTER_RESET; - cmd_table[Cmd_CODE_UTIL_COUNTER_SET_PARAM].cmd_func = Cmd_UTIL_COUNTER_SET_PARAM; cmd_table[Cmd_CODE_TMGR_SET_TIME].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_4BYTE; cmd_table[Cmd_CODE_TMGR_UPDATE_UNIXTIME].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_8BYTE; @@ -230,22 +213,6 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_MEM_LOAD].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_RAW; cmd_table[Cmd_CODE_MEM_SET_DESTINATION].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_4BYTE; cmd_table[Cmd_CODE_MEM_COPY_REGION_SEQ].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_4BYTE; - cmd_table[Cmd_CODE_AL_ADD_ANOMALY].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_4BYTE; - cmd_table[Cmd_CODE_AL_ADD_ANOMALY].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_4BYTE; - cmd_table[Cmd_CODE_AL_SET_PAGE_FOR_TLM].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_AL_ENABLE_LOGGING].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_4BYTE; - cmd_table[Cmd_CODE_AL_DISABLE_LOGGING].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_4BYTE; - cmd_table[Cmd_CODE_AL_SET_THRES_OF_NEARLY_FULL].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_2BYTE; - cmd_table[Cmd_CODE_AH_REGISTER_RULE].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_AH_REGISTER_RULE].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_AH_REGISTER_RULE].param_size_infos[1].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_AH_REGISTER_RULE].param_size_infos[1].packed_info.bit.second = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_AH_REGISTER_RULE].param_size_infos[2].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_AH_REGISTER_RULE].param_size_infos[2].packed_info.bit.second = CA_PARAM_SIZE_TYPE_2BYTE; - cmd_table[Cmd_CODE_AH_ACTIVATE_RULE].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_AH_INACTIVATE_RULE].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_AH_SET_PAGE_FOR_TLM].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_AHRES_LOG_SET_PAGE_FOR_TLM].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_EL_CLEAR_LOG_BY_ERR_LEVEL].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_EL_CLEAR_TLOG].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; cmd_table[Cmd_CODE_EL_CLEAR_CLOG].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; @@ -335,11 +302,6 @@ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]) cmd_table[Cmd_CODE_UTIL_CMD_ADD].param_size_infos[2].packed_info.bit.first = CA_PARAM_SIZE_TYPE_4BYTE; cmd_table[Cmd_CODE_UTIL_CMD_ADD].param_size_infos[2].packed_info.bit.second = CA_PARAM_SIZE_TYPE_4BYTE; cmd_table[Cmd_CODE_UTIL_CMD_SEND].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_UTIL_COUNTER_INCREMENT].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_UTIL_COUNTER_RESET].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_UTIL_COUNTER_SET_PARAM].param_size_infos[0].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; - cmd_table[Cmd_CODE_UTIL_COUNTER_SET_PARAM].param_size_infos[0].packed_info.bit.second = CA_PARAM_SIZE_TYPE_4BYTE; - cmd_table[Cmd_CODE_UTIL_COUNTER_SET_PARAM].param_size_infos[1].packed_info.bit.first = CA_PARAM_SIZE_TYPE_1BYTE; } #pragma section diff --git a/Examples/minimum_user/src/src_user/TlmCmd/command_definitions.h b/Examples/minimum_user/src/src_user/TlmCmd/command_definitions.h index e5baae2bf..f60b0e9d0 100644 --- a/Examples/minimum_user/src/src_user/TlmCmd/command_definitions.h +++ b/Examples/minimum_user/src/src_user/TlmCmd/command_definitions.h @@ -56,104 +56,90 @@ typedef enum Cmd_CODE_MEM_LOAD = 0x002D, Cmd_CODE_MEM_SET_DESTINATION = 0x002E, Cmd_CODE_MEM_COPY_REGION_SEQ = 0x002F, - Cmd_CODE_AL_ADD_ANOMALY = 0x0030, - Cmd_CODE_AL_CLEAR_LIST = 0x0031, - Cmd_CODE_AL_SET_PAGE_FOR_TLM = 0x0032, - Cmd_CODE_AL_INIT_LOGGING_ENA_FLAG = 0x0033, - Cmd_CODE_AL_ENABLE_LOGGING = 0x0034, - Cmd_CODE_AL_DISABLE_LOGGING = 0x0035, - Cmd_CODE_AL_SET_THRES_OF_NEARLY_FULL = 0x0036, - Cmd_CODE_AH_REGISTER_RULE = 0x0037, - Cmd_CODE_AH_ACTIVATE_RULE = 0x0038, - Cmd_CODE_AH_INACTIVATE_RULE = 0x0039, - Cmd_CODE_AH_CLEAR_LOG = 0x003A, - Cmd_CODE_AH_SET_PAGE_FOR_TLM = 0x003B, - Cmd_CODE_AHRES_LOG_CLEAR = 0x003C, - Cmd_CODE_AHRES_LOG_SET_PAGE_FOR_TLM = 0x003D, - Cmd_CODE_EL_INIT = 0x003E, - Cmd_CODE_EL_CLEAR_LOG_ALL = 0x003F, - Cmd_CODE_EL_CLEAR_LOG_BY_ERR_LEVEL = 0x0040, - Cmd_CODE_EL_CLEAR_STATISTICS = 0x0041, - Cmd_CODE_EL_CLEAR_TLOG = 0x0042, - Cmd_CODE_EL_CLEAR_CLOG = 0x0043, - Cmd_CODE_EL_RECORD_EVENT = 0x0044, - Cmd_CODE_EL_TLOG_SET_PAGE_FOR_TLM = 0x0045, - Cmd_CODE_EL_CLOG_SET_PAGE_FOR_TLM = 0x0046, - Cmd_CODE_EL_INIT_LOGGING_SETTINGS = 0x0047, - Cmd_CODE_EL_ENABLE_LOGGING = 0x0048, - Cmd_CODE_EL_DISABLE_LOGGING = 0x0049, - Cmd_CODE_EL_ENABLE_LOGGING_ALL = 0x004A, - Cmd_CODE_EL_DISABLE_LOGGING_ALL = 0x004B, - Cmd_CODE_EL_ENABLE_TLOG_OVERWRITE = 0x004C, - Cmd_CODE_EL_DISABLE_TLOG_OVERWRITE = 0x004D, - Cmd_CODE_EL_ENABLE_TLOG_OVERWRITE_ALL = 0x004E, - Cmd_CODE_EL_DISABLE_TLOG_OVERWRITE_ALL = 0x004F, - Cmd_CODE_EH_INIT = 0x0050, - Cmd_CODE_EH_CLEAR_ALL_RULE = 0x0051, - Cmd_CODE_EH_LOAD_DEFAULT_RULE = 0x0052, - Cmd_CODE_EH_SET_REGISTER_RULE_EVENT_PARAM = 0x0053, - Cmd_CODE_EH_SET_REGISTER_RULE_CONDITION_PARAM = 0x0054, - Cmd_CODE_EH_REGISTER_RULE = 0x0055, - Cmd_CODE_EH_DELETE_RULE = 0x0056, - Cmd_CODE_EH_INIT_RULE = 0x0057, - Cmd_CODE_EH_INIT_RULE_FOR_MULTI_LEVEL = 0x0058, - Cmd_CODE_EH_ACTIVATE_RULE = 0x0059, - Cmd_CODE_EH_INACTIVATE_RULE = 0x005A, - Cmd_CODE_EH_ACTIVATE_RULE_FOR_MULTI_LEVEL = 0x005B, - Cmd_CODE_EH_INACTIVATE_RULE_FOR_MULTI_LEVEL = 0x005C, - Cmd_CODE_EH_SET_RULE_COUNTER = 0x005D, - Cmd_CODE_EH_CLEAR_RULE_COUNTER = 0x005E, - Cmd_CODE_EH_CLEAR_RULE_COUNTER_BY_EVENT = 0x005F, - Cmd_CODE_EH_CLEAR_LOG = 0x0060, - Cmd_CODE_EH_SET_MAX_RESPONSE_NUM = 0x0061, - Cmd_CODE_EH_SET_MAX_CHECK_EVENT_NUM = 0x0062, - Cmd_CODE_EH_SET_MAX_MULTI_LEVEL_NUM = 0x0063, - Cmd_CODE_EH_SET_PAGE_OF_RULE_TABLE_FOR_TLM = 0x0064, - Cmd_CODE_EH_SET_PAGE_OF_RULE_SORTED_IDX_FOR_TLM = 0x0065, - Cmd_CODE_EH_SET_PAGE_OF_LOG_TABLE_FOR_TLM = 0x0066, - Cmd_CODE_EH_SET_TARGET_ID_OF_RULE_TABLE_FOR_TLM = 0x0067, - Cmd_CODE_EH_MATCH_EVENT_COUNTER_TO_EL = 0x0068, - Cmd_CODE_EH_INIT_RULE_BY_EVENT_GROUP = 0x0069, - Cmd_CODE_EH_INIT_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL = 0x006A, - Cmd_CODE_EH_ACTIVATE_RULE_BY_EVENT_GROUP = 0x006B, - Cmd_CODE_EH_INACTIVATE_RULE_BY_EVENT_GROUP = 0x006C, - Cmd_CODE_EH_ACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL = 0x006D, - Cmd_CODE_EH_INACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL = 0x006E, - Cmd_CODE_EVENT_UTIL_ENABLE_EH_EXEC = 0x006F, - Cmd_CODE_EVENT_UTIL_DISABLE_EH_EXEC = 0x0070, - Cmd_CODE_EVENT_UTIL_EXEC_EH = 0x0071, - Cmd_CODE_TF_INIT = 0x0072, - Cmd_CODE_CA_INIT = 0x0073, - Cmd_CODE_TF_REGISTER_TLM = 0x0074, - Cmd_CODE_CA_REGISTER_CMD = 0x0075, - Cmd_CODE_TF_SET_PAGE_FOR_TLM = 0x0076, - Cmd_CODE_CA_SET_PAGE_FOR_TLM = 0x0077, - Cmd_CODE_TLM_MGR_INIT = 0x0078, - Cmd_CODE_TLM_MGR_INIT_MASTER_BC = 0x0079, - Cmd_CODE_TLM_MGR_CLEAR_HK_TLM = 0x007A, - Cmd_CODE_TLM_MGR_CLEAR_SYSTEM_TLM = 0x007B, - Cmd_CODE_TLM_MGR_CLEAR_USER_TLM = 0x007C, - Cmd_CODE_TLM_MGR_START_TLM = 0x007D, - Cmd_CODE_TLM_MGR_STOP_TLM = 0x007E, - Cmd_CODE_TLM_MGR_CLEAR_TLM_TL = 0x007F, - Cmd_CODE_TLM_MGR_REGISTER_HK_TLM = 0x0080, - Cmd_CODE_TLM_MGR_REGISTER_SYSTEM_TLM = 0x0081, - Cmd_CODE_TLM_MGR_REGISTER_HIGH_FREQ_TLM = 0x0082, - Cmd_CODE_TLM_MGR_REGISTER_LOW_FREQ_TLM = 0x0083, - Cmd_CODE_DCU_ABORT_CMD = 0x0084, - Cmd_CODE_DCU_DOWN_ABORT_FLAG = 0x0085, - Cmd_CODE_DCU_CLEAR_LOG = 0x0086, - Cmd_CODE_TEST_CCP_REGISTER_TLC_ASAP = 0x0087, - Cmd_CODE_TEST_CCP_GET_RAW_PARAM_INFO = 0x0088, - Cmd_CODE_DI_GS_CCSDS_TX_START = 0x0100, - Cmd_CODE_DI_GS_CCSDS_TX_STOP = 0x0101, - Cmd_CODE_DI_GS_DRIVER_RESET = 0x0102, - Cmd_CODE_DI_GS_SET_MS_FLUSH_INTERVAL = 0x0103, - Cmd_CODE_DI_GS_SET_RP_FLUSH_INTERVAL = 0x0104, - Cmd_CODE_DI_GS_SET_FARM_PW = 0x0105, - Cmd_CODE_DI_GS_SET_INFO = 0x0106, - Cmd_CODE_DI_GS_CCSDS_GET_BUFFER = 0x0107, - Cmd_CODE_DI_GS_CCSDS_SET_RATE = 0x0108, + Cmd_CODE_EL_INIT = 0x0030, + Cmd_CODE_EL_CLEAR_LOG_ALL = 0x0031, + Cmd_CODE_EL_CLEAR_LOG_BY_ERR_LEVEL = 0x0032, + Cmd_CODE_EL_CLEAR_STATISTICS = 0x0033, + Cmd_CODE_EL_CLEAR_TLOG = 0x0034, + Cmd_CODE_EL_CLEAR_CLOG = 0x0035, + Cmd_CODE_EL_RECORD_EVENT = 0x0036, + Cmd_CODE_EL_TLOG_SET_PAGE_FOR_TLM = 0x0037, + Cmd_CODE_EL_CLOG_SET_PAGE_FOR_TLM = 0x0038, + Cmd_CODE_EL_INIT_LOGGING_SETTINGS = 0x0039, + Cmd_CODE_EL_ENABLE_LOGGING = 0x003A, + Cmd_CODE_EL_DISABLE_LOGGING = 0x003B, + Cmd_CODE_EL_ENABLE_LOGGING_ALL = 0x003C, + Cmd_CODE_EL_DISABLE_LOGGING_ALL = 0x003D, + Cmd_CODE_EL_ENABLE_TLOG_OVERWRITE = 0x003E, + Cmd_CODE_EL_DISABLE_TLOG_OVERWRITE = 0x003F, + Cmd_CODE_EL_ENABLE_TLOG_OVERWRITE_ALL = 0x0040, + Cmd_CODE_EL_DISABLE_TLOG_OVERWRITE_ALL = 0x0041, + Cmd_CODE_EH_INIT = 0x0042, + Cmd_CODE_EH_CLEAR_ALL_RULE = 0x0043, + Cmd_CODE_EH_LOAD_DEFAULT_RULE = 0x0044, + Cmd_CODE_EH_SET_REGISTER_RULE_EVENT_PARAM = 0x0045, + Cmd_CODE_EH_SET_REGISTER_RULE_CONDITION_PARAM = 0x0046, + Cmd_CODE_EH_REGISTER_RULE = 0x0047, + Cmd_CODE_EH_DELETE_RULE = 0x0048, + Cmd_CODE_EH_INIT_RULE = 0x0049, + Cmd_CODE_EH_INIT_RULE_FOR_MULTI_LEVEL = 0x004A, + Cmd_CODE_EH_ACTIVATE_RULE = 0x004B, + Cmd_CODE_EH_INACTIVATE_RULE = 0x004C, + Cmd_CODE_EH_ACTIVATE_RULE_FOR_MULTI_LEVEL = 0x004D, + Cmd_CODE_EH_INACTIVATE_RULE_FOR_MULTI_LEVEL = 0x004E, + Cmd_CODE_EH_SET_RULE_COUNTER = 0x004F, + Cmd_CODE_EH_CLEAR_RULE_COUNTER = 0x0050, + Cmd_CODE_EH_CLEAR_RULE_COUNTER_BY_EVENT = 0x0051, + Cmd_CODE_EH_CLEAR_LOG = 0x0052, + Cmd_CODE_EH_SET_MAX_RESPONSE_NUM = 0x0053, + Cmd_CODE_EH_SET_MAX_CHECK_EVENT_NUM = 0x0054, + Cmd_CODE_EH_SET_MAX_MULTI_LEVEL_NUM = 0x0055, + Cmd_CODE_EH_SET_PAGE_OF_RULE_TABLE_FOR_TLM = 0x0056, + Cmd_CODE_EH_SET_PAGE_OF_RULE_SORTED_IDX_FOR_TLM = 0x0057, + Cmd_CODE_EH_SET_PAGE_OF_LOG_TABLE_FOR_TLM = 0x0058, + Cmd_CODE_EH_SET_TARGET_ID_OF_RULE_TABLE_FOR_TLM = 0x0059, + Cmd_CODE_EH_MATCH_EVENT_COUNTER_TO_EL = 0x005A, + Cmd_CODE_EH_INIT_RULE_BY_EVENT_GROUP = 0x005B, + Cmd_CODE_EH_INIT_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL = 0x005C, + Cmd_CODE_EH_ACTIVATE_RULE_BY_EVENT_GROUP = 0x005D, + Cmd_CODE_EH_INACTIVATE_RULE_BY_EVENT_GROUP = 0x005E, + Cmd_CODE_EH_ACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL = 0x005F, + Cmd_CODE_EH_INACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL = 0x0060, + Cmd_CODE_EVENT_UTIL_ENABLE_EH_EXEC = 0x0061, + Cmd_CODE_EVENT_UTIL_DISABLE_EH_EXEC = 0x0062, + Cmd_CODE_EVENT_UTIL_EXEC_EH = 0x0063, + Cmd_CODE_TF_INIT = 0x0064, + Cmd_CODE_CA_INIT = 0x0065, + Cmd_CODE_TF_REGISTER_TLM = 0x0066, + Cmd_CODE_CA_REGISTER_CMD = 0x0067, + Cmd_CODE_TF_SET_PAGE_FOR_TLM = 0x0068, + Cmd_CODE_CA_SET_PAGE_FOR_TLM = 0x0069, + Cmd_CODE_TLM_MGR_INIT = 0x006A, + Cmd_CODE_TLM_MGR_INIT_MASTER_BC = 0x006B, + Cmd_CODE_TLM_MGR_CLEAR_HK_TLM = 0x006C, + Cmd_CODE_TLM_MGR_CLEAR_SYSTEM_TLM = 0x006D, + Cmd_CODE_TLM_MGR_CLEAR_USER_TLM = 0x006E, + Cmd_CODE_TLM_MGR_START_TLM = 0x006F, + Cmd_CODE_TLM_MGR_STOP_TLM = 0x0070, + Cmd_CODE_TLM_MGR_CLEAR_TLM_TL = 0x0071, + Cmd_CODE_TLM_MGR_REGISTER_HK_TLM = 0x0072, + Cmd_CODE_TLM_MGR_REGISTER_SYSTEM_TLM = 0x0073, + Cmd_CODE_TLM_MGR_REGISTER_HIGH_FREQ_TLM = 0x0074, + Cmd_CODE_TLM_MGR_REGISTER_LOW_FREQ_TLM = 0x0075, + Cmd_CODE_DCU_ABORT_CMD = 0x0076, + Cmd_CODE_DCU_DOWN_ABORT_FLAG = 0x0077, + Cmd_CODE_DCU_CLEAR_LOG = 0x0078, + Cmd_CODE_TEST_CCP_REGISTER_TLC_ASAP = 0x0079, + Cmd_CODE_TEST_CCP_GET_RAW_PARAM_INFO = 0x007A, + Cmd_CODE_DI_GS_DRIVER_RESET = 0x0100, + Cmd_CODE_DI_GS_SET_MS_FLUSH_INTERVAL = 0x0101, + Cmd_CODE_DI_GS_SET_RP_FLUSH_INTERVAL = 0x0102, + Cmd_CODE_DI_GS_SET_FARM_PW = 0x0103, + Cmd_CODE_DI_GS_SET_INFO = 0x0104, + Cmd_CODE_DI_GS_CCSDS_GET_BUFFER = 0x0105, + Cmd_CODE_DI_GS_CCSDS_SET_RATE = 0x0106, + Cmd_CODE_DI_GS_UART_TLM_ON = 0x0107, + Cmd_CODE_DI_GS_UART_TLM_OFF = 0x0108, Cmd_CODE_WDT_INIT = 0x0109, Cmd_CODE_WDT_ENABLE = 0x010A, Cmd_CODE_WDT_DISABLE = 0x010B, @@ -165,9 +151,6 @@ typedef enum Cmd_CODE_UTIL_CMD_ADD = 0x03E0, Cmd_CODE_UTIL_CMD_SEND = 0x03E1, Cmd_CODE_UTIL_CMD_RESET = 0x03E2, - Cmd_CODE_UTIL_COUNTER_INCREMENT = 0x03E3, - Cmd_CODE_UTIL_COUNTER_RESET = 0x03E4, - Cmd_CODE_UTIL_COUNTER_SET_PARAM = 0x03E5, Cmd_CODE_MAX } CMD_CODE; diff --git a/Examples/minimum_user/src/src_user/TlmCmd/telemetry_definitions.c b/Examples/minimum_user/src/src_user/TlmCmd/telemetry_definitions.c index d77e853d9..7f8162993 100644 --- a/Examples/minimum_user/src/src_user/TlmCmd/telemetry_definitions.c +++ b/Examples/minimum_user/src/src_user/TlmCmd/telemetry_definitions.c @@ -67,7 +67,7 @@ void TF_load_tlm_table(TF_TlmInfo tlm_table[TF_MAX_TLMS]) static TF_TLM_FUNC_ACK Tlm_MOBC_(uint8_t* packet, uint16_t* len, uint16_t max_len) { - if (322 > max_len) return TF_TLM_FUNC_ACK_TOO_SHORT_LEN; + if (335 > max_len) return TF_TLM_FUNC_ACK_TOO_SHORT_LEN; #ifndef BUILD_SETTINGS_FAST_BUILD TF_copy_u32(&packet[26], (uint32_t)(TMGR_get_master_clock().mode_cycle)); @@ -76,105 +76,118 @@ static TF_TLM_FUNC_ACK Tlm_MOBC_(uint8_t* packet, uint16_t* len, uint16_t max_le TF_copy_u8(&packet[46], (uint8_t)(mode_manager->stat)); TF_copy_u8(&packet[47], (uint8_t)(mode_manager->current_id)); TF_copy_u8(&packet[48], (uint8_t)(mode_manager->previous_id)); - TF_copy_u8(&packet[49], (uint8_t)(TDSP_info->task_list_id)); - TF_copy_u32(&packet[50], (uint32_t)(TDSP_info->tskd.prev_err.time.total_cycle)); - TF_copy_u8(&packet[54], (uint8_t)(TDSP_info->tskd.prev_err.time.step)); - TF_copy_u16(&packet[55], (uint16_t)(TDSP_info->tskd.prev_err.code)); - TF_copy_i32(&packet[57], (int32_t)(TDSP_info->tskd.prev_err.sts)); - TF_copy_i32(&packet[61], (int32_t)gs_driver->latest_info->rx.ret_from_if_rx); - TF_copy_u8(&packet[65], (uint8_t)gs_driver->latest_info->rx.rec_status); - TF_copy_u32(&packet[66], (uint32_t)gs_driver->latest_info->rx.last_rec_time); - TF_copy_u8(&packet[70], (uint8_t)gs_validate_info->positive_window_width); - TF_copy_u8(&packet[71], (uint8_t)gs_driver->latest_info->rx.cmd_ack); - TF_copy_u8(&packet[72], (uint8_t)gs_driver->tlm_tx_port_type); - TF_copy_u32(&packet[73], PL_count_executed_nodes(&PH_gs_cmd_list)); - TF_copy_u32(&packet[77], (uint32_t)(gs_command_dispatcher->prev.time.total_cycle)); - TF_copy_u16(&packet[81], (uint16_t)(gs_command_dispatcher->prev.code)); - TF_copy_i32(&packet[83], (int32_t)(gs_command_dispatcher->prev.sts)); - TF_copy_u32(&packet[87], (uint32_t)(gs_command_dispatcher->prev_err.time.total_cycle)); - TF_copy_u16(&packet[91], (uint16_t)(gs_command_dispatcher->prev_err.code)); - TF_copy_i32(&packet[93], (int32_t)(gs_command_dispatcher->prev_err.sts)); - TF_copy_u32(&packet[97], (uint32_t)(gs_command_dispatcher->error_counter)); - TF_copy_u32(&packet[101], PL_count_executed_nodes(&PH_rt_cmd_list)); - TF_copy_u32(&packet[105], (uint32_t)(realtime_command_dispatcher->prev.time.total_cycle)); - TF_copy_u16(&packet[109], (uint16_t)(realtime_command_dispatcher->prev.code)); - TF_copy_i32(&packet[111], (int32_t)(realtime_command_dispatcher->prev.sts)); - TF_copy_u32(&packet[115], (uint32_t)(realtime_command_dispatcher->prev_err.time.total_cycle)); - TF_copy_u16(&packet[119], (uint16_t)(realtime_command_dispatcher->prev_err.code)); - TF_copy_i32(&packet[121], (int32_t)(realtime_command_dispatcher->prev_err.sts)); - TF_copy_u32(&packet[125], (uint32_t)(realtime_command_dispatcher->error_counter)); - TF_copy_u32(&packet[129], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])); - TF_copy_u8(&packet[133], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]))); - TF_copy_u32(&packet[134], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_cycle)); - TF_copy_u16(&packet[138], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code)); - TF_copy_i32(&packet[140], (int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.sts)); - TF_copy_u32(&packet[144], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_cycle)); - TF_copy_u16(&packet[148], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code)); - TF_copy_i32(&packet[150], (int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.sts)); - TF_copy_u32(&packet[154], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_counter)); - TF_copy_u8(&packet[158], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error)); - TF_copy_u8(&packet[159], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout)); - TF_copy_u32(&packet[160], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet)))); - TF_copy_u16(&packet[164], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet)))); - TF_copy_u32(&packet[166], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])); - TF_copy_u8(&packet[170], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))); - TF_copy_u32(&packet[171], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.time.total_cycle)); - TF_copy_u16(&packet[175], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.code)); - TF_copy_i32(&packet[177], (int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.sts)); - TF_copy_u32(&packet[181], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.time.total_cycle)); - TF_copy_u16(&packet[185], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.code)); - TF_copy_i32(&packet[187], (int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.sts)); - TF_copy_u32(&packet[191], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].error_counter)); - TF_copy_u8(&packet[195], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error)); - TF_copy_u8(&packet[196], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout)); - TF_copy_u32(&packet[197], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet)))); - TF_copy_u16(&packet[201], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet)))); - TF_copy_u32(&packet[203], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])); - TF_copy_u8(&packet[207], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))); - TF_copy_u32(&packet[208], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.time.total_cycle)); - TF_copy_u16(&packet[212], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.code)); - TF_copy_i32(&packet[214], (int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.sts)); - TF_copy_u32(&packet[218], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.time.total_cycle)); - TF_copy_u16(&packet[222], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.code)); - TF_copy_i32(&packet[224], (int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.sts)); - TF_copy_u32(&packet[228], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].error_counter)); - TF_copy_u8(&packet[232], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error)); - TF_copy_u8(&packet[233], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout)); - TF_copy_u32(&packet[234], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet)))); - TF_copy_u16(&packet[238], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet)))); - TF_copy_u32(&packet[240], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])); - TF_copy_u8(&packet[244], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))); - TF_copy_u32(&packet[245], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.time.total_cycle)); - TF_copy_u16(&packet[249], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.code)); - TF_copy_i32(&packet[251], (int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.sts)); - TF_copy_u32(&packet[255], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.time.total_cycle)); - TF_copy_u16(&packet[259], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.code)); - TF_copy_i32(&packet[261], (int32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.sts)); - TF_copy_u32(&packet[265], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].error_counter)); - TF_copy_u8(&packet[269], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].stop_on_error)); - TF_copy_u8(&packet[270], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].lockout)); - TF_copy_u32(&packet[271], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet)))); - TF_copy_u16(&packet[275], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet)))); - TF_copy_u8(&packet[277], (uint8_t)(block_command_table->pos.block)); - TF_copy_u8(&packet[278], (uint8_t)(block_command_table->pos.cmd)); - TF_copy_u32(&packet[279], ((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)))); - TF_copy_u16(&packet[283], (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)))); - TF_copy_u8(&packet[285], gs_driver->ccsds_info.buffer_num); - TF_copy_u32(&packet[286], (uint32_t)(DI_GS_ms_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval)); - TF_copy_u32(&packet[290], (uint32_t)(DI_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval)); - TF_copy_u32(&packet[294], PL_count_executed_nodes(&PH_ms_tlm_list)); - TF_copy_u8(&packet[298], (uint8_t)(PL_count_active_nodes(&PH_ms_tlm_list))); - TF_copy_u32(&packet[299], PL_count_executed_nodes(&PH_st_tlm_list)); - TF_copy_u8(&packet[303], (uint8_t)(PL_count_active_nodes(&PH_st_tlm_list))); - TF_copy_u32(&packet[304], PL_count_executed_nodes(&PH_rp_tlm_list)); - TF_copy_u8(&packet[308], (uint8_t)(PL_count_active_nodes(&PH_rp_tlm_list))); - TF_copy_u32(&packet[309], (uint32_t)gs_driver->latest_info->tx.send_cycle); - TF_copy_u32(&packet[313], gs_driver->driver_ccsds.ccsds_config.bitrate); - TF_copy_u8(&packet[317], (uint8_t)gs_driver->latest_info->tx.vcid); - TF_copy_u32(&packet[318], gs_driver->latest_info->tx.vcdu_counter); + TF_copy_u8(&packet[49], (uint8_t)(task_dispathcer->task_list_id)); + TF_copy_u32(&packet[50], (uint32_t)(task_dispathcer->tskd.prev_err.time.total_cycle)); + TF_copy_u8(&packet[54], (uint8_t)(task_dispathcer->tskd.prev_err.time.step)); + TF_copy_u16(&packet[55], (uint16_t)(task_dispathcer->tskd.prev_err.code)); + TF_copy_u8(&packet[57], (uint8_t)(task_dispathcer->tskd.prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[58], task_dispathcer->tskd.prev_err.cmd_ret.err_code); + TF_copy_i32(&packet[62], (int32_t)gs_driver->latest_info->rx.ret_from_if_rx); + TF_copy_u8(&packet[66], (uint8_t)gs_driver->latest_info->rx.rec_status); + TF_copy_u32(&packet[67], (uint32_t)gs_driver->latest_info->rx.last_rec_time); + TF_copy_u8(&packet[71], (uint8_t)gs_validate_info->positive_window_width); + TF_copy_u8(&packet[72], (uint8_t)gs_driver->latest_info->rx.cmd_ack); + TF_copy_u8(&packet[73], (uint8_t)gs_driver->tlm_tx_port_type); + TF_copy_u32(&packet[74], PL_count_executed_nodes(&PH_gs_cmd_list)); + TF_copy_u32(&packet[78], (uint32_t)(gs_command_dispatcher->prev.time.total_cycle)); + TF_copy_u16(&packet[82], (uint16_t)(gs_command_dispatcher->prev.code)); + TF_copy_u8(&packet[84], (uint8_t)(gs_command_dispatcher->prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[85], gs_command_dispatcher->prev.cmd_ret.err_code); + TF_copy_u32(&packet[89], (uint32_t)(gs_command_dispatcher->prev_err.time.total_cycle)); + TF_copy_u16(&packet[93], (uint16_t)(gs_command_dispatcher->prev_err.code)); + TF_copy_u8(&packet[95], (uint8_t)(gs_command_dispatcher->prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[96], gs_command_dispatcher->prev_err.cmd_ret.err_code); + TF_copy_u32(&packet[100], (uint32_t)(gs_command_dispatcher->error_counter)); + TF_copy_u32(&packet[104], PL_count_executed_nodes(&PH_rt_cmd_list)); + TF_copy_u32(&packet[108], (uint32_t)(realtime_command_dispatcher->prev.time.total_cycle)); + TF_copy_u16(&packet[112], (uint16_t)(realtime_command_dispatcher->prev.code)); + TF_copy_u8(&packet[114], (uint8_t)(realtime_command_dispatcher->prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[115], realtime_command_dispatcher->prev.cmd_ret.err_code); + TF_copy_u32(&packet[119], (uint32_t)(realtime_command_dispatcher->prev_err.time.total_cycle)); + TF_copy_u16(&packet[123], (uint16_t)(realtime_command_dispatcher->prev_err.code)); + TF_copy_u8(&packet[125], (uint8_t)(realtime_command_dispatcher->prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[126], realtime_command_dispatcher->prev_err.cmd_ret.err_code); + TF_copy_u32(&packet[130], (uint32_t)(realtime_command_dispatcher->error_counter)); + TF_copy_u32(&packet[134], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])); + TF_copy_u8(&packet[138], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]))); + TF_copy_u32(&packet[139], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_cycle)); + TF_copy_u16(&packet[143], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code)); + TF_copy_u8(&packet[145], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[146], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.err_code); + TF_copy_u32(&packet[150], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_cycle)); + TF_copy_u16(&packet[154], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code)); + TF_copy_u8(&packet[156], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[157], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.err_code); + TF_copy_u32(&packet[161], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_counter)); + TF_copy_u8(&packet[165], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error)); + TF_copy_u8(&packet[166], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout)); + TF_copy_u32(&packet[167], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet)))); + TF_copy_u16(&packet[171], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet)))); + TF_copy_u32(&packet[173], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])); + TF_copy_u8(&packet[177], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))); + TF_copy_u32(&packet[178], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.time.total_cycle)); + TF_copy_u16(&packet[182], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.code)); + TF_copy_u8(&packet[184], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[185], timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev.cmd_ret.err_code); + TF_copy_u32(&packet[189], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.time.total_cycle)); + TF_copy_u16(&packet[193], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.code)); + TF_copy_u8(&packet[195], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[196], timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].prev_err.cmd_ret.err_code); + TF_copy_u32(&packet[200], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].error_counter)); + TF_copy_u8(&packet[204], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error)); + TF_copy_u8(&packet[205], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout)); + TF_copy_u32(&packet[206], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet)))); + TF_copy_u16(&packet[210], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))->packet)))); + TF_copy_u32(&packet[212], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])); + TF_copy_u8(&packet[216], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))); + TF_copy_u32(&packet[217], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.time.total_cycle)); + TF_copy_u16(&packet[221], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.code)); + TF_copy_u8(&packet[223], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[224], timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev.cmd_ret.err_code); + TF_copy_u32(&packet[228], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.time.total_cycle)); + TF_copy_u16(&packet[232], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.code)); + TF_copy_u8(&packet[234], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[235], timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].prev_err.cmd_ret.err_code); + TF_copy_u32(&packet[239], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].error_counter)); + TF_copy_u8(&packet[243], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error)); + TF_copy_u8(&packet[244], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout)); + TF_copy_u32(&packet[245], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet)))); + TF_copy_u16(&packet[249], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))->packet)))); + TF_copy_u32(&packet[251], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])); + TF_copy_u8(&packet[255], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))); + TF_copy_u32(&packet[256], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.time.total_cycle)); + TF_copy_u16(&packet[260], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.code)); + TF_copy_u8(&packet[262], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[263], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.cmd_ret.err_code); + TF_copy_u32(&packet[267], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.time.total_cycle)); + TF_copy_u16(&packet[271], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.code)); + TF_copy_u8(&packet[273], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[274], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.cmd_ret.err_code); + TF_copy_u32(&packet[278], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].error_counter)); + TF_copy_u8(&packet[282], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].stop_on_error)); + TF_copy_u8(&packet[283], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].lockout)); + TF_copy_u32(&packet[284], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet)))); + TF_copy_u16(&packet[288], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet)))); + TF_copy_u8(&packet[290], (uint8_t)(block_command_table->pos.block)); + TF_copy_u8(&packet[291], (uint8_t)(block_command_table->pos.cmd)); + TF_copy_u32(&packet[292], ((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)))); + TF_copy_u16(&packet[296], (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)))); + TF_copy_u8(&packet[298], gs_driver->ccsds_info.buffer_num); + TF_copy_u32(&packet[299], (uint32_t)(DI_GS_ms_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval)); + TF_copy_u32(&packet[303], (uint32_t)(DI_GS_rp_tlm_packet_handler->tc_packet_to_m_pdu.flush_interval)); + TF_copy_u32(&packet[307], PL_count_executed_nodes(&PH_ms_tlm_list)); + TF_copy_u8(&packet[311], (uint8_t)(PL_count_active_nodes(&PH_ms_tlm_list))); + TF_copy_u32(&packet[312], PL_count_executed_nodes(&PH_st_tlm_list)); + TF_copy_u8(&packet[316], (uint8_t)(PL_count_active_nodes(&PH_st_tlm_list))); + TF_copy_u32(&packet[317], PL_count_executed_nodes(&PH_rp_tlm_list)); + TF_copy_u8(&packet[321], (uint8_t)(PL_count_active_nodes(&PH_rp_tlm_list))); + 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); #endif - *len = 322; + *len = 335; return TF_TLM_FUNC_ACK_SUCCESS; } @@ -3136,28 +3149,28 @@ static TF_TLM_FUNC_ACK Tlm_GS_(uint8_t* packet, uint16_t* len, uint16_t max_len) TF_copy_u8(&packet[38], (uint8_t)gs_driver->info[0].rx.tctf.ad_rec_status); TF_copy_u8(&packet[39], (uint8_t)gs_driver->info[0].rx.tctf.bc_rec_status); TF_copy_u8(&packet[40], (uint8_t)gs_driver->info[0].rx.tctf.bd_rec_status); - TF_copy_u8(&packet[41], gs_driver->is_ccsds_tx_valid); - TF_copy_u32(&packet[42], (uint32_t)gs_driver->info[0].tx.send_cycle); - TF_copy_u8(&packet[46], (uint8_t)gs_driver->info[0].tx.vcid); - TF_copy_u32(&packet[47], gs_driver->info[0].tx.vcdu_counter); - TF_copy_u8(&packet[51], gs_driver->ccsds_info.buffer_num); - TF_copy_u8(&packet[52], gs_driver->driver_uart.uart_config.ch); - TF_copy_u32(&packet[53], gs_driver->driver_uart.uart_config.baudrate); - TF_copy_u8(&packet[57], (uint8_t)gs_driver->driver_uart.uart_config.parity_settings); - TF_copy_u8(&packet[58], (uint8_t)gs_driver->driver_uart.uart_config.data_length); - TF_copy_u8(&packet[59], (uint8_t)gs_driver->driver_uart.uart_config.stop_bit); - TF_copy_u8(&packet[60], (uint8_t)gs_driver->info[1].rx.rec_status); - TF_copy_i32(&packet[61], (int32_t)gs_driver->info[1].rx.ret_from_if_rx); - TF_copy_u8(&packet[65], (uint8_t)gs_driver->info[1].rx.last_dest_type); - TF_copy_u32(&packet[66], (uint32_t)gs_driver->info[1].rx.last_rec_time); - TF_copy_u8(&packet[70], (uint8_t)gs_driver->info[1].rx.cmd_ack); - TF_copy_u8(&packet[71], (uint8_t)gs_driver->info[1].rx.tctf.last_rec_tctf_type); - TF_copy_u8(&packet[72], (uint8_t)gs_driver->info[1].rx.tctf.ad_rec_status); - TF_copy_u8(&packet[73], (uint8_t)gs_driver->info[1].rx.tctf.bc_rec_status); - TF_copy_u8(&packet[74], (uint8_t)gs_driver->info[1].rx.tctf.bd_rec_status); - TF_copy_u32(&packet[75], (uint32_t)gs_driver->info[1].tx.send_cycle); - TF_copy_u8(&packet[79], (uint8_t)gs_driver->info[1].tx.vcid); - TF_copy_u32(&packet[80], gs_driver->info[1].tx.vcdu_counter); + 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_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); + TF_copy_u8(&packet[56], (uint8_t)gs_driver->driver_uart.uart_config.parity_settings); + TF_copy_u8(&packet[57], (uint8_t)gs_driver->driver_uart.uart_config.data_length); + TF_copy_u8(&packet[58], (uint8_t)gs_driver->driver_uart.uart_config.stop_bit); + TF_copy_u8(&packet[59], (uint8_t)gs_driver->info[1].rx.rec_status); + TF_copy_i32(&packet[60], (int32_t)gs_driver->info[1].rx.ret_from_if_rx); + TF_copy_u8(&packet[64], (uint8_t)gs_driver->info[1].rx.last_dest_type); + TF_copy_u32(&packet[65], (uint32_t)gs_driver->info[1].rx.last_rec_time); + TF_copy_u8(&packet[69], (uint8_t)gs_driver->info[1].rx.cmd_ack); + TF_copy_u8(&packet[70], (uint8_t)gs_driver->info[1].rx.tctf.last_rec_tctf_type); + TF_copy_u8(&packet[71], (uint8_t)gs_driver->info[1].rx.tctf.ad_rec_status); + TF_copy_u8(&packet[72], (uint8_t)gs_driver->info[1].rx.tctf.bc_rec_status); + 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_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); TF_copy_u8(&packet[86], gs_validate_info->lockout_flag); @@ -3177,143 +3190,143 @@ static TF_TLM_FUNC_ACK Tlm_GS_(uint8_t* packet, uint16_t* len, uint16_t max_len) static TF_TLM_FUNC_ACK Tlm_HK_(uint8_t* packet, uint16_t* len, uint16_t max_len) { - if (413 > max_len) return TF_TLM_FUNC_ACK_TOO_SHORT_LEN; + if (428 > max_len) return TF_TLM_FUNC_ACK_TOO_SHORT_LEN; #ifndef BUILD_SETTINGS_FAST_BUILD TF_copy_u32(&packet[26], TMGR_get_master_clock().mode_cycle); TF_copy_double(&packet[30], TMGR_get_unixtime_at_ti0()); TF_copy_u8(&packet[38], (uint8_t)(mode_manager->current_id)); TF_copy_u8(&packet[39], (uint8_t)( ((uint8_t)(mode_manager->stat) << 7 & 0x80) | ((uint8_t)(mode_manager->previous_id) & 0x7F) )); - TF_copy_u16(&packet[40], TDSP_info->task_list_id); + TF_copy_u16(&packet[40], task_dispathcer->task_list_id); TF_copy_u8(&packet[42], (uint8_t)gs_driver->latest_info->rx.rec_status); TF_copy_u32(&packet[43], (uint32_t)gs_driver->latest_info->rx.last_rec_time); TF_copy_u8(&packet[47], (uint8_t)(gs_driver->latest_info->rx.cmd_ack)); TF_copy_u32(&packet[48], PL_count_executed_nodes(&PH_gs_cmd_list)); - TF_copy_u32(&packet[52], gs_command_dispatcher->prev.time.total_cycle); + TF_copy_u32(&packet[52], (uint32_t)(gs_command_dispatcher->prev.time.total_cycle)); TF_copy_u16(&packet[56], (uint16_t)(gs_command_dispatcher->prev.code)); - TF_copy_i8(&packet[58], (int8_t)(gs_command_dispatcher->prev.sts)); - TF_copy_u32(&packet[59], gs_command_dispatcher->prev_err.time.total_cycle); - TF_copy_u16(&packet[63], (uint16_t)(gs_command_dispatcher->prev_err.code)); - TF_copy_i8(&packet[65], (int8_t)(gs_command_dispatcher->prev_err.sts)); - TF_copy_u32(&packet[66], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])); - TF_copy_u8(&packet[70], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]))); - TF_copy_u32(&packet[71], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_cycle); - TF_copy_u16(&packet[75], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code)); - TF_copy_i8(&packet[77], (int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.sts)); - TF_copy_u32(&packet[78], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_cycle); - TF_copy_u16(&packet[82], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code)); - TF_copy_i8(&packet[84], (int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.sts)); - TF_copy_u32(&packet[85], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet)))); - TF_copy_u16(&packet[89], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet)))); - TF_copy_u32(&packet[91], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])); - TF_copy_u8(&packet[95], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))); - TF_copy_u32(&packet[96], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])); - TF_copy_u8(&packet[100], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))); - TF_copy_u32(&packet[101], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])); - TF_copy_u8(&packet[105], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))); - TF_copy_u32(&packet[106], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.time.total_cycle); - TF_copy_u16(&packet[110], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.code)); - TF_copy_i8(&packet[112], (int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.sts)); - TF_copy_u32(&packet[113], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.time.total_cycle); - TF_copy_u16(&packet[117], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.code)); - TF_copy_i8(&packet[119], (int8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.sts)); - TF_copy_u32(&packet[120], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet)))); - TF_copy_u16(&packet[124], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet)))); - TF_copy_u8(&packet[126], (uint8_t)(((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error << 7 & 0x80) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout << 6 & 0x40) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error << 5 & 0x20) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout << 4 & 0x10) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error << 3 & 0x08) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout << 2 & 0x04) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].stop_on_error << 1 & 0x02) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].lockout & 0x01) )); - TF_copy_u8(&packet[127], (uint8_t)((wdt_config->is_wdt_enable << 7 & 0x80) | (wdt_config->is_clear_enable << 6 & 0x40) | 0x00)); - TF_copy_u16(&packet[128], block_command_table->pos.block); - TF_copy_u8(&packet[130], (uint8_t)(block_command_table->pos.cmd)); - TF_copy_u32(&packet[131], ((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)))); - TF_copy_u16(&packet[135], (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)))); - TF_copy_u32(&packet[137], event_logger->statistics.record_counter_total); - TF_copy_u16(&packet[141], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_HIGH]); - TF_copy_u16(&packet[143], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_MIDDLE]); - TF_copy_u16(&packet[145], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_LOW]); - TF_copy_u16(&packet[147], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_EL]); - TF_copy_u16(&packet[149], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_EH]); - TF_copy_u8(&packet[151], (uint8_t)event_logger->latest_event.group); - TF_copy_u32(&packet[152], event_logger->latest_event.local); - TF_copy_u8(&packet[156], (uint8_t)event_logger->latest_event.err_level); - TF_copy_u32(&packet[157], event_logger->latest_event.time.total_cycle); - TF_copy_u8(&packet[161], (uint8_t)event_logger->latest_event.time.step); - TF_copy_u32(&packet[162], event_logger->latest_event.note); - TF_copy_u8(&packet[166], (uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->group); - TF_copy_u32(&packet[167], EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->local); - TF_copy_u32(&packet[171], EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->time.total_cycle); - TF_copy_u8(&packet[175], (uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->time.step); - TF_copy_u16(&packet[176], (uint16_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->note); - TF_copy_u32(&packet[178], event_handler->log_table.respond_counter); - TF_copy_u32(&packet[182], (uint32_t)anomaly_logger->counter); - TF_copy_u32(&packet[186], (uint32_t)anomaly_logger->records[(anomaly_logger->header == 0) ? 0 : anomaly_logger->header - 1].time.total_cycle); - TF_copy_u8(&packet[190], (uint8_t)(anomaly_logger->records[(anomaly_logger->header == 0) ? 0 : anomaly_logger->header - 1].time.step & 0x000000ff)); - TF_copy_u8(&packet[191], (uint8_t)(anomaly_logger->records[(anomaly_logger->header == 0) ? 0 : anomaly_logger->header - 1].code.group & 0x000000ff)); - TF_copy_u32(&packet[192], anomaly_logger->records[(anomaly_logger->header == 0) ? 0 : anomaly_logger->header - 1].code.local); - TF_copy_u8(&packet[196], (uint8_t)(anomaly_logger->records[(anomaly_logger->header == 0) ? 0 : anomaly_logger->header - 1].run_length & 0x000000ff)); - TF_copy_u8(&packet[197], (uint8_t)(anomaly_logger->header)); - TF_copy_u8(&packet[198], (uint8_t)(anomaly_handler->action_counter)); - TF_copy_u8(&packet[199], (uint8_t)(anomaly_handler->latest_id)); - TF_copy_u32(&packet[200], (uint32_t)(anomaly_handler->respond_at.total_cycle)); - TF_copy_u8(&packet[204], (uint8_t)(gs_command_dispatcher->error_counter)); - TF_copy_u16(&packet[205], (uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].cmd_code)); - TF_copy_u8(&packet[207], (uint8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].status)); - TF_copy_u16(&packet[208], (uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].exec_counter)); - TF_copy_i8(&packet[210], (int8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].last_exec_sts)); - TF_copy_u32(&packet[211], divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].last_exec_time.total_cycle); - TF_copy_u16(&packet[215], (uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].cmd_code)); - TF_copy_u8(&packet[217], (uint8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].status)); - TF_copy_u16(&packet[218], (uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].exec_counter)); - TF_copy_i8(&packet[220], (int8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].last_exec_sts)); - TF_copy_u32(&packet[221], divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].last_exec_time.total_cycle); - TF_copy_u32(&packet[225], GIT_REV_CORE_SHORT); - TF_copy_u32(&packet[229], GIT_REV_USER_SHORT); - TF_copy_u32(&packet[233], 0); - TF_copy_u32(&packet[237], 0); - TF_copy_u32(&packet[241], 0); - TF_copy_u32(&packet[245], 0); - TF_copy_u32(&packet[249], 0); - TF_copy_u32(&packet[253], 0); - TF_copy_u32(&packet[257], 0); - TF_copy_u32(&packet[261], 0); - TF_copy_u32(&packet[265], 0); - TF_copy_u32(&packet[269], 0); - TF_copy_u32(&packet[273], 0); - TF_copy_u32(&packet[277], 0); - TF_copy_u32(&packet[281], 0); - TF_copy_u32(&packet[285], 0); - TF_copy_u32(&packet[289], 0); - TF_copy_u32(&packet[293], 0); - TF_copy_u32(&packet[297], 0); - TF_copy_u32(&packet[301], 0); - TF_copy_u32(&packet[305], 0); - TF_copy_u32(&packet[309], 0); - TF_copy_u32(&packet[313], 0); - TF_copy_u32(&packet[317], 0); - TF_copy_u32(&packet[321], 0); - TF_copy_u32(&packet[325], 0); - TF_copy_u32(&packet[329], 0); - TF_copy_u32(&packet[333], 0); - TF_copy_u32(&packet[337], 0); - TF_copy_u32(&packet[341], 0); - TF_copy_u32(&packet[345], 0); - TF_copy_u32(&packet[349], 0); - TF_copy_u32(&packet[353], 0); - TF_copy_u32(&packet[357], 0); - TF_copy_u32(&packet[361], 0); - TF_copy_u32(&packet[365], 0); - TF_copy_u32(&packet[369], 0); - TF_copy_u32(&packet[373], 0); - TF_copy_u32(&packet[377], 0); - TF_copy_u32(&packet[381], 0); - TF_copy_u32(&packet[385], 0); - TF_copy_u32(&packet[389], 0); - TF_copy_u32(&packet[393], 0); - TF_copy_u32(&packet[397], 0); - TF_copy_u32(&packet[401], 0); - TF_copy_u32(&packet[405], 0); - TF_copy_u32(&packet[409], 0); + TF_copy_u8(&packet[58], (uint8_t)(gs_command_dispatcher->prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[59], gs_command_dispatcher->prev.cmd_ret.err_code); + TF_copy_u32(&packet[63], (uint32_t)(gs_command_dispatcher->prev_err.time.total_cycle)); + TF_copy_u16(&packet[67], (uint16_t)(gs_command_dispatcher->prev_err.code)); + TF_copy_u8(&packet[69], (uint8_t)(gs_command_dispatcher->prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[70], gs_command_dispatcher->prev_err.cmd_ret.err_code); + TF_copy_u32(&packet[74], (uint32_t)(gs_command_dispatcher->error_counter)); + TF_copy_u32(&packet[78], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS])); + TF_copy_u8(&packet[82], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS]))); + TF_copy_u32(&packet[83], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.time.total_cycle)); + TF_copy_u16(&packet[87], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.code)); + TF_copy_u8(&packet[89], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[90], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev.cmd_ret.err_code); + TF_copy_u32(&packet[94], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.time.total_cycle)); + TF_copy_u16(&packet[98], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.code)); + TF_copy_u8(&packet[100], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[101], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].prev_err.cmd_ret.err_code); + TF_copy_u8(&packet[105], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].error_counter)); + TF_copy_u32(&packet[106], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet)))); + TF_copy_u16(&packet[110], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS]))->packet)))); + TF_copy_u32(&packet[112], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC])); + TF_copy_u8(&packet[116], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_BC]))); + TF_copy_u32(&packet[117], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM])); + TF_copy_u8(&packet[121], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_DEPLOY_TLM]))); + TF_copy_u32(&packet[122], PL_count_executed_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])); + TF_copy_u8(&packet[126], (uint8_t)(PL_count_active_nodes(&PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))); + TF_copy_u32(&packet[127], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.time.total_cycle)); + TF_copy_u16(&packet[131], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.code)); + TF_copy_u8(&packet[133], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.cmd_ret.exec_sts)); + TF_copy_u32(&packet[134], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev.cmd_ret.err_code); + TF_copy_u32(&packet[138], (uint32_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.time.total_cycle)); + TF_copy_u16(&packet[142], (uint16_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.code)); + TF_copy_u8(&packet[144], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.cmd_ret.exec_sts)); + TF_copy_u32(&packet[145], timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].prev_err.cmd_ret.err_code); + TF_copy_u8(&packet[149], (uint8_t)(timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].error_counter)); + TF_copy_u32(&packet[150], (PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : (uint32_t)CCP_get_ti((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet)))); + TF_copy_u16(&packet[154], (uint16_t)(PL_is_empty(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION])) ? 0 : CCP_get_id((const CommonCmdPacket*)(PL_get_head(&(PH_tl_cmd_list[TLCD_ID_FROM_GS_FOR_MISSION]))->packet)))); + TF_copy_u8(&packet[156], (uint8_t)(((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].stop_on_error << 7 & 0x80) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS].lockout << 6 & 0x40) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].stop_on_error << 5 & 0x20) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_BC].lockout << 4 & 0x10) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].stop_on_error << 3 & 0x08) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_DEPLOY_TLM].lockout << 2 & 0x04) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].stop_on_error << 1 & 0x02) | ((uint8_t)timeline_command_dispatcher->dispatcher[TLCD_ID_FROM_GS_FOR_MISSION].lockout & 0x01) )); + TF_copy_u8(&packet[157], (uint8_t)((wdt_config->is_wdt_enable << 7 & 0x80) | (wdt_config->is_clear_enable << 6 & 0x40) | 0x00)); + TF_copy_u16(&packet[158], block_command_table->pos.block); + TF_copy_u8(&packet[160], (uint8_t)(block_command_table->pos.cmd)); + TF_copy_u32(&packet[161], ((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)))); + TF_copy_u16(&packet[165], (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)))); + TF_copy_u32(&packet[167], event_logger->statistics.record_counter_total); + TF_copy_u16(&packet[171], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_HIGH]); + TF_copy_u16(&packet[173], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_MIDDLE]); + TF_copy_u16(&packet[175], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_LOW]); + TF_copy_u16(&packet[177], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_EL]); + TF_copy_u16(&packet[179], (uint16_t)event_logger->statistics.record_counters[EL_ERROR_LEVEL_EH]); + TF_copy_u8(&packet[181], (uint8_t)event_logger->latest_event.group); + TF_copy_u32(&packet[182], event_logger->latest_event.local); + TF_copy_u8(&packet[186], (uint8_t)event_logger->latest_event.err_level); + TF_copy_u32(&packet[187], event_logger->latest_event.time.total_cycle); + TF_copy_u8(&packet[191], (uint8_t)event_logger->latest_event.time.step); + TF_copy_u32(&packet[192], event_logger->latest_event.note); + TF_copy_u8(&packet[196], (uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->group); + TF_copy_u32(&packet[197], EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->local); + TF_copy_u32(&packet[201], EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->time.total_cycle); + TF_copy_u8(&packet[205], (uint8_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->time.step); + TF_copy_u16(&packet[206], (uint16_t)EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL_HIGH, 0)->note); + TF_copy_u32(&packet[208], event_handler->log_table.respond_counter); + TF_copy_u16(&packet[212], (uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].cmd_code)); + TF_copy_u8(&packet[214], (uint8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].status)); + TF_copy_u16(&packet[215], (uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].exec_counter)); + TF_copy_i8(&packet[217], (int8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].last_exec_sts)); + TF_copy_u32(&packet[218], divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[0]].last_exec_time.total_cycle); + TF_copy_u16(&packet[222], (uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].cmd_code)); + TF_copy_u8(&packet[224], (uint8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].status)); + TF_copy_u16(&packet[225], (uint16_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].exec_counter)); + TF_copy_i8(&packet[227], (int8_t)(divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].last_exec_sts)); + TF_copy_u32(&packet[228], divided_cmd_utility->exec_logs[divided_cmd_utility->exec_log_order[1]].last_exec_time.total_cycle); + TF_copy_u32(&packet[232], GIT_REV_CORE_SHORT); + TF_copy_u32(&packet[236], GIT_REV_USER_SHORT); + TF_copy_u32(&packet[240], 0); + TF_copy_u32(&packet[244], 0); + TF_copy_u32(&packet[248], 0); + TF_copy_u32(&packet[252], 0); + TF_copy_u32(&packet[256], 0); + TF_copy_u32(&packet[260], 0); + TF_copy_u32(&packet[264], 0); + TF_copy_u32(&packet[268], 0); + TF_copy_u32(&packet[272], 0); + TF_copy_u32(&packet[276], 0); + TF_copy_u32(&packet[280], 0); + TF_copy_u32(&packet[284], 0); + TF_copy_u32(&packet[288], 0); + TF_copy_u32(&packet[292], 0); + TF_copy_u32(&packet[296], 0); + TF_copy_u32(&packet[300], 0); + TF_copy_u32(&packet[304], 0); + TF_copy_u32(&packet[308], 0); + TF_copy_u32(&packet[312], 0); + TF_copy_u32(&packet[316], 0); + TF_copy_u32(&packet[320], 0); + TF_copy_u32(&packet[324], 0); + TF_copy_u32(&packet[328], 0); + TF_copy_u32(&packet[332], 0); + TF_copy_u32(&packet[336], 0); + TF_copy_u32(&packet[340], 0); + TF_copy_u32(&packet[344], 0); + TF_copy_u32(&packet[348], 0); + TF_copy_u32(&packet[352], 0); + TF_copy_u32(&packet[356], 0); + TF_copy_u32(&packet[360], 0); + TF_copy_u32(&packet[364], 0); + TF_copy_u32(&packet[368], 0); + TF_copy_u32(&packet[372], 0); + TF_copy_u32(&packet[376], 0); + TF_copy_u32(&packet[380], 0); + TF_copy_u32(&packet[384], 0); + TF_copy_u32(&packet[388], 0); + TF_copy_u32(&packet[392], 0); + TF_copy_u32(&packet[396], 0); + TF_copy_u32(&packet[400], 0); + TF_copy_u32(&packet[404], 0); + TF_copy_u32(&packet[408], 0); + TF_copy_u32(&packet[412], 0); + TF_copy_u32(&packet[416], 0); + TF_copy_u32(&packet[420], 0); + TF_copy_u32(&packet[424], 0); #endif - *len = 413; + *len = 428; return TF_TLM_FUNC_ACK_SUCCESS; } @@ -3412,24 +3425,26 @@ static TF_TLM_FUNC_ACK Tlm_GIT_REV_(uint8_t* packet, uint16_t* len, uint16_t max static TF_TLM_FUNC_ACK Tlm_UART_TEST_(uint8_t* packet, uint16_t* len, uint16_t max_len) { - if (51 > max_len) return TF_TLM_FUNC_ACK_TOO_SHORT_LEN; + if (55 > max_len) return TF_TLM_FUNC_ACK_TOO_SHORT_LEN; #ifndef BUILD_SETTINGS_FAST_BUILD - TF_copy_u8(&packet[26], (uint8_t)(uart_test_instance->driver.super.config.rec_status_.ret_from_if_rx)); - TF_copy_u32(&packet[27], uart_test_instance->driver.super.config.rx_count_); - TF_copy_u8(&packet[31], (uint8_t)(uart_test_instance->driver.super.stream_config[0].rec_status_.status_code)); - TF_copy_u16(&packet[32], uart_test_instance->driver.super.stream_config[0].rec_status_.fixed_frame_len); - TF_copy_u32(&packet[34], uart_test_instance->driver.super.stream_config[0].rx_frame_fix_count_); - TF_copy_u16(&packet[38], uart_test_instance->driver.super.stream_config[0].rx_frame_rec_len_); - TF_copy_u8(&packet[40], uart_test_instance->driver.super.stream_config[0].is_rx_buffer_carry_over_); - TF_copy_u8(&packet[41], (uint8_t)(uart_test_instance->driver.super.stream_config[1].rec_status_.status_code)); - TF_copy_u16(&packet[42], uart_test_instance->driver.super.stream_config[1].rec_status_.fixed_frame_len); - TF_copy_u32(&packet[44], uart_test_instance->driver.super.stream_config[1].rx_frame_fix_count_); - TF_copy_u16(&packet[48], uart_test_instance->driver.super.stream_config[1].rx_frame_rec_len_); - TF_copy_u8(&packet[50], uart_test_instance->driver.super.stream_config[1].is_rx_buffer_carry_over_); + TF_copy_u8(&packet[26], (uint8_t)(uart_test_driver->driver.super.config.info.rec_status_.ret_from_if_rx)); + TF_copy_u32(&packet[27], uart_test_driver->driver.super.config.info.rx_count_); + TF_copy_u8(&packet[31], (uint8_t)(uart_test_driver->driver.super.stream_config[0].info.rec_status_.status_code)); + TF_copy_u16(&packet[32], uart_test_driver->driver.super.stream_config[0].info.rec_status_.fixed_frame_len); + TF_copy_u32(&packet[34], uart_test_driver->driver.super.stream_config[0].info.rx_frame_fix_count_); + TF_copy_u16(&packet[38], uart_test_driver->driver.super.stream_config[0].settings.rx_buffer_->size); + TF_copy_u16(&packet[40], uart_test_driver->driver.super.stream_config[0].settings.rx_buffer_->confirmed_frame_len); + TF_copy_u8(&packet[42], uart_test_driver->driver.super.stream_config[0].settings.rx_buffer_->is_frame_fixed); + TF_copy_u8(&packet[43], (uint8_t)(uart_test_driver->driver.super.stream_config[1].info.rec_status_.status_code)); + TF_copy_u16(&packet[44], uart_test_driver->driver.super.stream_config[1].info.rec_status_.fixed_frame_len); + TF_copy_u32(&packet[46], uart_test_driver->driver.super.stream_config[1].info.rx_frame_fix_count_); + TF_copy_u16(&packet[50], uart_test_driver->driver.super.stream_config[1].settings.rx_buffer_->size); + TF_copy_u16(&packet[52], uart_test_driver->driver.super.stream_config[1].settings.rx_buffer_->confirmed_frame_len); + TF_copy_u8(&packet[54], uart_test_driver->driver.super.stream_config[1].settings.rx_buffer_->is_frame_fixed); #endif - *len = 51; + *len = 55; return TF_TLM_FUNC_ACK_SUCCESS; } diff --git a/Examples/minimum_user/src/src_user/TlmCmd/user_packet_handler.c b/Examples/minimum_user/src/src_user/TlmCmd/user_packet_handler.c index 1af6ef6cd..08fbafe63 100644 --- a/Examples/minimum_user/src/src_user/TlmCmd/user_packet_handler.c +++ b/Examples/minimum_user/src/src_user/TlmCmd/user_packet_handler.c @@ -48,9 +48,10 @@ PH_ACK PH_user_analyze_cmd(const CommonCmdPacket* packet) } -CCP_EXEC_STS PH_user_cmd_router(const CommonCmdPacket* packet) +CCP_CmdRet PH_user_cmd_router(const CommonCmdPacket* packet) { - switch (CCP_get_apid(packet)) + APID apid = CCP_get_apid(packet); + switch (apid) { case APID_AOBC_CMD: // AOBCに配送 @@ -59,8 +60,8 @@ CCP_EXEC_STS PH_user_cmd_router(const CommonCmdPacket* packet) // TOBCに配送 // return DI_TOBC_dispatch_command(packet); default: - // 該当する配送先が定義されていない場合。 - return CCP_EXEC_ROUTING_FAILED; + // 該当する配送先が定義されていない場合 + return CCP_make_cmd_ret(CCP_EXEC_ROUTING_FAILED, apid); } } diff --git a/Examples/minimum_user/src/src_user/TlmCmd/user_packet_handler.h b/Examples/minimum_user/src/src_user/TlmCmd/user_packet_handler.h index 66234aae0..568bed004 100644 --- a/Examples/minimum_user/src/src_user/TlmCmd/user_packet_handler.h +++ b/Examples/minimum_user/src/src_user/TlmCmd/user_packet_handler.h @@ -7,6 +7,7 @@ #include #include +#include #include extern PacketList PH_aobc_cmd_list; @@ -36,15 +37,15 @@ void PH_user_init(void); PH_ACK PH_user_analyze_cmd(const CommonCmdPacket* packet); /** - * @brief PH の cmd_router_ のユーザー処理関数 + * @brief PH の PH_dispatch_command のユーザー処理関数 * * C2A を搭載したコンポに Cmd が転送される. * つまり,転送対象 OBC にとっては RTC 扱いになる - * ここから Driver を叩いて送信まで行うことになる(実行時間は cmdExec と同じだけ許容されているので OK) + * ここから Driver を叩いて送信まで行うことになる(実行時間は CA_execute_cmd と同じだけ許容されているので OK) * @param packet: CCP - * @retval CCP_EXEC_SUCCESS など: 無事に転送された.転送先の結果を返す - * @retval CCP_EXEC_ROUTING_FAILED: 転送失敗(詳細エラーは DriverSuper を参照) + * @retval CCP_CmdRet{CCP_EXEC_SUCCESS, *} など: 無事に転送された.転送先の結果を返す + * @retval CCP_CmdRet{CCP_EXEC_ROUTING_FAILED, *}: 転送失敗(詳細エラーは DriverSuper を参照) */ -CCP_EXEC_STS PH_user_cmd_router(const CommonCmdPacket* packet); +CCP_CmdRet PH_user_cmd_router(const CommonCmdPacket* packet); #endif diff --git a/IfWrapper/Common/i2c_common.c b/IfWrapper/Common/i2c_common.c new file mode 100644 index 000000000..3eac37884 --- /dev/null +++ b/IfWrapper/Common/i2c_common.c @@ -0,0 +1,107 @@ +#pragma section REPRO +/** + * @file + * @brief I2C 通信関連の一般 IO 以外の公開関数 + * @note レジスタの読み書き等,ハードウェアに依存しない関数群を定義する + */ + +#include "i2c_common.h" +#include "../../Library/endian.h" +#include + +/** + * @brief I2C_Config 構造体にて指定されたデバイスのレジスタへ書き込む + * @param[in] p_super : DriverSuper 構造体へのポインタ + * @param[in] stream : 使用する stream_config の番号 + * @param[in] p_i2c_config : 対象とする I2C_Config 構造体へのポインタ + * @param[in] register_address : 書き込むレジスタのアドレス + * @param[in] data_v : 書き込むデータを格納している場所のポインタ + * @param[in] data_len : 書き込むデータの長さ.1 or 2 [byte] のみ指定可 + * @retval DS_ERR_CODE (DS_send_general_cmd の返り値) + */ +static DS_ERR_CODE I2C_write_bytes_(DriverSuper* p_super, uint8_t stream, I2C_Config* p_i2c_config, + uint8_t register_address, void* data_v, uint8_t data_len); + +/** + * @brief I2C_Config 構造体にて指定されたデバイスのレジスタへ読み込む + * @param[in] p_super : DriverSuper 構造体へのポインタ + * @param[in] stream : 使用する stream_config の番号 + * @param[in] p_i2c_config : 対象とする I2C_Config 構造体へのポインタ + * @param[in] register_address : 読み込むレジスタのアドレス + * @param[out] data_v : データ格納先へのポインタ + * @param[in] buffer_size : 読み込むデータの長さ. + * @retval DS_ERR_CODE + */ +static DS_ERR_CODE I2C_read_bytes_(DriverSuper* p_super, uint8_t stream, I2C_Config* p_i2c_config, + uint8_t register_address, void* data_v, uint8_t buffer_size); + +DS_ERR_CODE I2C_write_byte(DriverSuper* p_super, uint8_t stream, I2C_Config* p_i2c_config, uint8_t register_address, uint8_t data) +{ + return I2C_write_bytes_(p_super, stream, p_i2c_config, register_address, &data, sizeof(data)); +} + +DS_ERR_CODE I2C_write_2bytes(DriverSuper* p_super, uint8_t stream, I2C_Config* p_i2c_config, uint8_t register_address, uint16_t data) +{ + return I2C_write_bytes_(p_super, stream, p_i2c_config, register_address, &data, sizeof(data)); +} + +static DS_ERR_CODE I2C_write_bytes_(DriverSuper* p_super, uint8_t stream, I2C_Config* p_i2c_config, + uint8_t register_address, void* data_v, uint8_t data_len) +{ + uint8_t tx_data[sizeof(register_address) + sizeof(uint16_t)]; + DS_StreamConfig* stream_config = &(p_super->stream_config[stream]); + + tx_data[0] = register_address; + ENDIAN_memcpy(tx_data + sizeof(register_address), data_v, data_len); + I2C_set_stop_flag(p_i2c_config, 1); + DSSC_set_tx_frame(stream_config, tx_data); + DSSC_set_tx_frame_size(stream_config, sizeof(register_address) + data_len); + + return DS_send_general_cmd(p_super, stream); +} + +DS_ERR_CODE I2C_read_byte(DriverSuper* p_super, uint8_t stream, I2C_Config* p_i2c_config, + uint8_t register_address, uint8_t* data) +{ + return I2C_read_bytes_(p_super, stream, p_i2c_config, register_address, data, sizeof(*data)); +} + +DS_ERR_CODE I2C_read_2bytes(DriverSuper* p_super, uint8_t stream, I2C_Config* p_i2c_config, + uint8_t register_address, uint16_t* data) +{ + return I2C_read_bytes_(p_super, stream, p_i2c_config, register_address, data, sizeof(*data)); +} + +static DS_ERR_CODE I2C_read_bytes_(DriverSuper* p_super, uint8_t stream, I2C_Config* p_i2c_config, + uint8_t register_address, void* data_v, uint8_t buffer_size) +{ + DS_ERR_CODE ret = DS_ERR_CODE_OK; + const uint8_t* rx_data; + DS_StreamConfig* stream_config = &(p_super->stream_config[stream]); + + // read setting + DSSC_set_rx_frame_size(stream_config, buffer_size); + I2C_set_rx_length(p_i2c_config, buffer_size); + DS_clear_rx_buffer(p_super); + // send + I2C_set_stop_flag(p_i2c_config, 0); + DSSC_set_tx_frame(stream_config, ®ister_address); + DSSC_set_tx_frame_size(stream_config, sizeof(register_address)); + ret = DS_send_req_tlm_cmd(p_super, stream); + if (ret != DS_ERR_CODE_OK) return ret; + // read + I2C_set_stop_flag(p_i2c_config, 1); + ret = DS_receive(p_super); + if (ret != DS_ERR_CODE_OK) return ret; + if (DSSC_get_rec_status(stream_config)->status_code != DS_STREAM_REC_STATUS_FIXED_FRAME) + { + return DS_ERR_CODE_ERR; + } + + rx_data = DSSC_get_rx_frame(stream_config); + ENDIAN_memcpy(data_v, rx_data, buffer_size); + + return ret; +} + +#pragma section diff --git a/IfWrapper/Common/i2c_common.h b/IfWrapper/Common/i2c_common.h new file mode 100644 index 000000000..3e8acfb5f --- /dev/null +++ b/IfWrapper/Common/i2c_common.h @@ -0,0 +1,61 @@ +/** + * @file + * @brief I2C 通信関連の一般 IO 以外の公開関数 + * @note レジスタの読み書き等,ハードウェアに依存しない関数群を定義する + */ + +#ifndef I2C_COMMON_H_ +#define I2C_COMMON_H_ + +#include "../../Drivers/Super/driver_super.h" +#include "../i2c.h" + +/** + * @brief I2C_Config 構造体にて指定されたデバイスのレジスタへ 1 バイトデータを書き込む + * @param[in] p_super : DriverSuper 構造体へのポインタ + * @param[in] stream : 使用する stream_config の番号 + * @param[in] p_i2c_config : 対象とする I2C_Config 構造体へのポインタ + * @param[in] register_address : 書き込むレジスタのアドレス + * @param[in] data : 書き込むデータ + * @retval DS_ERR_CODE (DS_send_general_cmd の返り値) + */ +DS_ERR_CODE I2C_write_byte(DriverSuper* p_super, uint8_t stream, I2C_Config* p_i2c_config, + uint8_t register_address, uint8_t data); + +/** + * @brief I2C_Config 構造体にて指定されたデバイスのレジスタへ 2 バイトデータを書き込む + * @param[in] p_super : DriverSuper 構造体へのポインタ + * @param[in] stream : 使用する stream_config の番号 + * @param[in] p_i2c_config : 対象とする I2C_Config 構造体へのポインタ + * @param[in] register_address : 書き込むレジスタのアドレス + * @param[in] data : 書き込むデータ + * @retval DS_ERR_CODE (DS_send_general_cmd の返り値) + */ +DS_ERR_CODE I2C_write_2bytes(DriverSuper* p_super, uint8_t stream, I2C_Config* p_i2c_config, + uint8_t register_address, uint16_t data); + +/** + * @brief I2C_Config 構造体にて指定されたデバイスのレジスタから 1 バイトデータを読み込む + * @param[in] p_super : DriverSuper 構造体へのポインタ + * @param[in] stream : 使用する stream_config の番号 + * @param[in] p_i2c_config : 対象とする I2C_Config 構造体へのポインタ + * @param[in] register_address : 読み込むレジスタのアドレス + * @param[out] data_v : データ格納先へのポインタ + * @retval DS_ERR_CODE + */ +DS_ERR_CODE I2C_read_byte(DriverSuper* p_super, uint8_t stream, I2C_Config* p_i2c_config, + uint8_t register_address, uint8_t* data_v); + +/** + * @brief I2C_Config 構造体にて指定されたデバイスのレジスタから 2 バイトデータを読み込む + * @param[in] p_super : DriverSuper 構造体へのポインタ + * @param[in] stream : 使用する stream_config の番号 + * @param[in] p_i2c_config : 対象とする I2C_Config 構造体へのポインタ + * @param[in] register_address : 読み込むレジスタのアドレス + * @param[out] data_v : データ格納先へのポインタ + * @retval DS_ERR_CODE + */ +DS_ERR_CODE I2C_read_2bytes(DriverSuper* p_super, uint8_t stream, I2C_Config* p_i2c_config, + uint8_t register_address, uint16_t* data_v); + +#endif diff --git a/IfWrapper/aa.h b/IfWrapper/aa.h index 3967d497c..5961c9cc2 100644 --- a/IfWrapper/aa.h +++ b/IfWrapper/aa.h @@ -12,7 +12,7 @@ #ifndef AA_H_ #define AA_H_ -#include +#include /** * @class AA_Config diff --git a/IfWrapper/ccsds.h b/IfWrapper/ccsds.h index d72c41b22..d77ae245c 100644 --- a/IfWrapper/ccsds.h +++ b/IfWrapper/ccsds.h @@ -12,7 +12,7 @@ #ifndef CCSDS_H_ #define CCSDS_H_ -#include +#include /** * @struct CCSDS_Config diff --git a/IfWrapper/dc.h b/IfWrapper/dc.h index 7771b8222..3f909e40e 100644 --- a/IfWrapper/dc.h +++ b/IfWrapper/dc.h @@ -9,7 +9,7 @@ #ifndef DC_H_ #define DC_H_ -#include +#include /** * @class DC_Config diff --git a/IfWrapper/i2c.h b/IfWrapper/i2c.h index c0257c87f..b7e9bd910 100644 --- a/IfWrapper/i2c.h +++ b/IfWrapper/i2c.h @@ -11,7 +11,7 @@ #ifndef I2C_H_ #define I2C_H_ -#include +#include /** * @struct I2cConfig @@ -43,7 +43,7 @@ typedef enum I2C_ALREADY_ERR = -3, //!< チャンネルオープン済み I2C_FREQUENCY_ERR = -2, //!< 周波数異常 I2C_CH_ERR = -1, //!< チャンネル異常 (Port_configに無い) - I2C_OK = 0, //!< OKは0を踏襲 + I2C_OK = 0 //!< OKは0を踏襲 } I2C_ERR_CODE; /** @@ -98,5 +98,4 @@ void I2C_set_stop_flag(void* my_i2c_v, const uint8_t stop_flag); */ void I2C_set_rx_length(void* my_i2c_v, const uint32_t rx_length); - #endif diff --git a/IfWrapper/pa.h b/IfWrapper/pa.h index f9f0efb25..c4b5b2667 100644 --- a/IfWrapper/pa.h +++ b/IfWrapper/pa.h @@ -12,7 +12,7 @@ #ifndef PA_H_ #define PA_H_ -#include +#include /** * @class PA_Config diff --git a/IfWrapper/spi.h b/IfWrapper/spi.h index 7a98bc94e..0661a2c1e 100644 --- a/IfWrapper/spi.h +++ b/IfWrapper/spi.h @@ -10,7 +10,7 @@ #ifndef SPI_H_ #define SPI_H_ -#include +#include /** * @enum SPI_MODE @@ -32,8 +32,8 @@ typedef enum */ typedef enum { - SPI_CS_STATE_AFTER_TX_LOW = 0, //!< 送信後にCSをLowのままにし、そのまま受信動作などを行う - SPI_CS_STATE_AFTER_TX_HIGH = 1 //!< 送信後にCSをHighにする + SPI_CS_STATE_AFTER_TX_HIGH = 0, //!< 送信後にCSをHighにする + SPI_CS_STATE_AFTER_TX_LOW = 1 //!< 送信後にCSをLowのままにし、そのまま受信動作などを行う } SPI_CS_STATE_AFTER_TX; /** diff --git a/IfWrapper/spwire.h b/IfWrapper/spwire.h index c3a54eb2c..c1ab52f4d 100644 --- a/IfWrapper/spwire.h +++ b/IfWrapper/spwire.h @@ -17,7 +17,7 @@ #ifndef SPWIRE_H_ #define SPWIRE_H_ -#include +#include /** * @class SPWIRE_Config diff --git a/IfWrapper/uart.h b/IfWrapper/uart.h index 4262f5313..a4ab171fd 100644 --- a/IfWrapper/uart.h +++ b/IfWrapper/uart.h @@ -12,7 +12,7 @@ #ifndef UART_H_ #define UART_H_ -#include +#include /** * @enum PARITY_SETTINGS diff --git a/IfWrapper/wdt.h b/IfWrapper/wdt.h index 0b7b5abdf..14d8e95db 100644 --- a/IfWrapper/wdt.h +++ b/IfWrapper/wdt.h @@ -5,7 +5,7 @@ #ifndef WDT_H_ #define WDT_H_ -#include +#include typedef struct { diff --git a/Library/CMakeLists.txt b/Library/CMakeLists.txt index 90fc75b5b..df5e570a5 100644 --- a/Library/CMakeLists.txt +++ b/Library/CMakeLists.txt @@ -2,13 +2,23 @@ cmake_minimum_required(VERSION 3.13) project(C2A_CORE_LIB) +if(C2A_USE_SIMPLE_LIBC) + message("use simple libc!!!") + set(C2A_LIBC_SRC + libc/memchr.c + libc/bsearch.c + ) +else() + set(C2A_LIBC_SRC "") +endif() + set(C2A_SRCS ascii_conv.c c2a_round.c crc.c - endian_conv.c - endian_memcpy.c + endian.c majority_vote_for3.c + ${C2A_LIBC_SRC} ) if(BUILD_C2A_AS_CXX) diff --git a/Library/crc.c b/Library/crc.c index 350246205..2f71a8cc4 100644 --- a/Library/crc.c +++ b/Library/crc.c @@ -75,7 +75,6 @@ static const uint16_t CRC_kCrc16CcittLeftTable_[256] = { 0x6e17, 0x7e36, 0x4e55, 0x5e74, 0x2e93, 0x3eb2, 0x0ed1, 0x1ef0 }; -#if 0 static const uint16_t CRC_kCrc16CcittRightTable_[256] = { 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, @@ -110,7 +109,6 @@ static const uint16_t CRC_kCrc16CcittRightTable_[256] = { 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78 }; -#endif uint16_t CRC_calc_crc_16_ibm_right(uint16_t crc, const uint8_t* c, size_t n, int rev_flag) { @@ -138,7 +136,6 @@ uint16_t CRC_calc_crc_16_ccitt_left(uint16_t crc, const uint8_t* c, size_t n, in else return crc; } -#if 0 uint16_t CRC_calc_crc_16_ccitt_right(uint16_t crc, const uint8_t* c, size_t n, int rev_flag) { size_t i; @@ -151,7 +148,6 @@ uint16_t CRC_calc_crc_16_ccitt_right(uint16_t crc, const uint8_t* c, size_t n, i if (rev_flag) return (uint16_t)~crc; else return crc; } -#endif void CRC_make_crc_8_table(uint8_t* table, uint8_t crc_poly, uint8_t shift) { diff --git a/Library/crc.h b/Library/crc.h index 081d80df0..8523c675d 100644 --- a/Library/crc.h +++ b/Library/crc.h @@ -6,7 +6,7 @@ #define CRC_H_ #include // for size_t -#include +#include /** * @brief CRC-16-IBM @@ -36,8 +36,6 @@ uint16_t CRC_calc_crc_16_ibm_right(uint16_t crc, const uint8_t* c, size_t n, int */ uint16_t CRC_calc_crc_16_ccitt_left(uint16_t crc, const uint8_t* c, size_t n, int rev_flag); -// 右送りの CCITT は一般的ではないこと, table でメモリを使うので,一旦無効化 -#if 0 /** * @brief CRC-16-CCITT * @@ -51,7 +49,6 @@ uint16_t CRC_calc_crc_16_ccitt_left(uint16_t crc, const uint8_t* c, size_t n, in * @return uint16_t: 計算結果 */ uint16_t CRC_calc_crc_16_ccitt_right(uint16_t crc, const uint8_t* c, size_t n, int rev_flag); -#endif /** * @brief crc用のテーブル作成 diff --git a/Library/endian.c b/Library/endian.c new file mode 100644 index 000000000..667dc66e6 --- /dev/null +++ b/Library/endian.c @@ -0,0 +1,39 @@ +/** + * @file + * @brief エンディアンに関するものを定義する + */ +#pragma section REPRO +#include "endian.h" +#include +#include + +void* ENDIAN_memcpy(void* dest, const void* src, size_t size) +{ +#ifdef IS_LITTLE_ENDIAN + // 内部でcopyと同等のことを行っている + ENDIAN_conv(dest, src, size); +#else + memcpy(dest, src, size); +#endif + + return dest; +} + +void ENDIAN_conv(void* after, const void* before, size_t size) +{ + const uint8_t* bef = (const uint8_t*)before; + uint8_t* aft = (uint8_t*)after; + size_t i; + + if (size < 0) return; + + size--; + for (i = 0; i <= size; i++) + { + *(aft + (size - i)) = *(bef + i); + } + + return; +} + +#pragma section diff --git a/Library/endian.h b/Library/endian.h new file mode 100644 index 000000000..814cf9b14 --- /dev/null +++ b/Library/endian.h @@ -0,0 +1,43 @@ +/** + * @file + * @brief エンディアンに関するものを定義する + */ +#ifndef ENDIAN_H_ +#define ENDIAN_H_ + +#include + +/** + * @enum ENDIAN_TYPE + * @brief エンディアンを定義するため + * @note uint8_t を想定 + */ +typedef enum +{ + ENDIAN_TYPE_BIG, //!< big-endian + ENDIAN_TYPE_LITTLE, //!< little-endian + ENDIAN_TYPE_UNKNOWN //!< 不明 +} ENDIAN_TYPE; + +/** + * @brief エンディアンを考慮した memcpy + * @note RAM 上の内部変数と,ビッグエンディアンでなされる外部との通信バッファなど + * (uint8_t の配列と同等の構造)とのコピーで用いる + * @param[out] dest: コピー先メモリポインタ + * @param[in] src: コピー元メモリポインタ + * @param[in] size: コピーバイト数 + * @return dest + */ +void* ENDIAN_memcpy(void* dest, const void* src, size_t size); + +/** + * @brief エンディアンの変更 + * @note uint8_t の配列とみなして,順番を逆転する + * @param[out] after: 変更後 + * @param[in] before: 変更前 + * @param[in] size: 処理データのバイト数 + * @return void + */ +void ENDIAN_conv(void* after, const void* before, size_t size); + +#endif diff --git a/Library/endian_conv.c b/Library/endian_conv.c deleted file mode 100644 index e227d5ec4..000000000 --- a/Library/endian_conv.c +++ /dev/null @@ -1,24 +0,0 @@ -#pragma section REPRO -#include "endian_conv.h" - -int endian_conv(const void* bef_t, void* aft_t, int size) -{ - const unsigned char* bef = (const unsigned char*)bef_t; - unsigned char* aft = (unsigned char*)aft_t; - int i; - - if (size < 0) - { - return -1; - } - - size--; - - for (i = 0; i <= size; i++) - { - *(aft + (size - i)) = *(bef + i); - } - - return 0; -} -#pragma section diff --git a/Library/endian_conv.h b/Library/endian_conv.h deleted file mode 100644 index 4b60b436d..000000000 --- a/Library/endian_conv.h +++ /dev/null @@ -1,6 +0,0 @@ -#ifndef ENDIAN_CONV_H_ -#define ENDIAN_CONV_H_ - -int endian_conv(const void* bef_t, void* aft_t, int size); - -#endif diff --git a/Library/endian_memcpy.c b/Library/endian_memcpy.c deleted file mode 100644 index ec0e8ed8c..000000000 --- a/Library/endian_memcpy.c +++ /dev/null @@ -1,37 +0,0 @@ -#pragma section REPRO -/** - * @file - * @brief memcpyのエンディアン対策 - */ - -/* -memcpyでエンディアンのせいで死ぬことがあるので, -OBCではmemcpy,SLIS環境ではendian convが入るようにスイッチさせる. - -memcpy(&sci_.sib_rev, CCP_get_param_head(packet), 2); -↓ -endina_memcpy(&sci_.sib_rev, CCP_get_param_head(packet), 2); -*/ - -#include "endian_memcpy.h" -#include "endian_conv.h" -#include "string.h" // for memcpy -#include - -#ifdef SILS_FW -#include "stdlib.h" // for malloc -#endif // SILS_FW - -void* endian_memcpy(void* dest, const void* src, size_t count) -{ -#ifdef IS_LITTLE_ENDIAN - // 内部でcopyと同等のことを行っている - endian_conv(src, dest, (int)count); -#else - memcpy(dest, src, count); -#endif - - return dest; -} - -#pragma section diff --git a/Library/endian_memcpy.h b/Library/endian_memcpy.h deleted file mode 100644 index 77e3bfb25..000000000 --- a/Library/endian_memcpy.h +++ /dev/null @@ -1,22 +0,0 @@ -/** - * @file - * @brief memcpyのエンディアン対策 - */ -/* -memcpyでエンディアンのせいで死ぬことがあるので, -OBCではmemcpy,SLIS環境ではendian convが入るようにスイッチさせる. - -memcpy(&sci_.sib_rev, CCP_get_param_head(packet), 2); -↓ -endina_memcpy(&sci_.sib_rev, CCP_get_param_head(packet), 2); -*/ -#ifndef ENDIAN_MEMCPY_H_ -#define ENDIAN_MEMCPY_H_ - - -#include // for size_t - -// #pragma inline endian_memcpy -void* endian_memcpy(void* dest, const void* src, size_t count); - -#endif diff --git a/Library/libc/bsearch.c b/Library/libc/bsearch.c new file mode 100644 index 000000000..a4a320ab3 --- /dev/null +++ b/Library/libc/bsearch.c @@ -0,0 +1,51 @@ +/** + * @file + * @brief C2A が依存する libc 関数 bsearch を自前実装し,c2a-core から提供することで,C2A の移植性を高める. + * これにより,ベアメタル環境でも C2A を libc 無しに(newlib などを持ち出してくることなく)ビルド・動作させることができる. + * @note https://github.com/ut-issl/c2a-core/pull/485 + * @note https://linuxjm.osdn.jp/html/LDP_man-pages/man3/bsearch.3.html + */ +#include + +// compare func(key, base[i]) +// key < b: compr_func(key, b) < 0 +// key = b: compr_func(key, b) = 0 +// key > b: compr_func(key, b) > 0 +typedef int (*compr_func)(const void*, const void*); + +void *bsearch(const void* key, const void* base, size_t nmemb, size_t size, compr_func compr) +{ + size_t min = 0; + size_t max = nmemb; + + if (nmemb == 0 || size == 0) + { + return NULL; + } + + while (min < max) + { + size_t index = (min + max) / 2; + void* current = (void*) ((char*)base + (size * index)); + + int result = compr(key, current); + if (result == 0) + { + // found + return current; + } + else if (result < 0) + { + // key < current + max = index; + } + else // result > 0 + { + // current < key + min = index + 1; + } + } + + // not found + return NULL; +} diff --git a/Library/libc/memchr.c b/Library/libc/memchr.c new file mode 100644 index 000000000..457cb329a --- /dev/null +++ b/Library/libc/memchr.c @@ -0,0 +1,24 @@ +/** + * @file + * @brief C2A が依存する libc 関数 memchr を自前実装し,c2a-core から提供することで,C2A の移植性を高める. + * これにより,ベアメタル環境でも C2A を libc 無しに(newlib などを持ち出してくることなく)ビルド・動作させることができる. + * @note https://github.com/ut-issl/c2a-core/pull/485 + * @note https://linuxjm.osdn.jp/html/LDP_man-pages/man3/memchr.3.html + */ +#include + +void* memchr(const void* buf, int c, size_t n) +{ + const unsigned char* s = (const unsigned char*) buf; + + while (n--) + { + if (*s == (unsigned char)c) + { + return (void*)s; + } + s++; + } + + return NULL; +} diff --git a/Library/majority_vote_for3.h b/Library/majority_vote_for3.h index e1149ee14..faf8ae7b8 100644 --- a/Library/majority_vote_for3.h +++ b/Library/majority_vote_for3.h @@ -6,7 +6,7 @@ #define MAJORITY_VOTE_FOR3_H_ #include -#include +#include typedef enum { diff --git a/Library/result.h b/Library/result.h new file mode 100644 index 000000000..d5ffb057f --- /dev/null +++ b/Library/result.h @@ -0,0 +1,19 @@ +/** + * @file + * @brief Result enum の定義 + */ +#ifndef RESULT_H_ +#define RESULT_H_ + +/** + * @enum RESULT + * @brief Rust でいうところの Result<(), ()> のような,汎用的な成功したかどうかだけの返り値用 enum + * @note uint8_t を想定 + */ +typedef enum +{ + RESULT_OK = 0, //!< OK (C2A では慣習的に OK 系列挙子は 0 を使うので,万が一他の enum に cast されても事故が起きにくいように) + RESULT_ERR //!< Error or NG +} RESULT; + +#endif diff --git a/Library/stdint_wrapper/stdint.h b/Library/stdint_wrapper/stdint.h new file mode 100644 index 000000000..c2704fcf8 --- /dev/null +++ b/Library/stdint_wrapper/stdint.h @@ -0,0 +1,18 @@ +/** + * @file + * @brief C89 環境用 stdint.h + * @note 真に C89 で,stdint.h が提供されない環境では,このパスを include path に追加し, src_user/Library/stdint_impl.h を自前で用意すること + */ +#ifndef STDINT_H_ +#define STDINT_H_ + +// C99 stdint.h ないしはそれと同等のヘッダへのラッパー用ヘッダ +// 実機向けのコンパイラが C89 であるときのみ使用すること(CMake では C2A_USE_C99_STDINT=OFF すること) + +#ifdef SILS_FW +#include // このヘッダを使う OBC であっても,SILS 環境下では C99 stdint.h が存在することが期待できる +#else +#include // 真に C89 環境下では C2A user で C99 stdint.h と同等の型を提供する +#endif // SILS_FW + +#endif // STDINT_H_ diff --git a/README.md b/README.md index 470dd05c0..8b25dff41 100644 --- a/README.md +++ b/README.md @@ -43,13 +43,17 @@ ## 採用実績・動作実績 C2A Core の採用実績のある衛星 OBC や動作実績のあるボードの情報をまとめる. -| Name | Satellite |    Lead Institution    | Launch | CPU |    Clock    |           ROM           |           RAM           |         NVRAM         |         Storage         |           Interface           | Reference | +| Name | Satellite |    Lead Institution    | Launch / Deploy | CPU |    Clock    |           ROM           |           RAM           |         NVRAM         |         Storage         |           Interface           | Reference | | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | +| OBC (2U) | MAGNARO (Tigris) | Inamori Lab. at Nagoya University | 2022/10/12 | STMicroelectronics STM32F4 | 90 MHz | 2 MiB internal ROM | 384 KiB internal RAM, 500 KiB external SRAM | 524 KiB MRAM, 131 KiB EEPROM | 16 GB SD card | UART, SPI, I2C, GPIO, ADC, DCMI | [^1] | +| OBC (1U) | MAGNARO (Piscis) | Inamori Lab. at Nagoya University | 2022/10/12 | STMicroelectronics STM32F4 | 45 MHz | 2 MiB internal ROM | 384 KiB internal RAM, 500 KiB external SRAM | 524 KiB MRAM, 131 KiB EEPROM | 16 GB SD card | UART, SPI, I2C, GPIO, ADC, DCMI | [^1] | +| MOBC | SPHERE-1 EYE | Sony Group Corporation, ISSL at the University of Tokyo | 2023/01/03 | Renesas Electronics SH-2A | 200 MHz | 2.5 MiB internal ROM | 128 KiB internal RAM, 8 MiB external SRAM | 2 MiB MRAM | 2 GiB NAND flash memory | UART (RS422, LVTTL), CCSDS (LVTTL), GPIO (LVTTL), ADC | | +| AOBC | SPHERE-1 EYE | Sony Group Corporation, ISSL at the University of Tokyo | 2023/01/03 | Microchip Technology PIC32MX7 | 80 MHz | 512 KiB internal ROM | 128 KiB internal RAM | 512 KiB FRAM | None | UART (RS422, RS485, LVTTL), SPI, I2C, GPIO (LVTTL), ADC | | +| TOBC | SPHERE-1 EYE | Sony Group Corporation, ISSL at the University of Tokyo | 2023/01/03 | Microchip Technology PIC32MX7 | 30 MHz | 512 KiB internal ROM | 128 KiB internal RAM | None | None | UART (LVTTL), I2C, GPIO (LVTTL), ADC | | +| AOBC | OPTIMAL-1 | ArkEdge Space Inc. | 2023/01/06 | | | | | | | | | | MOBC | ONGLAISAT | ISSL at the University of Tokyo | - | Renesas Electronics SH-2A | 200 MHz | 2.5 MiB internal ROM | 128 KiB internal RAM, 8 MiB external SRAM | 2 MiB MRAM | 2 GiB NAND flash memory | UART (RS422, LVTTL), CCSDS (LVTTL), GPIO (LVTTL), ADC | [^1] | | AOBC | ONGLAISAT | ISSL at the University of Tokyo | - | Microchip Technology PIC32MX7 | 80 MHz | 512 KiB internal ROM | 128 KiB internal RAM | 512 KiB FRAM | None | UART (RS422, RS485, LVTTL), SPI, I2C, GPIO (LVTTL), ADC | [^1] | | TOBC | ONGLAISAT | ISSL at the University of Tokyo | - | Microchip Technology PIC32MX7 | 30 MHz | 512 KiB internal ROM | 128 KiB internal RAM | None | None | UART (LVTTL), I2C, GPIO (LVTTL), ADC | [^1] | -| OBC (2U) | MAGNARO (親機) | Inamori Lab. at Nagoya University | - | STMicroelectronics STM32F4 | 90 MHz | 2 MiB internal ROM | 384 KiB internal RAM, 500 KiB external SRAM | 524 KiB MRAM, 131 KiB EEPROM | 16 GiB SD card | UART, SPI, I2C, GPIO, ADC, DCMI | [^1] | -| OBC (1U) | MAGNARO (子機) | Inamori Lab. at Nagoya University | - | STMicroelectronics STM32F4 | 45 MHz | 2 MiB internal ROM | 384 KiB internal RAM, 500 KiB external SRAM | 524 KiB MRAM, 131 KiB EEPROM | 16 GiB SD card | UART, SPI, I2C, GPIO, ADC, DCMI | [^1] | [^1]: Ryo Suzumoto, et al. Improvement of C2A (Command-Centric Architecture) Reusability for Multiple Types of OBCs and Development of Continuous Integration Environment for Reliability of Flight Software. _33rd International Symposium on Space Technology and Science_, 2022-f-58, 2022. diff --git a/System/AnomalyLogger/anomaly_logger.c b/System/AnomalyLogger/anomaly_logger.c deleted file mode 100644 index 6544234da..000000000 --- a/System/AnomalyLogger/anomaly_logger.c +++ /dev/null @@ -1,344 +0,0 @@ -#pragma section REPRO -#include "anomaly_logger.h" -#ifdef AL_ENABLE - -#include - -#include // memset - -#include "../TimeManager/time_manager.h" -#include "../../Library/endian_memcpy.h" - -static void AL_clear_records_(void); -static int AC_is_equal_(const AL_AnomalyCode* lhs, - const AL_AnomalyCode* rhs); -static void AL_init_logging_ena_flag_(void); -static int AL_is_logging_enable_(uint32_t group); -static int AL_enable_logging_(uint32_t group); -static int AL_disable_logging_(uint32_t group); - -static AnomalyLogger anomaly_logger_; -const AnomalyLogger* const anomaly_logger = &anomaly_logger_; - -const AL_AnomalyRecord* AL_get_record(size_t pos) -{ - // 指定範囲エラーの場合はNULLを返す - if (pos >= anomaly_logger_.header) return NULL; - - return &(anomaly_logger_.records[pos]); -} - -const AL_AnomalyRecord* AL_get_latest_record(void) -{ - // 登録アノマリーがない場合は先頭要素を返す。 - // この場合の先頭要素はAL_initialize()によってゼロクリア済み。 - if (anomaly_logger_.header == 0) return &(anomaly_logger_.records[0]); - - return &(anomaly_logger_.records[anomaly_logger_.header - 1]); -} - -void AL_initialize(void) -{ - AL_clear(); - AL_init_logging_ena_flag_(); - anomaly_logger_.threshold_of_nearly_full = AL_RECORD_MAX - 10; // 仮の値 2019/02/06 - - AL_load_default_settings(); -} - -CCP_EXEC_STS Cmd_AL_ADD_ANOMALY(const CommonCmdPacket* packet) -{ - const uint8_t* param = CCP_get_param_head(packet); - uint32_t group, local; - int ret; - - // パラメータを抽出 - endian_memcpy(&group, param, 4); - endian_memcpy(&local, param + 4, 4); - - // パラメータを登録 - ret = AL_add_anomaly(group, local); - - if (ret == AL_ADD_SUCCESS) - { - return CCP_EXEC_SUCCESS; - } - else - { - return CCP_EXEC_UNKNOWN; - } -} - -int AL_add_anomaly(uint32_t group, uint32_t local) -{ - const AL_AnomalyRecord* prev_anomaly_record = AL_get_latest_record(); - AL_AnomalyRecord new_anomaly_record; - int ret; - - ret = AL_is_logging_enable_(group); - if (ret == -1) return AL_ADD_ERR_INVALID; - if (ret == 0) return AL_ADD_DISABLE_LOGGING; - - new_anomaly_record.time = TMGR_get_master_clock(); - new_anomaly_record.code.group = group; - new_anomaly_record.code.local = local; - new_anomaly_record.run_length = 1; - - // 登録数上限の場合はその事実を記録する - if (anomaly_logger_.header == AL_RECORD_MAX - 1) - { - new_anomaly_record.code.group = AL_CORE_GROUP_ANOMALY_LOGGER; - new_anomaly_record.code.local = AL_FULL; - } - - // 同じAL_AnomalyCodeの登録は圧縮する - if (AC_is_equal_(&(new_anomaly_record.code), &(prev_anomaly_record->code))) - { - // 時刻と連長を更新し再登録 - new_anomaly_record.run_length += prev_anomaly_record->run_length; - anomaly_logger_.records[anomaly_logger_.header - 1] = new_anomaly_record; - } - else - { - // 新規登録 - anomaly_logger_.records[anomaly_logger_.header] = new_anomaly_record; - - // 登録数が上限でないなら先頭位置をインクリメント - if (anomaly_logger_.header != AL_RECORD_MAX - 1) - { - ++anomaly_logger_.header; - } - } - - ++anomaly_logger_.counter; - - if (anomaly_logger_.header == anomaly_logger_.threshold_of_nearly_full) - { - AL_add_anomaly(AL_CORE_GROUP_ANOMALY_LOGGER, AL_NEARLY_FULL); - } - - return AL_ADD_SUCCESS; -} - -CCP_EXEC_STS Cmd_AL_CLEAR_LIST(const CommonCmdPacket* packet) -{ - (void)packet; - AL_clear(); - return CCP_EXEC_SUCCESS; -} - -// こいつは,AHからも呼ばれるので注意! -void AL_clear(void) -{ - anomaly_logger_.counter = 0; - anomaly_logger_.header = 0; - AL_clear_records_(); - anomaly_logger_.page_no = 0; -} - -static void AL_clear_records_(void) -{ - int i; - AL_AnomalyRecord ar = {{0, 0, 0}, {0, 0}, 0}; - - for (i = 0; i < AL_RECORD_MAX; ++i) - { - anomaly_logger_.records[i] = ar; - } -} - -static int AC_is_equal_(const AL_AnomalyCode* lhs, - const AL_AnomalyCode* rhs) -{ - return ((lhs->group == rhs->group) && (lhs->local == rhs->local)); -} - -CCP_EXEC_STS Cmd_AL_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) -{ - uint8_t page; - - page = CCP_get_param_head(packet)[0]; - - if (page >= AL_TLM_PAGE_MAX) - { - // ページ番号がコマンドテーブル範囲外 - return CCP_EXEC_ILLEGAL_PARAMETER; - } - - anomaly_logger_.page_no = page; - return CCP_EXEC_SUCCESS; -} - - -// 2019-01-18 -// 追加 - -CCP_EXEC_STS Cmd_AL_INIT_LOGGING_ENA_FLAG(const CommonCmdPacket* packet) -{ - (void)packet; - AL_init_logging_ena_flag_(); - return CCP_EXEC_SUCCESS; -} - -static void AL_init_logging_ena_flag_(void) -{ - int i; - // デフォルトでは全GROUP IDでロギングが有効 - for (i = 0; i < (AL_GROUP_MAX / 8); ++i) - { - anomaly_logger_.is_logging_enable[i] = 0xff; - } -} - -CCP_EXEC_STS Cmd_AL_ENABLE_LOGGING(const CommonCmdPacket* packet) -{ - const uint8_t* param = CCP_get_param_head(packet); - uint32_t group; - int ret; - - // パラメータを抽出 - endian_memcpy(&group, param, 4); - - if ( !(0 <= group && group < AL_GROUP_MAX) ) - { - return CCP_EXEC_ILLEGAL_PARAMETER; - } - - ret = AL_enable_logging_(group); - - if (ret == 0) - { - return CCP_EXEC_SUCCESS; - } - else - { - return CCP_EXEC_UNKNOWN; - } -} - -CCP_EXEC_STS Cmd_AL_DISABLE_LOGGING(const CommonCmdPacket* packet) -{ - const uint8_t* param = CCP_get_param_head(packet); - uint32_t group; - int ret; - - // パラメータを抽出 - endian_memcpy(&group, param, 4); - - if ( !(0 <= group && group < AL_GROUP_MAX) ) - { - return CCP_EXEC_ILLEGAL_PARAMETER; - } - - ret = AL_disable_logging_(group); - - if (ret == 0) - { - return CCP_EXEC_SUCCESS; - } - else - { - return CCP_EXEC_UNKNOWN; - } -} - -// 有効なら1 -// 無効なら0 -// エラーは-1 -static int AL_is_logging_enable_(uint32_t group) -{ - uint32_t group_idx = group / 8; - uint32_t group_subidx = 7 - group % 8; // 反転 - uint8_t info; - uint8_t mask; - uint8_t ret; - - if ( !(0 <= group && group < AL_GROUP_MAX) ) - { - return -1; - } - - info = anomaly_logger_.is_logging_enable[group_idx]; - mask = (uint8_t)(0x01 << group_subidx); - ret = (uint8_t)(info & mask); - - if (ret == 0) return 0; - return 1; -} - -static int AL_enable_logging_(uint32_t group) -{ - uint32_t group_idx = group / 8; - uint32_t group_subidx = 7 - group % 8; // 反転 - uint8_t info; - uint8_t mask; - - if ( !(0 <= group && group < AL_GROUP_MAX) ) - { - return -1; - } - - info = anomaly_logger_.is_logging_enable[group_idx]; - mask = (uint8_t)(0x01 << group_subidx); - info = (uint8_t)(info | mask); - - anomaly_logger_.is_logging_enable[group_idx] = info; - - return 0; -} - -static int AL_disable_logging_(uint32_t group) -{ - uint32_t group_idx = group / 8; - uint32_t group_subidx = 7 - group % 8; // 反転 - uint8_t info; - uint8_t mask; - - if ( !(0 <= group && group < AL_GROUP_MAX) ) - { - return -1; - } - - info = anomaly_logger_.is_logging_enable[group_idx]; - mask = (uint8_t)(0x01 << group_subidx); - mask = (uint8_t)(~mask); // ビット反転 - info = (uint8_t)(info & mask); - - anomaly_logger_.is_logging_enable[group_idx] = info; - - return 0; -} - - -CCP_EXEC_STS Cmd_AL_SET_THRES_OF_NEARLY_FULL(const CommonCmdPacket* packet) -{ - const uint8_t* param = CCP_get_param_head(packet); - uint16_t thres; - - // パラメータを抽出 - endian_memcpy(&thres, param, 2); - - anomaly_logger_.threshold_of_nearly_full = thres; - return CCP_EXEC_SUCCESS; -} - - -// 2019/04/26 公開した -int AL_enable_logging(uint32_t group) -{ - return AL_enable_logging_(group); -} - -int AL_disable_logging(uint32_t group) -{ - return AL_disable_logging_(group); -} - -int AL_is_logging_enable(uint32_t group) -{ - return AL_is_logging_enable_(group); -} - -#endif - -#pragma section diff --git a/System/AnomalyLogger/anomaly_logger.h b/System/AnomalyLogger/anomaly_logger.h deleted file mode 100644 index fc6e90f7c..000000000 --- a/System/AnomalyLogger/anomaly_logger.h +++ /dev/null @@ -1,118 +0,0 @@ -#ifndef ANOMALY_LOGGER_H_ -#define ANOMALY_LOGGER_H_ - -#include -#ifdef AL_ENABLE - -#include // for size_t - -#include "../TimeManager/obc_time.h" -#include "../../TlmCmd/common_cmd_packet.h" -#include - -#define AL_TLM_PAGE_SIZE (32) //!< アノマリロガーのログテーブルの1テレメトリパケット(=1ページ)に格納されるログ数(ページネーション用) -#define AL_TLM_PAGE_MAX (4) //!< アノマリロガーのログテーブルのページ数(ページネーション用) -#define AL_RECORD_MAX (AL_TLM_PAGE_SIZE * AL_TLM_PAGE_MAX) //!< 最大何個のアノマリを記録できるか -// [TODO] 2018/12/10 -// AL_FULL のままでいいのか? -// FLASHに書いていって,消してく? -// 定期的に全部おろして,clearするのもありかもしれない -// アノマリレコーダーの方は,runlengthで圧縮せずに,tiとともに保存したい - -// anomaly_logger_params.h にて,以下の定数の再定義をする -// - AL_TLM_PAGE_SIZE -// - AL_TLM_PAGE_MAX -// - AL_RECORD_MAX -// また -// AL_DISALBE_AT_C2A_CORE -// を定義することで, C2A CORE での AL_add_anomaly を抑制できる. -// AL から Event Logger への移行が済んでいるものに対しては,定義を推奨する. -// なお,これを定義しても, AL, AH 自体の機能は引き続き利用可能である. -#include - -typedef enum -{ - AL_CORE_GROUP_ANOMALY_LOGGER, - AL_CORE_GROUP_MODE_MANAGER, - AL_CORE_GROUP_TASK_MANAGER, - AL_CORE_GROUP_TASK_DISPATCHER, - AL_CORE_GROUP_APP_MANAGER, - AL_CORE_GROUP_TLCD, - AL_CORE_GROUP_MAX -} AL_CORE_GROUP; - -typedef enum -{ - AL_SUCCESS, - AL_NEARLY_FULL, - AL_FULL -} AL_ACK; - -// AL_add_anomalyの返り値 -enum -{ - AL_ADD_SUCCESS, // 正常終了 - AL_ADD_ERR_INVALID, // エラー - AL_ADD_DISABLE_LOGGING // ロギング無効化(棄却) -}; - -typedef struct -{ - uint32_t group; - uint32_t local; -} AL_AnomalyCode; - -typedef struct -{ - ObcTime time; - AL_AnomalyCode code; - size_t run_length; -} AL_AnomalyRecord; - -typedef struct -{ - size_t counter; // AL_add_anomaly された回数 - size_t header; // 次にaddされると書き込まれる位置.ARはリングバッファではなく,Fullでとまる. - AL_AnomalyRecord records[AL_RECORD_MAX]; - uint8_t page_no; - uint8_t is_logging_enable[AL_GROUP_MAX / 8]; // bit単位で情報を保持する - uint16_t threshold_of_nearly_full; -} AnomalyLogger; - -extern const AnomalyLogger* const anomaly_logger; - -const AL_AnomalyRecord* AL_get_record(size_t pos); - -const AL_AnomalyRecord* AL_get_latest_record(void); - -void AL_initialize(void); - -int AL_add_anomaly(uint32_t group, uint32_t local); - -int AL_enable_logging(uint32_t group); - -int AL_disable_logging(uint32_t group); - -int AL_is_logging_enable(uint32_t group); - -void AL_clear(void); - -CCP_EXEC_STS Cmd_AL_ADD_ANOMALY(const CommonCmdPacket* packet); - -CCP_EXEC_STS Cmd_AL_CLEAR_LIST(const CommonCmdPacket* packet); - -CCP_EXEC_STS Cmd_AL_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet); - -CCP_EXEC_STS Cmd_AL_INIT_LOGGING_ENA_FLAG(const CommonCmdPacket* packet); - -CCP_EXEC_STS Cmd_AL_ENABLE_LOGGING(const CommonCmdPacket* packet); - -CCP_EXEC_STS Cmd_AL_DISABLE_LOGGING(const CommonCmdPacket* packet); - -CCP_EXEC_STS Cmd_AL_SET_THRES_OF_NEARLY_FULL(const CommonCmdPacket* packet); - -#else -#define AL_DISALBE_AT_C2A_CORE -#endif - -#endif diff --git a/System/ApplicationManager/app_manager.c b/System/ApplicationManager/app_manager.c index d3e9535bc..48c57ec53 100644 --- a/System/ApplicationManager/app_manager.c +++ b/System/ApplicationManager/app_manager.c @@ -5,13 +5,13 @@ #include // for memcpy #include "../../Applications/nop.h" -#include "../AnomalyLogger/anomaly_logger.h" #include "../EventManager/event_logger.h" #include "../TimeManager/time_manager.h" #include "../WatchdogTimer/watchdog_timer.h" #include #include "../../Library/print.h" // for Printf -#include "../../Library/endian_memcpy.h" +#include "../../Library/endian.h" +#include "../../TlmCmd/common_cmd_packet_util.h" static AM_ACK AM_initialize_app_(size_t id); static AM_ACK AM_execute_app_(size_t id); @@ -37,9 +37,6 @@ AM_ACK AM_register_ai(size_t id, { if (id >= AM_MAX_APPS) { -#ifndef AL_DISALBE_AT_C2A_CORE - AL_add_anomaly(AL_CORE_GROUP_APP_MANAGER, AM_INVALID_ID); -#endif EL_record_event((EL_GROUP)EL_CORE_GROUP_APP_MANAGER, AM_INVALID_ID, EL_ERROR_LEVEL_LOW, (uint32_t)id); return AM_INVALID_ID; } @@ -58,16 +55,16 @@ void AM_initialize_all_apps(void) } } -CCP_EXEC_STS Cmd_AM_REGISTER_APP(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_AM_REGISTER_APP(const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); size_t id; AppInfo ai; // パラメータを読み出し。 - endian_memcpy(&id, param, 4); - endian_memcpy(&ai.initializer, param + 4, 4); - endian_memcpy(&ai.entry_point, param + 8, 4); + ENDIAN_memcpy(&id, param, 4); + ENDIAN_memcpy(&ai.initializer, param + 4, 4); + ENDIAN_memcpy(&ai.entry_point, param + 8, 4); ai.name = "SPECIAL"; ai.prev = 0; @@ -77,30 +74,30 @@ CCP_EXEC_STS Cmd_AM_REGISTER_APP(const CommonCmdPacket* packet) switch (AM_register_ai(id, &ai)) { case AM_SUCCESS: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case AM_INVALID_ID: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -CCP_EXEC_STS Cmd_AM_INITIALIZE_APP(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_AM_INITIALIZE_APP(const CommonCmdPacket* packet) { size_t id = AM_MAX_APPS; // パラメータ読み出し。 - endian_memcpy(&id, CCP_get_param_head(packet), 4); + ENDIAN_memcpy(&id, CCP_get_param_head(packet), 4); switch (AM_initialize_app_(id)) { case AM_SUCCESS: case AM_NOT_REGISTERED: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case AM_INVALID_ID: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } @@ -112,9 +109,6 @@ static AM_ACK AM_initialize_app_(size_t id) if (id >= AM_MAX_APPS) { -#ifndef AL_DISALBE_AT_C2A_CORE - AL_add_anomaly(AL_CORE_GROUP_APP_MANAGER, AM_INVALID_ID); -#endif EL_record_event((EL_GROUP)EL_CORE_GROUP_APP_MANAGER, AM_INVALID_ID, EL_ERROR_LEVEL_LOW, (uint32_t)id); return AM_INVALID_ID; } @@ -139,22 +133,22 @@ static AM_ACK AM_initialize_app_(size_t id) return AM_SUCCESS; } -CCP_EXEC_STS Cmd_AM_EXECUTE_APP(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_AM_EXECUTE_APP(const CommonCmdPacket* packet) { size_t id = AM_MAX_APPS; // パラメータ読み出し。 - endian_memcpy(&id, CCP_get_param_head(packet), 4); + ENDIAN_memcpy(&id, CCP_get_param_head(packet), 4); switch (AM_execute_app_(id)) { case AM_SUCCESS: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case AM_INVALID_ID: case AM_NOT_REGISTERED: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } @@ -166,17 +160,11 @@ static AM_ACK AM_execute_app_(size_t id) if (id >= AM_MAX_APPS) { -#ifndef AL_DISALBE_AT_C2A_CORE - AL_add_anomaly(AL_CORE_GROUP_APP_MANAGER, AM_INVALID_ID); -#endif EL_record_event((EL_GROUP)EL_CORE_GROUP_APP_MANAGER, AM_INVALID_ID, EL_ERROR_LEVEL_LOW, (uint32_t)id); return AM_INVALID_ID; } else if (app_manager_.ais[id].entry_point == NULL) { -#ifndef AL_DISALBE_AT_C2A_CORE - AL_add_anomaly(AL_CORE_GROUP_APP_MANAGER, AM_NOT_REGISTERED); -#endif EL_record_event((EL_GROUP)EL_CORE_GROUP_APP_MANAGER, AM_NOT_REGISTERED, EL_ERROR_LEVEL_LOW, (uint32_t)id); return AM_NOT_REGISTERED; } @@ -206,7 +194,7 @@ static AM_ACK AM_execute_app_(size_t id) return AM_SUCCESS; } -CCP_EXEC_STS Cmd_AM_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_AM_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) { uint8_t page; @@ -215,14 +203,14 @@ CCP_EXEC_STS Cmd_AM_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) if (page >= AM_TLM_PAGE_MAX) { // ページ番号がコマンドテーブル範囲外 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } app_manager_.page_no = page; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_AM_CLEAR_APP_INFO(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_AM_CLEAR_APP_INFO(const CommonCmdPacket* packet) { int i; (void)packet; @@ -234,7 +222,7 @@ CCP_EXEC_STS Cmd_AM_CLEAR_APP_INFO(const CommonCmdPacket* packet) app_manager_.ais[i].min = 0xffffffff; } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } diff --git a/System/ApplicationManager/app_manager.h b/System/ApplicationManager/app_manager.h index b39635fef..7710f25b3 100644 --- a/System/ApplicationManager/app_manager.h +++ b/System/ApplicationManager/app_manager.h @@ -34,16 +34,16 @@ AM_ACK AM_register_ai(size_t id, void AM_initialize_all_apps(void); -CCP_EXEC_STS Cmd_AM_REGISTER_APP(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_AM_REGISTER_APP(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_AM_INITIALIZE_APP(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_AM_INITIALIZE_APP(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_AM_EXECUTE_APP(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_AM_EXECUTE_APP(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_AM_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_AM_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet); // 2019-07-18 追加 // min, max, prevのみ消す.initはそのまま -CCP_EXEC_STS Cmd_AM_CLEAR_APP_INFO(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_AM_CLEAR_APP_INFO(const CommonCmdPacket* packet); #endif diff --git a/System/EventManager/event_handler.c b/System/EventManager/event_handler.c index 2eefe3bec..afde3f4d6 100644 --- a/System/EventManager/event_handler.c +++ b/System/EventManager/event_handler.c @@ -8,7 +8,7 @@ #include #include #include "../../TlmCmd/common_cmd_packet_util.h" -#include "../../Applications/timeline_command_dispatcher.h" +#include "../../Applications/timeline_command_dispatcher_id_define.h" #include "../TimeManager/time_manager.h" #ifdef EL_IS_ENABLE_TLOG @@ -23,7 +23,7 @@ typedef enum EH_EL_LOCAL_ID_EL_TOTAL_COUNTER_ERR = 0, //!< ELとEHのカウンタの不整合エラー (counter_total) EH_EL_LOCAL_ID_EL_COUNTER_ERR, //!< ELとEHのカウンタの不整合エラー (counters) EH_EL_LOCAL_ID_TOO_MANY_EVENT, //!< イベントが発生しすぎて,TLogが失われている - EH_EL_LOCAL_ID_FAIL_FORM_CTCP, //!< BC 展開 Cmd の生成に失敗 + EH_EL_LOCAL_ID_FAIL_TO_RESPOND, //!< EH 対応時に BC 展開に失敗 EH_EL_LOCAL_ID_LOG_TABLE_FULL, //!< EH_LogTable が満杯になり, wp が 0 に戻った EH_EL_LOCAL_ID_SEARCH_ERR, //!< EH_search_rule_table_index_ の返り値不正 EH_EL_LOCAL_ID_RECURSION_ERR, //!< 多段対応時に再帰呼び出し回数が設定値を超えた @@ -648,23 +648,35 @@ static EH_CKECK_RULE_ACK EH_check_cumulative_rule_(EH_RULE_ID rule_id, const EL_ static void EH_respond_(EH_RULE_ID rule_id) { EH_Rule* rule = &event_handler_.rule_table.rules[rule_id]; - CCP_EXEC_STS ack; + CCP_CmdRet cmd_ret; - ack = CCP_form_and_exec_block_deploy_cmd(TLCD_ID_DEPLOY_BC, rule->settings.deploy_bct_id); - if (ack != CCP_EXEC_SUCCESS) + cmd_ret = CCP_form_and_exec_block_deploy_cmd(TLCD_ID_DEPLOY_BC, rule->settings.deploy_bct_id); + if (cmd_ret.exec_sts != CCP_EXEC_SUCCESS) { - EL_record_event((EL_GROUP)EL_CORE_GROUP_EVENT_HANDLER, - EH_EL_LOCAL_ID_FAIL_FORM_CTCP, - EL_ERROR_LEVEL_HIGH, - ack); + uint32_t note = ((0x0000ffff & cmd_ret.exec_sts) << 16) | (0x0000ffff & cmd_ret.err_code); + if ((PL_ACK)cmd_ret.err_code == PL_BC_TIME_ADJUSTED) + { + EL_record_event((EL_GROUP)EL_CORE_GROUP_EVENT_HANDLER, + EH_EL_LOCAL_ID_FAIL_TO_RESPOND, + EL_ERROR_LEVEL_LOW, + note); + } + else + { + EL_record_event((EL_GROUP)EL_CORE_GROUP_EVENT_HANDLER, + EH_EL_LOCAL_ID_FAIL_TO_RESPOND, + EL_ERROR_LEVEL_HIGH, + note); + } } EH_inactivate_rule_for_multi_level(rule_id); - EH_record_responded_log_(rule_id, ack); + EH_record_responded_log_(rule_id, cmd_ret.exec_sts); } +// FIXME: CCP_EXEC_STS -> CCP_CmdRet にしてもいいかも? static void EH_record_responded_log_(EH_RULE_ID rule_id, CCP_EXEC_STS deploy_cmd_ack) { EH_LogTable* log_table = &event_handler_.log_table; @@ -1449,31 +1461,31 @@ const EH_Log* EH_get_the_nth_log_from_the_latest(uint16_t n) } -CCP_EXEC_STS Cmd_EH_INIT(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_INIT(const CommonCmdPacket* packet) { (void)packet; EH_initialize(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_CLEAR_ALL_RULE(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_CLEAR_ALL_RULE(const CommonCmdPacket* packet) { (void)packet; EH_clear_rules_(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_LOAD_DEFAULT_RULE(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_LOAD_DEFAULT_RULE(const CommonCmdPacket* packet) { (void)packet; EH_load_default_rules(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_SET_REGISTER_RULE_EVENT_PARAM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_SET_REGISTER_RULE_EVENT_PARAM(const CommonCmdPacket* packet) { // 登録する瞬間にしかわからないので,ここでは値のアサーションはせず, // Cmd_EH_REGISTER_RULE でアサーションする @@ -1484,11 +1496,11 @@ CCP_EXEC_STS Cmd_EH_SET_REGISTER_RULE_EVENT_PARAM(const CommonCmdPacket* packet) event_handler_.reg_from_cmd.settings.should_match_err_level = CCP_get_param_from_packet(packet, 4, uint8_t); event_handler_.reg_from_cmd.settings.deploy_bct_id = CCP_get_param_from_packet(packet, 5, bct_id_t); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_SET_REGISTER_RULE_CONDITION_PARAM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_SET_REGISTER_RULE_CONDITION_PARAM(const CommonCmdPacket* packet) { // 登録する瞬間にしかわからないので,ここでは値のアサーションはせず, // Cmd_EH_REGISTER_RULE でアサーションする @@ -1497,11 +1509,11 @@ CCP_EXEC_STS Cmd_EH_SET_REGISTER_RULE_CONDITION_PARAM(const CommonCmdPacket* pac event_handler_.reg_from_cmd.settings.condition.time_threshold_ms = CCP_get_param_from_packet(packet, 2, uint32_t); event_handler_.reg_from_cmd.settings.is_active = CCP_get_param_from_packet(packet, 3, uint8_t); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_REGISTER_RULE(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_REGISTER_RULE(const CommonCmdPacket* packet) { (void)packet; event_handler_.reg_from_cmd.register_ack = @@ -1510,7 +1522,7 @@ CCP_EXEC_STS Cmd_EH_REGISTER_RULE(const CommonCmdPacket* packet) switch (event_handler_.reg_from_cmd.register_ack) { case EH_REGISTER_ACK_OK: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case EH_REGISTER_ACK_ILLEGAL_RULE_ID: case EH_REGISTER_ACK_ILLEGAL_GROUP: case EH_REGISTER_ACK_ILLEGAL_ERROR_LEVEL: @@ -1520,19 +1532,19 @@ CCP_EXEC_STS Cmd_EH_REGISTER_RULE(const CommonCmdPacket* packet) case EH_REGISTER_ACK_ILLEGAL_BCT_ID: case EH_REGISTER_ACK_ILLEGAL_ACTIVE_FLAG: case EH_REGISTER_ACK_ILLEGAL_MULTI_LEVEL: - return CCP_EXEC_ILLEGAL_PARAMETER; // 正確にはこのコマンドのパラメタではないが... + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); // 正確にはこのコマンドのパラメタではないが... case EH_REGISTER_ACK_ERR_FULL: case EH_REGISTER_ACK_ERR_RULE_OVERWRITE: case EH_REGISTER_ACK_ERR_DUPLICATE_FULL: case EH_REGISTER_ACK_UNKNOWN_ERR: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -CCP_EXEC_STS Cmd_EH_DELETE_RULE(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_DELETE_RULE(const CommonCmdPacket* packet) { EH_RULE_ID rule_id = (EH_RULE_ID)CCP_get_param_from_packet(packet, 0, uint16_t); EH_RULE_SORTED_INDEX_ACK ack = EH_delete_rule_table_(rule_id); @@ -1540,18 +1552,18 @@ CCP_EXEC_STS Cmd_EH_DELETE_RULE(const CommonCmdPacket* packet) switch (ack) { case EH_RULE_SORTED_INDEX_ACK_OK: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case EH_RULE_SORTED_INDEX_ACK_ILLEGAL_RULE_ID: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); case EH_RULE_SORTED_INDEX_ACK_NOT_FOUND: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -CCP_EXEC_STS Cmd_EH_INIT_RULE(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_INIT_RULE(const CommonCmdPacket* packet) { EH_RULE_ID rule_id = (EH_RULE_ID)CCP_get_param_from_packet(packet, 0, uint16_t); EH_CHECK_RULE_ACK ack = EH_init_rule(rule_id); @@ -1559,18 +1571,18 @@ CCP_EXEC_STS Cmd_EH_INIT_RULE(const CommonCmdPacket* packet) switch (ack) { case EH_CHECK_RULE_ACK_OK: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case EH_CHECK_RULE_ACK_INVALID_RULE_ID: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); case EH_CHECK_RULE_ACK_UNREGISTERED: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -CCP_EXEC_STS Cmd_EH_INIT_RULE_FOR_MULTI_LEVEL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_INIT_RULE_FOR_MULTI_LEVEL(const CommonCmdPacket* packet) { EH_RULE_ID rule_id = (EH_RULE_ID)CCP_get_param_from_packet(packet, 0, uint16_t); EH_CHECK_RULE_ACK ack = EH_init_rule_for_multi_level(rule_id); @@ -1578,18 +1590,18 @@ CCP_EXEC_STS Cmd_EH_INIT_RULE_FOR_MULTI_LEVEL(const CommonCmdPacket* packet) switch (ack) { case EH_CHECK_RULE_ACK_OK: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case EH_CHECK_RULE_ACK_INVALID_RULE_ID: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); case EH_CHECK_RULE_ACK_UNREGISTERED: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -CCP_EXEC_STS Cmd_EH_ACTIVATE_RULE(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_ACTIVATE_RULE(const CommonCmdPacket* packet) { EH_RULE_ID rule_id = (EH_RULE_ID)CCP_get_param_from_packet(packet, 0, uint16_t); EH_CHECK_RULE_ACK ack = EH_activate_rule(rule_id); @@ -1597,18 +1609,18 @@ CCP_EXEC_STS Cmd_EH_ACTIVATE_RULE(const CommonCmdPacket* packet) switch (ack) { case EH_CHECK_RULE_ACK_OK: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case EH_CHECK_RULE_ACK_INVALID_RULE_ID: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); case EH_CHECK_RULE_ACK_UNREGISTERED: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -CCP_EXEC_STS Cmd_EH_INACTIVATE_RULE(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_INACTIVATE_RULE(const CommonCmdPacket* packet) { EH_RULE_ID rule_id = (EH_RULE_ID)CCP_get_param_from_packet(packet, 0, uint16_t); EH_CHECK_RULE_ACK ack = EH_inactivate_rule(rule_id); @@ -1616,18 +1628,18 @@ CCP_EXEC_STS Cmd_EH_INACTIVATE_RULE(const CommonCmdPacket* packet) switch (ack) { case EH_CHECK_RULE_ACK_OK: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case EH_CHECK_RULE_ACK_INVALID_RULE_ID: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); case EH_CHECK_RULE_ACK_UNREGISTERED: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -CCP_EXEC_STS Cmd_EH_ACTIVATE_RULE_FOR_MULTI_LEVEL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_ACTIVATE_RULE_FOR_MULTI_LEVEL(const CommonCmdPacket* packet) { EH_RULE_ID rule_id = (EH_RULE_ID)CCP_get_param_from_packet(packet, 0, uint16_t); EH_CHECK_RULE_ACK ack = EH_activate_rule_for_multi_level(rule_id); @@ -1635,18 +1647,18 @@ CCP_EXEC_STS Cmd_EH_ACTIVATE_RULE_FOR_MULTI_LEVEL(const CommonCmdPacket* packet) switch (ack) { case EH_CHECK_RULE_ACK_OK: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case EH_CHECK_RULE_ACK_INVALID_RULE_ID: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); case EH_CHECK_RULE_ACK_UNREGISTERED: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -CCP_EXEC_STS Cmd_EH_INACTIVATE_RULE_FOR_MULTI_LEVEL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_INACTIVATE_RULE_FOR_MULTI_LEVEL(const CommonCmdPacket* packet) { EH_RULE_ID rule_id = (EH_RULE_ID)CCP_get_param_from_packet(packet, 0, uint16_t); EH_CHECK_RULE_ACK ack = EH_inactivate_rule_for_multi_level(rule_id); @@ -1654,18 +1666,18 @@ CCP_EXEC_STS Cmd_EH_INACTIVATE_RULE_FOR_MULTI_LEVEL(const CommonCmdPacket* packe switch (ack) { case EH_CHECK_RULE_ACK_OK: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case EH_CHECK_RULE_ACK_INVALID_RULE_ID: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); case EH_CHECK_RULE_ACK_UNREGISTERED: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -CCP_EXEC_STS Cmd_EH_SET_RULE_COUNTER(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_SET_RULE_COUNTER(const CommonCmdPacket* packet) { EH_RULE_ID rule_id = (EH_RULE_ID)CCP_get_param_from_packet(packet, 0, uint16_t); uint16_t counter = CCP_get_param_from_packet(packet, 1, uint16_t); @@ -1674,18 +1686,18 @@ CCP_EXEC_STS Cmd_EH_SET_RULE_COUNTER(const CommonCmdPacket* packet) switch (ack) { case EH_CHECK_RULE_ACK_OK: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case EH_CHECK_RULE_ACK_INVALID_RULE_ID: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); case EH_CHECK_RULE_ACK_UNREGISTERED: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -CCP_EXEC_STS Cmd_EH_CLEAR_RULE_COUNTER(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_CLEAR_RULE_COUNTER(const CommonCmdPacket* packet) { EH_RULE_ID rule_id = (EH_RULE_ID)CCP_get_param_from_packet(packet, 0, uint16_t); EH_CHECK_RULE_ACK ack = EH_clear_rule_counter(rule_id); @@ -1693,151 +1705,151 @@ CCP_EXEC_STS Cmd_EH_CLEAR_RULE_COUNTER(const CommonCmdPacket* packet) switch (ack) { case EH_CHECK_RULE_ACK_OK: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case EH_CHECK_RULE_ACK_INVALID_RULE_ID: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); case EH_CHECK_RULE_ACK_UNREGISTERED: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -CCP_EXEC_STS Cmd_EH_CLEAR_RULE_COUNTER_BY_EVENT(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_CLEAR_RULE_COUNTER_BY_EVENT(const CommonCmdPacket* packet) { EL_GROUP group = (EL_GROUP)CCP_get_param_from_packet(packet, 0, uint32_t); uint32_t local = (EL_GROUP)CCP_get_param_from_packet(packet, 1, uint32_t); EL_ERROR_LEVEL err_level = (EL_ERROR_LEVEL)CCP_get_param_from_packet(packet, 2, uint8_t); EH_clear_rule_counter_by_event(group, local, err_level); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_CLEAR_LOG(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_CLEAR_LOG(const CommonCmdPacket* packet) { (void)packet; EH_clear_log_(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_SET_MAX_RESPONSE_NUM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_SET_MAX_RESPONSE_NUM(const CommonCmdPacket* packet) { event_handler_.exec_settings.max_response_num = CCP_get_param_from_packet(packet, 0, uint8_t); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_SET_MAX_CHECK_EVENT_NUM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_SET_MAX_CHECK_EVENT_NUM(const CommonCmdPacket* packet) { event_handler_.exec_settings.max_check_event_num = CCP_get_param_from_packet(packet, 0, uint16_t); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_SET_MAX_MULTI_LEVEL_NUM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_SET_MAX_MULTI_LEVEL_NUM(const CommonCmdPacket* packet) { event_handler_.exec_settings.max_multi_level_num = CCP_get_param_from_packet(packet, 0, uint8_t); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_SET_PAGE_OF_RULE_TABLE_FOR_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_SET_PAGE_OF_RULE_TABLE_FOR_TLM(const CommonCmdPacket* packet) { uint8_t page = CCP_get_param_from_packet(packet, 0, uint8_t); - if (page >= EH_RULE_TLM_PAGE_MAX) return CCP_EXEC_ILLEGAL_PARAMETER; + if (page >= EH_RULE_TLM_PAGE_MAX) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); event_handler_.tlm_info.rule.page_no = page; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_SET_PAGE_OF_RULE_SORTED_IDX_FOR_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_SET_PAGE_OF_RULE_SORTED_IDX_FOR_TLM(const CommonCmdPacket* packet) { uint8_t page = CCP_get_param_from_packet(packet, 0, uint8_t); - if (page >= EH_RULE_TLM_PAGE_MAX) return CCP_EXEC_ILLEGAL_PARAMETER; + if (page >= EH_RULE_TLM_PAGE_MAX) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); event_handler_.tlm_info.rule_sorted_index.page_no = page; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_SET_PAGE_OF_LOG_TABLE_FOR_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_SET_PAGE_OF_LOG_TABLE_FOR_TLM(const CommonCmdPacket* packet) { uint8_t page = CCP_get_param_from_packet(packet, 0, uint8_t); - if (page >= EH_LOG_TLM_PAGE_MAX) return CCP_EXEC_ILLEGAL_PARAMETER; + if (page >= EH_LOG_TLM_PAGE_MAX) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); event_handler_.tlm_info.log.page_no = page; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_SET_TARGET_ID_OF_RULE_TABLE_FOR_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_SET_TARGET_ID_OF_RULE_TABLE_FOR_TLM(const CommonCmdPacket* packet) { EH_RULE_ID rule_id = (EH_RULE_ID)CCP_get_param_from_packet(packet, 0, uint16_t); if (EH_check_rule_id_(rule_id) == EH_CHECK_RULE_ACK_INVALID_RULE_ID) { - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } event_handler_.tlm_info.rule.target_rule_id = rule_id; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_MATCH_EVENT_COUNTER_TO_EL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_MATCH_EVENT_COUNTER_TO_EL(const CommonCmdPacket* packet) { (void)packet; EH_match_event_counter_to_el(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_INIT_RULE_BY_EVENT_GROUP(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_INIT_RULE_BY_EVENT_GROUP(const CommonCmdPacket* packet) { EL_GROUP group = (EL_GROUP)CCP_get_param_from_packet(packet, 0, uint32_t); EH_init_rule_by_event_group(group); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_INIT_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_INIT_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL(const CommonCmdPacket* packet) { EL_GROUP group = (EL_GROUP)CCP_get_param_from_packet(packet, 0, uint32_t); EH_init_rule_by_event_group_for_multi_level(group); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_ACTIVATE_RULE_BY_EVENT_GROUP(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_ACTIVATE_RULE_BY_EVENT_GROUP(const CommonCmdPacket* packet) { EL_GROUP group = (EL_GROUP)CCP_get_param_from_packet(packet, 0, uint32_t); EH_activate_rule_by_event_group(group); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_INACTIVATE_RULE_BY_EVENT_GROUP(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_INACTIVATE_RULE_BY_EVENT_GROUP(const CommonCmdPacket* packet) { EL_GROUP group = (EL_GROUP)CCP_get_param_from_packet(packet, 0, uint32_t); EH_inactivate_rule_by_event_group(group); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_ACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_ACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL(const CommonCmdPacket* packet) { EL_GROUP group = (EL_GROUP)CCP_get_param_from_packet(packet, 0, uint32_t); EH_activate_rule_by_event_group_for_multi_level(group); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EH_INACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EH_INACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL(const CommonCmdPacket* packet) { EL_GROUP group = (EL_GROUP)CCP_get_param_from_packet(packet, 0, uint32_t); EH_inactivate_rule_by_event_group_for_multi_level(group); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #endif // EL_IS_ENABLE_TLOG diff --git a/System/EventManager/event_handler.h b/System/EventManager/event_handler.h index 8918886ac..26ea9d680 100644 --- a/System/EventManager/event_handler.h +++ b/System/EventManager/event_handler.h @@ -548,71 +548,71 @@ void EH_match_event_counter_to_el(void); const EH_Log* EH_get_the_nth_log_from_the_latest(uint16_t n); -CCP_EXEC_STS Cmd_EH_INIT(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_INIT(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_CLEAR_ALL_RULE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_CLEAR_ALL_RULE(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_LOAD_DEFAULT_RULE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_LOAD_DEFAULT_RULE(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_SET_REGISTER_RULE_EVENT_PARAM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_SET_REGISTER_RULE_EVENT_PARAM(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_SET_REGISTER_RULE_CONDITION_PARAM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_SET_REGISTER_RULE_CONDITION_PARAM(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_REGISTER_RULE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_REGISTER_RULE(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_DELETE_RULE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_DELETE_RULE(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_INIT_RULE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_INIT_RULE(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_INIT_RULE_FOR_MULTI_LEVEL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_INIT_RULE_FOR_MULTI_LEVEL(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_ACTIVATE_RULE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_ACTIVATE_RULE(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_INACTIVATE_RULE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_INACTIVATE_RULE(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_ACTIVATE_RULE_FOR_MULTI_LEVEL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_ACTIVATE_RULE_FOR_MULTI_LEVEL(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_INACTIVATE_RULE_FOR_MULTI_LEVEL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_INACTIVATE_RULE_FOR_MULTI_LEVEL(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_SET_RULE_COUNTER(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_SET_RULE_COUNTER(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_CLEAR_RULE_COUNTER(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_CLEAR_RULE_COUNTER(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_CLEAR_RULE_COUNTER_BY_EVENT(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_CLEAR_RULE_COUNTER_BY_EVENT(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_CLEAR_LOG(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_CLEAR_LOG(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_SET_MAX_RESPONSE_NUM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_SET_MAX_RESPONSE_NUM(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_SET_MAX_CHECK_EVENT_NUM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_SET_MAX_CHECK_EVENT_NUM(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_SET_MAX_MULTI_LEVEL_NUM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_SET_MAX_MULTI_LEVEL_NUM(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_SET_PAGE_OF_RULE_TABLE_FOR_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_SET_PAGE_OF_RULE_TABLE_FOR_TLM(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_SET_PAGE_OF_RULE_SORTED_IDX_FOR_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_SET_PAGE_OF_RULE_SORTED_IDX_FOR_TLM(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_SET_PAGE_OF_LOG_TABLE_FOR_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_SET_PAGE_OF_LOG_TABLE_FOR_TLM(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_SET_TARGET_ID_OF_RULE_TABLE_FOR_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_SET_TARGET_ID_OF_RULE_TABLE_FOR_TLM(const CommonCmdPacket* packet); /** * @brief 新しい EL_Event 発生を検出するためのカウンタを強制的に EL のカウンタに合わせる */ -CCP_EXEC_STS Cmd_EH_MATCH_EVENT_COUNTER_TO_EL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_MATCH_EVENT_COUNTER_TO_EL(const CommonCmdPacket* packet); // by_event_group 関数 -CCP_EXEC_STS Cmd_EH_INIT_RULE_BY_EVENT_GROUP(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_INIT_RULE_BY_EVENT_GROUP(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_INIT_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_INIT_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_ACTIVATE_RULE_BY_EVENT_GROUP(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_ACTIVATE_RULE_BY_EVENT_GROUP(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_INACTIVATE_RULE_BY_EVENT_GROUP(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_INACTIVATE_RULE_BY_EVENT_GROUP(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_ACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_ACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EH_INACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EH_INACTIVATE_RULE_BY_EVENT_GROUP_FOR_MULTI_LEVEL(const CommonCmdPacket* packet); #endif // EL_IS_ENABLE_TLOG diff --git a/System/EventManager/event_logger.c b/System/EventManager/event_logger.c index 169983d6b..c4841beb4 100644 --- a/System/EventManager/event_logger.c +++ b/System/EventManager/event_logger.c @@ -748,15 +748,15 @@ const EL_Event* EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL err_level, ui #endif -CCP_EXEC_STS Cmd_EL_INIT(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_INIT(const CommonCmdPacket* packet) { (void)packet; EL_initialize(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EL_CLEAR_LOG_ALL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_CLEAR_LOG_ALL(const CommonCmdPacket* packet) { (void)packet; @@ -771,16 +771,16 @@ CCP_EXEC_STS Cmd_EL_CLEAR_LOG_ALL(const CommonCmdPacket* packet) EL_clear_latest_event_(); EL_clear_statistics_(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EL_CLEAR_LOG_BY_ERR_LEVEL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_CLEAR_LOG_BY_ERR_LEVEL(const CommonCmdPacket* packet) { EL_ERROR_LEVEL err_level = (EL_ERROR_LEVEL)CCP_get_param_from_packet(packet, 0, uint8_t); - if (err_level < 0) return CCP_EXEC_ILLEGAL_PARAMETER; - if (err_level >= EL_ERROR_LEVEL_MAX) return CCP_EXEC_ILLEGAL_PARAMETER; + if (err_level < 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (err_level >= EL_ERROR_LEVEL_MAX) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); #ifdef EL_IS_ENABLE_TLOG EL_clear_tlog_(err_level); @@ -790,49 +790,49 @@ CCP_EXEC_STS Cmd_EL_CLEAR_LOG_BY_ERR_LEVEL(const CommonCmdPacket* packet) EL_clear_clog_(err_level); #endif - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EL_CLEAR_STATISTICS(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_CLEAR_STATISTICS(const CommonCmdPacket* packet) { (void)packet; EL_clear_statistics_(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #ifdef EL_IS_ENABLE_TLOG -CCP_EXEC_STS Cmd_EL_CLEAR_TLOG(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_CLEAR_TLOG(const CommonCmdPacket* packet) { EL_ERROR_LEVEL err_level = (EL_ERROR_LEVEL)CCP_get_param_from_packet(packet, 0, uint8_t); - if (err_level < 0) return CCP_EXEC_ILLEGAL_PARAMETER; - if (err_level >= EL_ERROR_LEVEL_MAX) return CCP_EXEC_ILLEGAL_PARAMETER; + if (err_level < 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (err_level >= EL_ERROR_LEVEL_MAX) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); EL_clear_tlog_(err_level); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #endif #ifdef EL_IS_ENABLE_CLOG -CCP_EXEC_STS Cmd_EL_CLEAR_CLOG(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_CLEAR_CLOG(const CommonCmdPacket* packet) { EL_ERROR_LEVEL err_level = (EL_ERROR_LEVEL)CCP_get_param_from_packet(packet, 0, uint8_t); - if (err_level < 0) return CCP_EXEC_ILLEGAL_PARAMETER; - if (err_level >= EL_ERROR_LEVEL_MAX) return CCP_EXEC_ILLEGAL_PARAMETER; + if (err_level < 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (err_level >= EL_ERROR_LEVEL_MAX) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); EL_clear_clog_(err_level); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #endif -CCP_EXEC_STS Cmd_EL_RECORD_EVENT(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_RECORD_EVENT(const CommonCmdPacket* packet) { EL_GROUP group = (EL_GROUP)CCP_get_param_from_packet(packet, 0, uint32_t); uint32_t local = CCP_get_param_from_packet(packet, 1, uint32_t); @@ -844,24 +844,24 @@ CCP_EXEC_STS Cmd_EL_RECORD_EVENT(const CommonCmdPacket* packet) switch (ack) { case EL_ACK_OK: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case EL_ACK_TLOG_FULL: // 要検討だが,これは正常ではあるのでこれでよし - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case EL_ACK_ILLEGAL_GROUP: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); case EL_ACK_ILLEGAL_ERROR_LEVEL: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); case EL_ACK_DISABLE_LOGGING: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } #ifdef EL_IS_ENABLE_TLOG -CCP_EXEC_STS Cmd_EL_TLOG_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_TLOG_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) { uint8_t page_no = CCP_get_param_from_packet(packet, 0, uint8_t); EL_ERROR_LEVEL err_level = (EL_ERROR_LEVEL)CCP_get_param_from_packet(packet, 1, uint8_t); @@ -869,38 +869,38 @@ CCP_EXEC_STS Cmd_EL_TLOG_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) switch (err_level) { case EL_ERROR_LEVEL_HIGH: - if (page_no >= EL_TLOG_TLM_PAGE_MAX_HIGH) return CCP_EXEC_ILLEGAL_PARAMETER; + if (page_no >= EL_TLOG_TLM_PAGE_MAX_HIGH) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); break; #ifdef EL_IS_ENABLE_MIDDLE_ERROR_LEVEL case EL_ERROR_LEVEL_MIDDLE: - if (page_no >= EL_TLOG_TLM_PAGE_MAX_MIDDLE) return CCP_EXEC_ILLEGAL_PARAMETER; + if (page_no >= EL_TLOG_TLM_PAGE_MAX_MIDDLE) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); break; #endif case EL_ERROR_LEVEL_LOW: - if (page_no >= EL_TLOG_TLM_PAGE_MAX_LOW) return CCP_EXEC_ILLEGAL_PARAMETER; + if (page_no >= EL_TLOG_TLM_PAGE_MAX_LOW) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); break; #ifdef EL_IS_ENABLE_EL_ERROR_LEVEL case EL_ERROR_LEVEL_EL: - if (page_no > (EL_TLOG_LOG_SIZE_MAX_EL - 1) / EL_TLOG_TLM_PAGE_SIZE) return CCP_EXEC_ILLEGAL_PARAMETER; + if (page_no > (EL_TLOG_LOG_SIZE_MAX_EL - 1) / EL_TLOG_TLM_PAGE_SIZE) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); break; #endif case EL_ERROR_LEVEL_EH: - if (page_no > (EL_TLOG_LOG_SIZE_MAX_EH - 1) / EL_TLOG_TLM_PAGE_SIZE) return CCP_EXEC_ILLEGAL_PARAMETER; + if (page_no > (EL_TLOG_LOG_SIZE_MAX_EH - 1) / EL_TLOG_TLM_PAGE_SIZE) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); break; default: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } event_logger_.tlm_info.tlog.page_no = page_no; event_logger_.tlm_info.tlog.err_level = err_level; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #endif #ifdef EL_IS_ENABLE_CLOG -CCP_EXEC_STS Cmd_EL_CLOG_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_CLOG_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) { uint8_t page_no = CCP_get_param_from_packet(packet, 0, uint8_t); EL_ERROR_LEVEL err_level = (EL_ERROR_LEVEL)CCP_get_param_from_packet(packet, 1, uint8_t); @@ -908,46 +908,46 @@ CCP_EXEC_STS Cmd_EL_CLOG_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) switch (err_level) { case EL_ERROR_LEVEL_HIGH: - if (page_no >= EL_CLOG_TLM_PAGE_MAX_HIGH) return CCP_EXEC_ILLEGAL_PARAMETER; + if (page_no >= EL_CLOG_TLM_PAGE_MAX_HIGH) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); break; #ifdef EL_IS_ENABLE_MIDDLE_ERROR_LEVEL case EL_ERROR_LEVEL_MIDDLE: - if (page_no >= EL_CLOG_TLM_PAGE_MAX_MIDDLE) return CCP_EXEC_ILLEGAL_PARAMETER; + if (page_no >= EL_CLOG_TLM_PAGE_MAX_MIDDLE) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); break; #endif case EL_ERROR_LEVEL_LOW: - if (page_no >= EL_CLOG_TLM_PAGE_MAX_LOW) return CCP_EXEC_ILLEGAL_PARAMETER; + if (page_no >= EL_CLOG_TLM_PAGE_MAX_LOW) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); break; #ifdef EL_IS_ENABLE_EL_ERROR_LEVEL case EL_ERROR_LEVEL_EL: - if (page_no > (EL_CLOG_LOG_SIZE_MAX_EL - 1) / EL_CLOG_TLM_PAGE_SIZE) return CCP_EXEC_ILLEGAL_PARAMETER; + if (page_no > (EL_CLOG_LOG_SIZE_MAX_EL - 1) / EL_CLOG_TLM_PAGE_SIZE) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); break; #endif case EL_ERROR_LEVEL_EH: - if (page_no > (EL_CLOG_LOG_SIZE_MAX_EH - 1) / EL_CLOG_TLM_PAGE_SIZE) return CCP_EXEC_ILLEGAL_PARAMETER; + if (page_no > (EL_CLOG_LOG_SIZE_MAX_EH - 1) / EL_CLOG_TLM_PAGE_SIZE) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); break; default: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } event_logger_.tlm_info.clog.page_no = page_no; event_logger_.tlm_info.clog.err_level = err_level; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #endif -CCP_EXEC_STS Cmd_EL_INIT_LOGGING_SETTINGS(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_INIT_LOGGING_SETTINGS(const CommonCmdPacket* packet) { (void)packet; EL_enable_all_logging(); EL_load_default_settings(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EL_ENABLE_LOGGING(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_ENABLE_LOGGING(const CommonCmdPacket* packet) { EL_GROUP group = (EL_GROUP)CCP_get_param_from_packet(packet, 0, uint32_t); @@ -956,16 +956,16 @@ CCP_EXEC_STS Cmd_EL_ENABLE_LOGGING(const CommonCmdPacket* packet) switch (ack) { case EL_ACK_OK: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case EL_ACK_ILLEGAL_GROUP: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -CCP_EXEC_STS Cmd_EL_DISABLE_LOGGING(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_DISABLE_LOGGING(const CommonCmdPacket* packet) { EL_GROUP group = (EL_GROUP)CCP_get_param_from_packet(packet, 0, uint32_t); @@ -974,33 +974,33 @@ CCP_EXEC_STS Cmd_EL_DISABLE_LOGGING(const CommonCmdPacket* packet) switch (ack) { case EL_ACK_OK: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case EL_ACK_ILLEGAL_GROUP: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -CCP_EXEC_STS Cmd_EL_ENABLE_LOGGING_ALL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_ENABLE_LOGGING_ALL(const CommonCmdPacket* packet) { (void)packet; EL_enable_all_logging(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EL_DISABLE_LOGGING_ALL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_DISABLE_LOGGING_ALL(const CommonCmdPacket* packet) { (void)packet; EL_disable_all_logging(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #ifdef EL_IS_ENABLE_TLOG -CCP_EXEC_STS Cmd_EL_ENABLE_TLOG_OVERWRITE(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_ENABLE_TLOG_OVERWRITE(const CommonCmdPacket* packet) { EL_ERROR_LEVEL err_level = (EL_ERROR_LEVEL)CCP_get_param_from_packet(packet, 0, uint8_t); @@ -1009,16 +1009,16 @@ CCP_EXEC_STS Cmd_EL_ENABLE_TLOG_OVERWRITE(const CommonCmdPacket* packet) switch (ack) { case EL_ACK_OK: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case EL_ACK_ILLEGAL_ERROR_LEVEL: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -CCP_EXEC_STS Cmd_EL_DISABLE_TLOG_OVERWRITE(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_DISABLE_TLOG_OVERWRITE(const CommonCmdPacket* packet) { EL_ERROR_LEVEL err_level = (EL_ERROR_LEVEL)CCP_get_param_from_packet(packet, 0, uint8_t); @@ -1027,28 +1027,28 @@ CCP_EXEC_STS Cmd_EL_DISABLE_TLOG_OVERWRITE(const CommonCmdPacket* packet) switch (ack) { case EL_ACK_OK: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case EL_ACK_ILLEGAL_ERROR_LEVEL: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -CCP_EXEC_STS Cmd_EL_ENABLE_TLOG_OVERWRITE_ALL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_ENABLE_TLOG_OVERWRITE_ALL(const CommonCmdPacket* packet) { (void)packet; EL_enable_tlog_overwrite_all(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_EL_DISABLE_TLOG_OVERWRITE_ALL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_EL_DISABLE_TLOG_OVERWRITE_ALL(const CommonCmdPacket* packet) { (void)packet; EL_disable_tlog_overwrite_all(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #endif diff --git a/System/EventManager/event_logger.h b/System/EventManager/event_logger.h index 634261c90..a9eea556a 100644 --- a/System/EventManager/event_logger.h +++ b/System/EventManager/event_logger.h @@ -37,11 +37,11 @@ #define EVENT_LOGGER_H_ // TODO: FALSHメモリ等の大容量不揮発ボリュームへの書き込み -// TODO: AL や EL そのもの全体をビルドする,しないをえらべる ifdef を追加(メモリのため) +// TODO: EL そのもの全体をビルドする,しないをえらべる ifdef を追加(メモリのため) // TODO: ObcTime の初期化が OBCT_clear ではなく memset 0x00 である(現状問題ないが,今後問題になるかも) #include -#include +#include #include "../../TlmCmd/common_cmd_packet.h" #include "../TimeManager/obc_time.h" @@ -216,7 +216,8 @@ typedef enum EL_CORE_GROUP_EH_RESPOND_WITH_HIGHER_LEVEL_RULE, //!< EH_Rule でマッチしたが,そのルールで対応せずに,上位のルールで対応させた(詳細は event_handler.h 参照) EL_CORE_GROUP_COMMAND_ANALYZE, EL_CORE_GROUP_CDIS_INTERNAL_ERR, - EL_CORE_GROUP_CDIS_EXEC_ERR, + EL_CORE_GROUP_CDIS_EXEC_ERR_STS, + EL_CORE_GROUP_CDIS_EXEC_ERR_CODE, // TODO: Driver Super #ifdef EL_IS_ENABLE_EL_ERROR_LEVEL EL_CORE_GROUP_EL_DROP_CLOG1, //!< EL CLogs で古いエラーを上書きするとき (group, err_level を保存) @@ -511,50 +512,50 @@ int EL_is_tlog_overwrite_enable(EL_ERROR_LEVEL err_level); const EL_Event* EL_get_the_nth_tlog_from_the_latest(EL_ERROR_LEVEL err_level, uint16_t n); #endif -CCP_EXEC_STS Cmd_EL_INIT(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_INIT(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EL_CLEAR_LOG_ALL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_CLEAR_LOG_ALL(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EL_CLEAR_LOG_BY_ERR_LEVEL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_CLEAR_LOG_BY_ERR_LEVEL(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EL_CLEAR_STATISTICS(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_CLEAR_STATISTICS(const CommonCmdPacket* packet); #ifdef EL_IS_ENABLE_TLOG -CCP_EXEC_STS Cmd_EL_CLEAR_TLOG(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_CLEAR_TLOG(const CommonCmdPacket* packet); #endif #ifdef EL_IS_ENABLE_CLOG -CCP_EXEC_STS Cmd_EL_CLEAR_CLOG(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_CLEAR_CLOG(const CommonCmdPacket* packet); #endif -CCP_EXEC_STS Cmd_EL_RECORD_EVENT(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_RECORD_EVENT(const CommonCmdPacket* packet); #ifdef EL_IS_ENABLE_TLOG -CCP_EXEC_STS Cmd_EL_TLOG_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_TLOG_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet); #endif #ifdef EL_IS_ENABLE_CLOG -CCP_EXEC_STS Cmd_EL_CLOG_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_CLOG_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet); #endif -CCP_EXEC_STS Cmd_EL_INIT_LOGGING_SETTINGS(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_INIT_LOGGING_SETTINGS(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EL_ENABLE_LOGGING(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_ENABLE_LOGGING(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EL_DISABLE_LOGGING(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_DISABLE_LOGGING(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EL_ENABLE_LOGGING_ALL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_ENABLE_LOGGING_ALL(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EL_DISABLE_LOGGING_ALL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_DISABLE_LOGGING_ALL(const CommonCmdPacket* packet); #ifdef EL_IS_ENABLE_TLOG -CCP_EXEC_STS Cmd_EL_ENABLE_TLOG_OVERWRITE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_ENABLE_TLOG_OVERWRITE(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EL_DISABLE_TLOG_OVERWRITE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_DISABLE_TLOG_OVERWRITE(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EL_ENABLE_TLOG_OVERWRITE_ALL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_ENABLE_TLOG_OVERWRITE_ALL(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_EL_DISABLE_TLOG_OVERWRITE_ALL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_EL_DISABLE_TLOG_OVERWRITE_ALL(const CommonCmdPacket* packet); #endif #endif diff --git a/System/ModeManager/mode_manager.c b/System/ModeManager/mode_manager.c index 4eb74fdf7..1a7f1111c 100644 --- a/System/ModeManager/mode_manager.c +++ b/System/ModeManager/mode_manager.c @@ -9,14 +9,13 @@ #include "../TimeManager/time_manager.h" #include "../TaskManager/task_dispatcher.h" -#include "../AnomalyLogger/anomaly_logger.h" #include "../EventManager/event_logger.h" #include "../../TlmCmd/block_command_executor.h" #include "../../TlmCmd/common_cmd_packet_util.h" #include #include "../../TlmCmd/packet_handler.h" -#include "../../Applications/timeline_command_dispatcher.h" -#include "../../Library/endian_memcpy.h" +#include "../../Applications/timeline_command_dispatcher_id_define.h" +#include "../../Library/endian.h" /** * @brief Cmd_MM_START_TRANSITIONの実体 @@ -83,7 +82,7 @@ void MM_clear_transition_table_(void) * @brief * モード遷移後にタスクリストとして実行するブロックコマンドを設定するコマンド */ -CCP_EXEC_STS Cmd_MM_SET_MODE_LIST(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_MM_SET_MODE_LIST(const CommonCmdPacket* packet) { MD_MODEID mode; bct_id_t bc_index; @@ -92,19 +91,19 @@ CCP_EXEC_STS Cmd_MM_SET_MODE_LIST(const CommonCmdPacket* packet) if (CCP_get_param_len(packet) != (1 + SIZE_OF_BCT_ID_T)) { // パラメータはパケットヘッダとuint8_t 2個(mode, index)。 - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } // どのモードにどのブロックコマンドを登録するかを引数から読み出す mode = (MD_MODEID)param[0]; - endian_memcpy(&bc_index, param + 1, SIZE_OF_BCT_ID_T); + ENDIAN_memcpy(&bc_index, param + 1, SIZE_OF_BCT_ID_T); mode_manager_.mm_ack = MM_set_mode_list(mode, bc_index); if (mode_manager_.mm_ack != MM_SUCCESS) { - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } MM_ACK MM_set_mode_list(MD_MODEID mode, bct_id_t bc_index) @@ -135,7 +134,7 @@ MM_ACK MM_set_mode_list(MD_MODEID mode, bct_id_t bc_index) * @brief * モード遷移時に実行するブロックコマンドを設定するコマンド */ -CCP_EXEC_STS Cmd_MM_SET_TRANSITION_TABLE(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_MM_SET_TRANSITION_TABLE(const CommonCmdPacket* packet) { unsigned char from, to; bct_id_t bc_index; @@ -144,20 +143,20 @@ CCP_EXEC_STS Cmd_MM_SET_TRANSITION_TABLE(const CommonCmdPacket* packet) if (CCP_get_param_len(packet) != 1 + 1 + SIZE_OF_BCT_ID_T) { // コマンドはパケットヘッダとuint8_t 3個(from, to, index)。 - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } // どのモード遷移にどのブロックコマンドを登録するかを引数から読み出す from = param[0]; to = param[1]; - endian_memcpy(&bc_index, param + 2, SIZE_OF_BCT_ID_T); + ENDIAN_memcpy(&bc_index, param + 2, SIZE_OF_BCT_ID_T); mode_manager_.mm_ack = MM_set_transition_table((MD_MODEID)from, (MD_MODEID)to, bc_index); if (mode_manager_.mm_ack != MM_SUCCESS) { - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } MM_ACK MM_set_transition_table(MD_MODEID from, @@ -190,7 +189,7 @@ MM_ACK MM_set_transition_table(MD_MODEID from, * @brief * モード遷移を開始するコマンド */ -CCP_EXEC_STS Cmd_MM_START_TRANSITION(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_MM_START_TRANSITION(const CommonCmdPacket* packet) { MD_MODEID id; @@ -201,9 +200,9 @@ CCP_EXEC_STS Cmd_MM_START_TRANSITION(const CommonCmdPacket* packet) mode_manager_.mm_ack = MM_start_transition_(id); if (mode_manager_.mm_ack != MM_SUCCESS) { - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } static MM_ACK MM_start_transition_(MD_MODEID id) @@ -213,18 +212,12 @@ static MM_ACK MM_start_transition_(MD_MODEID id) if (id >= MD_MODEID_MODE_MAX) { // 定義されていないモード番号が指定された場合 -#ifndef AL_DISALBE_AT_C2A_CORE - AL_add_anomaly(AL_CORE_GROUP_MODE_MANAGER, MM_BAD_ID); -#endif EL_record_event((EL_GROUP)EL_CORE_GROUP_MODE_MANAGER, MM_BAD_ID, EL_ERROR_LEVEL_LOW, (uint32_t)id); return MM_BAD_ID; } else if (mode_manager_.stat != MM_STATUS_FINISHED) { // 別のモード遷移を実行中の場合 -#ifndef AL_DISALBE_AT_C2A_CORE - AL_add_anomaly(AL_CORE_GROUP_MODE_MANAGER, MM_OVERWRITE); -#endif EL_record_event((EL_GROUP)EL_CORE_GROUP_MODE_MANAGER, MM_OVERWRITE, EL_ERROR_LEVEL_LOW, (uint32_t)mode_manager_.current_id); return MM_OVERWRITE; } @@ -235,9 +228,6 @@ static MM_ACK MM_start_transition_(MD_MODEID id) if (bc_index == MM_NOT_DEFINED) { // 実行したいモード遷移に対応するブロックコマンドが登録されていない場合 -#ifndef AL_DISALBE_AT_C2A_CORE - AL_add_anomaly(AL_CORE_GROUP_MODE_MANAGER, MM_ILLEGAL_MOVE); -#endif EL_record_event((EL_GROUP)EL_CORE_GROUP_MODE_MANAGER, MM_ILLEGAL_MOVE, EL_ERROR_LEVEL_LOW, (uint32_t)bc_index); return MM_ILLEGAL_MOVE; } @@ -258,16 +248,16 @@ static MM_ACK MM_start_transition_(MD_MODEID id) * モード遷移のブロックコマンドの最後に入れて使う * 入っていない場合、タスクリストが遷移先のモードに置き換わらないので注意 */ -CCP_EXEC_STS Cmd_MM_FINISH_TRANSITION(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_MM_FINISH_TRANSITION(const CommonCmdPacket* packet) { (void)packet; mode_manager_.mm_ack = MM_finish_transition_(); if (mode_manager_.mm_ack != MM_SUCCESS) { - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } static MM_ACK MM_finish_transition_(void) @@ -277,9 +267,6 @@ static MM_ACK MM_finish_transition_(void) if (mode_manager_.stat != MM_STATUS_IN_PROGRESS) { // モード遷移が実行中でない場合 -#ifndef AL_DISALBE_AT_C2A_CORE - AL_add_anomaly(AL_CORE_GROUP_MODE_MANAGER, MM_NOT_IN_PROGRESS); -#endif EL_record_event((EL_GROUP)EL_CORE_GROUP_MODE_MANAGER, MM_NOT_IN_PROGRESS, EL_ERROR_LEVEL_HIGH, (uint32_t)mode_manager_.current_id); return MM_NOT_IN_PROGRESS; } @@ -295,9 +282,6 @@ static MM_ACK MM_finish_transition_(void) break; default: -#ifndef AL_DISALBE_AT_C2A_CORE - AL_add_anomaly(AL_CORE_GROUP_MODE_MANAGER, MM_TL_LOAD_FAILED); -#endif EL_record_event((EL_GROUP)EL_CORE_GROUP_MODE_MANAGER, MM_TL_LOAD_FAILED, EL_ERROR_LEVEL_HIGH, (uint32_t)ack); break; } @@ -312,12 +296,12 @@ static void MM_deploy_block_cmd_(bct_id_t bc_index) CCP_form_and_exec_block_deploy_cmd(TLCD_ID_DEPLOY_BC, bc_index); } -CCP_EXEC_STS Cmd_MM_UPDATE_TRANSITION_TABLE_FOR_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_MM_UPDATE_TRANSITION_TABLE_FOR_TLM(const CommonCmdPacket* packet) { (void)packet; MM_update_transition_table_for_tlm(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } uint16_t MM_update_transition_table_for_tlm(void) diff --git a/System/ModeManager/mode_manager.h b/System/ModeManager/mode_manager.h index 9b1f02853..ea9b2002d 100644 --- a/System/ModeManager/mode_manager.h +++ b/System/ModeManager/mode_manager.h @@ -112,10 +112,10 @@ MM_ACK MM_set_transition_table(MD_MODEID from, MD_MODEID to, bct_id_t bc_index); */ bct_id_t MM_get_tasklist_id_of_mode(MD_MODEID mode); -CCP_EXEC_STS Cmd_MM_SET_MODE_LIST(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_MM_SET_TRANSITION_TABLE(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_MM_START_TRANSITION(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_MM_FINISH_TRANSITION(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_MM_UPDATE_TRANSITION_TABLE_FOR_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_MM_SET_MODE_LIST(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_MM_SET_TRANSITION_TABLE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_MM_START_TRANSITION(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_MM_FINISH_TRANSITION(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_MM_UPDATE_TRANSITION_TABLE_FOR_TLM(const CommonCmdPacket* packet); #endif diff --git a/System/TaskManager/task_dispatcher.c b/System/TaskManager/task_dispatcher.c index ae832c913..b891f0940 100644 --- a/System/TaskManager/task_dispatcher.c +++ b/System/TaskManager/task_dispatcher.c @@ -1,4 +1,10 @@ #pragma section REPRO +/** + * @file + * @brief task list に設定されたタスクを実行する主体 + * @note これは, RT OS のタスク時分割処理に相当する + * したがって,これによって, 1 cycle を step 刻みで各 task に振り分けて実行していくことになる + */ #include "task_dispatcher.h" #include @@ -6,70 +12,75 @@ #include "../../TlmCmd/packet_list_util.h" #include "../../TlmCmd/block_command_executor.h" +#include "../../TlmCmd/common_cmd_packet_util.h" #include "../ModeManager/mode_manager.h" #include "../TimeManager/time_manager.h" -#include "../AnomalyLogger/anomaly_logger.h" #include "../EventManager/event_logger.h" #include #include -#include "../../Library/print.h" -#include -static TDSP_Info TDSP_info_; -const TDSP_Info* const TDSP_info = &TDSP_info_; +#define TDSP_TASK_MAX BCT_MAX_CMD_NUM + +static TaskDsipatcher task_dispathcer_; +const TaskDsipatcher* const task_dispathcer = &task_dispathcer_; // 現在のサイクルで実行すべきタスク一覧を保存したもの -static PacketList task_list_; +static PacketList TDSP_task_list_; /** - * @brief `TDSP_info_.task_list_id` に登録された BC を TaskListに展開. + * @brief `task_dispathcer_.task_list_id` に登録された BC を TaskListに展開. * @note 実際に BC の内容を読み込み、展開しているのは `PL_ACK PL_deploy_block_cmd(args)` */ static void TDSP_deploy_block_as_task_list_(void); +// debug_apps にあるべき & 今はつわかないので無効化 +#if 0 +#include "../../Library/print.h" +#include /** * @brief デバッグ情報表示 */ -static void print_tdsp_status_(void); +static void TDSP_print_tdsp_status_(void); +#endif + void TDSP_initialize(void) { static PL_Node task_stock_[TDSP_TASK_MAX]; static CommonCmdPacket packet_stock_[TDSP_TASK_MAX]; - PL_initialize_with_ccp(task_stock_, packet_stock_, TDSP_TASK_MAX, &task_list_); + PL_initialize_with_ccp(task_stock_, packet_stock_, TDSP_TASK_MAX, &TDSP_task_list_); // タスクリストを初期化し、INITIALモードのブロックコマンドを展開する - TDSP_info_.tskd = CDIS_init(&task_list_); - TDSP_info_.task_list_id = MM_get_tasklist_id_of_mode(MD_MODEID_START_UP); + task_dispathcer_.tskd = CDIS_init(&TDSP_task_list_); + task_dispathcer_.task_list_id = MM_get_tasklist_id_of_mode(MD_MODEID_START_UP); TDSP_deploy_block_as_task_list_(); - TDSP_info_.activated_at = 0; + task_dispathcer_.activated_at = 0; } + TDSP_ACK TDSP_set_task_list_id(bct_id_t id) { if (id >= BCT_MAX_BLOCKS) return TDSP_INVAILD_BCT_ID; if (!BCE_is_active(id)) return TDSP_INACTIVE_BCT_ID; if (BCT_get_bc_length(id) == 0) return TDSP_EMPTY_BC; - TDSP_info_.task_list_id = id; + task_dispathcer_.task_list_id = id; return TDSP_SUCCESS; } + static void TDSP_deploy_block_as_task_list_(void) { PL_ACK ack; // 本関数内の処理中にMaster Cycleが変化した場合を検出できるよう、 // まず次Master Cycleの情報を更新する。 - TDSP_info_.activated_at = TMGR_get_master_total_cycle() + 1; + task_dispathcer_.activated_at = TMGR_get_master_total_cycle() + 1; - ack = PL_deploy_block_cmd(&task_list_, TDSP_info_.task_list_id, 0); + ack = PL_deploy_block_cmd(&TDSP_task_list_, task_dispathcer_.task_list_id, 0); if (ack != PL_SUCCESS) { -#ifndef AL_DISALBE_AT_C2A_CORE - AL_add_anomaly(AL_CORE_GROUP_TASK_DISPATCHER, TDSP_DEPLOY_FAILED); -#endif EL_record_event((EL_GROUP)EL_CORE_GROUP_TASK_DISPATCHER, TDSP_DEPLOY_FAILED, EL_ERROR_LEVEL_HIGH, @@ -77,6 +88,7 @@ static void TDSP_deploy_block_as_task_list_(void) } } + void TDSP_execute_pl_as_task_list(void) { // まずは (1)ブロックコマンドがタスクリストに展開された時のサイクル数 と (2)現在のサイクル数 を比較 @@ -84,40 +96,34 @@ void TDSP_execute_pl_as_task_list(void) // (1) > (2) の時は今回のサイクルで実行すべきコマンドがすべて実行済みである // (1) < (2) の時は展開から 1サイクル (100ms) 以上経過してしまっているので強制終了する - if (TDSP_info_.activated_at == TMGR_get_master_total_cycle()) + if (task_dispathcer_.activated_at == TMGR_get_master_total_cycle()) { // タスクリストの先頭コマンド実行予定時刻と現在時刻を比較 - PL_ACK ack = PL_check_tl_cmd(&task_list_, + PL_ACK ack = PL_check_tl_cmd(&TDSP_task_list_, (size_t)(TMGR_get_master_step())); switch (ack) { case PL_TLC_PAST_TIME: // 実行時刻が過ぎていた場合は実行前にアノマリを登録。 -#ifndef AL_DISALBE_AT_C2A_CORE - AL_add_anomaly(AL_CORE_GROUP_TASK_DISPATCHER, TDSP_STEP_OVERRUN); -#endif EL_record_event((EL_GROUP)EL_CORE_GROUP_TASK_DISPATCHER, TDSP_STEP_OVERRUN, EL_ERROR_LEVEL_LOW, - (uint32_t)CCP_get_ti( (const CommonCmdPacket*)(PL_get_head(&task_list_)->packet) )); + (uint32_t)CCP_get_ti( (const CommonCmdPacket*)(PL_get_head(&TDSP_task_list_)->packet) )); // FALL THROUGH case PL_TLC_ON_TIME: // 実行時刻が過ぎている、もしくは実行時刻ピッタリの場合はコマンドを実行 - CDIS_dispatch_command(&(TDSP_info_.tskd)); + CDIS_dispatch_command(&(task_dispathcer_.tskd)); - if (TDSP_info_.tskd.prev.sts != CCP_EXEC_SUCCESS) + if (task_dispathcer_.tskd.prev.cmd_ret.exec_sts != CCP_EXEC_SUCCESS) { // コマンド実行時に異常が発生した場合はアノマリを登録。 -#ifndef AL_DISALBE_AT_C2A_CORE - AL_add_anomaly(AL_CORE_GROUP_TASK_DISPATCHER, TDSP_TASK_EXEC_FAILED); -#endif EL_record_event((EL_GROUP)EL_CORE_GROUP_TASK_DISPATCHER, TDSP_TASK_EXEC_FAILED, EL_ERROR_LEVEL_HIGH, - TDSP_info_.tskd.prev.sts); + task_dispathcer_.tskd.prev.cmd_ret.exec_sts); } break; @@ -127,10 +133,10 @@ void TDSP_execute_pl_as_task_list(void) // ・タスクリストが空 // ・次のコマンドの実行時刻がまだ - if (PL_count_active_nodes(&task_list_) == 0) + if (PL_count_active_nodes(&TDSP_task_list_) == 0) { // task_listが空なら再度タスクリストを展開 - // これを行うとTDSP_info_.activated_atがインクリメントされるので、"次のサイクル実行待ち状態"になる + // これを行うとtask_dispathcer_.activated_atがインクリメントされるので、"次のサイクル実行待ち状態"になる TDSP_deploy_block_as_task_list_(); } @@ -138,53 +144,49 @@ void TDSP_execute_pl_as_task_list(void) default: // 基本ここには来ない -#ifndef AL_DISALBE_AT_C2A_CORE - AL_add_anomaly(AL_CORE_GROUP_TASK_DISPATCHER, TDSP_UNKNOWN); -#endif EL_record_event((EL_GROUP)EL_CORE_GROUP_TASK_DISPATCHER, TDSP_UNKNOWN, EL_ERROR_LEVEL_HIGH, (uint32_t)ack); } } - else if (TDSP_info_.activated_at > TMGR_get_master_total_cycle()) + else if (task_dispathcer_.activated_at > TMGR_get_master_total_cycle()) { // 次のサイクルの実行待ち状態 return; } - else if (TDSP_info_.activated_at < TMGR_get_master_total_cycle()) + else if (task_dispathcer_.activated_at < TMGR_get_master_total_cycle()) { - if ((TDSP_info_.activated_at == 0) && (TMGR_get_master_total_cycle() == OBCT_MAX_CYCLE - 1)) + if ((task_dispathcer_.activated_at == 0) && (TMGR_get_master_total_cycle() == OBCT_MAX_CYCLE - 1)) { // 次サイクルの実行待ち状態(サイクルオーバーフロー直前) - // 本来は TDSP_info_.activated_at > TMGR_get_master_total_cycle() となるはずが、 - // TDSP_info_.activated_atがあふれて0に戻っている場合ここに来る + // 本来は task_dispathcer_.activated_at > TMGR_get_master_total_cycle() となるはずが、 + // task_dispathcer_.activated_atがあふれて0に戻っている場合ここに来る return; } else { // 1サイクル以内に全てのコマンドを実行し終えなかった場合ここに来る -#ifndef AL_DISALBE_AT_C2A_CORE - AL_add_anomaly(AL_CORE_GROUP_TASK_DISPATCHER, TDSP_CYCLE_OVERRUN); -#endif EL_record_event((EL_GROUP)EL_CORE_GROUP_TASK_DISPATCHER, TDSP_CYCLE_OVERRUN, EL_ERROR_LEVEL_HIGH, 0); // リストをクリア->再展開し次サイクルから再実行 - PL_clear_list(&task_list_); + PL_clear_list(&TDSP_task_list_); TDSP_deploy_block_as_task_list_(); } } } + void TDSP_resync_internal_counter(void) { - TDSP_info_.activated_at = TMGR_get_master_total_cycle(); + task_dispathcer_.activated_at = TMGR_get_master_total_cycle(); } -CCP_EXEC_STS Cmd_TDSP_SET_TASK_LIST(const CommonCmdPacket* packet) + +CCP_CmdRet Cmd_TDSP_SET_TASK_LIST(const CommonCmdPacket* packet) { // FIXME: u8 でいいのか? まあ,いい気もする. TDSP_ACK ack = TDSP_set_task_list_id((bct_id_t)(CCP_get_param_head(packet)[0])); @@ -192,29 +194,35 @@ CCP_EXEC_STS Cmd_TDSP_SET_TASK_LIST(const CommonCmdPacket* packet) switch (ack) { case TDSP_SUCCESS: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); case TDSP_INVAILD_BCT_ID: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); case TDSP_INACTIVE_BCT_ID: case TDSP_EMPTY_BC: default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } } -AppInfo print_tdsp_status(void) + +// debug_apps にあるべき & 今はつわかないので無効化 +#if 0 +AppInfo TDSP_print_tdsp_status(void) { - return AI_create_app_info("tstm", NULL, print_tdsp_status_); + return AI_create_app_info("tstm", NULL, TDSP_print_tdsp_status_); } -void print_tdsp_status_(void) + +void TDSP_print_tdsp_status_(void) { VT100_erase_line(); - Printf("TASK: BC %d, ERR (TOTAL, STEP, STS) = (%10u, %3u, %d)\n", - TDSP_info->task_list_id, - TDSP_info->tskd.prev_err.time.total_cycle, - TDSP_info->tskd.prev_err.time.step, - TDSP_info->tskd.prev_err.sts); + Printf("TASK: BC %d, ERR (TOTAL, STEP, STS, CODE) = (%10u, %3u, %d, %d)\n", + task_dispathcer->task_list_id, + task_dispathcer->tskd.prev_err.time.total_cycle, + task_dispathcer->tskd.prev_err.time.step, + task_dispathcer->tskd.prev_err.cmd_ret.exec_sts, + task_dispathcer->tskd.prev_err.cmd_ret.err_code); } +#endif #pragma section diff --git a/System/TaskManager/task_dispatcher.h b/System/TaskManager/task_dispatcher.h index 064476e3a..5ffdcf33d 100644 --- a/System/TaskManager/task_dispatcher.h +++ b/System/TaskManager/task_dispatcher.h @@ -1,3 +1,9 @@ +/** + * @file + * @brief task list に設定されたタスクを実行する主体 + * @note これは, RT OS のタスク時分割処理に相当する + * したがって,これによって, 1 cycle を step 刻みで各 task に振り分けて実行していくことになる + */ #ifndef TASK_DISPATCHER_H_ #define TASK_DISPATCHER_H_ @@ -5,10 +11,8 @@ #include "../../TlmCmd/command_dispatcher.h" #include "../ApplicationManager/app_info.h" -#define TDSP_TASK_MAX BCT_MAX_CMD_NUM - /** - * @struct TDSP_Info + * @struct TaskDsipatcher * @brief TaskDispatcherの状態 */ typedef struct @@ -16,7 +20,7 @@ typedef struct CommandDispatcher tskd; //!< タスクリストへのポインタと、その他実行情報を保存する構造体 bct_id_t task_list_id; //!< タスクリストに展開するブロックコマンドのID cycle_t activated_at; //!< ブロックコマンドがタスクリストに展開された時のサイクル数 -} TDSP_Info; +} TaskDsipatcher; /** * @enum TDSP_ACK @@ -36,11 +40,10 @@ typedef enum TDSP_UNKNOWN } TDSP_ACK; -// FIXME: extern const TaskDsipatcher* const task_dispathcer; に直す -extern const TDSP_Info* const TDSP_info; +extern const TaskDsipatcher* const task_dispathcer; /** - * @brief タスク管理を行うTDSP_Info構造体(TDSP_Info_)の初期化 + * @brief タスク管理を行うTaskDsipatcher構造体(TaskDsipatcher_)の初期化 * @note データ構造は Packet List */ void TDSP_initialize(void); @@ -59,7 +62,7 @@ TDSP_ACK TDSP_set_task_list_id(bct_id_t id); * 展開されているタスクリストの実行時刻 (cycle レベル) を比較し, task_list_ に登録されているタスクを順番に実行する. * 1つタスクを消化すると return する. (while(1) で回っているのですぐ戻ってくる.) * 実行 cycle が現在だった場合, 各タスクの step によって実行する, しないを switch に合わせて処理する. - * 実際にタスクを処理する場合, CDIS_dispatch_command -> PH_dispatch_command -> cmdExec の順に実行される(真の Executer は cmdExec). + * 実際にタスクを処理する場合, CDIS_dispatch_command -> PH_dispatch_command -> CA_execute_cmd の順に実行される(真の Executer は CA_execute_cmd). */ void TDSP_execute_pl_as_task_list(void); @@ -71,8 +74,11 @@ void TDSP_resync_internal_counter(void); /** * @brief 指定したブロックコマンドを、次にタスクリストに展開するものとして登録するコマンド */ -CCP_EXEC_STS Cmd_TDSP_SET_TASK_LIST(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TDSP_SET_TASK_LIST(const CommonCmdPacket* packet); -AppInfo print_tdsp_status(void); +// debug_apps にあるべき & 今はつわかないので無効化 +#if 0 +AppInfo TDSP_print_tdsp_status(void); +#endif #endif diff --git a/System/TimeManager/obc_time.h b/System/TimeManager/obc_time.h index 7ebb3cf63..e45923775 100644 --- a/System/TimeManager/obc_time.h +++ b/System/TimeManager/obc_time.h @@ -5,7 +5,7 @@ #ifndef OBC_TIME_H_ #define OBC_TIME_H_ -#include +#include // step, cycleについてはTimeManagerを参照のこと #define OBCT_STEP_IN_MSEC (1) //!< 1 step で何 ms か diff --git a/System/TimeManager/time_manager.c b/System/TimeManager/time_manager.c index 8aca51820..70be48dbe 100644 --- a/System/TimeManager/time_manager.c +++ b/System/TimeManager/time_manager.c @@ -36,9 +36,9 @@ static TMGR_ACK TMGR_set_cycle_correction_(double cycle_correction); /** * @brief enum 変換用関数 * @param[in] ack: TMGR_ACK - * @return CCP_EXEC_STS + * @return CCP_CmdRet */ -static CCP_EXEC_STS TMGR_conv_tmgr_ack_to_ccp_exec_sts_(TMGR_ACK ack); +static CCP_CmdRet TMGR_conv_tmgr_ack_to_ccp_cmd_ret_(TMGR_ACK ack); void TMGR_init(void) { @@ -232,28 +232,28 @@ static TMGR_ACK TMGR_set_cycle_correction_(double cycle_correction) return TMGR_ACK_OK; } -static CCP_EXEC_STS TMGR_conv_tmgr_ack_to_ccp_exec_sts_(TMGR_ACK ack) +static CCP_CmdRet TMGR_conv_tmgr_ack_to_ccp_cmd_ret_(TMGR_ACK ack) { switch (ack) { case TMGR_ACK_OK: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret(CCP_EXEC_SUCCESS, (uint32_t)ack); case TMGR_ACK_PARAM_ERR: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_PARAMETER, (uint32_t)ack); default: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_CONTEXT, (uint32_t)ack); } } -CCP_EXEC_STS Cmd_TMGR_SET_TIME(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TMGR_SET_TIME(const CommonCmdPacket* packet) { cycle_t set_value = CCP_get_param_from_packet(packet, 0, cycle_t); TMGR_ACK ack = TMGR_set_master_total_cycle_(set_value); - return TMGR_conv_tmgr_ack_to_ccp_exec_sts_(ack); + return TMGR_conv_tmgr_ack_to_ccp_cmd_ret_(ack); } -CCP_EXEC_STS Cmd_TMGR_UPDATE_UNIXTIME(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TMGR_UPDATE_UNIXTIME(const CommonCmdPacket* packet) { ObcTime time; double unixtime = CCP_get_param_from_packet(packet, 0, double); @@ -261,9 +261,9 @@ CCP_EXEC_STS Cmd_TMGR_UPDATE_UNIXTIME(const CommonCmdPacket* packet) step_t step = CCP_get_param_from_packet(packet, 2, cycle_t); TMGR_ACK ack; - if (unixtime < 0) return CCP_EXEC_ILLEGAL_PARAMETER; - if (total_cycle >= OBCT_MAX_CYCLE) return CCP_EXEC_ILLEGAL_PARAMETER; - if (step >= OBCT_STEPS_PER_CYCLE) return CCP_EXEC_ILLEGAL_PARAMETER; + if (unixtime < 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (total_cycle >= OBCT_MAX_CYCLE) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (step >= OBCT_STEPS_PER_CYCLE) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); time.total_cycle = total_cycle; time.step = step; @@ -271,39 +271,39 @@ CCP_EXEC_STS Cmd_TMGR_UPDATE_UNIXTIME(const CommonCmdPacket* packet) ack = TMGR_update_unixtime(unixtime, &time); - return TMGR_conv_tmgr_ack_to_ccp_exec_sts_(ack); + return TMGR_conv_tmgr_ack_to_ccp_cmd_ret_(ack); } -CCP_EXEC_STS Cmd_TMGR_SET_UTL_UNIXTIME_EPOCH(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TMGR_SET_UTL_UNIXTIME_EPOCH(const CommonCmdPacket* packet) { double utl_unixtime_epoch = CCP_get_param_from_packet(packet, 0, double); TMGR_ACK ack = TMGR_set_utl_unixtime_epoch_(utl_unixtime_epoch); - return TMGR_conv_tmgr_ack_to_ccp_exec_sts_(ack); + return TMGR_conv_tmgr_ack_to_ccp_cmd_ret_(ack); } -CCP_EXEC_STS Cmd_TMGR_SET_CYCLE_CORRECTION(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TMGR_SET_CYCLE_CORRECTION(const CommonCmdPacket* packet) { double cycle_correction = CCP_get_param_from_packet(packet, 0, double); TMGR_ACK ack = TMGR_set_cycle_correction_(cycle_correction); - return TMGR_conv_tmgr_ack_to_ccp_exec_sts_(ack); + return TMGR_conv_tmgr_ack_to_ccp_cmd_ret_(ack); } -CCP_EXEC_STS Cmd_TMGR_RESET_CYCLE_CORRECTION(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TMGR_RESET_CYCLE_CORRECTION(const CommonCmdPacket* packet) { (void)packet; TMGR_set_cycle_correction_(1.0); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TMGR_CLEAR_UNIXTIME_INFO(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TMGR_CLEAR_UNIXTIME_INFO(const CommonCmdPacket* packet) { (void)packet; TMGR_clear_unixtime_info(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/System/TimeManager/time_manager.h b/System/TimeManager/time_manager.h index 6c565aa8c..57cb37a5c 100644 --- a/System/TimeManager/time_manager.h +++ b/System/TimeManager/time_manager.h @@ -228,16 +228,16 @@ ObcTime TMGR_get_obc_time_from_unixtime(const double unixtime); */ cycle_t TMGR_get_ti_from_utl_unixtime(const cycle_t utl_unixtime); -CCP_EXEC_STS Cmd_TMGR_SET_TIME(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TMGR_SET_TIME(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_TMGR_UPDATE_UNIXTIME(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TMGR_UPDATE_UNIXTIME(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_TMGR_SET_UTL_UNIXTIME_EPOCH(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TMGR_SET_UTL_UNIXTIME_EPOCH(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_TMGR_SET_CYCLE_CORRECTION(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TMGR_SET_CYCLE_CORRECTION(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_TMGR_RESET_CYCLE_CORRECTION(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TMGR_RESET_CYCLE_CORRECTION(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_TMGR_CLEAR_UNIXTIME_INFO(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TMGR_CLEAR_UNIXTIME_INFO(const CommonCmdPacket* packet); #endif diff --git a/System/WatchdogTimer/watchdog_timer.c b/System/WatchdogTimer/watchdog_timer.c index c0b6b4d89..ccb6a76aa 100644 --- a/System/WatchdogTimer/watchdog_timer.c +++ b/System/WatchdogTimer/watchdog_timer.c @@ -6,6 +6,7 @@ */ #include "watchdog_timer.h" #include "../../Library/print.h" +#include "../../TlmCmd/common_cmd_packet_util.h" static WDT_Config wdt_config_; const WDT_Config* const wdt_config = &wdt_config_; @@ -43,15 +44,15 @@ void WDT_clear_wdt(void) // ここからリプロ対象内!! -CCP_EXEC_STS Cmd_WDT_INIT(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_WDT_INIT(const CommonCmdPacket* packet) { (void)packet; wdt_init_(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_WDT_ENABLE(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_WDT_ENABLE(const CommonCmdPacket* packet) { int ret; (void)packet; @@ -61,13 +62,13 @@ CCP_EXEC_STS Cmd_WDT_ENABLE(const CommonCmdPacket* packet) if (ret != 0) { - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_WDT_DISABLE(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_WDT_DISABLE(const CommonCmdPacket* packet) { int ret; (void)packet; @@ -77,28 +78,28 @@ CCP_EXEC_STS Cmd_WDT_DISABLE(const CommonCmdPacket* packet) if (ret != 0) { - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_WDT_STOP_CLEAR(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_WDT_STOP_CLEAR(const CommonCmdPacket* packet) { (void)packet; wdt_config_.is_clear_enable = 0; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_WDT_START_CLEAR(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_WDT_START_CLEAR(const CommonCmdPacket* packet) { (void)packet; wdt_config_.is_clear_enable = 1; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/System/WatchdogTimer/watchdog_timer.h b/System/WatchdogTimer/watchdog_timer.h index 2ad234c52..6a59e81a8 100644 --- a/System/WatchdogTimer/watchdog_timer.h +++ b/System/WatchdogTimer/watchdog_timer.h @@ -31,10 +31,10 @@ void WDT_clear_wdt(void); // ↑全再プロ対象外 // ↓全再プロ対象内 -CCP_EXEC_STS Cmd_WDT_INIT(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_WDT_ENABLE(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_WDT_DISABLE(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_WDT_STOP_CLEAR(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_WDT_START_CLEAR(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_WDT_INIT(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_WDT_ENABLE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_WDT_DISABLE(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_WDT_STOP_CLEAR(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_WDT_START_CLEAR(const CommonCmdPacket* packet); #endif diff --git a/TlmCmd/Ccsds/cmd_space_packet.c b/TlmCmd/Ccsds/cmd_space_packet.c index 174048f42..2a8aa55af 100644 --- a/TlmCmd/Ccsds/cmd_space_packet.c +++ b/TlmCmd/Ccsds/cmd_space_packet.c @@ -271,7 +271,7 @@ uint16_t CSP_get_param_len(const CmdSpacePacket* csp) void CSP_set_param(CmdSpacePacket* csp, const uint8_t* param, uint16_t len) { // パラメータをパケットにコピー - // paramは既に成形されているのでここは endian_memcpy ではなく memcpy (paramの数, 種類などがこの関数からは不明) + // paramは既に成形されているのでここは ENDIAN_memcpy ではなく memcpy (paramの数, 種類などがこの関数からは不明) // const ではダメなので, CSP_get_param_head が使えない memcpy(&(csp->packet[SP_PRM_HDR_LEN + CSP_SND_HDR_LEN]), param, (size_t)len); diff --git a/TlmCmd/Ccsds/cmd_space_packet.h b/TlmCmd/Ccsds/cmd_space_packet.h index 258aa07f2..784046a39 100644 --- a/TlmCmd/Ccsds/cmd_space_packet.h +++ b/TlmCmd/Ccsds/cmd_space_packet.h @@ -59,7 +59,7 @@ typedef enum #include // 相互参照問題があるので,この順番で include -#include +#include #include "space_packet_typedef.h" #include "space_packet.h" #include "../common_cmd_packet.h" diff --git a/TlmCmd/Ccsds/space_packet.c b/TlmCmd/Ccsds/space_packet.c index f0b574273..58813dd3a 100644 --- a/TlmCmd/Ccsds/space_packet.c +++ b/TlmCmd/Ccsds/space_packet.c @@ -5,7 +5,7 @@ * @note 詳細は space_packet.h を参照 */ #include "space_packet.h" -#include "../../Library/endian_memcpy.h" +#include "../../Library/endian.h" #include @@ -200,7 +200,7 @@ void SP_extract_param_from_packet(const SpacePacket* sp, } } - endian_memcpy(dst, buffer, pei->byte_len); + ENDIAN_memcpy(dst, buffer, pei->byte_len); } @@ -215,7 +215,7 @@ void SP_insert_param_to_packet(SpacePacket* sp, if (pei->byte_len > 8) return; if (pei->offset > 7) return; - endian_memcpy(buffer, src, pei->byte_len); + ENDIAN_memcpy(buffer, src, pei->byte_len); // offset あり if (pei->offset) diff --git a/TlmCmd/Ccsds/space_packet.h b/TlmCmd/Ccsds/space_packet.h index 606de3f4e..267b32260 100644 --- a/TlmCmd/Ccsds/space_packet.h +++ b/TlmCmd/Ccsds/space_packet.h @@ -36,7 +36,7 @@ #ifndef SPACE_PACKET_H_ #define SPACE_PACKET_H_ -#include +#include #include "space_packet_typedef.h" #include "../common_tlm_cmd_packet.h" diff --git a/TlmCmd/Ccsds/space_packet_typedef.h b/TlmCmd/Ccsds/space_packet_typedef.h index f5f37b806..21254c24c 100644 --- a/TlmCmd/Ccsds/space_packet_typedef.h +++ b/TlmCmd/Ccsds/space_packet_typedef.h @@ -6,7 +6,7 @@ #ifndef SPACE_PACKET_TYPEDEF_H_ #define SPACE_PACKET_TYPEDEF_H_ -#include +#include #define TSP_MAX_LEN (432) //!< TlmSpacePacket の最大パケット長.VCDU 分割しないならこれが最大値 #define CSP_MAX_LEN (128) //!< CmdSpacePacket の最大パケット長.値は適当においている diff --git a/TlmCmd/Ccsds/tlm_space_packet.c b/TlmCmd/Ccsds/tlm_space_packet.c index edc255e9b..62762eac1 100644 --- a/TlmCmd/Ccsds/tlm_space_packet.c +++ b/TlmCmd/Ccsds/tlm_space_packet.c @@ -19,7 +19,7 @@ static const SP_ParamExtractionInfo TSP_pei_tlm_id_ = {11, 0xff, 0, 1}; // static const SP_ParamExtractionInfo TSP_pei_global_time_ = {12, 0xff, 0, 8}; // 11111111b static const SP_ParamExtractionInfo TSP_pei_ob_sn_time_ = {20, 0xff, 0, 4}; // 11111111b static const SP_ParamExtractionInfo TSP_pei_dest_flags_ = {24, 0xff, 0, 1}; // 11111111b -static const SP_ParamExtractionInfo TSP_pei_dr_ptn_ = {25, 0x0f, 0, 1}; // 11111111b +static const SP_ParamExtractionInfo TSP_pei_dest_info_ = {25, 0x0f, 0, 1}; // 11111111b // ****************************** @@ -215,18 +215,18 @@ void TSP_set_dest_flags(TlmSpacePacket* tsp, ctp_dest_flags_t flags) } -uint8_t TSP_get_dr_partition(const TlmSpacePacket* tsp) +uint8_t TSP_get_dest_info(const TlmSpacePacket* tsp) { - uint8_t ptn; + uint8_t info; - SP_extract_param_from_packet(TSP_CAST_TO_SP(tsp), &TSP_pei_dr_ptn_, &ptn); - return ptn; + SP_extract_param_from_packet(TSP_CAST_TO_SP(tsp), &TSP_pei_dest_info_, &info); + return info; } -void TSP_set_dr_partition(TlmSpacePacket* tsp, uint8_t ptn) +void TSP_set_dest_info(TlmSpacePacket* tsp, uint8_t info) { - SP_insert_param_to_packet(TSP_CAST_TO_NON_CONST_SP(tsp), &TSP_pei_dr_ptn_, &ptn); + SP_insert_param_to_packet(TSP_CAST_TO_NON_CONST_SP(tsp), &TSP_pei_dest_info_, &info); } diff --git a/TlmCmd/Ccsds/tlm_space_packet.h b/TlmCmd/Ccsds/tlm_space_packet.h index 8727fc58e..2fffac82c 100644 --- a/TlmCmd/Ccsds/tlm_space_packet.h +++ b/TlmCmd/Ccsds/tlm_space_packet.h @@ -28,7 +28,7 @@ * | 20 | 0 | 32 | On-Board | * | | | | Subnetwork Time | * | 24 | 0 | 8 | Dest Flags | - * | 25 | 0 | 8 | DR Partition | + * | 25 | 0 | 8 | Dest Info | * |---------+-------+-------+------------------| * | === User Data Field ====================== | * |---------+-------+-------+------------------| @@ -72,7 +72,7 @@ typedef enum #include // 相互参照問題があるので,この順番で include -#include +#include #include "space_packet_typedef.h" #include "space_packet.h" #include "../common_tlm_packet.h" @@ -289,19 +289,19 @@ ctp_dest_flags_t TSP_get_dest_flags(const TlmSpacePacket* tsp); void TSP_set_dest_flags(TlmSpacePacket* tsp, ctp_dest_flags_t flags); /** - * @brief DR Partition を取得 + * @brief Dest Info を取得 * @param tsp: TlmSpacePacket - * @return DR Partition + * @return Dest Info */ -uint8_t TSP_get_dr_partition(const TlmSpacePacket* tsp); +uint8_t TSP_get_dest_info(const TlmSpacePacket* tsp); /** - * @brief DR Partition を設定 - * @param[in,out] tsp: TlmSpacePacket - * @param[in] ptn: DR Partition + * @brief Dest Info を設定 + * @param[in,out] tsp: TlmSpacePacket + * @param[in] info: Dest Info * @return void */ -void TSP_set_dr_partition(TlmSpacePacket* tsp, uint8_t ptn); +void TSP_set_dest_info(TlmSpacePacket* tsp, uint8_t info); // ****************** diff --git a/TlmCmd/block_command_executor.c b/TlmCmd/block_command_executor.c index b9925d28e..03b1f9204 100644 --- a/TlmCmd/block_command_executor.c +++ b/TlmCmd/block_command_executor.c @@ -12,7 +12,7 @@ #include "block_command_executor.h" #include "packet_handler.h" -#include "../Library/endian_memcpy.h" +#include "../Library/endian.h" #include "../System/TimeManager/time_manager.h" #include "common_cmd_packet_util.h" @@ -36,28 +36,28 @@ static void BCE_set_bc_exe_params_(const bct_id_t block, const BCE_Params* bc_ex /** * @brief rotator の実行主体 * @param[in] block: BC の idx - * @return CCP_EXEC_STS + * @return CCP_CmdRet * @note rotator はひたすらその BC に含まれる Cmd をループで実行し続ける * interval[cycle] ごとに 1つの Cmd が実行される. */ -static CCP_EXEC_STS BCE_rotate_block_cmd_(bct_id_t block); +static CCP_CmdRet BCE_rotate_block_cmd_(bct_id_t block); /** * @brief BC をまとめて一括で実行する * @param[in] block: BC の idx - * @return CCP_EXEC_STS + * @return CCP_CmdRet * @note BC の内部で BC を実行する時など */ -static CCP_EXEC_STS BCE_combine_block_cmd_(bct_id_t block); +static CCP_CmdRet BCE_combine_block_cmd_(bct_id_t block); /** * @brief BC をまとめて一括で実行する * @param[in] block: BC の idx * @param[in] limit_step: 実行制限時間 [step] - * @return CCP_EXEC_STS + * @return CCP_CmdRet * @note 時間を制限を設けてBCを実行したい時など */ -static CCP_EXEC_STS BCE_timelimit_combine_block_cmd_(bct_id_t block, step_t limit_step); +static CCP_CmdRet BCE_timelimit_combine_block_cmd_(bct_id_t block, step_t limit_step); /** * @brief 時間制限付きの combiner @@ -115,14 +115,14 @@ BCT_ACK BCE_clear_block(const bct_id_t block) return BCT_SUCCESS; } -CCP_EXEC_STS Cmd_BCE_ACTIVATE_BLOCK(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_BCE_ACTIVATE_BLOCK(const CommonCmdPacket* packet) { BCT_ACK ack; (void)packet; ack = BCE_activate_block(); - return BCT_convert_bct_ack_to_ccp_exec_sts(ack); + return BCT_convert_bct_ack_to_ccp_cmd_ret(ack); } BCT_ACK BCE_activate_block(void) @@ -146,7 +146,7 @@ BCT_ACK BCE_activate_block(void) return BCT_SUCCESS; } -CCP_EXEC_STS Cmd_BCE_ACTIVATE_BLOCK_BY_ID(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_BCE_ACTIVATE_BLOCK_BY_ID(const CommonCmdPacket* packet) { bct_id_t block; BCT_ACK ack; @@ -154,16 +154,16 @@ CCP_EXEC_STS Cmd_BCE_ACTIVATE_BLOCK_BY_ID(const CommonCmdPacket* packet) if (CCP_get_param_len(packet) != SIZE_OF_BCT_ID_T) { // パラメータはブロック番号 - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } - endian_memcpy(&block, CCP_get_param_head(packet), SIZE_OF_BCT_ID_T); + ENDIAN_memcpy(&block, CCP_get_param_head(packet), SIZE_OF_BCT_ID_T); ack = BCE_activate_block_by_id(block); - return BCT_convert_bct_ack_to_ccp_exec_sts(ack); + return BCT_convert_bct_ack_to_ccp_cmd_ret(ack); } -CCP_EXEC_STS Cmd_BCE_INACTIVATE_BLOCK_BY_ID(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_BCE_INACTIVATE_BLOCK_BY_ID(const CommonCmdPacket* packet) { bct_id_t block; BCT_ACK ack; @@ -171,14 +171,14 @@ CCP_EXEC_STS Cmd_BCE_INACTIVATE_BLOCK_BY_ID(const CommonCmdPacket* packet) if (CCP_get_param_len(packet) != SIZE_OF_BCT_ID_T) { // パラメータはブロック番号 - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } - endian_memcpy(&block, CCP_get_param_head(packet), SIZE_OF_BCT_ID_T); + ENDIAN_memcpy(&block, CCP_get_param_head(packet), SIZE_OF_BCT_ID_T); ack = BCE_inactivate_block_by_id(block); - return BCT_convert_bct_ack_to_ccp_exec_sts(ack); + return BCT_convert_bct_ack_to_ccp_cmd_ret(ack); } BCT_ACK BCE_activate_block_by_id(bct_id_t block) @@ -207,39 +207,38 @@ BCT_ACK BCE_inactivate_block_by_id(bct_id_t block) return BCT_SUCCESS; } -CCP_EXEC_STS Cmd_BCE_ROTATE_BLOCK(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_BCE_ROTATE_BLOCK(const CommonCmdPacket* packet) { bct_id_t block; if (CCP_get_param_len(packet) != SIZE_OF_BCT_ID_T) { // パラメータはブロック番号 - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } // パラメータを読み出し。 - endian_memcpy(&block, CCP_get_param_head(packet), SIZE_OF_BCT_ID_T); + ENDIAN_memcpy(&block, CCP_get_param_head(packet), SIZE_OF_BCT_ID_T); return BCE_rotate_block_cmd_(block); } -static CCP_EXEC_STS BCE_rotate_block_cmd_(bct_id_t block) +static CCP_CmdRet BCE_rotate_block_cmd_(bct_id_t block) { - CCP_EXEC_STS ack; BCE_Params* bc_exe_params; BCT_Pos pos; - if (block >= BCT_MAX_BLOCKS) return BCT_convert_bct_ack_to_ccp_exec_sts(BCT_INVALID_BLOCK_NO); + if (block >= BCT_MAX_BLOCKS) return BCT_convert_bct_ack_to_ccp_cmd_ret(BCT_INVALID_BLOCK_NO); bc_exe_params = BCE_get_bc_exe_params_(block); - if (!bc_exe_params->is_active) return CCP_EXEC_ILLEGAL_CONTEXT; - if (bc_exe_params->rotate.interval == 0) return CCP_EXEC_ILLEGAL_CONTEXT; + if (!bc_exe_params->is_active) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); + if (bc_exe_params->rotate.interval == 0) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); ++bc_exe_params->rotate.counter; if (bc_exe_params->rotate.counter < bc_exe_params->rotate.interval) { BCE_set_bc_exe_params_(block, bc_exe_params); - return CCP_EXEC_SUCCESS; // スキップ + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); // スキップ } bc_exe_params->rotate.counter = 0; @@ -251,57 +250,56 @@ static CCP_EXEC_STS BCE_rotate_block_cmd_(bct_id_t block) BCT_make_pos(&pos, block, bc_exe_params->rotate.next_cmd); BCT_load_cmd(&pos, &BCE_packet_); - ack = PH_dispatch_command(&BCE_packet_); - - return ack; + return PH_dispatch_command(&BCE_packet_); } -CCP_EXEC_STS Cmd_BCE_COMBINE_BLOCK(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_BCE_COMBINE_BLOCK(const CommonCmdPacket* packet) { bct_id_t block; if (CCP_get_param_len(packet) != SIZE_OF_BCT_ID_T) { // パラメータはブロック番号 - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } // パラメータを読み出し。 - endian_memcpy(&block, CCP_get_param_head(packet), SIZE_OF_BCT_ID_T); + ENDIAN_memcpy(&block, CCP_get_param_head(packet), SIZE_OF_BCT_ID_T); return BCE_combine_block_cmd_(block); } -static CCP_EXEC_STS BCE_combine_block_cmd_(bct_id_t block) +static CCP_CmdRet BCE_combine_block_cmd_(bct_id_t block) { uint8_t cmd; - CCP_EXEC_STS ack; uint8_t length; - if (block >= BCT_MAX_BLOCKS) return BCT_convert_bct_ack_to_ccp_exec_sts(BCT_INVALID_BLOCK_NO); + if (block >= BCT_MAX_BLOCKS) return BCT_convert_bct_ack_to_ccp_cmd_ret(BCT_INVALID_BLOCK_NO); length = BCT_get_bc_length(block); - if (!BCE_is_active(block)) return CCP_EXEC_ILLEGAL_CONTEXT; + if (!BCE_is_active(block)) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); for (cmd = 0; cmd < length; ++cmd) { + CCP_CmdRet cmd_ret; BCT_Pos pos; + pos.block = block; pos.cmd = cmd; BCT_load_cmd(&pos, &BCE_packet_); - ack = PH_dispatch_command(&BCE_packet_); + cmd_ret = PH_dispatch_command(&BCE_packet_); - if (ack != CCP_EXEC_SUCCESS) return ack; + if (cmd_ret.exec_sts != CCP_EXEC_SUCCESS) return cmd_ret; } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } // 2019/10/01 追加 // 時間制限付きコンバイナ // (時間が来たら打ち切り.したがって,必ず設定時間はすぎる) -CCP_EXEC_STS Cmd_BCE_TIMELIMIT_COMBINE_BLOCK(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_BCE_TIMELIMIT_COMBINE_BLOCK(const CommonCmdPacket* packet) { const uint8_t* param = CCP_get_param_head(packet); bct_id_t block; @@ -310,31 +308,30 @@ CCP_EXEC_STS Cmd_BCE_TIMELIMIT_COMBINE_BLOCK(const CommonCmdPacket* packet) if (CCP_get_param_len(packet) != SIZE_OF_BCT_ID_T + 1) { // パラメータはブロック番号 + 制限時間 [step] - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } // パラメータを読み出し。 - endian_memcpy(&block, param, SIZE_OF_BCT_ID_T); + ENDIAN_memcpy(&block, param, SIZE_OF_BCT_ID_T); limit_step = param[SIZE_OF_BCT_ID_T]; return BCE_timelimit_combine_block_cmd_(block, limit_step); } -static CCP_EXEC_STS BCE_timelimit_combine_block_cmd_(bct_id_t block, step_t limit_step) +static CCP_CmdRet BCE_timelimit_combine_block_cmd_(bct_id_t block, step_t limit_step) { uint8_t cmd; uint8_t length; - CCP_EXEC_STS ack; BCE_Params* bc_exe_params; ObcTime start = TMGR_get_master_clock(); ObcTime finish; step_t diff; - if (block >= BCT_MAX_BLOCKS) return BCT_convert_bct_ack_to_ccp_exec_sts(BCT_INVALID_BLOCK_NO); + if (block >= BCT_MAX_BLOCKS) return BCT_convert_bct_ack_to_ccp_cmd_ret(BCT_INVALID_BLOCK_NO); bc_exe_params = BCE_get_bc_exe_params_(block); - if (!bc_exe_params->is_active) return CCP_EXEC_ILLEGAL_CONTEXT; + if (!bc_exe_params->is_active) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); ++bc_exe_params->timelimit_combine.call_num; length = BCT_get_bc_length(block); @@ -350,15 +347,18 @@ static CCP_EXEC_STS BCE_timelimit_combine_block_cmd_(bct_id_t block, step_t limi for (cmd = 0; cmd < length; ++cmd) { + CCP_CmdRet cmd_ret; BCT_Pos pos; + pos.block = block; pos.cmd = cmd; BCT_load_cmd(&pos, &BCE_packet_); - ack = PH_dispatch_command(&BCE_packet_); - if (ack != CCP_EXEC_SUCCESS) + cmd_ret = PH_dispatch_command(&BCE_packet_); + + if (cmd_ret.exec_sts != CCP_EXEC_SUCCESS) { BCE_set_bc_exe_params_(block, bc_exe_params); - return ack; + return cmd_ret; } // 時間判定 @@ -375,14 +375,14 @@ static CCP_EXEC_STS BCE_timelimit_combine_block_cmd_(bct_id_t block, step_t limi } BCE_set_bc_exe_params_(block, bc_exe_params); - return CCP_EXEC_SUCCESS; // 異常ではないのでこれを返す + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); // 異常ではないのでこれを返す } } BCE_set_bc_exe_params_(block, bc_exe_params); // 最後まで実行できた - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } BCT_ACK BCE_reset_rotator_info(const bct_id_t block) @@ -462,39 +462,39 @@ BCT_ACK BCE_swap_contents(const bct_id_t block_a, const bct_id_t block_b) return BCT_SUCCESS; } -CCP_EXEC_STS Cmd_BCE_RESET_ROTATOR_INFO(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_BCE_RESET_ROTATOR_INFO(const CommonCmdPacket* packet) { bct_id_t block; if (CCP_get_param_len(packet) != SIZE_OF_BCT_ID_T) { // パラメータはブロック番号 - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } // パラメータを読み出し。 - endian_memcpy(&block, CCP_get_param_head(packet), SIZE_OF_BCT_ID_T); + ENDIAN_memcpy(&block, CCP_get_param_head(packet), SIZE_OF_BCT_ID_T); - return BCT_convert_bct_ack_to_ccp_exec_sts(BCE_reset_rotator_info(block)); + return BCT_convert_bct_ack_to_ccp_cmd_ret(BCE_reset_rotator_info(block)); } -CCP_EXEC_STS Cmd_BCE_RESET_COMBINER_INFO(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_BCE_RESET_COMBINER_INFO(const CommonCmdPacket* packet) { bct_id_t block; if (CCP_get_param_len(packet) != SIZE_OF_BCT_ID_T) { // パラメータはブロック番号 - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } // パラメータを読み出し。 - endian_memcpy(&block, CCP_get_param_head(packet), SIZE_OF_BCT_ID_T); + ENDIAN_memcpy(&block, CCP_get_param_head(packet), SIZE_OF_BCT_ID_T); - return BCT_convert_bct_ack_to_ccp_exec_sts(BCE_reset_combiner_info(block)); + return BCT_convert_bct_ack_to_ccp_cmd_ret(BCE_reset_combiner_info(block)); } -CCP_EXEC_STS Cmd_BCE_SET_ROTATE_INTERVAL(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_BCE_SET_ROTATE_INTERVAL(const CommonCmdPacket* packet) { const unsigned char* param = CCP_get_param_head(packet); bct_id_t block; @@ -504,24 +504,24 @@ CCP_EXEC_STS Cmd_BCE_SET_ROTATE_INTERVAL(const CommonCmdPacket* packet) if (CCP_get_param_len(packet) != (SIZE_OF_BCT_ID_T + 2)) { // パラメータはブロック番号2Byte+周期2Byte = 4Bytes - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } // パラメータを読み出し。 - endian_memcpy(&block, param, SIZE_OF_BCT_ID_T); - endian_memcpy(&interval, param + SIZE_OF_BCT_ID_T, 2); + ENDIAN_memcpy(&block, param, SIZE_OF_BCT_ID_T); + ENDIAN_memcpy(&interval, param + SIZE_OF_BCT_ID_T, 2); if (interval == 0 || block >= BCT_MAX_BLOCKS) { // 0で割りに行くのでここではじく - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } bc_exe_params = BCE_get_bc_exe_params_(block); bc_exe_params->rotate.interval = interval; BCE_set_bc_exe_params_(block, bc_exe_params); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/TlmCmd/block_command_executor.h b/TlmCmd/block_command_executor.h index f2801284e..b7d5af322 100644 --- a/TlmCmd/block_command_executor.h +++ b/TlmCmd/block_command_executor.h @@ -107,7 +107,7 @@ uint8_t BCE_is_active(const bct_id_t block); * @param[in] block_a: 入れ替える BC * @param[in] block_b: 入れ替える BC * @return BCT_ACK 実行結果 - * @note ID1:HK:SRAM, ID2:AH:MRAM があった時に ID1:AH:MRAM, ID2:HK:SRAM が出来る (交換されるのはparam) + * @note ID1:HK:SRAM, ID2:EH:MRAM があった時に ID1:EH:MRAM, ID2:HK:SRAM が出来る (交換されるのはparam) * `BCE_swap_contents` と組み合わせることで番号 - 中身はそのままで RAM だけを切り替えることが出来る * 必ず `BCT_swap_address` と共に使用すること */ @@ -118,20 +118,20 @@ BCT_ACK BCE_swap_address(const bct_id_t block_a, const bct_id_t block_b); * @param[in] block_a: 入れ替える BC * @param[in] block_b: 入れ替える BC * @return BCT_ACK 実行結果 - * @note ID1:AH:MRAM, ID2:HK:SRAM があった時に ID1:HK:MRAM, ID2:AH:SRAM が出来る (交換されるのはparam) + * @note ID1:EH:MRAM, ID2:HK:SRAM があった時に ID1:HK:MRAM, ID2:EH:SRAM が出来る (交換されるのはparam) * `BCE_swap_address` と組み合わせることで番号 - 中身はそのままで RAM だけを切り替えることが出来る * 必ず `BCT_swap_contents` と共に使用すること */ BCT_ACK BCE_swap_contents(const bct_id_t block_a, const bct_id_t block_b); -CCP_EXEC_STS Cmd_BCE_ACTIVATE_BLOCK(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_BCE_ACTIVATE_BLOCK_BY_ID(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_BCE_INACTIVATE_BLOCK_BY_ID(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_BCE_ROTATE_BLOCK(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_BCE_COMBINE_BLOCK(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_BCE_TIMELIMIT_COMBINE_BLOCK(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_BCE_RESET_ROTATOR_INFO(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_BCE_RESET_COMBINER_INFO(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_BCE_SET_ROTATE_INTERVAL(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_BCE_ACTIVATE_BLOCK(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_BCE_ACTIVATE_BLOCK_BY_ID(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_BCE_INACTIVATE_BLOCK_BY_ID(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_BCE_ROTATE_BLOCK(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_BCE_COMBINE_BLOCK(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_BCE_TIMELIMIT_COMBINE_BLOCK(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_BCE_RESET_ROTATOR_INFO(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_BCE_RESET_COMBINER_INFO(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_BCE_SET_ROTATE_INTERVAL(const CommonCmdPacket* packet); #endif diff --git a/TlmCmd/block_command_loader.c b/TlmCmd/block_command_loader.c index 19e01b976..c5d6d0331 100644 --- a/TlmCmd/block_command_loader.c +++ b/TlmCmd/block_command_loader.c @@ -9,11 +9,11 @@ #include #include "block_command_loader.h" -#include "../Applications/timeline_command_dispatcher.h" +#include "../Applications/timeline_command_dispatcher_id_define.h" #include "block_command_executor.h" #include // for rotate/combine block #include "common_cmd_packet_util.h" -#include "../Library/endian_memcpy.h" +#include "../Library/endian.h" #define BCL_PARAM_MAX_LENGTH BCT_CMD_MAX_LENGTH @@ -158,61 +158,61 @@ void BCL_tool_register_app(cycle_t ti, AR_APP_ID app_id) // TODO: prepare_param系の関数にidx超過のassertionを入れる void BCL_tool_prepare_param_uint8(uint8_t val) { - endian_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); + ENDIAN_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); block_command_loader_.param_idx += sizeof(val); } void BCL_tool_prepare_param_int8(int8_t val) { - endian_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); + ENDIAN_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); block_command_loader_.param_idx += sizeof(val); } void BCL_tool_prepare_param_uint16(uint16_t val) { - endian_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); + ENDIAN_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); block_command_loader_.param_idx += sizeof(val); } void BCL_tool_prepare_param_int16(int16_t val) { - endian_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); + ENDIAN_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); block_command_loader_.param_idx += sizeof(val); } void BCL_tool_prepare_param_uint32(uint32_t val) { - endian_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); + ENDIAN_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); block_command_loader_.param_idx += sizeof(val); } void BCL_tool_prepare_param_int32(int32_t val) { - endian_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); + ENDIAN_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); block_command_loader_.param_idx += sizeof(val); } void BCL_tool_prepare_param_float(float val) { - endian_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); + ENDIAN_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); block_command_loader_.param_idx += sizeof(val); } void BCL_tool_prepare_param_uint64(uint64_t val) { - endian_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); + ENDIAN_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); block_command_loader_.param_idx += sizeof(val); } void BCL_tool_prepare_param_int64(int64_t val) { - endian_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); + ENDIAN_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); block_command_loader_.param_idx += sizeof(val); } void BCL_tool_prepare_param_double(double val) { - endian_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); + ENDIAN_memcpy(&block_command_loader_.params[block_command_loader_.param_idx], &val, sizeof(val)); block_command_loader_.param_idx += sizeof(val); } diff --git a/TlmCmd/block_command_loader.h b/TlmCmd/block_command_loader.h index 98f986bf5..d0a34828d 100644 --- a/TlmCmd/block_command_loader.h +++ b/TlmCmd/block_command_loader.h @@ -9,7 +9,7 @@ #define BLOCK_COMMAND_LOADER_H_ #include "./block_command_table.h" -#include "../Applications/timeline_command_dispatcher.h" +#include "../Applications/timeline_command_dispatcher_id_define.h" #include "../System/TimeManager/obc_time.h" #include diff --git a/TlmCmd/block_command_table.c b/TlmCmd/block_command_table.c index e28fbf043..a0623112a 100644 --- a/TlmCmd/block_command_table.c +++ b/TlmCmd/block_command_table.c @@ -16,7 +16,7 @@ #include "command_analyze.h" #include #include "../System/TimeManager/time_manager.h" -#include "../Library/endian_memcpy.h" +#include "../Library/endian.h" #include "../System/WatchdogTimer/watchdog_timer.h" #include "common_cmd_packet_util.h" @@ -383,37 +383,39 @@ BCT_ACK BCT_swap_contents(const bct_id_t block_a, const bct_id_t block_b) return BCT_SUCCESS; } -CCP_EXEC_STS BCT_convert_bct_ack_to_ccp_exec_sts(BCT_ACK ack) +CCP_CmdRet BCT_convert_bct_ack_to_ccp_cmd_ret(BCT_ACK ack) { switch (ack) { case BCT_SUCCESS: - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret(CCP_EXEC_SUCCESS, (uint32_t)ack); + // FIXME: これだめじゃん? case BCT_INVALID_BLOCK_NO: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_PARAMETER, (uint32_t)ack); case BCT_INVALID_CMD_NO: - return CCP_EXEC_CMD_NOT_DEFINED; + return CCP_make_cmd_ret(CCP_EXEC_CMD_NOT_DEFINED, (uint32_t)ack); case BCT_DEFECTIVE_BLOCK: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_CONTEXT, (uint32_t)ack); case BCT_CMD_TOO_LONG: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_PARAMETER, (uint32_t)ack); case BCT_BC_FULL: - return CCP_EXEC_ILLEGAL_CONTEXT; + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_CONTEXT, (uint32_t)ack); case BCT_ZERO_PERIOD: - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_PARAMETER, (uint32_t)ack); + // FIXME: これだめじゃん? default: - return CCP_EXEC_UNKNOWN; + return CCP_make_cmd_ret(CCP_EXEC_UNKNOWN, (uint32_t)ack); } } -CCP_EXEC_STS Cmd_BCT_CLEAR_BLOCK(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_BCT_CLEAR_BLOCK(const CommonCmdPacket* packet) { bct_id_t block; BCT_ACK ack; @@ -421,16 +423,16 @@ CCP_EXEC_STS Cmd_BCT_CLEAR_BLOCK(const CommonCmdPacket* packet) if (CCP_get_param_len(packet) != SIZE_OF_BCT_ID_T) { // パラメータはブロック番号 - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } // パラメータを読み出し。 - endian_memcpy(&block, CCP_get_param_head(packet), SIZE_OF_BCT_ID_T); + ENDIAN_memcpy(&block, CCP_get_param_head(packet), SIZE_OF_BCT_ID_T); // 指定されたブロック番号のクリアを実行。 ack = BCT_clear_block(block); - return BCT_convert_bct_ack_to_ccp_exec_sts(ack); + return BCT_convert_bct_ack_to_ccp_cmd_ret(ack); } BCT_ACK BCT_clear_block(const bct_id_t block) @@ -446,7 +448,7 @@ BCT_ACK BCT_clear_block(const bct_id_t block) return BCT_SUCCESS; } -CCP_EXEC_STS Cmd_BCT_SET_BLOCK_POSITION(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_BCT_SET_BLOCK_POSITION(const CommonCmdPacket* packet) { const unsigned char* param = CCP_get_param_head(packet); BCT_Pos pos; @@ -455,33 +457,33 @@ CCP_EXEC_STS Cmd_BCT_SET_BLOCK_POSITION(const CommonCmdPacket* packet) if (CCP_get_param_len(packet) != (SIZE_OF_BCT_ID_T + 1)) { // パラメータはブロック番号とコマンド番号1Byte。 - return CCP_EXEC_ILLEGAL_LENGTH; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); } // パラメータを読み出し - endian_memcpy(&pos.block, param, SIZE_OF_BCT_ID_T); + ENDIAN_memcpy(&pos.block, param, SIZE_OF_BCT_ID_T); pos.cmd = param[SIZE_OF_BCT_ID_T]; ack = BCT_set_position_(&pos); - return BCT_convert_bct_ack_to_ccp_exec_sts(ack); + return BCT_convert_bct_ack_to_ccp_cmd_ret(ack); } -CCP_EXEC_STS Cmd_BCT_COPY_BCT(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_BCT_COPY_BCT(const CommonCmdPacket* packet) { const unsigned char* param = CCP_get_param_head(packet); uint16_t dst_block, src_block; BCT_ACK ack; - if (CCP_get_param_len(packet) != 2 * SIZE_OF_BCT_ID_T) return CCP_EXEC_ILLEGAL_LENGTH; - endian_memcpy(&dst_block, param, SIZE_OF_BCT_ID_T); - endian_memcpy(&src_block, param + SIZE_OF_BCT_ID_T, SIZE_OF_BCT_ID_T); + if (CCP_get_param_len(packet) != 2 * SIZE_OF_BCT_ID_T) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); + ENDIAN_memcpy(&dst_block, param, SIZE_OF_BCT_ID_T); + ENDIAN_memcpy(&src_block, param + SIZE_OF_BCT_ID_T, SIZE_OF_BCT_ID_T); ack = BCT_copy_bct(dst_block, src_block); - return BCT_convert_bct_ack_to_ccp_exec_sts(ack); + return BCT_convert_bct_ack_to_ccp_cmd_ret(ack); } -CCP_EXEC_STS Cmd_BCT_OVERWRITE_CMD(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_BCT_OVERWRITE_CMD(const CommonCmdPacket* packet) { CMD_CODE cmd_id = (CMD_CODE)CCP_get_param_from_packet(packet, 0, uint16_t); cycle_t ti = (cycle_t)CCP_get_param_from_packet(packet, 1, uint32_t); @@ -499,7 +501,7 @@ CCP_EXEC_STS Cmd_BCT_OVERWRITE_CMD(const CommonCmdPacket* packet) uint16_t cmd_param_len; // raw なので引数長チェック - if (real_param_len < min_cmd_param_len || real_param_len > max_cmd_param_len) return CCP_EXEC_ILLEGAL_LENGTH; + if (real_param_len < min_cmd_param_len || real_param_len > max_cmd_param_len) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); cmd_param_len = real_param_len - min_cmd_param_len; CCP_get_raw_param_from_packet(packet, new_cmd_param, cmd_param_len); @@ -508,19 +510,19 @@ CCP_EXEC_STS Cmd_BCT_OVERWRITE_CMD(const CommonCmdPacket* packet) CCP_form_tlc((CommonCmdPacket*)&new_bct_cmddata, ti, cmd_id, new_cmd_param, cmd_param_len); BCT_overwrite_cmd(&pos, (CommonCmdPacket*)&new_bct_cmddata); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } // 長さ 10 の BC に NOP を登録するコマンド. 使用前提が狭すぎるか?? // パス運用時に使用するので, 一応厳密にしておいたほうがいい気もする. -CCP_EXEC_STS Cmd_BCT_FILL_NOP(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_BCT_FILL_NOP(const CommonCmdPacket* packet) { static CommonCmdPacket temp_packet_; cycle_t ti; uint8_t num_nop = CCP_get_param_from_packet(packet, 0, uint8_t); - if (num_nop > 10 || num_nop < 1) return CCP_EXEC_ILLEGAL_PARAMETER; - if (block_command_table_.pos.cmd + num_nop != 10) return CCP_EXEC_ILLEGAL_CONTEXT; + if (num_nop > 10 || num_nop < 1) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (block_command_table_.pos.cmd + num_nop != 10) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); for (ti = 11 - (cycle_t)num_nop; ti < 11; ++ti) { @@ -528,7 +530,7 @@ CCP_EXEC_STS Cmd_BCT_FILL_NOP(const CommonCmdPacket* packet) BCT_register_cmd(&temp_packet_); } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/TlmCmd/block_command_table.h b/TlmCmd/block_command_table.h index 026b2ceda..2f532ebd7 100644 --- a/TlmCmd/block_command_table.h +++ b/TlmCmd/block_command_table.h @@ -5,7 +5,7 @@ #ifndef BLOCK_COMMAND_TABLE_H_ #define BLOCK_COMMAND_TABLE_H_ -#include +#include #define BCT_CMD_MAX_LENGTH (64) /*!< BCTに保存するパケットのパケットサイズの上限 TCPの最大長はかなり大きいので,ここではそれより小さくしてメモリを節約するのが通例 @@ -268,7 +268,7 @@ const uint8_t* BCT_get_param_head(const bct_id_t block, const uint8_t cmd); * @param[in] block_a: 入れ替える BC * @param[in] block_b: 入れ替える BC * @return BCT_ACK 実行結果 - * @note ID1:HK:SRAM, ID2:AH:MRAM があった時に ID1:AH:MRAM, ID2:HK:SRAM が出来る + * @note ID1:HK:SRAM, ID2:EH:MRAM があった時に ID1:EH:MRAM, ID2:HK:SRAM が出来る * `BCT_swap_contents` と組み合わせることで番号 - 中身はそのままで RAM だけを切り替えることが出来る * 必ず `BCE_swap_address` と共に使用すること */ @@ -279,7 +279,7 @@ BCT_ACK BCT_swap_address(const bct_id_t block_a, const bct_id_t block_b); * @param[in] block_a: 入れ替える BC * @param[in] block_b: 入れ替える BC * @return BCT_ACK 実行結果 - * @note ID1:AH:MRAM, ID2:HK:SRAM があった時に ID1:HK:MRAM, ID2:AH:SRAM が出来る + * @note ID1:EH:MRAM, ID2:HK:SRAM があった時に ID1:HK:MRAM, ID2:EH:SRAM が出来る * `BCT_swap_ram` と組み合わせることで番号 - 中身はそのままで RAM だけを切り替えることが出来る * 必ず `BCE_swap_contents` と共に使用すること */ @@ -288,14 +288,14 @@ BCT_ACK BCT_swap_contents(const bct_id_t block_a, const bct_id_t block_b); /** * @brief 返り値用 enum 変換用関数 * @param ack: BCT_ACK - * @return CCP_EXEC_STS + * @return CCP_CmdRet */ -CCP_EXEC_STS BCT_convert_bct_ack_to_ccp_exec_sts(BCT_ACK ack); +CCP_CmdRet BCT_convert_bct_ack_to_ccp_cmd_ret(BCT_ACK ack); -CCP_EXEC_STS Cmd_BCT_CLEAR_BLOCK(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_BCT_SET_BLOCK_POSITION(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_BCT_COPY_BCT(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_BCT_OVERWRITE_CMD(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_BCT_FILL_NOP(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_BCT_CLEAR_BLOCK(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_BCT_SET_BLOCK_POSITION(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_BCT_COPY_BCT(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_BCT_OVERWRITE_CMD(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_BCT_FILL_NOP(const CommonCmdPacket* packet); #endif diff --git a/TlmCmd/command_analyze.c b/TlmCmd/command_analyze.c index b623addaa..f950f162d 100644 --- a/TlmCmd/command_analyze.c +++ b/TlmCmd/command_analyze.c @@ -53,10 +53,10 @@ void CA_initialize(void) CA_load_cmd_table(command_analyze_.cmd_table); } -CCP_EXEC_STS CA_execute_cmd(const CommonCmdPacket* packet) +CCP_CmdRet CA_execute_cmd(const CommonCmdPacket* packet) { CMD_CODE cmd_code = CCP_get_id(packet); - CCP_EXEC_STS (*cmd_func)(const CommonCmdPacket*) = NULL; + CCP_CmdRet (*cmd_func)(const CommonCmdPacket*) = NULL; if (cmd_code >= CA_MAX_CMDS) { @@ -64,7 +64,7 @@ CCP_EXEC_STS CA_execute_cmd(const CommonCmdPacket* packet) CA_EL_LOCAL_ID_ILLEGAL_CMD_CODE, EL_ERROR_LEVEL_LOW, (uint32_t)cmd_code); - return CCP_EXEC_CMD_NOT_DEFINED; + return CCP_make_cmd_ret(CCP_EXEC_CMD_NOT_DEFINED, CA_MAX_CMDS); } cmd_func = command_analyze->cmd_table[cmd_code].cmd_func; @@ -73,7 +73,10 @@ CCP_EXEC_STS CA_execute_cmd(const CommonCmdPacket* packet) { // ここで最低限のパラメタ長チェックをするが, bct_id_t など,内部定義を使っているものは各コマンド内部でもアサーションすること uint16_t param_len = CCP_get_param_len(packet); - if (CA_ckeck_cmd_param_len(cmd_code, param_len) != CA_ACK_OK) return CCP_EXEC_ILLEGAL_LENGTH; + if (CA_ckeck_cmd_param_len(cmd_code, param_len) != CA_ACK_OK) + { + return CCP_make_cmd_ret(CCP_EXEC_ILLEGAL_LENGTH, (uint32_t)cmd_code); + } return cmd_func(packet); } @@ -83,7 +86,7 @@ CCP_EXEC_STS CA_execute_cmd(const CommonCmdPacket* packet) CA_EL_LOCAL_ID_NULL_CMD_CODE, EL_ERROR_LEVEL_LOW, (uint32_t)cmd_code); - return CCP_EXEC_CMD_NOT_DEFINED; + return CCP_make_cmd_ret(CCP_EXEC_CMD_NOT_DEFINED, (uint32_t)cmd_code); } } @@ -180,14 +183,14 @@ static CA_PARAM_SIZE_TYPE CA_get_param_size_type_(CMD_CODE cmd_code, uint8_t n) } } -CCP_EXEC_STS Cmd_CA_INIT(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_CA_INIT(const CommonCmdPacket* packet) { (void)packet; CA_initialize(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_CA_REGISTER_CMD(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_CA_REGISTER_CMD(const CommonCmdPacket* packet) { uint8_t param_size_infos[(CA_MAX_CMD_PARAM_NUM + 1) / 2]; CMD_CODE cmd_code = (CMD_CODE)CCP_get_param_from_packet(packet, 0, uint16_t); @@ -196,40 +199,40 @@ CCP_EXEC_STS Cmd_CA_REGISTER_CMD(const CommonCmdPacket* packet) uint8_t i; // raw パラメタなので,引数長チェック - if (CCP_get_param_len(packet) != 6 + sizeof(param_size_infos)) return CCP_EXEC_ILLEGAL_LENGTH; + if (CCP_get_param_len(packet) != 6 + sizeof(param_size_infos)) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); ret = CCP_get_raw_param_from_packet(packet, param_size_infos, sizeof(param_size_infos)); - if (ret != sizeof(param_size_infos)) return CCP_EXEC_ILLEGAL_LENGTH; + if (ret != sizeof(param_size_infos)) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_LENGTH); if (cmd_code >= CA_MAX_CMDS) { // 登録指定位置がコマンド数上限を超えている場合は異常判定 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } // ローレベルコマンドなので,アサーションしない - command_analyze_.cmd_table[cmd_code].cmd_func = (CCP_EXEC_STS (*)(const CommonCmdPacket*))cmd_func; + command_analyze_.cmd_table[cmd_code].cmd_func = (CCP_CmdRet (*)(const CommonCmdPacket*))cmd_func; for (i = 0; i < sizeof(param_size_infos); ++i) { command_analyze_.cmd_table[cmd_code].param_size_infos[i].packed_info.bit.first = ( param_size_infos[i] & 0xf0 ) >> 4; command_analyze_.cmd_table[cmd_code].param_size_infos[i].packed_info.bit.second = param_size_infos[i] & 0x0f; } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_CA_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_CA_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) { uint8_t page = CCP_get_param_from_packet(packet, 0, uint8_t); if (page >= CA_TLM_PAGE_MAX) { // ページ番号がコマンドテーブル範囲外 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } command_analyze_.tlm_page_no = page; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/TlmCmd/command_analyze.h b/TlmCmd/command_analyze.h index 2431fb105..80fed6084 100644 --- a/TlmCmd/command_analyze.h +++ b/TlmCmd/command_analyze.h @@ -6,6 +6,7 @@ #define COMMAND_ANALYZE_H_ #include "common_cmd_packet.h" +#include "common_cmd_packet_util.h" #include #define CA_TLM_PAGE_SIZE (32) //!< コマンドテーブルの1テレメトリパケット(=1ページ)に格納されるコマンド数(ページネーション用) @@ -67,7 +68,7 @@ typedef enum */ typedef struct { - CCP_EXEC_STS (*cmd_func)(const CommonCmdPacket*); //!< コマンドとなる関数 + CCP_CmdRet (*cmd_func)(const CommonCmdPacket*); //!< コマンドとなる関数 CA_PackedParamSizeInfo param_size_infos[(CA_MAX_CMD_PARAM_NUM + 1) / 2]; //!< パラメタサイズ情報 } CA_CmdInfo; @@ -94,9 +95,9 @@ void CA_initialize(void); /** * @brief コマンド実行の本体 * @param packet: 実行するコマンド - * @return CCP_EXEC_STS + * @return CCP_CmdRet */ -CCP_EXEC_STS CA_execute_cmd(const CommonCmdPacket* packet); +CCP_CmdRet CA_execute_cmd(const CommonCmdPacket* packet); /** * @brief コマンドパラメタ数を取得する @@ -149,10 +150,10 @@ int CA_has_raw_param(CMD_CODE cmd_code); */ void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS]); -CCP_EXEC_STS Cmd_CA_INIT(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_CA_INIT(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_CA_REGISTER_CMD(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_CA_REGISTER_CMD(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_CA_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_CA_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet); #endif diff --git a/TlmCmd/command_dispatcher.c b/TlmCmd/command_dispatcher.c index c16fbfabe..2e579929d 100644 --- a/TlmCmd/command_dispatcher.c +++ b/TlmCmd/command_dispatcher.c @@ -4,7 +4,6 @@ * @brief 各種コマンドの実行管理 */ #include "command_dispatcher.h" - #include #include "../System/TimeManager/time_manager.h" #include "../System/EventManager/event_logger.h" @@ -80,7 +79,7 @@ static void CDIS_clear_exec_info_(CDIS_ExecInfo* exec_info) { OBCT_clear(&(exec_info->time)); exec_info->code = (CMD_CODE)0; - exec_info->sts = CCP_EXEC_SUCCESS; + exec_info->cmd_ret = CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } @@ -95,7 +94,7 @@ void CDIS_dispatch_command(CommandDispatcher* cdis) if (cdis->pl == NULL) return; // TODO: PL 側で NULL チェックに対応したら消す if (PL_is_empty(cdis->pl)) return; - if (cdis->prev.sts != CCP_EXEC_SUCCESS) + if (cdis->prev.cmd_ret.exec_sts != CCP_EXEC_SUCCESS) { // 直前コマンドが異常終了した場合は実行前に情報を保存 // 実行前にコピーすることで次コマンドが異常終了した場合は @@ -119,18 +118,24 @@ void CDIS_dispatch_command(CommandDispatcher* cdis) */ // 実行時情報を記録しつつコマンドを実行 - cdis->prev.time = TMGR_get_master_clock(); - cdis->prev.code = CCP_get_id(&packet_); - cdis->prev.sts = PH_dispatch_command(&packet_); + cdis->prev.time = TMGR_get_master_clock(); + cdis->prev.code = CCP_get_id(&packet_); + cdis->prev.cmd_ret = PH_dispatch_command(&packet_); // 実行したコマンドをリストから破棄 PL_drop_executed(cdis->pl); - if (cdis->prev.sts != CCP_EXEC_SUCCESS) + if (cdis->prev.cmd_ret.exec_sts != CCP_EXEC_SUCCESS) { + uint32_t note; // 実行時エラー情報をELにも記録. エラー発生場所(GSCD,TLCDなど)はcdisのポインタアドレスで区別 - uint32_t note = ((0x0000ffff & cdis->prev.code) << 16) | (0x0000ffff & cdis->prev.sts); - EL_record_event((EL_GROUP)EL_CORE_GROUP_CDIS_EXEC_ERR, + // より重要な EL_CORE_GROUP_CDIS_EXEC_ERR_STS があとに来るように EL 発行 + EL_record_event((EL_GROUP)EL_CORE_GROUP_CDIS_EXEC_ERR_CODE, + (uint32_t)cdis, + EL_ERROR_LEVEL_LOW, + cdis->prev.cmd_ret.err_code); + note = ((0x0000ffff & cdis->prev.code) << 16) | (0x0000ffff & cdis->prev.cmd_ret.exec_sts); + EL_record_event((EL_GROUP)EL_CORE_GROUP_CDIS_EXEC_ERR_STS, (uint32_t)cdis, EL_ERROR_LEVEL_LOW, note); diff --git a/TlmCmd/command_dispatcher.h b/TlmCmd/command_dispatcher.h index 56e32489a..ccaa67ac2 100644 --- a/TlmCmd/command_dispatcher.h +++ b/TlmCmd/command_dispatcher.h @@ -5,9 +5,10 @@ #ifndef COMMAND_DISPATCHER_H_ #define COMMAND_DISPATCHER_H_ -#include "../System/TimeManager/obc_time.h" +#include "common_cmd_packet_util.h" #include "common_cmd_packet.h" #include "packet_list.h" +#include "../System/TimeManager/obc_time.h" #include /** @@ -16,9 +17,9 @@ */ typedef struct { - ObcTime time; //!< 実行時刻 - CMD_CODE code; //!< 実行コマンドID - CCP_EXEC_STS sts; //!< 実行結果 + ObcTime time; //!< 実行時刻 + CMD_CODE code; //!< 実行コマンドID + CCP_CmdRet cmd_ret; //!< 実行結果 } CDIS_ExecInfo; /** diff --git a/TlmCmd/common_cmd_packet.h b/TlmCmd/common_cmd_packet.h index 448b4bf59..818e3aa03 100644 --- a/TlmCmd/common_cmd_packet.h +++ b/TlmCmd/common_cmd_packet.h @@ -43,8 +43,8 @@ typedef enum CCP_EXEC_ILLEGAL_LENGTH, //!< コマンド実行時のコマンド引数長エラー CCP_EXEC_ILLEGAL_PARAMETER, //!< コマンド実行時のパラメタエラー CCP_EXEC_ILLEGAL_CONTEXT, //!< コマンド実行時のその他のエラー - CCP_EXEC_CMD_NOT_DEFINED, //!< cmdExec で用いる - CCP_EXEC_ROUTING_FAILED, //!< command router で用いる + CCP_EXEC_CMD_NOT_DEFINED, //!< CA_execute_cmd で用いる + CCP_EXEC_ROUTING_FAILED, //!< PH_dispatch_command, PH_user_cmd_router で用いる CCP_EXEC_PACKET_FMT_ERR, //!< packet handler, ccp util で用いる CCP_EXEC_UNKNOWN //!< 内部処理用.使わない. } CCP_EXEC_STS; @@ -71,6 +71,16 @@ typedef enum CCP_EXEC_TYPE_UNKNOWN } CCP_EXEC_TYPE; +/** + * @struct CCP_CmdRet + * @brief コマンド返り値 + */ +typedef struct +{ + CCP_EXEC_STS exec_sts; //!< CCP_EXEC_STS.Cmd の統一的なエラーコード + uint32_t err_code; //!< 各 Cmd ユニークなエラーコード.各 App で定義する enum などを入れることを想定. +} CCP_CmdRet; + /** * @brief 有効なパケットかチェックする diff --git a/TlmCmd/common_cmd_packet_util.c b/TlmCmd/common_cmd_packet_util.c index 6a81ca0e5..a0aab8c4b 100644 --- a/TlmCmd/common_cmd_packet_util.c +++ b/TlmCmd/common_cmd_packet_util.c @@ -5,7 +5,7 @@ */ #include "common_cmd_packet_util.h" #include "command_analyze.h" -#include "../Library/endian_memcpy.h" +#include "../Library/endian.h" #include // for NULL #include @@ -70,6 +70,21 @@ static CCP_UTIL_ACK CCP_raise_err_at_param_generator_(void); static CCP_UTIL_ACK CCP_prepare_param_for_packet_(void* param, uint8_t byte); +CCP_CmdRet CCP_make_cmd_ret(CCP_EXEC_STS exec_sts, uint32_t err_code) +{ + CCP_CmdRet ret; + ret.exec_sts = exec_sts; + ret.err_code = err_code; + return ret; +} + + +CCP_CmdRet CCP_make_cmd_ret_without_err_code(CCP_EXEC_STS exec_sts) +{ + return CCP_make_cmd_ret(exec_sts, 0); +} + + void CCP_form_nop_rtc_(CommonCmdPacket* packet) { CCP_form_rtc(packet, Cmd_CODE_NOP, NULL, 0); @@ -318,21 +333,25 @@ PH_ACK CCP_register_tlc_asap(cycle_t ti, TLCD_ID tlcd_id, CMD_CODE cmd_id, const } -CCP_EXEC_STS CCP_form_and_exec_rtc(CMD_CODE cmd_id, const uint8_t* param, uint16_t len) +CCP_CmdRet CCP_form_and_exec_rtc(CMD_CODE cmd_id, const uint8_t* param, uint16_t len) { - CCP_UTIL_ACK ret; - ret = CCP_form_rtc(&CCP_util_packet_, cmd_id, param, len); - if (ret != CCP_UTIL_ACK_OK) return CCP_EXEC_PACKET_FMT_ERR; + CCP_UTIL_ACK ret = CCP_form_rtc(&CCP_util_packet_, cmd_id, param, len); + if (ret != CCP_UTIL_ACK_OK) + { + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_PACKET_FMT_ERR); + } return PH_dispatch_command(&CCP_util_packet_); } -CCP_EXEC_STS CCP_form_and_exec_block_deploy_cmd(TLCD_ID tl_no, bct_id_t block_no) +CCP_CmdRet CCP_form_and_exec_block_deploy_cmd(TLCD_ID tl_no, bct_id_t block_no) { - CCP_UTIL_ACK ret; - ret = CCP_form_block_deploy_cmd(&CCP_util_packet_, tl_no, block_no); - if (ret != CCP_UTIL_ACK_OK) return CCP_EXEC_PACKET_FMT_ERR; + CCP_UTIL_ACK ret = CCP_form_block_deploy_cmd(&CCP_util_packet_, tl_no, block_no); + if (ret != CCP_UTIL_ACK_OK) + { + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_PACKET_FMT_ERR); + } return PH_dispatch_command(&CCP_util_packet_); } @@ -377,7 +396,7 @@ uint8_t* CCP_get_1byte_param_from_packet(const CommonCmdPacket* packet, uint8_t if (CA_get_cmd_param_size(cmd_id, n) != param_size) return &ret; - endian_memcpy(&ret, CCP_get_param_head(packet) + offset, (size_t)param_size); + ENDIAN_memcpy(&ret, CCP_get_param_head(packet) + offset, (size_t)param_size); return &ret; } @@ -397,7 +416,7 @@ uint16_t* CCP_get_2byte_param_from_packet(const CommonCmdPacket* packet, uint8_t if (CA_get_cmd_param_size(cmd_id, n) != param_size) return &ret; - endian_memcpy(&ret, CCP_get_param_head(packet) + offset, (size_t)param_size); + ENDIAN_memcpy(&ret, CCP_get_param_head(packet) + offset, (size_t)param_size); return &ret; } @@ -417,7 +436,7 @@ uint32_t* CCP_get_4byte_param_from_packet(const CommonCmdPacket* packet, uint8_t if (CA_get_cmd_param_size(cmd_id, n) != param_size) return &ret; - endian_memcpy(&ret, CCP_get_param_head(packet) + offset, (size_t)param_size); + ENDIAN_memcpy(&ret, CCP_get_param_head(packet) + offset, (size_t)param_size); return &ret; } @@ -437,7 +456,7 @@ uint64_t* CCP_get_8byte_param_from_packet(const CommonCmdPacket* packet, uint8_t if (CA_get_cmd_param_size(cmd_id, n) != param_size) return &ret; - endian_memcpy(&ret, CCP_get_param_head(packet) + offset, (size_t)param_size); + ENDIAN_memcpy(&ret, CCP_get_param_head(packet) + offset, (size_t)param_size); return &ret; } @@ -640,7 +659,7 @@ static CCP_UTIL_ACK CCP_prepare_param_for_packet_(void* param, uint8_t byte) } if (p_pg->len != offset) return CCP_raise_err_at_param_generator_(); - endian_memcpy((void*)(CCP_get_param_head(&(p_pg->packet)) + offset), param, byte); // const_cast + ENDIAN_memcpy((void*)(CCP_get_param_head(&(p_pg->packet)) + offset), param, byte); // const_cast p_pg->len += byte; p_pg->param_idx++; return CCP_UTIL_ACK_OK; diff --git a/TlmCmd/common_cmd_packet_util.h b/TlmCmd/common_cmd_packet_util.h index 102c68a23..59c65f40d 100644 --- a/TlmCmd/common_cmd_packet_util.h +++ b/TlmCmd/common_cmd_packet_util.h @@ -6,7 +6,8 @@ #define COMMON_CMD_PACKET_UTIL_H_ #include "common_cmd_packet.h" -#include "../Applications/timeline_command_dispatcher.h" // for TLCD_ID +#include "packet_handler.h" +#include "../Applications/timeline_command_dispatcher_id_define.h" #include "block_command_table.h" // for bct_id #include @@ -21,6 +22,23 @@ typedef enum CCP_UTIL_ACK_PARAM_ERR //!< パラメタエラー } CCP_UTIL_ACK; + +/** + * @brief コマンド返り値である CCP_CmdRet を作成 + * @note err_code を使わないときはそれを明示するために CCP_make_cmd_ret_without_err_code をつかうこと + * @param[in] exec_sts: コマンド実行結果 (CCP_EXEC_STS) + * @param[in] err_code: ユーザー定義エラーコード + * @return CCP_CmdRet + */ +CCP_CmdRet CCP_make_cmd_ret(CCP_EXEC_STS exec_sts, uint32_t err_code); + +/** + * @brief コマンド返り値である CCP_CmdRet を作成(エラーコード不使用版) + * @param[in] exec_sts: コマンド実行結果 (CCP_EXEC_STS) + * @return CCP_CmdRet + */ +CCP_CmdRet CCP_make_cmd_ret_without_err_code(CCP_EXEC_STS exec_sts); + /** * @brief App 実行 TL コマンドを生成 * @note 生成した時は CCP_EXEC_TYPE_TL_FROM_GS @@ -140,19 +158,19 @@ PH_ACK CCP_register_tlc_asap(cycle_t ti, TLCD_ID tlcd_id, CMD_CODE cmd_id, const * @param[in] cmd_id: CMD_CODE * @param[in] param: パラメタ * @param[in] len: パラメタ長 - * @retval CCP_EXEC_PACKET_FMT_ERR: 引数が不正なとき + * @retval CCP_CmdRet{CCP_EXEC_PACKET_FMT_ERR, *}: 引数が不正なとき * @retval それ以外: PH_dispatch_command の返り値 */ -CCP_EXEC_STS CCP_form_and_exec_rtc(CMD_CODE cmd_id, const uint8_t* param, uint16_t len); +CCP_CmdRet CCP_form_and_exec_rtc(CMD_CODE cmd_id, const uint8_t* param, uint16_t len); /** * @brief BC展開 command を生成し,即時実行する * @param[in] tl_no: Timeline no * @param[in] block_no: BC ID - * @retval CCP_EXEC_PACKET_FMT_ERR: 引数が不正なとき + * @retval CCP_CmdRet{CCP_EXEC_PACKET_FMT_ERR, *}: 引数が不正なとき * @retval それ以外: PH_dispatch_command の返り値 */ -CCP_EXEC_STS CCP_form_and_exec_block_deploy_cmd(TLCD_ID tl_no, bct_id_t block_no); +CCP_CmdRet CCP_form_and_exec_block_deploy_cmd(TLCD_ID tl_no, bct_id_t block_no); /** * @brief TLCD ID から CCP_EXEC_TYPE を取得する diff --git a/TlmCmd/common_tlm_cmd_packet.h b/TlmCmd/common_tlm_cmd_packet.h index 4519e1f86..e2865ff76 100644 --- a/TlmCmd/common_tlm_cmd_packet.h +++ b/TlmCmd/common_tlm_cmd_packet.h @@ -8,7 +8,7 @@ #ifndef COMMON_TLM_CMD_PACKET_H_ #define COMMON_TLM_CMD_PACKET_H_ -#include +#include // ここで, CTCP_MAX_LEN, CommonTlmCmdPacket として使うパケット型を指定する #include #include "./common_tlm_packet.h" diff --git a/TlmCmd/packet_handler.c b/TlmCmd/packet_handler.c index 70ca126d2..35460a3e4 100644 --- a/TlmCmd/packet_handler.c +++ b/TlmCmd/packet_handler.c @@ -129,6 +129,13 @@ PH_ACK PH_analyze_cmd_packet(const CommonCmdPacket* packet) return ack; } + // ここまで来たら自分宛て + // 例えば以下のどちらか + // - CCP_DEST_TYPE_TO_ME + // - CCP_DEST_TYPE_TO_MOBC (自分) + // 統一するため上書きする + CCP_set_dest_type((CommonCmdPacket*)packet, CCP_DEST_TYPE_TO_ME); // const_cast + switch (CCP_get_exec_type(packet)) { case CCP_EXEC_TYPE_GS: @@ -219,9 +226,12 @@ PH_ACK PH_analyze_tlm_packet(const CommonTlmPacket* packet) } -CCP_EXEC_STS PH_dispatch_command(const CommonCmdPacket* packet) +CCP_CmdRet PH_dispatch_command(const CommonCmdPacket* packet) { - if (!CCP_is_valid_packet(packet)) return CCP_EXEC_UNKNOWN; // FIXME: 返り値変えたい + if (!CCP_is_valid_packet(packet)) + { + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_UNKNOWN); // FIXME: 返り値変えたい + } // FIXME: CTCP, SpacePacket 整理で直す if (CCP_get_apid(packet) == CCP_APID_TO_ME) diff --git a/TlmCmd/packet_handler.h b/TlmCmd/packet_handler.h index d244e3235..0e93c9a2d 100644 --- a/TlmCmd/packet_handler.h +++ b/TlmCmd/packet_handler.h @@ -5,6 +5,10 @@ #ifndef PACKET_HANDLER_H_ #define PACKET_HANDLER_H_ +#include "common_tlm_cmd_packet.h" +#include "packet_list.h" +#include "../Applications/timeline_command_dispatcher_id_define.h" + #define TL_TLM_PAGE_SIZE (32) #define TL_TLM_PAGE_MAX (8) @@ -33,11 +37,6 @@ #endif #endif -// 循環参照を防ぐためにここでinclude -#include "common_tlm_cmd_packet.h" -#include "packet_list.h" -#include "../Applications/timeline_command_dispatcher.h" - // FIXME: 整理したい typedef enum { @@ -49,7 +48,7 @@ typedef enum PH_ACK_TLC_SUCCESS, //!< TL に登録された PH_ACK_TLC_PAST_TIME, //!< 既に実行時間を過ぎている PH_ACK_TLC_ALREADY_EXISTS, //!< 同 TI に既に packet がいる - PH_ACK_BC_SUCCESS, //!< BC 展開に成功した + PH_ACK_BC_SUCCESS, //!< BC 展開に成功した PH_ACK_BC_INVALID_BLOCK_NO, //!< 無効な BC 番号だった PH_ACK_BC_ISORATED_CMD, //!< 飛ばして BC 登録しようとした PH_ACK_BC_CMD_TOO_LONG, //!< CMD が BC には長すぎる @@ -103,9 +102,9 @@ PH_ACK PH_analyze_cmd_packet(const CommonCmdPacket* packet); /** * @brief CCP をコマンドとして解釈して実行,ないしは別機器へ配送する * @param packet: 実行 or 配送するコマンドパケット - * @return CCP_EXEC_STS + * @return CCP_CmdRet */ -CCP_EXEC_STS PH_dispatch_command(const CommonCmdPacket* packet); +CCP_CmdRet PH_dispatch_command(const CommonCmdPacket* packet); /** * @brief CCP_EXEC_TYPE から PacketList を取得する diff --git a/TlmCmd/packet_list.c b/TlmCmd/packet_list.c index 67b731b8b..ad58b201e 100644 --- a/TlmCmd/packet_list.c +++ b/TlmCmd/packet_list.c @@ -9,7 +9,7 @@ #include "common_tlm_cmd_packet.h" #include "block_command_executor.h" #include "block_command_table.h" -#include +#include #include diff --git a/TlmCmd/telemetry_frame.c b/TlmCmd/telemetry_frame.c index f87eaf1df..d1b1405b0 100644 --- a/TlmCmd/telemetry_frame.c +++ b/TlmCmd/telemetry_frame.c @@ -5,9 +5,9 @@ */ #include "telemetry_frame.h" -#include +#include #include "../Library/print.h" -#include "../Library/endian_memcpy.h" +#include "../Library/endian.h" #include "./common_cmd_packet_util.h" static void initialize_tlm_table_(void); @@ -66,12 +66,12 @@ void TF_copy_u8(uint8_t* ptr, uint8_t data) void TF_copy_u16(uint8_t* ptr, uint16_t data) { - endian_memcpy(ptr, &data, 2); + ENDIAN_memcpy(ptr, &data, 2); } void TF_copy_u32(uint8_t* ptr, uint32_t data) { - endian_memcpy(ptr, &data, 4); + ENDIAN_memcpy(ptr, &data, 4); } void TF_copy_i8(uint8_t* ptr, int8_t data) @@ -81,32 +81,32 @@ void TF_copy_i8(uint8_t* ptr, int8_t data) void TF_copy_i16(uint8_t* ptr, int16_t data) { - endian_memcpy(ptr, &data, 2); + ENDIAN_memcpy(ptr, &data, 2); } void TF_copy_i32(uint8_t* ptr, int32_t data) { - endian_memcpy(ptr, &data, 4); + ENDIAN_memcpy(ptr, &data, 4); } void TF_copy_float(uint8_t* ptr, float data) { - endian_memcpy(ptr, &data, sizeof(float)); + ENDIAN_memcpy(ptr, &data, sizeof(float)); } void TF_copy_double(uint8_t* ptr, double data) { - endian_memcpy(ptr, &data, sizeof(double)); + ENDIAN_memcpy(ptr, &data, sizeof(double)); } -CCP_EXEC_STS Cmd_TF_INIT(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TF_INIT(const CommonCmdPacket* packet) { (void)packet; TF_initialize(); - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TF_REGISTER_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TF_REGISTER_TLM(const CommonCmdPacket* packet) { TLM_CODE tlm_id = (TLM_CODE)CCP_get_param_from_packet(packet, 0, uint8_t); uint32_t tlm_func = CCP_get_param_from_packet(packet, 1, uint32_t); @@ -114,25 +114,25 @@ CCP_EXEC_STS Cmd_TF_REGISTER_TLM(const CommonCmdPacket* packet) if (tlm_id >= TF_MAX_TLMS) { // 登録指定位置がテレメトリ数上限を超えている場合は異常判定 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } telemetry_frame_.tlm_table[tlm_id].tlm_func = (TF_TLM_FUNC_ACK (*)(uint8_t*, uint16_t*, uint16_t))tlm_func; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } -CCP_EXEC_STS Cmd_TF_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_TF_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet) { uint8_t page = CCP_get_param_from_packet(packet, 0, uint8_t); if (page >= TF_TLM_PAGE_MAX) { // ページ番号がコマンドテーブル範囲外 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } telemetry_frame_.tlm_page_no = page; - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } #pragma section diff --git a/TlmCmd/telemetry_frame.h b/TlmCmd/telemetry_frame.h index 1e9ee6f4d..15574901b 100644 --- a/TlmCmd/telemetry_frame.h +++ b/TlmCmd/telemetry_frame.h @@ -78,11 +78,11 @@ TF_TLM_FUNC_ACK TF_generate_contents(TLM_CODE tlm_id, */ void TF_load_tlm_table(TF_TlmInfo tlm_table[TF_MAX_TLMS]); -CCP_EXEC_STS Cmd_TF_INIT(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TF_INIT(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_TF_REGISTER_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TF_REGISTER_TLM(const CommonCmdPacket* packet); -CCP_EXEC_STS Cmd_TF_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_TF_SET_PAGE_FOR_TLM(const CommonCmdPacket* packet); void TF_copy_u8(uint8_t* ptr, uint8_t data); diff --git a/TlmCmd/telemetry_generator.c b/TlmCmd/telemetry_generator.c index 9b7865b01..9bffbcb50 100644 --- a/TlmCmd/telemetry_generator.c +++ b/TlmCmd/telemetry_generator.c @@ -17,7 +17,7 @@ static uint8_t TG_get_next_adu_counter_(void); // FIXME: 現在のコードは,MOBC と 2nd OBC の Tlm id がユニークであることを想定している // 本来被っても良いはず -CCP_EXEC_STS Cmd_GENERATE_TLM(const CommonCmdPacket* packet) +CCP_CmdRet Cmd_GENERATE_TLM(const CommonCmdPacket* packet) { static CommonTlmPacket ctp_; uint8_t category = CCP_get_param_from_packet(packet, 0, uint8_t); @@ -35,7 +35,7 @@ CCP_EXEC_STS Cmd_GENERATE_TLM(const CommonCmdPacket* packet) // パケット生成回数の上限は8回とする。 // 32kbpsでのDL時に8VCDU/secで1秒分の通信量。 // これを超える場合は複数回コマンドを送信して対応する。 - return CCP_EXEC_ILLEGAL_PARAMETER; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); } // ctp の ヘッダ部分の APID をクリア @@ -51,8 +51,8 @@ CCP_EXEC_STS Cmd_GENERATE_TLM(const CommonCmdPacket* packet) TSP_MAX_LEN); // 範囲外のTLM IDを除外 - if (ack == TF_TLM_FUNC_ACK_NOT_DEFINED) return CCP_EXEC_ILLEGAL_PARAMETER; - if (ack != TF_TLM_FUNC_ACK_SUCCESS) return CCP_EXEC_ILLEGAL_CONTEXT; + if (ack == TF_TLM_FUNC_ACK_NOT_DEFINED) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_PARAMETER); + if (ack != TF_TLM_FUNC_ACK_SUCCESS) return CCP_make_cmd_ret_without_err_code(CCP_EXEC_ILLEGAL_CONTEXT); // Header if (APID_is_other_obc_tlm_apid(CTP_get_apid(&ctp_))) @@ -83,7 +83,7 @@ CCP_EXEC_STS Cmd_GENERATE_TLM(const CommonCmdPacket* packet) dest_flags = CTP_DEST_FLAG_RP; } TSP_set_dest_flags(&ctp_, dest_flags); - TSP_set_dr_partition(&ctp_, dr_partition); + TSP_set_dest_info(&ctp_, dr_partition); // FIXME: もはや dr partition ですらない TSP_set_tlm_id(&ctp_, id); // 生成したパケットを指定された回数配送処理へ渡す @@ -93,7 +93,7 @@ CCP_EXEC_STS Cmd_GENERATE_TLM(const CommonCmdPacket* packet) --num_dumps; } - return CCP_EXEC_SUCCESS; + return CCP_make_cmd_ret_without_err_code(CCP_EXEC_SUCCESS); } // FIXME: space packet 大工事でビット幅が変わってるので直す! diff --git a/TlmCmd/telemetry_generator.h b/TlmCmd/telemetry_generator.h index 131b0911d..9f4751d03 100644 --- a/TlmCmd/telemetry_generator.h +++ b/TlmCmd/telemetry_generator.h @@ -3,6 +3,6 @@ #include "common_cmd_packet.h" -CCP_EXEC_STS Cmd_GENERATE_TLM(const CommonCmdPacket* packet); +CCP_CmdRet Cmd_GENERATE_TLM(const CommonCmdPacket* packet); #endif diff --git a/c2a_core_main.c b/c2a_core_main.c index b0b83b55d..3540a82b1 100644 --- a/c2a_core_main.c +++ b/c2a_core_main.c @@ -5,7 +5,6 @@ #include "./System/TaskManager/task_dispatcher.h" #include "./System/ApplicationManager/app_manager.h" #include "./System/EventManager/event_manager.h" -#include "./System/AnomalyLogger/anomaly_logger.h" #include "./System/TimeManager/time_manager.h" #include "./System/ModeManager/mode_manager.h" #include "./System/WatchdogTimer/watchdog_timer.h" @@ -15,7 +14,6 @@ #include "./TlmCmd/telemetry_frame.h" #include -#include void C2A_core_init(void) { @@ -27,10 +25,6 @@ void C2A_core_init(void) Printf("C2A_init: PH_init done.\n"); EM_initialize(); // Event Manager.App Managerより先に初期化するべき Printf("C2A_init: EM_initialize done.\n"); -#ifdef AL_ENABLE - AL_initialize(); // Anomaly Logger.App Managerより先に初期化するべき - Printf("C2A_init: AL_initialize done.\n"); -#endif AM_initialize(); // App Manager Printf("C2A_init: AM_initialize done.\n"); AR_load_initial_settings(); // App Registry diff --git a/c2a_core_main.h b/c2a_core_main.h index 5cae4ec07..7ed2b683e 100644 --- a/c2a_core_main.h +++ b/c2a_core_main.h @@ -8,7 +8,7 @@ void C2A_core_main(void); // これらの番号は,リリース時に手動で合わせる // 詳細: Docs/General/release.md #define C2A_CORE_VER_MAJOR (3) -#define C2A_CORE_VER_MINOR (7) +#define C2A_CORE_VER_MINOR (8) #define C2A_CORE_VER_PATCH (0) #define C2A_CORE_VER_PRE ("")