pub trait DeviceService: Send + Sync + 'static {
Show 19 methods
// Required methods
fn create<'life0, 'async_trait>(
&'life0 self,
request: Request<CreateDeviceRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDeviceRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update<'life0, 'async_trait>(
&'life0 self,
request: Request<UpdateDeviceRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteDeviceRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn list<'life0, 'async_trait>(
&'life0 self,
request: Request<ListDevicesRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<ListDevicesResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn create_keys<'life0, 'async_trait>(
&'life0 self,
request: Request<CreateDeviceKeysRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_keys<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDeviceKeysRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceKeysResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn update_keys<'life0, 'async_trait>(
&'life0 self,
request: Request<UpdateDeviceKeysRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_keys<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteDeviceKeysRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn flush_dev_nonces<'life0, 'async_trait>(
&'life0 self,
request: Request<FlushDevNoncesRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn activate<'life0, 'async_trait>(
&'life0 self,
request: Request<ActivateDeviceRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn deactivate<'life0, 'async_trait>(
&'life0 self,
request: Request<DeactivateDeviceRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_activation<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDeviceActivationRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceActivationResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_random_dev_addr<'life0, 'async_trait>(
&'life0 self,
request: Request<GetRandomDevAddrRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetRandomDevAddrResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_metrics<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDeviceMetricsRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceMetricsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_link_metrics<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDeviceLinkMetricsRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceLinkMetricsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn enqueue<'life0, 'async_trait>(
&'life0 self,
request: Request<EnqueueDeviceQueueItemRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<EnqueueDeviceQueueItemResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn flush_queue<'life0, 'async_trait>(
&'life0 self,
request: Request<FlushDeviceQueueRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_queue<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDeviceQueueItemsRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceQueueItemsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Generated trait containing gRPC methods that should be implemented for use with DeviceServiceServer.
Required Methods§
sourcefn create<'life0, 'async_trait>(
&'life0 self,
request: Request<CreateDeviceRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create<'life0, 'async_trait>( &'life0 self, request: Request<CreateDeviceRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Create the given device.
sourcefn get<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDeviceRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait>( &'life0 self, request: Request<GetDeviceRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get returns the device for the given DevEUI.
sourcefn update<'life0, 'async_trait>(
&'life0 self,
request: Request<UpdateDeviceRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update<'life0, 'async_trait>( &'life0 self, request: Request<UpdateDeviceRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Update the given device.
sourcefn delete<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteDeviceRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete<'life0, 'async_trait>( &'life0 self, request: Request<DeleteDeviceRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Delete the device with the given DevEUI.
sourcefn list<'life0, 'async_trait>(
&'life0 self,
request: Request<ListDevicesRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<ListDevicesResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list<'life0, 'async_trait>( &'life0 self, request: Request<ListDevicesRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<ListDevicesResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get the list of devices.
sourcefn create_keys<'life0, 'async_trait>(
&'life0 self,
request: Request<CreateDeviceKeysRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_keys<'life0, 'async_trait>( &'life0 self, request: Request<CreateDeviceKeysRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Create the given device-keys.
sourcefn get_keys<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDeviceKeysRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceKeysResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_keys<'life0, 'async_trait>( &'life0 self, request: Request<GetDeviceKeysRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceKeysResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Get the device-keys for the given DevEUI.
sourcefn update_keys<'life0, 'async_trait>(
&'life0 self,
request: Request<UpdateDeviceKeysRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update_keys<'life0, 'async_trait>( &'life0 self, request: Request<UpdateDeviceKeysRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Update the given device-keys.
sourcefn delete_keys<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteDeviceKeysRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_keys<'life0, 'async_trait>( &'life0 self, request: Request<DeleteDeviceKeysRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Delete the device-keys for the given DevEUI.
sourcefn flush_dev_nonces<'life0, 'async_trait>(
&'life0 self,
request: Request<FlushDevNoncesRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flush_dev_nonces<'life0, 'async_trait>( &'life0 self, request: Request<FlushDevNoncesRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
FlushDevNonces flushes the OTAA device nonces.
sourcefn activate<'life0, 'async_trait>(
&'life0 self,
request: Request<ActivateDeviceRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn activate<'life0, 'async_trait>( &'life0 self, request: Request<ActivateDeviceRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Activate (re)activates the device with the given parameters (for ABP or for importing OTAA activations).
sourcefn deactivate<'life0, 'async_trait>(
&'life0 self,
request: Request<DeactivateDeviceRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn deactivate<'life0, 'async_trait>( &'life0 self, request: Request<DeactivateDeviceRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Deactivate de-activates the device.
sourcefn get_activation<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDeviceActivationRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceActivationResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_activation<'life0, 'async_trait>( &'life0 self, request: Request<GetDeviceActivationRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceActivationResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
GetActivation returns the current activation details of the device (OTAA or ABP).
sourcefn get_random_dev_addr<'life0, 'async_trait>(
&'life0 self,
request: Request<GetRandomDevAddrRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetRandomDevAddrResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_random_dev_addr<'life0, 'async_trait>( &'life0 self, request: Request<GetRandomDevAddrRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<GetRandomDevAddrResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
GetRandomDevAddr returns a random DevAddr taking the NwkID prefix into account.
sourcefn get_metrics<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDeviceMetricsRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceMetricsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_metrics<'life0, 'async_trait>( &'life0 self, request: Request<GetDeviceMetricsRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceMetricsResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
GetMetrics returns the device metrics. Note that this requires a device-profile with codec and measurements configured.
sourcefn get_link_metrics<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDeviceLinkMetricsRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceLinkMetricsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_link_metrics<'life0, 'async_trait>( &'life0 self, request: Request<GetDeviceLinkMetricsRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceLinkMetricsResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
GetLinkMetrics returns the device link metrics. This includes uplinks, downlinks, RSSI, SNR, etc…
sourcefn enqueue<'life0, 'async_trait>(
&'life0 self,
request: Request<EnqueueDeviceQueueItemRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<EnqueueDeviceQueueItemResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn enqueue<'life0, 'async_trait>( &'life0 self, request: Request<EnqueueDeviceQueueItemRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<EnqueueDeviceQueueItemResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Enqueue adds the given item to the downlink queue.
sourcefn flush_queue<'life0, 'async_trait>(
&'life0 self,
request: Request<FlushDeviceQueueRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn flush_queue<'life0, 'async_trait>( &'life0 self, request: Request<FlushDeviceQueueRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<()>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
FlushQueue flushes the downlink device-queue.
sourcefn get_queue<'life0, 'async_trait>(
&'life0 self,
request: Request<GetDeviceQueueItemsRequest>
) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceQueueItemsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_queue<'life0, 'async_trait>( &'life0 self, request: Request<GetDeviceQueueItemsRequest> ) -> Pin<Box<dyn Future<Output = Result<Response<GetDeviceQueueItemsResponse>, Status>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
GetQueue returns the downlink device-queue.