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ยง
- GCCore
Exported Functions - 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.
- GCDatapoint
Value - Represents a datapoint value that can be published to the core
- GCDatapoint
Value Quality - The quality of a datapoint value Represents a u16 bit field similar to the IEC 61850 protocol with the following structure:
- GCPlugin
Config - Zero cost abstraction over the GCPluginConfig ABI struct
- GCPlugin
Info - 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.
- GCPlugin
Interface - Zero cost abstraction over the GCPluginInterface Safety: All the function calls are valid as long as the underlying GCPluginInterface pointer is valid
Enumsยง
- GCDatapoint
Value Type - Possible value types for a datapoint
- GCLog
Level - Enum representing the level of a log message
Traitsยง
- GCAbi
Conversion - Trait for converting between Rust and C types Provides methods for converting between raw and abstraction types.
Functionsยง
- copy_
str_ ๐to_ c