pub struct HciProxy { /* private fields */ }
Implementations§
Source§impl HciProxy
impl HciProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.bluetooth/Hci.
Sourcepub fn take_event_stream(&self) -> HciEventStream
pub fn take_event_stream(&self) -> HciEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn open_command_channel(
&self,
channel: Channel,
) -> QueryResponseFut<HciOpenCommandChannelResult, DefaultFuchsiaResourceDialect>
pub fn open_command_channel( &self, channel: Channel, ) -> QueryResponseFut<HciOpenCommandChannelResult, DefaultFuchsiaResourceDialect>
Open the two-way HCI command channel for sending HCI commands and receiving event packets. Returns ZX_ERR_ALREADY_BOUND if the channel is already open.
Sourcepub fn open_acl_data_channel(
&self,
channel: Channel,
) -> QueryResponseFut<HciOpenAclDataChannelResult, DefaultFuchsiaResourceDialect>
pub fn open_acl_data_channel( &self, channel: Channel, ) -> QueryResponseFut<HciOpenAclDataChannelResult, DefaultFuchsiaResourceDialect>
Open the two-way HCI ACL data channel. Returns ZX_ERR_ALREADY_BOUND if the channel is already open.
Sourcepub fn open_sco_data_channel(
&self,
channel: Channel,
) -> QueryResponseFut<HciOpenScoDataChannelResult, DefaultFuchsiaResourceDialect>
pub fn open_sco_data_channel( &self, channel: Channel, ) -> QueryResponseFut<HciOpenScoDataChannelResult, DefaultFuchsiaResourceDialect>
Opens a SCO channel on the provided handle. The zircon channel is closed in the event of an error opening the hci channel or if the hci channel is already associated with a handle to another zircon channel. Returns ZX_ERR_NOT_SUPPORTED if SCO is not supported by the current vendor or transport driver. Returns ZX_ERR_ALREADY_BOUND if the channel is already open.
Sourcepub fn configure_sco(
&self,
coding_format: ScoCodingFormat,
encoding: ScoEncoding,
sample_rate: ScoSampleRate,
) -> QueryResponseFut<HciConfigureScoResult, DefaultFuchsiaResourceDialect>
pub fn configure_sco( &self, coding_format: ScoCodingFormat, encoding: ScoEncoding, sample_rate: ScoSampleRate, ) -> QueryResponseFut<HciConfigureScoResult, DefaultFuchsiaResourceDialect>
Configure the HCI for a SCO connection with the indicated parameters. This must be called before sending/receiving data on the SCO channel. Returns ZX_ERR_NOT_SUPPORTED if SCO is not supported by the current vendor or transport driver.
Sourcepub fn reset_sco(
&self,
) -> QueryResponseFut<HciResetScoResult, DefaultFuchsiaResourceDialect>
pub fn reset_sco( &self, ) -> QueryResponseFut<HciResetScoResult, DefaultFuchsiaResourceDialect>
Releases resources held by an active SCO connection. Must be called when a SCO connection is closed. Returns ZX_ERR_NOT_SUPPORTED if SCO is not supported by the current vendor or transport driver.
Sourcepub fn open_iso_data_channel(
&self,
channel: Channel,
) -> QueryResponseFut<HciOpenIsoDataChannelResult, DefaultFuchsiaResourceDialect>
pub fn open_iso_data_channel( &self, channel: Channel, ) -> QueryResponseFut<HciOpenIsoDataChannelResult, DefaultFuchsiaResourceDialect>
Opens a channel on the provided handle for sending and receiving isochronous data packets. The zircon channel is closed in the event of an error opening the hci channel or if the hci channel is already associated with a handle to another zircon channel. Returns ZX_ERR_NOT_SUPPORTED if ISO is not supported by the current vendor or transport driver. Returns ZX_ERR_ALREADY_BOUND if the channel is already open.
Sourcepub fn open_snoop_channel(
&self,
channel: Channel,
) -> QueryResponseFut<HciOpenSnoopChannelResult, DefaultFuchsiaResourceDialect>
pub fn open_snoop_channel( &self, channel: Channel, ) -> QueryResponseFut<HciOpenSnoopChannelResult, DefaultFuchsiaResourceDialect>
Open an output-only channel for monitoring HCI traffic. The format of each message is: [1-octet flags] [n-octet payload] The flags octet is a bitfield with the following values defined:
- 0x00: The payload represents a command packet sent from the host to the controller.
- 0x01: The payload represents an event packet sent by the controller. Returns ZX_ERR_ALREADY_BOUND if the channel is already open.
Trait Implementations§
Source§impl HciProxyInterface for HciProxy
impl HciProxyInterface for HciProxy
type OpenCommandChannelResponseFut = QueryResponseFut<Result<(), i32>>
type OpenAclDataChannelResponseFut = QueryResponseFut<Result<(), i32>>
type OpenScoDataChannelResponseFut = QueryResponseFut<Result<(), i32>>
type ConfigureScoResponseFut = QueryResponseFut<Result<(), i32>>
type ResetScoResponseFut = QueryResponseFut<Result<(), i32>>
type OpenIsoDataChannelResponseFut = QueryResponseFut<Result<(), i32>>
type OpenSnoopChannelResponseFut = QueryResponseFut<Result<(), i32>>
fn open_command_channel( &self, channel: Channel, ) -> Self::OpenCommandChannelResponseFut
fn open_acl_data_channel( &self, channel: Channel, ) -> Self::OpenAclDataChannelResponseFut
fn open_sco_data_channel( &self, channel: Channel, ) -> Self::OpenScoDataChannelResponseFut
fn configure_sco( &self, coding_format: ScoCodingFormat, encoding: ScoEncoding, sample_rate: ScoSampleRate, ) -> Self::ConfigureScoResponseFut
fn reset_sco(&self) -> Self::ResetScoResponseFut
fn open_iso_data_channel( &self, channel: Channel, ) -> Self::OpenIsoDataChannelResponseFut
fn open_snoop_channel( &self, channel: Channel, ) -> Self::OpenSnoopChannelResponseFut
Source§impl Proxy for HciProxy
impl Proxy for HciProxy
Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for HciProxy
impl !RefUnwindSafe for HciProxy
impl Send for HciProxy
impl Sync for HciProxy
impl Unpin for HciProxy
impl !UnwindSafe for HciProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)