diff --git a/dnp3/src/outstation/traits.rs b/dnp3/src/outstation/traits.rs index e56446ce..7974e282 100644 --- a/dnp3/src/outstation/traits.rs +++ b/dnp3/src/outstation/traits.rs @@ -1,7 +1,4 @@ use crate::app::attr::Attribute; -use crate::app::parse::count::CountSequence; -use crate::app::parse::prefix::Prefix; -use crate::app::parse::traits::{FixedSizeVariation, Index}; use crate::app::variations::Group50Var2; use crate::app::RequestHeader; use crate::app::Sequence; @@ -550,67 +547,3 @@ impl ControlSupport for DefaultControlHandler { self.status } } - -trait HasCommandStatus { - fn status(&self) -> CommandStatus; - fn with_status(&self, status: CommandStatus) -> Self; -} - -trait ControlSupportExt: ControlSupport -where - T: FixedSizeVariation + HasCommandStatus, -{ - fn operate( - &mut self, - seq: CountSequence>, - op_type: OperateType, - database: &mut DatabaseHandle, - mut func: F, - ) where - F: FnMut(T, I), - I: Index, - { - for item in seq.iter() { - let status = { - if item.value.status() == CommandStatus::Success { - ControlSupport::::operate( - self, - item.value, - item.index.widen_to_u16(), - op_type, - database, - ) - } else { - CommandStatus::FormatError - } - }; - func(item.value.with_status(status), item.index) - } - } - - fn select( - &mut self, - seq: CountSequence>, - database: &mut DatabaseHandle, - mut func: F, - ) where - F: FnMut(T, I), - I: Index, - { - for item in seq.iter() { - let status = { - if item.value.status() == CommandStatus::Success { - ControlSupport::::select( - self, - item.value, - item.index.widen_to_u16(), - database, - ) - } else { - CommandStatus::FormatError - } - }; - func(item.value.with_status(status), item.index) - } - } -} diff --git a/ffi/dnp3-ffi/src/handler.rs b/ffi/dnp3-ffi/src/handler.rs index 9dc5e48d..8ce360bc 100644 --- a/ffi/dnp3-ffi/src/handler.rs +++ b/ffi/dnp3-ffi/src/handler.rs @@ -2,7 +2,6 @@ use crate::attr::FfiAttrValue; use dnp3::app::attr::*; use dnp3::app::measurement::*; use dnp3::app::*; -use dnp3::app::{ResponseFunction, ResponseHeader}; use dnp3::master::{ AssociationHandler, AssociationInformation, HeaderInfo, ReadHandler, ReadType, TaskError, TaskType,