pub struct AeronCnc { /* private fields */ }
Implementations§
Source§impl AeronCnc
impl AeronCnc
Sourcepub fn new_zeroed() -> Result<Self, AeronCError>
pub fn new_zeroed() -> Result<Self, AeronCError>
creates zeroed struct where the underlying c struct is on the heap
Sourcepub fn constants(
&self,
constants: &AeronCncConstants,
) -> Result<i32, AeronCError>
pub fn constants( &self, constants: &AeronCncConstants, ) -> Result<i32, AeronCError>
Sourcepub fn get_constants(&self) -> Result<AeronCncConstants, AeronCError>
pub fn get_constants(&self) -> Result<AeronCncConstants, AeronCError>
Fetch the sets of constant values associated with this command and control file.
Sourcepub fn to_driver_heartbeat(&self) -> i64
pub fn to_driver_heartbeat(&self) -> i64
Gets the timestamp of the last heartbeat sent to the media driver from any client.
§Return
last heartbeat timestamp in ms.
Sourcepub fn error_log_read<AeronErrorLogReaderFuncHandlerImpl: AeronErrorLogReaderFuncCallback>(
&self,
callback: Option<&Handler<AeronErrorLogReaderFuncHandlerImpl>>,
since_timestamp: i64,
) -> usize
pub fn error_log_read<AeronErrorLogReaderFuncHandlerImpl: AeronErrorLogReaderFuncCallback>( &self, callback: Option<&Handler<AeronErrorLogReaderFuncHandlerImpl>>, since_timestamp: i64, ) -> usize
Sourcepub fn error_log_read_once<AeronErrorLogReaderFuncHandlerImpl: FnMut(i32, i64, i64, &str)>(
&self,
callback: AeronErrorLogReaderFuncHandlerImpl,
since_timestamp: i64,
) -> usize
pub fn error_log_read_once<AeronErrorLogReaderFuncHandlerImpl: FnMut(i32, i64, i64, &str)>( &self, callback: AeronErrorLogReaderFuncHandlerImpl, since_timestamp: i64, ) -> usize
Reads the current error log for this driver.
§Parameters
-
callback
called for every distinct error observation -
clientd
client data to be passed to the callback -
since_timestamp
only return errors after this timestamp (0 returns all)
§Return
the number of distinct errors seen
NOTE: aeron must not store this closure and instead use it immediately. If not you will get undefined behaviour, use with care
Sourcepub fn counters_reader(&self) -> AeronCountersReader
pub fn counters_reader(&self) -> AeronCountersReader
Gets a counters reader for this command and control file. This does not need to be closed manually, resources are tied to the instance of aeron_cnc.
§Return
pointer to a counters reader.
Sourcepub fn loss_reporter_read<AeronLossReporterReadEntryFuncHandlerImpl: AeronLossReporterReadEntryFuncCallback>(
&self,
entry_func: Option<&Handler<AeronLossReporterReadEntryFuncHandlerImpl>>,
) -> Result<i32, AeronCError>
pub fn loss_reporter_read<AeronLossReporterReadEntryFuncHandlerImpl: AeronLossReporterReadEntryFuncCallback>( &self, entry_func: Option<&Handler<AeronLossReporterReadEntryFuncHandlerImpl>>, ) -> Result<i32, AeronCError>
Sourcepub fn loss_reporter_read_once<AeronLossReporterReadEntryFuncHandlerImpl: FnMut(i64, i64, i64, i64, i32, i32, &str, &str)>(
&self,
entry_func: AeronLossReporterReadEntryFuncHandlerImpl,
) -> Result<i32, AeronCError>
pub fn loss_reporter_read_once<AeronLossReporterReadEntryFuncHandlerImpl: FnMut(i64, i64, i64, i64, i32, i32, &str, &str)>( &self, entry_func: AeronLossReporterReadEntryFuncHandlerImpl, ) -> Result<i32, AeronCError>
Read all of the data loss observations from the report in the same media driver instances as the cnc file.
§Parameters
entry_func
callback for each observation found
§Return
-1 on failure, number of observations on success (could be 0).
NOTE: aeron must not store this closure and instead use it immediately. If not you will get undefined behaviour, use with care