Struct Client
pub struct Client {
qmi: Client<Dms>,
}Expand description
Client of the DMS service.
Its Connection must run for requests to complete.
Cloning the client is cheap. Dropping every clone stops the connection.
Fields§
§qmi: Client<Dms>Implementations§
§impl Client
impl Client
pub const fn builder() -> ClientBuilder<Dms, Self>
pub const fn builder() -> ClientBuilder<Dms, Self>
Returns a builder for the client, for example to change the request timeout.
pub fn events(&self) -> Result<Indications<EventReport>, Error>
pub fn events(&self) -> Result<Indications<EventReport>, Error>
Subscribes to event reports.
Only reports received after this call are delivered. Subscribe before
you enable the reports with
set_event_report, otherwise the first
ones are lost.
§Errors
Returns ql_qmi::Error::Disconnected if the connection has stopped.
pub fn manufacturer(&self) -> RequestBuilder<'_, Manufacturer>
pub fn manufacturer(&self) -> RequestBuilder<'_, Manufacturer>
Reads the manufacturer. Sends GetManufacturer.
pub fn model(&self) -> RequestBuilder<'_, Model>
pub fn model(&self) -> RequestBuilder<'_, Model>
Reads the model. Sends GetModel.
pub fn operating_mode(&self) -> RequestBuilder<'_, OperatingModeState>
pub fn operating_mode(&self) -> RequestBuilder<'_, OperatingModeState>
Reads the operating mode. Sends GetOperatingMode.
pub const fn qmi(&self) -> &Client<Dms>
pub const fn qmi(&self) -> &Client<Dms>
Returns the typed QMI client, for example to send a custom request.
pub fn revision(&self) -> RequestBuilder<'_, Revision>
pub fn revision(&self) -> RequestBuilder<'_, Revision>
Reads the firmware revisions. Sends GetRevision.
pub fn serial_numbers(&self) -> RequestBuilder<'_, SerialNumbers>
pub fn serial_numbers(&self) -> RequestBuilder<'_, SerialNumbers>
Reads the serial numbers. Sends GetSerialNumbers.
pub fn set_event_report(
&self,
request: &SetEventReport,
) -> RequestBuilder<'_, ()>
pub fn set_event_report( &self, request: &SetEventReport, ) -> RequestBuilder<'_, ()>
Sets which event reports the modem sends to this client. Sends
SetEventReport.
pub fn set_operating_mode(&self, mode: OperatingMode) -> RequestBuilder<'_, ()>
pub fn set_operating_mode(&self, mode: OperatingMode) -> RequestBuilder<'_, ()>
Sets the operating mode. Sends SetOperatingMode.