Struct hbs_acc::HeartbeatAcc
[−]
[src]
pub struct HeartbeatAcc { pub hb: HeartbeatAccContext, pub hbr: Vec<HeartbeatAccRecord>, pub log: Option<File>, }
Contains the Heartbeat and its window data buffer.
Fields
hb: HeartbeatAccContext
hbr: Vec<HeartbeatAccRecord>
log: Option<File>
Methods
impl HeartbeatAcc
[src]
fn new(
window_size: usize,
hwc_callback: Option<HeartbeatAccWindowComplete>,
log: Option<File>
) -> Result<HeartbeatAcc, &'static str>
window_size: usize,
hwc_callback: Option<HeartbeatAccWindowComplete>,
log: Option<File>
) -> Result<HeartbeatAcc, &'static str>
Allocate and initialize a new Heartbeat
.
fn heartbeat(
&mut self,
tag: u64,
work: u64,
start_time: u64,
end_time: u64,
accuracy: u64
)
&mut self,
tag: u64,
work: u64,
start_time: u64,
end_time: u64,
accuracy: u64
)
Issue a heartbeat
fn log_to_buffer_index(&mut self) -> Result<()>
Rust-only function that logs the buffer (up to buffer_index) to a file.