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