pub enum HciRequest {
OpenCommandChannel {
channel: Channel,
responder: HciOpenCommandChannelResponder,
},
OpenAclDataChannel {
channel: Channel,
responder: HciOpenAclDataChannelResponder,
},
OpenScoDataChannel {
channel: Channel,
responder: HciOpenScoDataChannelResponder,
},
ConfigureSco {
coding_format: ScoCodingFormat,
encoding: ScoEncoding,
sample_rate: ScoSampleRate,
responder: HciConfigureScoResponder,
},
ResetSco {
responder: HciResetScoResponder,
},
OpenIsoDataChannel {
channel: Channel,
responder: HciOpenIsoDataChannelResponder,
},
OpenSnoopChannel {
channel: Channel,
responder: HciOpenSnoopChannelResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: HciControlHandle,
method_type: MethodType,
},
}
Variants§
OpenCommandChannel
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.
OpenAclDataChannel
Open the two-way HCI ACL data channel. Returns ZX_ERR_ALREADY_BOUND if the channel is already open.
OpenScoDataChannel
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.
ConfigureSco
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.
Fields
coding_format: ScoCodingFormat
encoding: ScoEncoding
sample_rate: ScoSampleRate
responder: HciConfigureScoResponder
ResetSco
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.
Fields
responder: HciResetScoResponder
OpenIsoDataChannel
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.
OpenSnoopChannel
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.
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: HciControlHandle
method_type: MethodType
Implementations§
Source§impl HciRequest
impl HciRequest
pub fn into_open_command_channel( self, ) -> Option<(Channel, HciOpenCommandChannelResponder)>
pub fn into_open_acl_data_channel( self, ) -> Option<(Channel, HciOpenAclDataChannelResponder)>
pub fn into_open_sco_data_channel( self, ) -> Option<(Channel, HciOpenScoDataChannelResponder)>
pub fn into_configure_sco( self, ) -> Option<(ScoCodingFormat, ScoEncoding, ScoSampleRate, HciConfigureScoResponder)>
pub fn into_reset_sco(self) -> Option<HciResetScoResponder>
pub fn into_open_iso_data_channel( self, ) -> Option<(Channel, HciOpenIsoDataChannelResponder)>
pub fn into_open_snoop_channel( self, ) -> Option<(Channel, HciOpenSnoopChannelResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL