|
C2A_Core
|
OBCの時刻情報の定義と演算 [詳解]
関数 | |
| ObcTime | OBCT_create (cycle_t total_cycle, cycle_t mode_cycle, step_t step) |
| 引数から ObcTime を作成する [詳解] | |
| void | OBCT_clear (ObcTime *time) |
| ObcTime をクリアし全てゼロにする [詳解] | |
| void | OBCT_count_up (ObcTime *time) |
| ObcTimeをstep刻みでインクリメントする [詳解] | |
| ObcTime | OBCT_get_max (void) |
| ObcTime が取りうる最大値を返す [詳解] | |
| cycle_t | OBCT_get_total_cycle (const ObcTime *time) |
| 引数で指定した ObcTime の total_cycle を返す [詳解] | |
| cycle_t | OBCT_get_mode_cycle (const ObcTime *time) |
| 引数で指定した ObcTime の mode_cycle を返す [詳解] | |
| step_t | OBCT_get_step (const ObcTime *time) |
| 引数で指定した ObcTime の step を返す [詳解] | |
| uint32_t | OBCT_get_total_cycle_in_msec (const ObcTime *time) |
| 引数で指定した ObcTime の total_cycle をミリ秒単位で返す [詳解] | |
| uint32_t | OBCT_get_mode_cycle_in_msec (const ObcTime *time) |
| 引数で指定した ObcTime の mode_cycle をミリ秒単位で返す [詳解] | |
| double | OBCT_get_total_cycle_in_sec (const ObcTime *time) |
| 引数で指定した ObcTime の total_cycle を秒単位で返す [詳解] | |
| double | OBCT_get_mode_cycle_in_sec (const ObcTime *time) |
| 引数で指定した ObcTime の mode_cycle を秒単位で返す [詳解] | |
| cycle_t | OBCT_msec2cycle (uint32_t msec) |
| ミリ秒を cycle に変換する [詳解] | |
| uint32_t | OBCT_cycle2msec (cycle_t cycle) |
| cycle をミリ秒に変換する [詳解] | |
| cycle_t | OBCT_sec2cycle (uint32_t sec) |
| 秒を cycle に変換する [詳解] | |
| uint32_t | OBCT_cycle2sec (cycle_t cycle) |
| cycle を秒に変換する [詳解] | |
| ObcTime | OBCT_diff (const ObcTime *before, const ObcTime *after) |
| ObcTime の引き算を行う [詳解] | |
| step_t | OBCT_diff_in_step (const ObcTime *before, const ObcTime *after) |
| ObcTime の引き算を step 単位で行う [詳解] | |
| uint32_t | OBCT_diff_in_msec (const ObcTime *before, const ObcTime *after) |
| ObcTime の引き算をミリ秒単位で行う [詳解] | |
| double | OBCT_diff_in_sec (const ObcTime *before, const ObcTime *after) |
| ObcTime の引き算を秒単位で行う [詳解] | |
| ObcTime | OBCT_add (const ObcTime *left, const ObcTime *right) |
| ObcTime の足し算を行う [詳解] | |
| int | OBCT_compare (const ObcTime *t1, const ObcTime *t2) |
| ObcTime の比較 [詳解] | |
| void | OBCT_print (const ObcTime *time) |
| デバッグ出力に ObcTime を表示する [詳解] | |
OBCの時刻情報の定義と演算
obc_time.c に定義があります。
ObcTime の足し算を行う
| [in] | left | 一項目 |
| [in] | right | 二項目 |
obc_time.c の 166 行目に定義があります。
| void OBCT_clear | ( | ObcTime * | time | ) |
ObcTime の比較
| [in] | t1 | 比較対象 |
| [in] | t2 | 比較対象 |
| 1 | : t1 < t2 |
| 0 | : t1 == t2 |
| -1 | : t2 > t1 |
obc_time.c の 181 行目に定義があります。
| void OBCT_count_up | ( | ObcTime * | time | ) |
ObcTimeをstep刻みでインクリメントする
| [in] | time | カウントアップされる ObcTime 構造体 |
obc_time.c の 30 行目に定義があります。
引数から ObcTime を作成する
| [in] | total_cycle | |
| [in] | mode_cycle | |
| [in] | step |
obc_time.c の 10 行目に定義があります。
| uint32_t OBCT_cycle2msec | ( | cycle_t | cycle | ) |
| uint32_t OBCT_cycle2sec | ( | cycle_t | cycle | ) |
ObcTime の引き算を行う
| [in] | before | |
| [in] | after |
| after | >= before の場合: after から before を引いた結果の ObcTime |
| after | < before の場合: {0, 0, 0} |
obc_time.c の 116 行目に定義があります。
ObcTime の引き算をミリ秒単位で行う
| [in] | before | |
| [in] | after |
| after | >= before の場合: after - before をミリ秒単位に変換したもの |
| after | < before の場合: 0 |
obc_time.c の 153 行目に定義があります。
ObcTime の引き算を秒単位で行う
| [in] | before | |
| [in] | after |
| after | >= before の場合: after - before を秒単位に変換したもの |
| after | < before の場合: 0 |
obc_time.c の 159 行目に定義があります。
ObcTime の引き算を step 単位で行う
| [in] | before | |
| [in] | after |
| after | >= before の場合: after - before を step 単位に変換したもの |
| after | < before の場合: 0 |
obc_time.c の 146 行目に定義があります。
| ObcTime OBCT_get_max | ( | void | ) |
ObcTime が取りうる最大値を返す
| void |
obc_time.c の 54 行目に定義があります。
| uint32_t OBCT_get_mode_cycle_in_msec | ( | const ObcTime * | time | ) |
引数で指定した ObcTime の mode_cycle をミリ秒単位で返す
| [in] | time |
obc_time.c の 79 行目に定義があります。
| double OBCT_get_mode_cycle_in_sec | ( | const ObcTime * | time | ) |
引数で指定した ObcTime の mode_cycle を秒単位で返す
| [in] | time |
obc_time.c の 91 行目に定義があります。
| uint32_t OBCT_get_total_cycle_in_msec | ( | const ObcTime * | time | ) |
引数で指定した ObcTime の total_cycle をミリ秒単位で返す
| [in] | time |
obc_time.c の 74 行目に定義があります。
| double OBCT_get_total_cycle_in_sec | ( | const ObcTime * | time | ) |
引数で指定した ObcTime の total_cycle を秒単位で返す
| [in] | time |
obc_time.c の 84 行目に定義があります。
| cycle_t OBCT_msec2cycle | ( | uint32_t | msec | ) |
| void OBCT_print | ( | const ObcTime * | time | ) |
| cycle_t OBCT_sec2cycle | ( | uint32_t | sec | ) |