C2A_Core
|
OBC時刻のカウントアップと,各種衛星時刻関連処理 [詳解]
#include "time_manager.h"
#include "obc_time_config.h"
#include <string.h>
#include "../../Library/c2a_round.h"
#include "../TaskManager/task_dispatcher.h"
#include "../../TlmCmd/common_cmd_packet_util.h"
関数 | |
static TMGR_ACK | TMGR_set_master_total_cycle_ (cycle_t total_cycle) |
TI (master_clock_.total_cycle) の setter [詳解] | |
static TMGR_ACK | TMGR_set_utl_unixtime_epoch_ (double utl_unixtime_epoch) |
time_manager_.unixtime_info_.utl_unixtime_epoch の setter [詳解] | |
static TMGR_ACK | TMGR_set_cycle_correction_ (double cycle_correction) |
time_manager_.unixtime_info_.cycle_correction の setter [詳解] | |
static CCP_CmdRet | TMGR_conv_tmgr_ack_to_ccp_cmd_ret_ (TMGR_ACK ack) |
enum 変換用関数 [詳解] | |
void | TMGR_init (void) |
TimeManager 構造体を初期化する [詳解] | |
void | TMGR_clear (void) |
master_clock_ と unixtime_info_ をクリアし全てゼロにする [詳解] | |
void | TMGR_clear_master_mode_cycle (void) |
master_clock_ の mode_cycle をゼロにする [詳解] | |
void | TMGR_count_up_master_clock (void) |
master_clock_ をstep刻みでインクリメントする [詳解] | |
void | TMGR_down_initializing_flag (void) |
C2Aの初期化終了時に呼び出し, 初期化flagを下げ, TMGRをもう一度クリアする [詳解] | |
ObcTime | TMGR_get_master_clock (void) |
現在の master_clock_ を取得する [詳解] | |
ObcTime | TMGR_get_master_clock_from_boot (void) |
初期化にかかった時間も加算した master_clock_ を返す [詳解] | |
cycle_t | TMGR_get_master_total_cycle (void) |
現在の total_cycle を返す [詳解] | |
cycle_t | TMGR_get_master_mode_cycle (void) |
現在の mode_cycle を返す [詳解] | |
step_t | TMGR_get_master_step (void) |
現在の step を返す [詳解] | |
uint32_t | TMGR_get_master_total_cycle_in_msec (void) |
現在の total_cycle をミリ秒単位で返す [詳解] | |
uint32_t | TMGR_get_master_mode_cycle_in_msec (void) |
現在の mode_cycle をミリ秒単位で返す [詳解] | |
void | TMGR_clear_unixtime_info (void) |
unixtime_info_ を初期化する [詳解] | |
TMGR_ACK | TMGR_update_unixtime (const double unixtime, const ObcTime *time) |
unixtime と TI の紐づき情報を更新する [詳解] | |
double | TMGR_get_unixtime_at_ti0 (void) |
unixtime_at_ti0 を取得する [詳解] | |
double | TMGR_get_utl_unixtime_epoch (void) |
utl_unixtime_epoch を取得する [詳解] | |
double | TMGR_get_precise_cycles_per_sec (void) |
OBC のクロック誤差を反映した cycles_per_sec を返す [詳解] | |
double | TMGR_get_precise_ti_in_sec (const ObcTime *time) |
OBC のクロック誤差を反映した正確な ti を秒単位で返す [詳解] | |
double | TMGR_get_current_unixtime (void) |
現在の unixtime を OBC の ti をもとに計算して返す [詳解] | |
double | TMGR_get_unixtime_from_obc_time (const ObcTime *time) |
ObcTime を unixtime に変換する [詳解] | |
double | TMGR_get_unixtime_from_utl_unixtime (const cycle_t utl_unixtime) |
UTL_cmdで用いる utl_unixtime を 一般的なunixtimeに変換する [詳解] | |
double | TMGR_get_precise_ti_from_unixtime (const double unixtime) |
unixtime を TI (cycle単位) に変換する [詳解] | |
ObcTime | TMGR_get_obc_time_from_unixtime (const double unixtime) |
unixtime を ObcTime に変換する [詳解] | |
cycle_t | TMGR_get_ti_from_utl_unixtime (const cycle_t utl_unixtime) |
引数で指定された utl_unixtime に対応する TI を返す [詳解] | |
CCP_CmdRet | Cmd_TMGR_SET_TIME (const CommonCmdPacket *packet) |
CCP_CmdRet | Cmd_TMGR_UPDATE_UNIXTIME (const CommonCmdPacket *packet) |
CCP_CmdRet | Cmd_TMGR_SET_UTL_UNIXTIME_EPOCH (const CommonCmdPacket *packet) |
CCP_CmdRet | Cmd_TMGR_SET_CYCLE_CORRECTION (const CommonCmdPacket *packet) |
CCP_CmdRet | Cmd_TMGR_RESET_CYCLE_CORRECTION (const CommonCmdPacket *packet) |
CCP_CmdRet | Cmd_TMGR_CLEAR_UNIXTIME_INFO (const CommonCmdPacket *packet) |
変数 | |
static TimeManager | time_manager_ |
const TimeManager *const | time_manager = &time_manager_ |
OBC時刻のカウントアップと,各種衛星時刻関連処理
time_manager.c に定義があります。
CCP_CmdRet Cmd_TMGR_CLEAR_UNIXTIME_INFO | ( | const CommonCmdPacket * | packet | ) |
CCP_CmdRet Cmd_TMGR_RESET_CYCLE_CORRECTION | ( | const CommonCmdPacket * | packet | ) |
CCP_CmdRet Cmd_TMGR_SET_CYCLE_CORRECTION | ( | const CommonCmdPacket * | packet | ) |
CCP_CmdRet Cmd_TMGR_SET_TIME | ( | const CommonCmdPacket * | packet | ) |
CCP_CmdRet Cmd_TMGR_SET_UTL_UNIXTIME_EPOCH | ( | const CommonCmdPacket * | packet | ) |
CCP_CmdRet Cmd_TMGR_UPDATE_UNIXTIME | ( | const CommonCmdPacket * | packet | ) |
void TMGR_clear | ( | void | ) |
master_clock_ と unixtime_info_ をクリアし全てゼロにする
void |
time_manager.c の 51 行目に定義があります。
void TMGR_clear_master_mode_cycle | ( | void | ) |
void TMGR_clear_unixtime_info | ( | void | ) |
|
static |
void TMGR_count_up_master_clock | ( | void | ) |
void TMGR_down_initializing_flag | ( | void | ) |
C2Aの初期化終了時に呼び出し, 初期化flagを下げ, TMGRをもう一度クリアする
void |
time_manager.c の 72 行目に定義があります。
double TMGR_get_current_unixtime | ( | void | ) |
ObcTime TMGR_get_master_clock | ( | void | ) |
現在の master_clock_ を取得する
void |
{0,0,0} | : C2A初期化中の場合 |
master_clock_ | : それ以外 |
time_manager.c の 80 行目に定義があります。
ObcTime TMGR_get_master_clock_from_boot | ( | void | ) |
初期化にかかった時間も加算した master_clock_ を返す
void |
time_manager.c の 92 行目に定義があります。
cycle_t TMGR_get_master_mode_cycle | ( | void | ) |
現在の mode_cycle を返す
void |
time_manager.c の 101 行目に定義があります。
uint32_t TMGR_get_master_mode_cycle_in_msec | ( | void | ) |
現在の mode_cycle をミリ秒単位で返す
void |
time_manager.c の 114 行目に定義があります。
step_t TMGR_get_master_step | ( | void | ) |
cycle_t TMGR_get_master_total_cycle | ( | void | ) |
現在の total_cycle を返す
void |
time_manager.c の 97 行目に定義があります。
uint32_t TMGR_get_master_total_cycle_in_msec | ( | void | ) |
現在の total_cycle をミリ秒単位で返す
void |
time_manager.c の 109 行目に定義があります。
ObcTime TMGR_get_obc_time_from_unixtime | ( | const double | unixtime | ) |
unixtime を ObcTime に変換する
[in] | unixtime |
{0,0,0} | : 引数の unixtime が unixtime_at_ti0 より小さいとき |
ObcTime | : それ以外 |
time_manager.c の 194 行目に定義があります。
double TMGR_get_precise_cycles_per_sec | ( | void | ) |
OBC のクロック誤差を反映した cycles_per_sec を返す
void |
time_manager.c の 158 行目に定義があります。
double TMGR_get_precise_ti_from_unixtime | ( | const double | unixtime | ) |
unixtime を TI (cycle単位) に変換する
[in] | unixtime |
0 | : 引数の unixtime が unixtime_at_ti0 より小さいとき |
TI | : それ以外. 整数に丸めず double のまま返す |
time_manager.c の 184 行目に定義があります。
double TMGR_get_precise_ti_in_sec | ( | const ObcTime * | time | ) |
OBC のクロック誤差を反映した正確な ti を秒単位で返す
[in] | time | ti を保持している OBCTime |
time_manager.c の 163 行目に定義があります。
引数で指定された utl_unixtime に対応する TI を返す
[in] | utl_unixtime |
0 | : 引数の utl_unixtime が unixtime_at_ti0 より小さい場合 |
TI | (total_cycleのこと) : それ以外の場合 |
time_manager.c の 211 行目に定義があります。
double TMGR_get_unixtime_at_ti0 | ( | void | ) |
double TMGR_get_unixtime_from_obc_time | ( | const ObcTime * | time | ) |
double TMGR_get_unixtime_from_utl_unixtime | ( | const cycle_t | utl_unixtime | ) |
UTL_cmdで用いる utl_unixtime を 一般的なunixtimeに変換する
[in] | utl_unixtime |
time_manager.c の 179 行目に定義があります。
double TMGR_get_utl_unixtime_epoch | ( | void | ) |
void TMGR_init | ( | void | ) |
|
static |
time_manager_.unixtime_info_.cycle_correction の setter
[in] | cycle_correction |
time_manager.c の 227 行目に定義があります。
TI (master_clock_.total_cycle) の setter
[in] | total_cycle |
time_manager.c の 119 行目に定義があります。
|
static |
time_manager_.unixtime_info_.utl_unixtime_epoch の setter
[in] | utl_unixtime_epoch |
time_manager.c の 219 行目に定義があります。
unixtime と TI の紐づき情報を更新する
[in] | unixtime | (GPS 等から観測した) unixtime |
[in] | time | (GPS 等から) unixtime を観測した時の ObcTime |
time_manager.c の 136 行目に定義があります。
const TimeManager* const time_manager = &time_manager_ |
time_manager.c の 14 行目に定義があります。
|
static |
time_manager.c の 13 行目に定義があります。