2018-06-06 16:49:44 -04:00
|
|
|
#ifndef STEPCOMPRESS_H
|
|
|
|
|
#define STEPCOMPRESS_H
|
|
|
|
|
|
|
|
|
|
#include <stdint.h> // uint32_t
|
|
|
|
|
|
|
|
|
|
#define ERROR_RET -989898989
|
|
|
|
|
|
2021-07-19 14:51:05 -04:00
|
|
|
struct pull_history_steps {
|
|
|
|
|
uint64_t first_clock, last_clock;
|
|
|
|
|
int64_t start_position;
|
|
|
|
|
int step_count, interval, add;
|
|
|
|
|
};
|
|
|
|
|
|
2025-09-18 21:03:39 -04:00
|
|
|
struct list_head;
|
2025-09-18 21:49:12 -04:00
|
|
|
struct stepcompress *stepcompress_alloc(struct list_head *msg_queue);
|
2025-09-18 18:45:18 -04:00
|
|
|
void stepcompress_fill(struct stepcompress *sc, uint32_t oid, uint32_t max_error
|
2022-01-29 19:13:31 -05:00
|
|
|
, int32_t queue_step_msgtag
|
2021-02-04 16:33:03 -05:00
|
|
|
, int32_t set_next_step_dir_msgtag);
|
2022-01-29 19:13:31 -05:00
|
|
|
void stepcompress_set_invert_sdir(struct stepcompress *sc
|
|
|
|
|
, uint32_t invert_sdir);
|
2025-08-05 16:32:27 -04:00
|
|
|
void stepcompress_history_expire(struct stepcompress *sc, uint64_t end_clock);
|
2018-06-06 16:49:44 -04:00
|
|
|
void stepcompress_free(struct stepcompress *sc);
|
|
|
|
|
uint32_t stepcompress_get_oid(struct stepcompress *sc);
|
2018-06-08 19:55:24 -04:00
|
|
|
int stepcompress_get_step_dir(struct stepcompress *sc);
|
2025-08-05 16:32:27 -04:00
|
|
|
void stepcompress_set_time(struct stepcompress *sc
|
|
|
|
|
, double time_offset, double mcu_freq);
|
2020-02-24 21:59:39 -05:00
|
|
|
int stepcompress_append(struct stepcompress *sc, int sdir
|
|
|
|
|
, double print_time, double step_time);
|
2020-02-25 12:54:55 -05:00
|
|
|
int stepcompress_commit(struct stepcompress *sc);
|
2025-09-18 21:49:12 -04:00
|
|
|
int stepcompress_flush(struct stepcompress *sc, uint64_t move_clock);
|
2020-03-08 11:14:26 -04:00
|
|
|
int stepcompress_reset(struct stepcompress *sc, uint64_t last_step_clock);
|
2021-08-06 09:56:06 -04:00
|
|
|
int stepcompress_set_last_position(struct stepcompress *sc, uint64_t clock
|
2021-06-11 23:12:16 -04:00
|
|
|
, int64_t last_position);
|
|
|
|
|
int64_t stepcompress_find_past_position(struct stepcompress *sc
|
|
|
|
|
, uint64_t clock);
|
2021-07-19 14:51:05 -04:00
|
|
|
int stepcompress_extract_old(struct stepcompress *sc
|
|
|
|
|
, struct pull_history_steps *p, int max
|
|
|
|
|
, uint64_t start_clock, uint64_t end_clock);
|
2018-06-06 16:49:44 -04:00
|
|
|
|
|
|
|
|
#endif // stepcompress.h
|