Struct chirpstack_api::as_pb::external::api::device_service_client::DeviceServiceClient [−][src]
pub struct DeviceServiceClient<T> { /* fields omitted */ }
Expand description
DeviceService is the service managing the devices.
Implementations
impl<T> DeviceServiceClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + Sync + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> DeviceServiceClient<T> where
T: GrpcService<BoxBody>,
T::ResponseBody: Body + Send + Sync + 'static,
T::Error: Into<StdError>,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn with_interceptor<F>(
inner: T,
interceptor: F
) -> DeviceServiceClient<InterceptedService<T, F>> where
F: FnMut(Request<()>) -> Result<Request<()>, Status>,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Compress requests with gzip
.
This requires the server to support it otherwise it might respond with an error.
Enable decompressing responses with gzip
.
pub async fn create(
&mut self,
request: impl IntoRequest<CreateDeviceRequest>
) -> Result<Response<()>, Status>
pub async fn create(
&mut self,
request: impl IntoRequest<CreateDeviceRequest>
) -> Result<Response<()>, Status>
Create creates the given device.
pub async fn get(
&mut self,
request: impl IntoRequest<GetDeviceRequest>
) -> Result<Response<GetDeviceResponse>, Status>
pub async fn get(
&mut self,
request: impl IntoRequest<GetDeviceRequest>
) -> Result<Response<GetDeviceResponse>, Status>
Get returns the device matching the given DevEUI.
pub async fn list(
&mut self,
request: impl IntoRequest<ListDeviceRequest>
) -> Result<Response<ListDeviceResponse>, Status>
pub async fn list(
&mut self,
request: impl IntoRequest<ListDeviceRequest>
) -> Result<Response<ListDeviceResponse>, Status>
List returns the available devices.
pub async fn delete(
&mut self,
request: impl IntoRequest<DeleteDeviceRequest>
) -> Result<Response<()>, Status>
pub async fn delete(
&mut self,
request: impl IntoRequest<DeleteDeviceRequest>
) -> Result<Response<()>, Status>
Delete deletes the device matching the given DevEUI.
pub async fn update(
&mut self,
request: impl IntoRequest<UpdateDeviceRequest>
) -> Result<Response<()>, Status>
pub async fn update(
&mut self,
request: impl IntoRequest<UpdateDeviceRequest>
) -> Result<Response<()>, Status>
Update updates the device matching the given DevEUI.
pub async fn create_keys(
&mut self,
request: impl IntoRequest<CreateDeviceKeysRequest>
) -> Result<Response<()>, Status>
pub async fn create_keys(
&mut self,
request: impl IntoRequest<CreateDeviceKeysRequest>
) -> Result<Response<()>, Status>
CreateKeys creates the given device-keys.
pub async fn get_keys(
&mut self,
request: impl IntoRequest<GetDeviceKeysRequest>
) -> Result<Response<GetDeviceKeysResponse>, Status>
pub async fn get_keys(
&mut self,
request: impl IntoRequest<GetDeviceKeysRequest>
) -> Result<Response<GetDeviceKeysResponse>, Status>
GetKeys returns the device-keys for the given DevEUI.
pub async fn update_keys(
&mut self,
request: impl IntoRequest<UpdateDeviceKeysRequest>
) -> Result<Response<()>, Status>
pub async fn update_keys(
&mut self,
request: impl IntoRequest<UpdateDeviceKeysRequest>
) -> Result<Response<()>, Status>
UpdateKeys updates the device-keys.
pub async fn delete_keys(
&mut self,
request: impl IntoRequest<DeleteDeviceKeysRequest>
) -> Result<Response<()>, Status>
pub async fn delete_keys(
&mut self,
request: impl IntoRequest<DeleteDeviceKeysRequest>
) -> Result<Response<()>, Status>
DeleteKeys deletes the device-keys for the given DevEUI.
pub async fn activate(
&mut self,
request: impl IntoRequest<ActivateDeviceRequest>
) -> Result<Response<()>, Status>
pub async fn activate(
&mut self,
request: impl IntoRequest<ActivateDeviceRequest>
) -> Result<Response<()>, Status>
Activate (re)activates the device with the given parameters (for ABP or for importing OTAA activations).
pub async fn deactivate(
&mut self,
request: impl IntoRequest<DeactivateDeviceRequest>
) -> Result<Response<()>, Status>
pub async fn deactivate(
&mut self,
request: impl IntoRequest<DeactivateDeviceRequest>
) -> Result<Response<()>, Status>
Deactivate de-activates the device.
pub async fn get_activation(
&mut self,
request: impl IntoRequest<GetDeviceActivationRequest>
) -> Result<Response<GetDeviceActivationResponse>, Status>
pub async fn get_activation(
&mut self,
request: impl IntoRequest<GetDeviceActivationRequest>
) -> Result<Response<GetDeviceActivationResponse>, Status>
GetActivation returns the current activation details of the device (OTAA and ABP).
pub async fn get_random_dev_addr(
&mut self,
request: impl IntoRequest<GetRandomDevAddrRequest>
) -> Result<Response<GetRandomDevAddrResponse>, Status>
pub async fn get_random_dev_addr(
&mut self,
request: impl IntoRequest<GetRandomDevAddrRequest>
) -> Result<Response<GetRandomDevAddrResponse>, Status>
GetRandomDevAddr returns a random DevAddr taking the NwkID prefix into account.
pub async fn get_stats(
&mut self,
request: impl IntoRequest<GetDeviceStatsRequest>
) -> Result<Response<GetDeviceStatsResponse>, Status>
pub async fn get_stats(
&mut self,
request: impl IntoRequest<GetDeviceStatsRequest>
) -> Result<Response<GetDeviceStatsResponse>, Status>
GetStats returns the device stats.
pub async fn stream_frame_logs(
&mut self,
request: impl IntoRequest<StreamDeviceFrameLogsRequest>
) -> Result<Response<Streaming<StreamDeviceFrameLogsResponse>>, Status>
pub async fn stream_frame_logs(
&mut self,
request: impl IntoRequest<StreamDeviceFrameLogsRequest>
) -> Result<Response<Streaming<StreamDeviceFrameLogsResponse>>, Status>
StreamFrameLogs streams the uplink and downlink frame-logs for the given DevEUI.
- These are the raw LoRaWAN frames and this endpoint is intended for debugging only.
- This endpoint does not work from a web-browser.
pub async fn stream_event_logs(
&mut self,
request: impl IntoRequest<StreamDeviceEventLogsRequest>
) -> Result<Response<Streaming<StreamDeviceEventLogsResponse>>, Status>
pub async fn stream_event_logs(
&mut self,
request: impl IntoRequest<StreamDeviceEventLogsRequest>
) -> Result<Response<Streaming<StreamDeviceEventLogsResponse>>, Status>
StreamEventLogs stream the device events (uplink payloads, ACKs, joins, errors).
- This endpoint is intended for debugging only.
- This endpoint does not work from a web-browser.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for DeviceServiceClient<T> where
T: RefUnwindSafe,
impl<T> Send for DeviceServiceClient<T> where
T: Send,
impl<T> Sync for DeviceServiceClient<T> where
T: Sync,
impl<T> Unpin for DeviceServiceClient<T> where
T: Unpin,
impl<T> UnwindSafe for DeviceServiceClient<T> where
T: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Wrap the input message T
in a tonic::Request