pub struct HciSynchronousProxy { /* private fields */ }
Implementations§
Source§impl HciSynchronousProxy
impl HciSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<HciEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<HciEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn open_command_channel(
&self,
channel: Channel,
___deadline: MonotonicInstant,
) -> Result<HciOpenCommandChannelResult, Error>
pub fn open_command_channel( &self, channel: Channel, ___deadline: MonotonicInstant, ) -> Result<HciOpenCommandChannelResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<HciOpenAclDataChannelResult, Error>
pub fn open_acl_data_channel( &self, channel: Channel, ___deadline: MonotonicInstant, ) -> Result<HciOpenAclDataChannelResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<HciOpenScoDataChannelResult, Error>
pub fn open_sco_data_channel( &self, channel: Channel, ___deadline: MonotonicInstant, ) -> Result<HciOpenScoDataChannelResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<HciConfigureScoResult, Error>
pub fn configure_sco( &self, coding_format: ScoCodingFormat, encoding: ScoEncoding, sample_rate: ScoSampleRate, ___deadline: MonotonicInstant, ) -> Result<HciConfigureScoResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<HciResetScoResult, Error>
pub fn reset_sco( &self, ___deadline: MonotonicInstant, ) -> Result<HciResetScoResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<HciOpenIsoDataChannelResult, Error>
pub fn open_iso_data_channel( &self, channel: Channel, ___deadline: MonotonicInstant, ) -> Result<HciOpenIsoDataChannelResult, Error>
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,
___deadline: MonotonicInstant,
) -> Result<HciOpenSnoopChannelResult, Error>
pub fn open_snoop_channel( &self, channel: Channel, ___deadline: MonotonicInstant, ) -> Result<HciOpenSnoopChannelResult, Error>
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.