Skip to content

Commit

Permalink
fix function name
Browse files Browse the repository at this point in the history
  • Loading branch information
meltingrabbit committed Jan 28, 2022
1 parent 82e7bfe commit 092fb39
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
12 changes: 6 additions & 6 deletions TlmCmd/Ccsds/cmd_space_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ CSP_2ND_HDR_VER CSP_get_2nd_hdr_ver(const CmdSpacePacket* csp)
void CSP_set_2nd_hdr_ver(CmdSpacePacket* csp, CSP_2ND_HDR_VER ver)
{
uint8_t tmp = (uint8_t)ver;
SP_insert_param_from_packet(CSP_CAST_TO_NON_CONST_SP(csp), &CSP_pei_2nd_hdr_ver_, &tmp);
SP_insert_param_to_packet(CSP_CAST_TO_NON_CONST_SP(csp), &CSP_pei_2nd_hdr_ver_, &tmp);
}


Expand All @@ -149,7 +149,7 @@ CSP_CMD_TYPE CSP_get_cmd_type(const CmdSpacePacket* csp)
void CSP_set_cmd_type(CmdSpacePacket* csp, CSP_CMD_TYPE cmd_type)
{
uint8_t tmp = (uint8_t)cmd_type;
SP_insert_param_from_packet(CSP_CAST_TO_NON_CONST_SP(csp), &CSP_pei_cmd_type_, &tmp);
SP_insert_param_to_packet(CSP_CAST_TO_NON_CONST_SP(csp), &CSP_pei_cmd_type_, &tmp);
}


Expand All @@ -165,7 +165,7 @@ CMD_CODE CSP_get_cmd_id(const CmdSpacePacket* csp)
void CSP_set_cmd_id(CmdSpacePacket* csp, CMD_CODE id)
{
uint16_t tmp = (uint16_t)id;
SP_insert_param_from_packet(CSP_CAST_TO_NON_CONST_SP(csp), &CSP_pei_cmd_id_, &tmp);
SP_insert_param_to_packet(CSP_CAST_TO_NON_CONST_SP(csp), &CSP_pei_cmd_id_, &tmp);
}


Expand Down Expand Up @@ -193,7 +193,7 @@ CCP_DEST_TYPE CSP_get_dest_type(const CmdSpacePacket* csp)
void CSP_set_dest_type(CmdSpacePacket* csp, CCP_DEST_TYPE dest_type)
{
uint8_t tmp = (uint8_t)dest_type;
SP_insert_param_from_packet(CSP_CAST_TO_NON_CONST_SP(csp), &CSP_pei_dest_type_, &tmp);
SP_insert_param_to_packet(CSP_CAST_TO_NON_CONST_SP(csp), &CSP_pei_dest_type_, &tmp);
}


Expand Down Expand Up @@ -224,7 +224,7 @@ CCP_EXEC_TYPE CSP_get_exec_type(const CmdSpacePacket* csp)
void CSP_set_exec_type(CmdSpacePacket* csp, CCP_EXEC_TYPE exec_type)
{
uint8_t tmp = (uint8_t)exec_type;
SP_insert_param_from_packet(CSP_CAST_TO_NON_CONST_SP(csp), &CSP_pei_exec_type_, &tmp);
SP_insert_param_to_packet(CSP_CAST_TO_NON_CONST_SP(csp), &CSP_pei_exec_type_, &tmp);
}


Expand All @@ -239,7 +239,7 @@ uint32_t CSP_get_ti(const CmdSpacePacket* csp)

void CSP_set_ti(CmdSpacePacket* csp, uint32_t ti)
{
SP_insert_param_from_packet(CSP_CAST_TO_NON_CONST_SP(csp), &CSP_pei_ti_, &ti);
SP_insert_param_to_packet(CSP_CAST_TO_NON_CONST_SP(csp), &CSP_pei_ti_, &ti);
}


Expand Down
20 changes: 10 additions & 10 deletions TlmCmd/Ccsds/space_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ SP_VER SP_get_ver(const SpacePacket* sp)
void SP_set_ver(SpacePacket* sp, SP_VER ver)
{
uint8_t tmp = (uint8_t)ver;
SP_insert_param_from_packet(sp, &SP_pei_ver_, &tmp);
SP_insert_param_to_packet(sp, &SP_pei_ver_, &tmp);
}


Expand All @@ -59,7 +59,7 @@ SP_TYPE SP_get_type(const SpacePacket* sp)
void SP_set_type(SpacePacket* sp, SP_TYPE type)
{
uint8_t tmp = (uint8_t)type;
SP_insert_param_from_packet(sp, &SP_pei_type_, &tmp);
SP_insert_param_to_packet(sp, &SP_pei_type_, &tmp);
}


Expand All @@ -75,7 +75,7 @@ SP_2ND_HDR_FLAG SP_get_2nd_hdr_flag(const SpacePacket* sp)
void SP_set_2nd_hdr_flag(SpacePacket* sp, SP_2ND_HDR_FLAG flag)
{
uint8_t tmp = (uint8_t)flag;
SP_insert_param_from_packet(sp, &SP_pei_2nd_hdr_flag_, &tmp);
SP_insert_param_to_packet(sp, &SP_pei_2nd_hdr_flag_, &tmp);
}


Expand Down Expand Up @@ -105,7 +105,7 @@ APID SP_get_apid(const SpacePacket* sp)
void SP_set_apid(SpacePacket* sp, APID apid)
{
uint16_t tmp = (uint16_t)apid;
SP_insert_param_from_packet(sp, &SP_pei_apid_, &tmp);
SP_insert_param_to_packet(sp, &SP_pei_apid_, &tmp);
}


Expand All @@ -121,7 +121,7 @@ SP_SEQ_FLAG SP_get_seq_flag(const SpacePacket* sp)
void SP_set_seq_flag(SpacePacket* sp, SP_SEQ_FLAG flag)
{
uint8_t tmp = (uint8_t)flag;
SP_insert_param_from_packet(sp, &SP_pei_seq_flag_, &tmp);
SP_insert_param_to_packet(sp, &SP_pei_seq_flag_, &tmp);
}


Expand All @@ -136,7 +136,7 @@ uint16_t SP_get_seq_count(const SpacePacket* sp)

void SP_set_seq_count(SpacePacket* sp, uint16_t count)
{
SP_insert_param_from_packet(sp, &SP_pei_seq_count_, &count);
SP_insert_param_to_packet(sp, &SP_pei_seq_count_, &count);
}


Expand All @@ -156,7 +156,7 @@ void SP_set_packet_data_len(SpacePacket* sp, uint16_t len)

// Data Length は 0 起算表記なので 1 起算を変換
len--;
SP_insert_param_from_packet(sp, &SP_pei_pckt_data_len_, &len);
SP_insert_param_to_packet(sp, &SP_pei_pckt_data_len_, &len);
}


Expand Down Expand Up @@ -219,9 +219,9 @@ void SP_extract_param_from_packet(const SpacePacket* sp,
}


void SP_insert_param_from_packet(SpacePacket* sp,
const SP_ParamExtractionInfo* pei,
const void* src)
void SP_insert_param_to_packet(SpacePacket* sp,
const SP_ParamExtractionInfo* pei,
const void* src)
{
uint8_t buffer[8];
uint8_t i;
Expand Down
8 changes: 4 additions & 4 deletions TlmCmd/Ccsds/space_packet.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,14 +256,14 @@ void SP_extract_param_from_packet(const SpacePacket* sp,
void* dst);

/**
* @brief packet に格納された param を設定
* @brief packet param を格納
* @param sp[in,out]: SpacePacket
* @param pei[in]: SP_ParamExtractionInfo
* @param src[in]: 格納元のポインタ
* @return void
*/
void SP_insert_param_from_packet(SpacePacket* sp,
const SP_ParamExtractionInfo* pei,
const void* src);
void SP_insert_param_to_packet(SpacePacket* sp,
const SP_ParamExtractionInfo* pei,
const void* src);

#endif
14 changes: 7 additions & 7 deletions TlmCmd/Ccsds/tlm_space_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ TSP_2ND_HDR_VER TSP_get_2nd_hdr_ver(const TlmSpacePacket* tsp)
void TSP_set_2nd_hdr_ver(TlmSpacePacket* tsp, TSP_2ND_HDR_VER ver)
{
uint8_t tmp = (uint8_t)ver;
SP_insert_param_from_packet(TSP_CAST_TO_NON_CONST_SP(tsp), &TSP_pei_2nd_hdr_ver_, &tmp);
SP_insert_param_to_packet(TSP_CAST_TO_NON_CONST_SP(tsp), &TSP_pei_2nd_hdr_ver_, &tmp);
}


Expand All @@ -150,7 +150,7 @@ uint32_t TSP_get_board_time(const TlmSpacePacket* tsp)

void TSP_set_board_time(TlmSpacePacket* tsp, uint32_t time)
{
SP_insert_param_from_packet(TSP_CAST_TO_NON_CONST_SP(tsp), &TSP_pei_board_time_, &time);
SP_insert_param_to_packet(TSP_CAST_TO_NON_CONST_SP(tsp), &TSP_pei_board_time_, &time);
}


Expand All @@ -165,7 +165,7 @@ double TSP_get_global_time(const TlmSpacePacket* tsp)

void TSP_set_global_time(TlmSpacePacket* tsp, double time)
{
SP_insert_param_from_packet(TSP_CAST_TO_NON_CONST_SP(tsp), &TSP_pei_global_time_, &time);
SP_insert_param_to_packet(TSP_CAST_TO_NON_CONST_SP(tsp), &TSP_pei_global_time_, &time);
}


Expand All @@ -180,7 +180,7 @@ uint32_t TSP_get_on_board_subnet_time(const TlmSpacePacket* tsp)

void TSP_set_on_board_subnet_time(TlmSpacePacket* tsp, uint32_t time)
{
SP_insert_param_from_packet(TSP_CAST_TO_NON_CONST_SP(tsp), &TSP_pei_ob_sn_time_, &time);
SP_insert_param_to_packet(TSP_CAST_TO_NON_CONST_SP(tsp), &TSP_pei_ob_sn_time_, &time);
}


Expand All @@ -196,7 +196,7 @@ TLM_CODE TSP_get_tlm_id(const TlmSpacePacket* tsp)
void TSP_set_tlm_id(TlmSpacePacket* tsp, TLM_CODE id)
{
uint8_t tmp = (uint8_t)id;
SP_insert_param_from_packet(TSP_CAST_TO_NON_CONST_SP(tsp), &TSP_pei_tlm_id_, &tmp);
SP_insert_param_to_packet(TSP_CAST_TO_NON_CONST_SP(tsp), &TSP_pei_tlm_id_, &tmp);
}


Expand All @@ -211,7 +211,7 @@ ctp_dest_flags_t TSP_get_dest_flgas(const TlmSpacePacket* tsp)

void TSP_set_dest_flgas(TlmSpacePacket* tsp, ctp_dest_flags_t flags)
{
SP_insert_param_from_packet(TSP_CAST_TO_NON_CONST_SP(tsp), &TSP_pei_dest_flags_, &flags);
SP_insert_param_to_packet(TSP_CAST_TO_NON_CONST_SP(tsp), &TSP_pei_dest_flags_, &flags);
}


Expand All @@ -226,7 +226,7 @@ uint8_t TSP_get_dr_partition(const TlmSpacePacket* tsp)

void TSP_set_dr_partition(TlmSpacePacket* tsp, uint8_t ptn)
{
SP_insert_param_from_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_dr_ptn_, &ptn);
}


Expand Down

0 comments on commit 092fb39

Please sign in to comment.