Skip to main content

PluginPortDriver

Struct PluginPortDriver 

Source
pub struct PluginPortDriver { /* private fields */ }
Expand description

PortDriver implementation for a plugin’s control plane.

Trait Implementations§

Source§

impl PortDriver for PluginPortDriver

Source§

fn base(&self) -> &PortDriverBase

Source§

fn base_mut(&mut self) -> &mut PortDriverBase

Source§

fn io_write_int32(&mut self, user: &mut AsynUser, value: i32) -> AsynResult<()>

Source§

fn io_write_float64( &mut self, user: &mut AsynUser, value: f64, ) -> AsynResult<()>

Source§

fn io_write_octet( &mut self, user: &mut AsynUser, data: &[u8], ) -> AsynResult<usize>

Source§

fn read_int8_array( &mut self, _user: &AsynUser, buf: &mut [i8], ) -> AsynResult<usize>

Source§

fn read_int16_array( &mut self, _user: &AsynUser, buf: &mut [i16], ) -> AsynResult<usize>

Source§

fn read_int32_array( &mut self, _user: &AsynUser, buf: &mut [i32], ) -> AsynResult<usize>

Source§

fn read_int64_array( &mut self, _user: &AsynUser, buf: &mut [i64], ) -> AsynResult<usize>

Source§

fn read_float32_array( &mut self, _user: &AsynUser, buf: &mut [f32], ) -> AsynResult<usize>

Source§

fn read_float64_array( &mut self, _user: &AsynUser, buf: &mut [f64], ) -> AsynResult<usize>

Source§

fn connect(&mut self, _user: &AsynUser) -> Result<(), AsynError>

Source§

fn disconnect(&mut self, _user: &AsynUser) -> Result<(), AsynError>

Source§

fn enable(&mut self, _user: &AsynUser) -> Result<(), AsynError>

Source§

fn disable(&mut self, _user: &AsynUser) -> Result<(), AsynError>

Source§

fn connect_addr(&mut self, user: &AsynUser) -> Result<(), AsynError>

Source§

fn disconnect_addr(&mut self, user: &AsynUser) -> Result<(), AsynError>

Source§

fn enable_addr(&mut self, user: &AsynUser) -> Result<(), AsynError>

Source§

fn disable_addr(&mut self, user: &AsynUser) -> Result<(), AsynError>

Source§

fn get_option(&self, key: &str) -> Result<String, AsynError>

Source§

fn set_option( &mut self, _user: &mut AsynUser, key: &str, value: &str, ) -> Result<(), AsynError>

C asynOption::setOption(void *drvPvt, asynUser *pasynUser, key, val). Read more
Source§

fn report(&self, out: &mut dyn Write, level: i32)

The driver’s own report — C asynCommon::report, which the manager calls last (reportPrintPort, asynManager.c:1113-1122) after printing the port’s manager-level state itself. Read more
Source§

fn has_octet_interface(&self) -> bool

Whether this driver registered asynOctet — C’s pasynStdInterfaces->octet.pinterface != NULL, which is set from the constructor’s interfaceMask (asynPortDriver.cpp:1990). The Rust analogue of that mask is Self::capabilities.
Source§

fn read_int32(&mut self, user: &AsynUser) -> Result<i32, AsynError>

Source§

fn write_int32( &mut self, user: &mut AsynUser, value: i32, ) -> Result<(), AsynError>

Source§

fn read_int64(&mut self, user: &AsynUser) -> Result<i64, AsynError>

Source§

fn write_int64( &mut self, user: &mut AsynUser, value: i64, ) -> Result<(), AsynError>

Source§

fn get_bounds_int32(&self, _user: &AsynUser) -> Result<(i32, i32), AsynError>

C asynInt32Base.c:99 default: report low = high = 0 so a driver that does not implement getBounds makes convertAi/convertAo skip the LINEAR ESLO/EOFF computation (devAsynInt32.c:444).
Source§

fn get_bounds_int64(&self, _user: &AsynUser) -> Result<(i64, i64), AsynError>

C asynInt64Base.c:99 default: report low = high = 0 (see get_bounds_int32).
Source§

fn read_float64(&mut self, user: &AsynUser) -> Result<f64, AsynError>

Source§

fn write_float64( &mut self, user: &mut AsynUser, value: f64, ) -> Result<(), AsynError>

Source§

fn read_octet( &mut self, user: &AsynUser, buf: &mut [u8], ) -> Result<usize, AsynError>

Source§

fn write_octet( &mut self, user: &mut AsynUser, data: &[u8], ) -> Result<usize, AsynError>

Source§

fn read_uint32_digital( &mut self, user: &AsynUser, mask: u32, ) -> Result<u32, AsynError>

Source§

fn write_uint32_digital( &mut self, user: &mut AsynUser, value: u32, mask: u32, ) -> Result<(), AsynError>

Source§

fn set_interrupt_uint32_digital( &mut self, user: &AsynUser, mask: u32, reason: InterruptReason, ) -> Result<(), AsynError>

Configure rising / falling interrupt masks for a UInt32Digital parameter. C parity: asynPortDriver::setInterruptUInt32Digital (asynPortDriver.cpp:2346-2369) → routes to paramList::setUInt32Interrupt. The default delegates to the param store; drivers that need to push the configuration to hardware (e.g. real GPIB cards toggling SRQ enable) override it.
Source§

fn clear_interrupt_uint32_digital( &mut self, user: &AsynUser, mask: u32, ) -> Result<(), AsynError>

Clear bits from rising AND falling masks. C parity: asynPortDriver::clearInterruptUInt32Digital (asynPortDriver.cpp:2392-2415). Mirrors C — the call does not take an interruptReason; both masks are cleared.
Source§

fn get_interrupt_uint32_digital( &self, user: &AsynUser, reason: InterruptReason, ) -> Result<u32, AsynError>

Read the configured rising / falling / combined mask. C parity: asynPortDriver::getInterruptUInt32Digital (asynPortDriver.cpp:2438-2461).
Source§

fn read_enum( &mut self, user: &AsynUser, ) -> Result<(usize, Arc<[EnumEntry]>), AsynError>

Source§

fn write_enum( &mut self, user: &mut AsynUser, index: usize, ) -> Result<(), AsynError>

Source§

fn write_enum_choices( &mut self, user: &mut AsynUser, choices: Arc<[EnumEntry]>, ) -> Result<(), AsynError>

Source§

fn read_generic_pointer( &mut self, user: &AsynUser, ) -> Result<Arc<dyn Any + Sync + Send>, AsynError>

Source§

fn write_generic_pointer( &mut self, user: &mut AsynUser, value: Arc<dyn Any + Sync + Send>, ) -> Result<(), AsynError>

Source§

fn write_float64_array( &mut self, user: &AsynUser, data: &[f64], ) -> Result<(), AsynError>

Source§

fn write_int32_array( &mut self, user: &AsynUser, data: &[i32], ) -> Result<(), AsynError>

Source§

fn write_int8_array( &mut self, user: &AsynUser, data: &[i8], ) -> Result<(), AsynError>

Source§

fn write_int16_array( &mut self, user: &AsynUser, data: &[i16], ) -> Result<(), AsynError>

Source§

fn write_int64_array( &mut self, user: &AsynUser, data: &[i64], ) -> Result<(), AsynError>

Source§

fn write_float32_array( &mut self, user: &AsynUser, data: &[f32], ) -> Result<(), AsynError>

Source§

fn io_read_octet( &mut self, user: &AsynUser, buf: &mut [u8], ) -> Result<usize, AsynError>

Source§

fn io_read_octet_eom( &mut self, user: &AsynUser, buf: &mut [u8], ) -> Result<(usize, EomReason), AsynError>

Octet read that also reports the end-of-message reason — C parity for asynOctet::read(... int *eomReason) (asynOctet.h:38-40). The default implementation delegates to Self::io_read_octet and reconstructs a synthetic EomReason: CNT when the buffer filled, empty otherwise. Drivers that have native EOM information (asynOctetSyncIO::readRaw, GPIB END, EOS match) must override this method so consumers — asynRecord::EOMR, asynOctetSyncIO::readRaw mirrors — receive the real flags.
Source§

fn io_read_int32(&mut self, user: &AsynUser) -> Result<i32, AsynError>

Source§

fn io_read_int64(&mut self, user: &AsynUser) -> Result<i64, AsynError>

Source§

fn io_write_int64( &mut self, user: &mut AsynUser, value: i64, ) -> Result<(), AsynError>

Source§

fn io_read_float64(&mut self, user: &AsynUser) -> Result<f64, AsynError>

Source§

fn io_read_uint32_digital( &mut self, user: &AsynUser, mask: u32, ) -> Result<u32, AsynError>

Source§

fn io_write_uint32_digital( &mut self, user: &mut AsynUser, value: u32, mask: u32, ) -> Result<(), AsynError>

Source§

fn io_flush(&mut self, _user: &mut AsynUser) -> Result<(), AsynError>

Source§

fn set_input_eos( &mut self, user: &AsynUser, eos: &[u8], ) -> Result<(), AsynError>

Source§

fn get_input_eos(&self, user: &AsynUser) -> Vec<u8>

Source§

fn set_output_eos( &mut self, user: &AsynUser, eos: &[u8], ) -> Result<(), AsynError>

Source§

fn get_output_eos(&self, user: &AsynUser) -> Vec<u8>

Source§

fn gpib_universal_cmd( &mut self, _user: &mut AsynUser, _cmd: u8, ) -> Result<(), AsynError>

C asynGpib::universalCmd — send one universal command byte with ATN asserted (asynGpib.c:480-484, vxiUniversalCmd drvVxi11.c:1406-1424).
Source§

fn gpib_addressed_cmd( &mut self, _user: &mut AsynUser, _data: &[u8], ) -> Result<(), AsynError>

C asynGpib::addressedCmd — send an addressed-command frame with ATN asserted (asynGpib.c:472-478, vxiAddressedCmd drvVxi11.c:1360-1404). The frame is built by crate::interfaces::gpib::addressed_request.
Source§

fn gpib_ifc(&mut self, _user: &mut AsynUser) -> Result<(), AsynError>

C asynGpib::ifc — assert Interface Clear (asynGpib.c:486-490).
Source§

fn gpib_ren( &mut self, _user: &mut AsynUser, _enable: bool, ) -> Result<(), AsynError>

C asynGpib::ren — set the Remote Enable line (asynGpib.c:492-496).
Source§

fn shutdown(&mut self) -> Result<(), AsynError>

Called when the port is being shut down. Drivers override this to release hardware resources. Matches C asynPortDriver::shutdownPortDriver().
Source§

fn drv_user_create( &mut self, req: &DrvUserRequest, ) -> Result<DrvUserInfo, AsynError>

Resolve a record’s bind request (DrvUserRequest: drvInfo string, asyn addr, and the record’s asyn interface) to a DrvUserInfo — the asyn-rs analogue of C drvUserCreate. Read more
Source§

fn capabilities(&self) -> Vec<Capability>

Declare the capabilities this driver supports. Default implementation includes all scalar read/write operations.
Source§

fn supports(&self, cap: Capability) -> bool

Check if this driver supports a specific capability.
Source§

fn init(&mut self) -> Result<(), AsynError>

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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, 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> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more