pub enum PeerRequest {
AssignConnectionStatus {
status: HciError,
responder: PeerAssignConnectionStatusResponder,
},
EmulateLeConnectionComplete {
role: ConnectionRole,
control_handle: PeerControlHandle,
},
EmulateDisconnectionComplete {
control_handle: PeerControlHandle,
},
WatchConnectionStates {
responder: PeerWatchConnectionStatesResponder,
},
SetDeviceClass {
value: u32,
responder: PeerSetDeviceClassResponder,
},
SetServiceDefinitions {
service_definitions: Vec<ServiceDefinition>,
responder: PeerSetServiceDefinitionsResponder,
},
SetLeAdvertisement {
payload: PeerSetLeAdvertisementRequest,
responder: PeerSetLeAdvertisementResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: PeerControlHandle,
method_type: MethodType,
},
}
Expand description
Protocol used to drive the state of a fake peer device.
Variants§
AssignConnectionStatus
Assign a HCI status
for the controller to generate in response to connection requests.
Applies to all successive HCI_Create_Connection and HCI_LE_Create_Connection commands. The
procedure is acknowledged with an empty response.
EmulateLeConnectionComplete
Emulates a LE connection event. Does nothing if the peer is already connected. The
role
parameter determines the link layer connection role.
EmulateDisconnectionComplete
Emulate disconnection. Does nothing if the peer is not connected.
Fields
control_handle: PeerControlHandle
WatchConnectionStates
Returns a vector of the least to most recent controller connection states. 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.
Fields
responder: PeerWatchConnectionStatesResponder
SetDeviceClass
Sets the device class reported in the inquiry response for this peer during device
discovery. If the peer is not BR/EDR, the server will close with the ZX_ERR_NOT_SUPPORTED
epitaph.
SetServiceDefinitions
Sets the peer’s services that will be discoverable via Service Discovery Protocol. If the
peer is not BR/EDR, the server will close with the ZX_ERR_NOT_SUPPORTED
epitaph.
SetLeAdvertisement
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: PeerControlHandle
method_type: MethodType
Implementations§
Source§impl PeerRequest
impl PeerRequest
pub fn into_assign_connection_status( self, ) -> Option<(HciError, PeerAssignConnectionStatusResponder)>
pub fn into_emulate_le_connection_complete( self, ) -> Option<(ConnectionRole, PeerControlHandle)>
pub fn into_emulate_disconnection_complete(self) -> Option<PeerControlHandle>
pub fn into_watch_connection_states( self, ) -> Option<PeerWatchConnectionStatesResponder>
pub fn into_set_device_class(self) -> Option<(u32, PeerSetDeviceClassResponder)>
pub fn into_set_service_definitions( self, ) -> Option<(Vec<ServiceDefinition>, PeerSetServiceDefinitionsResponder)>
pub fn into_set_le_advertisement( self, ) -> Option<(PeerSetLeAdvertisementRequest, PeerSetLeAdvertisementResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL