pub struct DeviceConfig {
pub device_name: String,
pub autostart: AutoStartConfig,
pub support_storage: bool,
pub hardware_version: String,
pub software_version: String,
pub heartbeat_period: u16,
pub identity: IdentityConfig,
pub pdos: DevicePdoConfig,
pub bootloader: BootloaderConfig,
pub objects: Vec<ObjectDefinition>,
}Available on crate feature
std only.Expand description
Private struct for seserializing device config files
Fields§
§device_name: StringThe name describing the type of device (e.g. a model)
autostart: AutoStartConfigConfigures support for the AutoStart (0x5000) object and its default value
Allowed values:
- ‘unsupported’: No autostart object is created
- ‘disabled’: An autostart object is created, and it defaults to disabled
- ‘enabled’: An autostart object is created, and it defaults to enabled
support_storage: boolEnables object storage commands (object 0x1010)
Default: true
hardware_version: StringA version describing the hardware
software_version: StringA version describing the software
heartbeat_period: u16The period at which to transmit heartbeat messages in milliseconds
identity: IdentityConfigConfigures the identity object on the device
pdos: DevicePdoConfigConfigure PDO settings
bootloader: BootloaderConfigConfigure bootloader options
objects: Vec<ObjectDefinition>A list of application specific objects to define on the device
Implementations§
Trait Implementations§
Source§impl Clone for DeviceConfig
impl Clone for DeviceConfig
Source§fn clone(&self) -> DeviceConfig
fn clone(&self) -> DeviceConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceConfig
impl Debug for DeviceConfig
Source§impl<'de> Deserialize<'de> for DeviceConfig
impl<'de> Deserialize<'de> for DeviceConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DeviceConfig
impl RefUnwindSafe for DeviceConfig
impl Send for DeviceConfig
impl Sync for DeviceConfig
impl Unpin for DeviceConfig
impl UnwindSafe for DeviceConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more