15 #include "../Library/endian.h"
16 #include "../System/TimeManager/time_manager.h"
283 for (cmd = 0; cmd < length; ++cmd)
348 for (cmd = 0; cmd < length; ++cmd)
367 if (diff >= limit_step)
458 memcpy(&tmp_params, params_a,
sizeof(
BCE_Params));
BCT_ACK BCE_reset_combiner_info(const bct_id_t block)
static CommonCmdPacket BCE_packet_
BCT_ACK BCE_activate_block_by_id(bct_id_t block)
static CCP_CmdRet BCE_combine_block_cmd_(bct_id_t block)
BC をまとめて一括で実行する
CCP_CmdRet Cmd_BCE_INACTIVATE_BLOCK_BY_ID(const CommonCmdPacket *packet)
static BCE_Params * BCE_get_bc_exe_params_(const bct_id_t block)
static void BCE_set_bc_exe_params_(const bct_id_t block, const BCE_Params *bc_exe_params)
CCP_CmdRet Cmd_BCE_ACTIVATE_BLOCK_BY_ID(const CommonCmdPacket *packet)
BCT_ACK BCE_swap_address(const bct_id_t block_a, const bct_id_t block_b)
BCE の params の指すポインタ & func を入れ替える
static void BCE_set_bc_exe_params_default_(const bct_id_t block, const BCE_Params *bc_exe_params)
BCT_ACK BCE_clear_block(const bct_id_t block)
指定された block の BCE を初期化
const BlockCommandExecutor *const block_command_executor
BCT_ACK BCE_inactivate_block_by_id(bct_id_t block)
BCT_ACK BCE_reset_rotator_info(const bct_id_t block)
CCP_CmdRet Cmd_BCE_RESET_COMBINER_INFO(const CommonCmdPacket *packet)
CCP_CmdRet Cmd_BCE_TIMELIMIT_COMBINE_BLOCK(const CommonCmdPacket *packet)
const BCE_Params * BCE_get_bc_exe_params(const bct_id_t block)
BCE_Params の const getter
CCP_CmdRet Cmd_BCE_COMBINE_BLOCK(const CommonCmdPacket *packet)
uint8_t BCE_is_active(const bct_id_t block)
BCT の length の getter
static BlockCommandExecutor block_command_executor_
static BCE_Params * BCE_get_bc_exe_params_default_(const bct_id_t block)
時間制限付きの combiner
void BCE_load_default_func_pointer(void)
BCE_Params にデフォルトの関数ポインタを入れる
static CCP_CmdRet BCE_timelimit_combine_block_cmd_(bct_id_t block, step_t limit_step)
BC をまとめて一括で実行する
static CCP_CmdRet BCE_rotate_block_cmd_(bct_id_t block)
rotator の実行主体
BCT_ACK BCE_swap_contents(const bct_id_t block_a, const bct_id_t block_b)
BCE の params の指す中身を入れ替える
CCP_CmdRet Cmd_BCE_ROTATE_BLOCK(const CommonCmdPacket *packet)
CCP_CmdRet Cmd_BCE_RESET_ROTATOR_INFO(const CommonCmdPacket *packet)
CCP_CmdRet Cmd_BCE_ACTIVATE_BLOCK(const CommonCmdPacket *packet)
CCP_CmdRet Cmd_BCE_SET_ROTATE_INTERVAL(const CommonCmdPacket *packet)
BCT_ACK BCE_activate_block(void)
block_command_table->pos の BC を activate する
BCT_ACK BCT_make_pos(BCT_Pos *pos, const bct_id_t block, const uint8_t cmd)
BCT_Pos* を引数から作る
BCT_ACK BCT_load_cmd(const BCT_Pos *pos, CommonCmdPacket *packet)
保存データを CCP にコピーする.
const BlockCommandTable *const block_command_table
CCP_CmdRet BCT_convert_bct_ack_to_ccp_cmd_ret(BCT_ACK ack)
返り値用 enum 変換用関数
uint8_t BCT_get_bc_length(const bct_id_t block)
BCT の length の getter
#define SIZE_OF_BCT_ID_T
bct_id_t の型サイズ.メモリインパクトがそれなりにあるので,可変に
#define BCT_MAX_BLOCKS
BCのIDの最大数
BCT_ACK
BCT 関係の関数のエラーステータス
@ CCP_EXEC_ILLEGAL_LENGTH
コマンド実行時のコマンド引数長エラー
@ CCP_EXEC_ILLEGAL_PARAMETER
コマンド実行時のパラメタエラー
@ CCP_EXEC_ILLEGAL_CONTEXT
コマンド実行時のその他のエラー
uint16_t CCP_get_param_len(const CommonCmdPacket *packet)
CMD パラメタ長を取得
const uint8_t * CCP_get_param_head(const CommonCmdPacket *packet)
先頭のパラメタのポインタを取得
CCP_CmdRet CCP_make_cmd_ret_without_err_code(CCP_EXEC_STS exec_sts)
コマンド返り値である CCP_CmdRet を作成(エラーコード不使用版)
void * ENDIAN_memcpy(void *dest, const void *src, size_t size)
エンディアンを考慮した memcpy
step_t OBCT_diff_in_step(const ObcTime *before, const ObcTime *after)
ObcTime の引き算を step 単位で行う
CCP_CmdRet PH_dispatch_command(const CommonCmdPacket *packet)
CCP をコマンドとして解釈して実行,ないしは別機器へ配送する
C2A 全体を流れる Common Packet の配送を制御する
BCE_Params の getter, setter (private)
void(* set_bc_exe_params_)(const bct_id_t block, const BCE_Params *bc_params)
BCE_Params *(* get_bc_exe_params_)(const bct_id_t block)
uint16_t call_num
Cmd_BCE_TIMELIMIT_COMBINE_BLOCKが呼ばれるたびにインクリメント
uint8_t is_active
有効かどうか.1: 有効, 0: 無効
uint8_t worst_cmd_pos
最悪ケースのcmd pos
struct BCE_Params::@18 timelimit_combine
uint16_t interval
interval[cycle] ごとに実行される (大抵1)
struct BCE_Params::@17 rotate
uint8_t next_cmd
次に実行される cmd
uint8_t last_timeover_cmd_pos
前回時間制限に引っかかったときのcmd pos
uint16_t counter
interval の計算のための counter[cycle]
uint16_t timeover_num
時間制限に引っかかったらインクリメント
uint8_t cmd
そのブロック内でどのコマンドを指すか
BCE_Params * bc_exe_params[BCT_MAX_BLOCKS]
パラメタ.不揮発化出来るようにポインタで確保
BCE_Func bc_exe_func[BCT_MAX_BLOCKS]
BCE_Params に対する操作関数.各 BC ごとに確保
CCP_EXEC_STS exec_sts
CCP_EXEC_STS.Cmd の統一的なエラーコード
ObcTime TMGR_get_master_clock(void)
現在の master_clock_ を取得する