ESSPDevice

Struct ESSPDevice 

Source
pub struct ESSPDevice {
    pub client: Box<dyn ESSPClient + 'static>,
    pub address: SlaveID,
    pub currency: String,
    pub scaling_factor: u32,
    /* private fields */
}

Fields§

§client: Box<dyn ESSPClient + 'static>§address: SlaveID§currency: String§scaling_factor: u32

Implementations§

Source§

impl ESSPDevice

Source

pub fn new( port_name: &String, serial_settings: &PortSettings, address: SlaveID, enc_key_fixed: InterKey, currency: &str, scaling_factor: u32, mock: bool, ) -> Result<ESSPDevice, ClientError>

Source

pub fn set_poll_events(&mut self, poll_events: Vec<PollEvent>)

Source

pub fn send_and_check_reply( &mut self, msg: &Message, ) -> Result<Payload, ClientError>

Source

pub fn send(&mut self, msg: &Message) -> Result<bool, ClientError>

Source

pub fn create_message(&mut self, payload: Payload) -> Message

Source

pub fn sync(&mut self) -> Result<Payload, ClientError>

Source

pub fn reset(&mut self) -> Result<Payload, ClientError>

Source

pub fn host_protocol_version( &mut self, version: u8, ) -> Result<Payload, ClientError>

Source

pub fn poll(&mut self) -> Result<Payload, ClientError>

Source

pub fn get_serial_number( &mut self, encrypted: bool, ) -> Result<Payload, ClientError>

Source

pub fn disable(&mut self) -> Result<Payload, ClientError>

Source

pub fn enable(&mut self) -> Result<Payload, ClientError>

Source

pub fn event_ack(&mut self) -> Result<Payload, ClientError>

Source

pub fn payout_amount( &mut self, amount: u32, country_code: &str, test: bool, ) -> Result<Payload, ClientError>

Source

pub fn set_denomination_level( &mut self, coin_data: CoinNumValue, ) -> Result<Payload, ClientError>

Source

pub fn float_amount( &mut self, minimum_payout: u16, payout_value: u32, country_code: String, test: bool, ) -> Result<Payload, ClientError>

Source

pub fn get_min_payout(&mut self) -> Result<u32, ClientError>

Source

pub fn set_coin_mech_inhibit( &mut self, enabled: bool, coin_value: u16, ) -> Result<Payload, ClientError>

Source

pub fn float_by_denomination( &mut self, denom_vec: Vec<CoinNumValue>, test: bool, ) -> Result<Payload, ClientError>

Source

pub fn empty_all(&mut self) -> Result<Payload, ClientError>

Source

pub fn set_options( &mut self, reg0: u8, reg1: u8, ) -> Result<Payload, ClientError>

Source

pub fn get_options(&mut self) -> Result<Payload, ClientError>

Source

pub fn coin_mech_global_inhibit( &mut self, enabled: bool, ) -> Result<Payload, ClientError>

Source

pub fn smart_empty(&mut self) -> Result<Payload, ClientError>

Source

pub fn cashbox_payout_operation_data( &mut self, ) -> Result<CashboxPayoutData, ClientError>

Source

pub fn get_all_levels(&mut self) -> Result<Vec<CoinNumValue>, ClientError>

Source

pub fn set_generator(&mut self) -> Result<Payload, ClientError>

Source

pub fn set_modulus(&mut self) -> Result<Payload, ClientError>

Source

pub fn request_key_exchange(&mut self) -> Result<Payload, ClientError>

Source

pub fn set_cashbox_payout_limit( &mut self, denom_vec: &Vec<CoinNumValue>, ) -> Result<Payload, ClientError>

Source

pub fn set_inhibits( &mut self, channels: [u8; 2], ) -> Result<Payload, ClientError>

Source

pub fn get_all_levels_sum(&mut self) -> Result<u32, ClientError>

Source

pub fn float_separately( &mut self, float_levels: &Vec<CoinNumValue>, test: bool, ) -> bool

Source

pub fn set_auto_float_levels( &mut self, float_levels: &Vec<CoinNumValue>, ) -> Result<Payload, ClientError>

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, 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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
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.