pub enum PeerRequest {
AssignConnectionStatus {
status: HciError,
responder: PeerAssignConnectionStatusResponder,
},
EmulateLeConnectionComplete {
role: ConnectionRole,
control_handle: PeerControlHandle,
},
EmulateDisconnectionComplete {
control_handle: PeerControlHandle,
},
WatchConnectionStates {
responder: PeerWatchConnectionStatesResponder,
},
}
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
Watch connection state changes using the hanging get pattern. Notifies the most recent controller connection state if there has been a change since the last time this method was called.
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 connection state.
Fields
responder: PeerWatchConnectionStatesResponder
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>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL