Struct Client
pub struct Client {
qmi: Client<Wds>,
}Expand description
Client of the WDS service.
Its Connection must run for requests to complete.
Cloning the client is cheap. Dropping every clone stops the connection.
On EVA and EVD, the modem ends a data call when the client that started it disconnects. Keep the client alive while the call is up.
Fields§
§qmi: Client<Wds>Implementations§
§impl Client
impl Client
pub const fn builder() -> ClientBuilder<Wds, Self>
pub const fn builder() -> ClientBuilder<Wds, Self>
Returns a builder for the client, for example to change the request timeout.
pub fn bind_mux_data_port(
&self,
endpoint: EndpointId,
mux_id: MuxId,
) -> RequestBuilder<'_, ()>
pub fn bind_mux_data_port( &self, endpoint: EndpointId, mux_id: MuxId, ) -> RequestBuilder<'_, ()>
Binds the client to a data port. Sends BindMuxDataPort.
For rmnet_dataN, pass EndpointId::BAM_DMUX and the mux ID from
RmnetIndex::mux_id.
pub fn create_profile(
&self,
settings: &Profile,
) -> RequestBuilder<'_, CreatedProfile>
pub fn create_profile( &self, settings: &Profile, ) -> RequestBuilder<'_, CreatedProfile>
Creates a 3GPP profile. Sends CreateProfile.
pub fn default_profile(
&self,
profile_family: ProfileFamily,
) -> RequestBuilder<'_, DefaultProfile>
pub fn default_profile( &self, profile_family: ProfileFamily, ) -> RequestBuilder<'_, DefaultProfile>
Reads the number of the default 3GPP profile. Sends
GetDefaultProfile.
pub fn delete_profile(&self, profile: ProfileId) -> RequestBuilder<'_, ()>
pub fn delete_profile(&self, profile: ProfileId) -> RequestBuilder<'_, ()>
Deletes a profile. Sends DeleteProfile.
pub fn events(
&self,
) -> Result<Indications<PacketServiceStatusIndication>, Error>
pub fn events( &self, ) -> Result<Indications<PacketServiceStatusIndication>, Error>
Subscribes to packet service status indications.
The modem sends them without a registration. Only indications received after this call are delivered, so subscribe before you start a call.
§Errors
Returns ql_qmi::Error::Disconnected if the connection has stopped.
pub fn lte_attach_params(&self) -> RequestBuilder<'_, LteAttachParams>
pub fn lte_attach_params(&self) -> RequestBuilder<'_, LteAttachParams>
Reads the parameters of the last LTE attach. Sends
GetLteAttachParams.
pub fn lte_attach_pdn_list(&self) -> RequestBuilder<'_, LteAttachPdnList>
pub fn lte_attach_pdn_list(&self) -> RequestBuilder<'_, LteAttachPdnList>
Reads the LTE attach PDN list. Sends GetLteAttachPdnList.
pub fn modify_profile_settings(
&self,
index: ProfileIndex,
settings: &Profile,
) -> RequestBuilder<'_, ()>
pub fn modify_profile_settings( &self, index: ProfileIndex, settings: &Profile, ) -> RequestBuilder<'_, ()>
Sets the settings of a 3GPP profile. Sends ModifyProfileSettings.
pub fn packet_service_status(&self) -> RequestBuilder<'_, PacketServiceState>
pub fn packet_service_status(&self) -> RequestBuilder<'_, PacketServiceState>
Reads the state of the packet data connection of this client. Sends
GetPacketServiceStatus.
pub fn profile_list(
&self,
request: &GetProfileList,
) -> RequestBuilder<'_, ProfileList>
pub fn profile_list( &self, request: &GetProfileList, ) -> RequestBuilder<'_, ProfileList>
Reads the list of profiles. Sends GetProfileList.
pub fn profile_settings(
&self,
index: ProfileIndex,
) -> RequestBuilder<'_, ProfileSettings>
pub fn profile_settings( &self, index: ProfileIndex, ) -> RequestBuilder<'_, ProfileSettings>
Reads the settings of a 3GPP profile. Sends GetProfileSettings.
pub const fn qmi(&self) -> &Client<Wds>
pub const fn qmi(&self) -> &Client<Wds>
Returns the typed QMI client, for example to send a custom request.
pub fn runtime_settings(
&self,
request: &GetRuntimeSettings,
) -> RequestBuilder<'_, RuntimeSettings>
pub fn runtime_settings( &self, request: &GetRuntimeSettings, ) -> RequestBuilder<'_, RuntimeSettings>
Reads the settings of the data call of this client. Sends
GetRuntimeSettings.
pub fn set_default_profile(
&self,
profile_family: ProfileFamily,
index: ProfileIndex,
) -> RequestBuilder<'_, ()>
pub fn set_default_profile( &self, profile_family: ProfileFamily, index: ProfileIndex, ) -> RequestBuilder<'_, ()>
Sets the number of the default 3GPP profile. Sends
SetDefaultProfile.
pub fn set_ip_family(&self, ip_family: IpFamily) -> RequestBuilder<'_, ()>
pub fn set_ip_family(&self, ip_family: IpFamily) -> RequestBuilder<'_, ()>
Sets the IP family of the data calls of this client. Sends
SetIpFamily.
pub fn set_lte_attach_pdn_list(
&self,
request: &SetLteAttachPdnList<'_>,
) -> RequestBuilder<'_, ()>
pub fn set_lte_attach_pdn_list( &self, request: &SetLteAttachPdnList<'_>, ) -> RequestBuilder<'_, ()>
Sets the LTE attach PDN list. Sends SetLteAttachPdnList.
SetLteAttachPdnList::new checks the number of profiles.
pub fn start_network(
&self,
request: &StartNetwork,
) -> RequestBuilder<'_, StartedNetwork, Result<StartedNetwork, Error>>
pub fn start_network( &self, request: &StartNetwork, ) -> RequestBuilder<'_, StartedNetwork, Result<StartedNetwork, Error>>
Starts a data call. Sends StartNetwork.
If the network refuses the call, the request returns
Error::CallFailed with the reason instead of a plain rejection.
pub fn stop_network(&self, handle: PacketDataHandle) -> RequestBuilder<'_, ()>
pub fn stop_network(&self, handle: PacketDataHandle) -> RequestBuilder<'_, ()>
Ends a data call. Sends StopNetwork.