Skip to main content

Crate gc_abi

Crate gc_abi 

Expand description

This crate contains safe zero-cost abstractions over the raw C types in [gc_abi_sys]. Every interaction with the core gateway should be done through these abstractions.

ยงAccessing the raw C types

Every abstraction implements the GCAbiConversion trait, which allows for easy conversion between the Rust and C types. Some raw C types can also be accessed through the raw module.

Re-exportsยง

pub use device_config::DataBits;
pub use device_config::GCEthernetInterface;
pub use device_config::GCSerialInterface;
pub use device_config::Parity;
pub use device_config::StopBits;

Modulesยง

datapoint ๐Ÿ”’
datapoint_value ๐Ÿ”’
datapoint_value_quality ๐Ÿ”’
device_config
Device configuration types for serial and ethernet interfaces.
error
log ๐Ÿ”’
plugin_config ๐Ÿ”’
plugin_info ๐Ÿ”’
plugin_interface ๐Ÿ”’
raw
Raw bindings access.

Structsยง

GCCoreExportedFunctions
GCDatapoint
Safe zero cost abstraction over the gc_abi_sys::GCDatapoint This struct is meant to be initialized only by the gateway or another internal module.
GCDatapointValue
Represents a datapoint value that can be published to the core
GCDatapointValueQuality
The quality of a datapoint value Represents a u16 bit field similar to the IEC 61850 protocol with the following structure:
GCPluginConfig
Zero cost abstraction over the GCPluginConfig ABI struct
GCPluginInfo
A struct that represents the information of a plugin. This struct is meant to be initialized by the plugin and send to the gateway. It also the owner of the data it represents.
GCPluginInterface
Zero cost abstraction over the GCPluginInterface Safety: All the function calls are valid as long as the underlying GCPluginInterface pointer is valid

Enumsยง

GCDatapointValueType
Possible value types for a datapoint
GCLogLevel
Enum representing the level of a log message

Traitsยง

GCAbiConversion
Trait for converting between Rust and C types Provides methods for converting between raw and abstraction types.

Functionsยง

copy_str_to_c ๐Ÿ”’

Type Aliasesยง

GCDatapointID