Trait GCPluginCallbackHandler
pub trait GCPluginCallbackHandler:
Clone
+ Send
+ Sync {
// Required methods
fn audit_log(&self, log: &CStr);
fn system_log(&self, log_level: GCLogLevel, log: &CStr);
fn get_last_datapoint_value(
&self,
datapoint_id: GCDatapointID,
) -> Option<GCArc<GCDatapointValue>>;
fn publish_datapoint_value(&self, dp_value: &GCDatapointValue) -> bool;
fn get_ethernet_interface(&self, name: &CStr) -> Option<GCEthernetInterface>;
fn get_serial_interface(&self, name: &CStr) -> Option<GCSerialInterface>;
fn store_datapoint_value(&self, dp_value: &GCDatapointValue);
}Expand description
GCPluginCallbackHandler is a trait that must be implemented by the application to receive callbacks from the plugin.
Required Methods§
fn system_log(&self, log_level: GCLogLevel, log: &CStr)
fn system_log(&self, log_level: GCLogLevel, log: &CStr)
Called by the plugin to issue a system log call.
fn get_last_datapoint_value(
&self,
datapoint_id: GCDatapointID,
) -> Option<GCArc<GCDatapointValue>>
fn get_last_datapoint_value( &self, datapoint_id: GCDatapointID, ) -> Option<GCArc<GCDatapointValue>>
Called by the plugin to get the last value of a datapoint.
fn publish_datapoint_value(&self, dp_value: &GCDatapointValue) -> bool
fn publish_datapoint_value(&self, dp_value: &GCDatapointValue) -> bool
Called by the plugin to publish a datapoint value.
fn get_ethernet_interface(&self, name: &CStr) -> Option<GCEthernetInterface>
fn get_ethernet_interface(&self, name: &CStr) -> Option<GCEthernetInterface>
Called by the plugin to retrieve an Ethernet interface configuration by logical name. Returns interface OS name (e.g., “eth0”), or None if not found or not supported.
fn get_serial_interface(&self, name: &CStr) -> Option<GCSerialInterface>
fn get_serial_interface(&self, name: &CStr) -> Option<GCSerialInterface>
Called by the plugin to retrieve a serial interface configuration by logical name. Returns tuple of (interface_path, baud_rate, parity, stop_bits, data_bits), or None if not found or not supported.
fn store_datapoint_value(&self, dp_value: &GCDatapointValue)
fn store_datapoint_value(&self, dp_value: &GCDatapointValue)
Called by the plugin to store a datapoint value in the timeseries database.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.