Struct RemoteEntityConfig

Source
pub struct RemoteEntityConfig {
Show 14 fields pub entity_id: UnsignedByteField, pub max_packet_len: usize, pub max_file_segment_len: Option<usize>, pub closure_requested_by_default: bool, pub crc_on_transmission_by_default: bool, pub default_transmission_mode: TransmissionMode, pub default_crc_type: ChecksumType, pub positive_ack_timer_interval_seconds: f32, pub positive_ack_timer_expiration_limit: u32, pub check_limit: u32, pub disposition_on_cancellation: bool, pub immediate_nak_mode: bool, pub nak_timer_interval_seconds: f32, pub nak_timer_expiration_limit: u32,
}
Expand description

This structure models the remote entity configuration information as specified in chapter 8.3 of the CFDP standard. Some of the fields which were not considered necessary for the Rust implementation were omitted. Some other fields which are not contained inside the standard but are considered necessary for the Rust implementation are included.

§Notes on Positive Acknowledgment Procedures

The positive_ack_timer_interval_seconds and positive_ack_timer_expiration_limit will be used for positive acknowledgement procedures as specified in CFDP chapter 4.7. The sending entity will start the timer for any PDUs where an acknowledgment is required (e.g. EOF PDU). Once the expected ACK response has not been received for that interval, as counter will be incremented and the timer will be reset. Once the counter exceeds the positive_ack_timer_expiration_limit, a Positive ACK Limit Reached fault will be declared.

§Notes on Deferred Lost Segment Procedures

This procedure will be active if an EOF (No Error) PDU is received in acknowledged mode. After issuing the NAK sequence which has the whole file scope, a timer will be started. The timer is reset when missing segments or missing metadata is received. The timer will be deactivated if all missing data is received. If the timer expires, a new NAK sequence will be issued and a counter will be incremented, which can lead to a NAK Limit Reached fault being declared.

§Fields

  • entity_id - The ID of the remote entity.
  • max_packet_len - This determines of all PDUs generated for that remote entity in addition to the max_file_segment_len attribute which also determines the size of file data PDUs.
  • max_file_segment_len The maximum file segment length which determines the maximum size of file data PDUs in addition to the max_packet_len attribute. If this field is set to None, the maximum file segment length will be derived from the maximum packet length. If this has some value which is smaller than the segment value derived from max_packet_len, this value will be picked.
  • closure_requested_by_default - If the closure requested field is not supplied as part of the Put Request, it will be determined from this field in the remote configuration.
  • crc_on_transmission_by_default - If the CRC option is not supplied as part of the Put Request, it will be determined from this field in the remote configuration.
  • default_transmission_mode - If the transmission mode is not supplied as part of the Put Request, it will be determined from this field in the remote configuration.
  • disposition_on_cancellation - Determines whether an incomplete received file is discard on transaction cancellation. Defaults to False.
  • default_crc_type - Default checksum type used to calculate for all file transmissions to this remote entity.
  • check_limit - This timer determines the expiry period for incrementing a check counter after an EOF PDU is received for an incomplete file transfer. This allows out-of-order reception of file data PDUs and EOF PDUs. Also see 4.6.3.3 of the CFDP standard. Defaults to 2, so the check limit timer may expire twice.
  • positive_ack_timer_interval_seconds- See the notes on the Positive Acknowledgment Procedures inside the class documentation. Expected as floating point seconds. Defaults to 10 seconds.
  • positive_ack_timer_expiration_limit - See the notes on the Positive Acknowledgment Procedures inside the class documentation. Defaults to 2, so the timer may expire twice.
  • immediate_nak_mode - Specifies whether a NAK sequence should be issued immediately when a file data gap or lost metadata is detected in the acknowledged mode. Defaults to True.
  • nak_timer_interval_seconds - See the notes on the Deferred Lost Segment Procedure inside the class documentation. Expected as floating point seconds. Defaults to 10 seconds.
  • nak_timer_expiration_limit - See the notes on the Deferred Lost Segment Procedure inside the class documentation. Defaults to 2, so the timer may expire two times.

Fields§

§entity_id: UnsignedByteField§max_packet_len: usize§max_file_segment_len: Option<usize>§closure_requested_by_default: bool§crc_on_transmission_by_default: bool§default_transmission_mode: TransmissionMode§default_crc_type: ChecksumType§positive_ack_timer_interval_seconds: f32§positive_ack_timer_expiration_limit: u32§check_limit: u32§disposition_on_cancellation: bool§immediate_nak_mode: bool§nak_timer_interval_seconds: f32§nak_timer_expiration_limit: u32

Implementations§

Source§

impl RemoteEntityConfig

Source

pub fn new_with_default_values( entity_id: UnsignedByteField, max_packet_len: usize, closure_requested_by_default: bool, crc_on_transmission_by_default: bool, default_transmission_mode: TransmissionMode, default_crc_type: ChecksumType, ) -> Self

Trait Implementations§

Source§

impl Clone for RemoteEntityConfig

Source§

fn clone(&self) -> RemoteEntityConfig

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RemoteEntityConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for RemoteEntityConfig

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Format for RemoteEntityConfig

Source§

fn format(&self, f: Formatter<'_>)

Writes the defmt representation of self to fmt.
Source§

impl RemoteEntityConfigProvider for RemoteEntityConfig

A remote entity configurations also implements the RemoteEntityConfigProvider, but the RemoteEntityConfigProvider::add_config and RemoteEntityConfigProvider::remove_config are no-ops and always returns false.

Source§

fn get(&self, remote_id: u64) -> Option<&RemoteEntityConfig>

Retrieve the remote entity configuration for the given remote ID.
Source§

fn get_mut(&mut self, remote_id: u64) -> Option<&mut RemoteEntityConfig>

Source§

fn add_config(&mut self, _cfg: &RemoteEntityConfig) -> bool

Add a new remote configuration. Return true if the configuration was inserted successfully, and false if a configuration already exists.
Source§

fn remove_config(&mut self, _remote_id: u64) -> bool

Remote a configuration. Returns true if the configuration was removed successfully, and false if no configuration exists for the given remote ID.
Source§

impl Serialize for RemoteEntityConfig

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Copy for RemoteEntityConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,