pub struct NodeConfig {
pub id: String,
pub platform_type: String,
pub capabilities: Vec<Capability>,
pub comm_range_m: f32,
pub max_speed_mps: f32,
pub operator_binding: Option<HumanMachinePair>,
pub created_at: Option<Timestamp>,
}Expand description
Node static configuration (immutable)
Fields§
§id: StringUnique platform identifier
platform_type: StringNode type (UAV, UGV, Soldier System, etc.)
capabilities: Vec<Capability>Static capabilities (G-Set: grow-only)
comm_range_m: f32Maximum communication range in meters
max_speed_mps: f32Maximum speed in m/s
operator_binding: Option<HumanMachinePair>Human-machine binding (optional)
created_at: Option<Timestamp>Timestamp when node was configured
Trait Implementations§
Source§impl Clone for NodeConfig
impl Clone for NodeConfig
Source§fn clone(&self) -> NodeConfig
fn clone(&self) -> NodeConfig
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 NodeConfig
impl Debug for NodeConfig
Source§impl Default for NodeConfig
impl Default for NodeConfig
Source§fn default() -> NodeConfig
fn default() -> NodeConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for NodeConfig
impl<'de> Deserialize<'de> for NodeConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<NodeConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Message for NodeConfig
impl Message for NodeConfig
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.Source§impl NodeConfigExt for NodeConfig
impl NodeConfigExt for NodeConfig
Source§fn new(platform_type: String) -> Self
fn new(platform_type: String) -> Self
Create a new node configuration (autonomous, no operator)
Source§fn with_operator(
platform_type: String,
operator_binding: HumanMachinePair,
) -> Self
fn with_operator( platform_type: String, operator_binding: HumanMachinePair, ) -> Self
Create a new platform with operator binding
Source§fn add_capability(&mut self, capability: Capability)
fn add_capability(&mut self, capability: Capability)
Add a capability (G-Set operation - monotonic add only)
Source§fn has_capability_type(&self, capability_type: CapabilityType) -> bool
fn has_capability_type(&self, capability_type: CapabilityType) -> bool
Check if platform has a specific capability type
Source§fn get_capabilities_by_type(
&self,
capability_type: CapabilityType,
) -> Vec<&Capability>
fn get_capabilities_by_type( &self, capability_type: CapabilityType, ) -> Vec<&Capability>
Get all capabilities of a specific type
Source§fn has_operator(&self) -> bool
fn has_operator(&self) -> bool
Check if platform has an operator binding
Source§fn is_human_operated(&self) -> bool
fn is_human_operated(&self) -> bool
Check if platform is human-operated (has at least one operator)
Source§fn get_primary_operator(&self) -> Option<&Operator>
fn get_primary_operator(&self) -> Option<&Operator>
Get the primary operator (highest-ranking) if any
Source§fn get_operator_binding(&self) -> Option<&HumanMachinePair>
fn get_operator_binding(&self) -> Option<&HumanMachinePair>
Get the operator binding
Source§fn set_operator_binding(&mut self, binding: Option<HumanMachinePair>)
fn set_operator_binding(&mut self, binding: Option<HumanMachinePair>)
Set or update the operator binding
Source§fn is_autonomous(&self) -> bool
fn is_autonomous(&self) -> bool
Check if platform is autonomous (no operators)
Source§impl PartialEq for NodeConfig
impl PartialEq for NodeConfig
Source§impl Serialize for NodeConfig
impl Serialize for NodeConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for NodeConfig
Auto Trait Implementations§
impl Freeze for NodeConfig
impl RefUnwindSafe for NodeConfig
impl Send for NodeConfig
impl Sync for NodeConfig
impl Unpin for NodeConfig
impl UnsafeUnpin for NodeConfig
impl UnwindSafe for NodeConfig
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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