pub struct HciEmulatorProxy { /* private fields */ }
Implementations§
source§impl HciEmulatorProxy
impl HciEmulatorProxy
sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.bluetooth.test/HciEmulator.
sourcepub fn take_event_stream(&self) -> HciEmulatorEventStream
pub fn take_event_stream(&self) -> HciEmulatorEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
sourcepub fn publish(
&self,
settings: &EmulatorSettings
) -> QueryResponseFut<HciEmulatorPublishResult>
pub fn publish( &self, settings: &EmulatorSettings ) -> QueryResponseFut<HciEmulatorPublishResult>
Publish a bt-hci device using the provided settings
. Each HciEmulator instance can only
manage a single bt-hci device. Returns Emulator.HCI_ALREADY_PUBLISHED
if the device has
already been published.
sourcepub fn add_low_energy_peer(
&self,
parameters: &LowEnergyPeerParameters,
peer: ServerEnd<PeerMarker>
) -> QueryResponseFut<HciEmulatorAddLowEnergyPeerResult>
pub fn add_low_energy_peer( &self, parameters: &LowEnergyPeerParameters, peer: ServerEnd<PeerMarker> ) -> QueryResponseFut<HciEmulatorAddLowEnergyPeerResult>
Inserts a new LE peer device to be emulated by this controller. Once registered, the state
of the fake peer can be driven and observed using the peer
handle.
A reply will be sent to acknowledge the creation of the fake peer. If a peer cannot be
initialized (e.g. due to a missing required field in parameters
or for containing an
address that is already emulated) the peer
handle will be closed and an error reply will
be sent.
The peer will appear in advertising reports and respond to requests according to its
configuration as long as the peer
channel is open. The emulator stops emulating this peer
when the channel gets closed, which makes it no longer discoverable and not respond to any
requests.
sourcepub fn add_bredr_peer(
&self,
parameters: &BredrPeerParameters,
peer: ServerEnd<PeerMarker>
) -> QueryResponseFut<HciEmulatorAddBredrPeerResult>
pub fn add_bredr_peer( &self, parameters: &BredrPeerParameters, peer: ServerEnd<PeerMarker> ) -> QueryResponseFut<HciEmulatorAddBredrPeerResult>
Inserts a new BR/EDR peer device to be emulated by this controller. Once registered, the state
of the fake peer can be driven and observed using the peer
handle.
A reply will be sent to acknowledge the creation of the fake peer. If a peer cannot be
initialized (e.g. due to a missing required field in parameters
or for containing an
address that is already emulated) the peer
handle will be closed and an error reply will
be sent.
The peer will appear in inquiry results and respond to requests according to its
configuration as long as the peer
channel is open. The emulator stops emulating this peer
when the channel gets closed, which makes it no longer discoverable and not respond to any
requests.
sourcepub fn watch_controller_parameters(
&self
) -> QueryResponseFut<ControllerParameters>
pub fn watch_controller_parameters( &self ) -> QueryResponseFut<ControllerParameters>
Returns the current controller parameter state. If the parameters have not changed since the last time this message was received, then this method does not return until there is a change. (see hanging get pattern)
sourcepub fn watch_le_scan_states(&self) -> QueryResponseFut<Vec<LeScanState>>
pub fn watch_le_scan_states(&self) -> QueryResponseFut<Vec<LeScanState>>
Returns the most recent set of state transitions for the link layer LE scan procedure. This method returns when there has been a state change since the last invocation of this method by this client.
Multiple calls to this method can be outstanding at a given time. All calls will resolve in a response as soon as there is a change to the scan state. (see hanging get pattern)
sourcepub fn watch_legacy_advertising_states(
&self
) -> QueryResponseFut<Vec<LegacyAdvertisingState>>
pub fn watch_legacy_advertising_states( &self ) -> QueryResponseFut<Vec<LegacyAdvertisingState>>
Returns the most recent set of state transitions for the link layer LE legacy advertising procedure. This method returns when there has been a state change since the last invocation of this method by this client.
Only one call to this method can be outstanding at a given time. The
[fuchsia.bluetooth.test/HciEmulator
] channel will be closed if a call received when one is
already pending.
(see hanging get pattern)
Trait Implementations§
source§impl Clone for HciEmulatorProxy
impl Clone for HciEmulatorProxy
source§fn clone(&self) -> HciEmulatorProxy
fn clone(&self) -> HciEmulatorProxy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for HciEmulatorProxy
impl Debug for HciEmulatorProxy
source§impl HciEmulatorProxyInterface for HciEmulatorProxy
impl HciEmulatorProxyInterface for HciEmulatorProxy
type PublishResponseFut = QueryResponseFut<Result<(), EmulatorError>>
fn publish(&self, settings: &EmulatorSettings) -> Self::PublishResponseFut
type AddLowEnergyPeerResponseFut = QueryResponseFut<Result<(), EmulatorPeerError>>
fn add_low_energy_peer( &self, parameters: &LowEnergyPeerParameters, peer: ServerEnd<PeerMarker> ) -> Self::AddLowEnergyPeerResponseFut
type AddBredrPeerResponseFut = QueryResponseFut<Result<(), EmulatorPeerError>>
fn add_bredr_peer( &self, parameters: &BredrPeerParameters, peer: ServerEnd<PeerMarker> ) -> Self::AddBredrPeerResponseFut
type WatchControllerParametersResponseFut = QueryResponseFut<ControllerParameters>
fn watch_controller_parameters( &self ) -> Self::WatchControllerParametersResponseFut
type WatchLeScanStatesResponseFut = QueryResponseFut<Vec<LeScanState>>
fn watch_le_scan_states(&self) -> Self::WatchLeScanStatesResponseFut
type WatchLegacyAdvertisingStatesResponseFut = QueryResponseFut<Vec<LegacyAdvertisingState>>
fn watch_legacy_advertising_states( &self ) -> Self::WatchLegacyAdvertisingStatesResponseFut
source§impl Proxy for HciEmulatorProxy
impl Proxy for HciEmulatorProxy
§type Protocol = HciEmulatorMarker
type Protocol = HciEmulatorMarker
Proxy
controls.