9 #include "../Library/print.h"
10 #include "../System/EventManager/event_logger.h"
43 Printf(
"CA: init error!!!\n");
81 return cmd_func(packet);
135 uint16_t min_len = 0;
140 if (param_size == 0)
return min_len;
141 min_len += param_size;
167 if (param_num == 0)
return 0;
215 for (i = 0; i <
sizeof(param_size_infos); ++i)
static CommandAnalyze command_analyze_
uint8_t CA_get_cmd_param_num(CMD_CODE cmd_code)
コマンドパラメタ数を取得する
@ CA_EL_LOCAL_ID_ILLEGAL_CMD_CODE
不正な CMD_CODE を指定された場合
@ CA_EL_LOCAL_ID_NULL_CMD_CODE
未登録な CMD_CODE を指定された場合
CCP_CmdRet Cmd_CA_SET_PAGE_FOR_TLM(const CommonCmdPacket *packet)
uint8_t CA_get_cmd_param_size(CMD_CODE cmd_code, uint8_t n)
コマンドパラメタサイズを取得する
CCP_CmdRet Cmd_CA_INIT(const CommonCmdPacket *packet)
int CA_has_raw_param(CMD_CODE cmd_code)
RAW パラメタを持っているか?
const CommandAnalyze *const command_analyze
static CA_PARAM_SIZE_TYPE CA_get_param_size_type_(CMD_CODE cmd_code, uint8_t n)
コマンドパラメタのサイズ情報を取得
CCP_CmdRet Cmd_CA_REGISTER_CMD(const CommonCmdPacket *packet)
uint16_t CA_get_cmd_param_min_len(CMD_CODE cmd_code)
最小コマンドパラメタ長を取得する
CCP_CmdRet CA_execute_cmd(const CommonCmdPacket *packet)
コマンド実行の本体
void CA_initialize(void)
CA の初期化
CA_ACK CA_ckeck_cmd_param_len(CMD_CODE cmd_code, uint16_t param_len)
コマンドパラメタ長をチェックする
#define CA_MAX_CMD_PARAM_NUM
コマンドパラメタ(引数)の最大数.現時点ではユーザー側で可変にすることを想定してはない
#define CA_TLM_PAGE_MAX
コマンドテーブルページ数(ページネーション用)
CA_PARAM_SIZE_TYPE
コマンドパラメタサイズ
@ CA_PARAM_SIZE_TYPE_8BYTE
8 byte
@ CA_PARAM_SIZE_TYPE_RAW
RAW パラメタ
@ CA_PARAM_SIZE_TYPE_2BYTE
2 byte
@ CA_PARAM_SIZE_TYPE_NONE
パラメタなし
@ CA_PARAM_SIZE_TYPE_1BYTE
1 byte
@ CA_PARAM_SIZE_TYPE_4BYTE
4 byte
#define CA_MAX_CMDS
コマンドテーブルサイズ.すなわち登録できる最大コマンド数
void CA_load_cmd_table(CA_CmdInfo cmd_table[CA_MAX_CMDS])
Cmd Tableのロード
uint16_t CCP_get_max_param_len(void)
CMD パラメタ長の最大値を取得
@ CCP_EXEC_ILLEGAL_LENGTH
コマンド実行時のコマンド引数長エラー
@ CCP_EXEC_ILLEGAL_PARAMETER
コマンド実行時のパラメタエラー
@ CCP_EXEC_CMD_NOT_DEFINED
CA_execute_cmd で用いる
CMD_CODE CCP_get_id(const CommonCmdPacket *packet)
CMD ID を取得
uint16_t CCP_get_param_len(const CommonCmdPacket *packet)
CMD パラメタ長を取得
CCP_CmdRet CCP_make_cmd_ret(CCP_EXEC_STS exec_sts, uint32_t err_code)
コマンド返り値である CCP_CmdRet を作成
CCP_CmdRet CCP_make_cmd_ret_without_err_code(CCP_EXEC_STS exec_sts)
コマンド返り値である CCP_CmdRet を作成(エラーコード不使用版)
uint16_t CCP_get_raw_param_from_packet(const CommonCmdPacket *packet, void *dest, uint16_t max_copy_len)
CCP packet から,RAW コマンド引数を取得する
#define CCP_get_param_from_packet(packet, n, type)
CCP packet から,n番目のコマンド引数を取得する
EL_ACK EL_record_event(EL_GROUP group, uint32_t local, EL_ERROR_LEVEL err_level, uint32_t note)
イベント (EL_Event) を記録
@ EL_CORE_GROUP_COMMAND_ANALYZE
EL_GROUP
event_logger の Event Group の user 定義部分
void Printf(const char *format,...)
CCP_CmdRet(* cmd_func)(const CommonCmdPacket *)
コマンドとなる関数
CA_PackedParamSizeInfo param_size_infos[(CA_MAX_CMD_PARAM_NUM+1)/2]
パラメタサイズ情報
union CA_PackedParamSizeInfo::@19 packed_info
struct CA_PackedParamSizeInfo::@19::@20 bit
CommandAnalyze の Info 構造体
uint8_t tlm_page_no
テレメで使うページ数
CA_CmdInfo cmd_table[CA_MAX_CMDS]
コマンドテーブル