Exemple #1
0
        public Task <MsgSubscribeSensorsResponse> SubscribeSensorsAsync(MsgSubscribeSensors subscribeRequest, bool bypassCapabilityCheck)
        {
            if (!bypassCapabilityCheck && !this.Capabilities.Contains(eThingCaps.SensorProvider))
            {
                return(TheCommonUtils.TaskFromResult(new MsgSubscribeSensorsResponse {
                    Error = "Thing is not a sensor provider"
                }));
            }
            ;
            var subscribeResponseTask = TheCommRequestResponse.PublishRequestJSonAsync <TheThing.MsgSubscribeSensors, TheThing.MsgSubscribeSensorsResponse>(this, subscribeRequest);

            return(subscribeResponseTask);
        }
Exemple #2
0
 public Task <MsgSubscribeSensorsResponse <subscriptionT> > SubscribeSensorsAsync <subscriptionT>(MsgSubscribeSensors <subscriptionT> subscribeRequest) where subscriptionT : TheSensorSubscription
 {
     return(SubscribeSensorsAsync(subscribeRequest, false));
 }
Exemple #3
0
 public Task <MsgSubscribeSensorsResponse> SubscribeSensorsAsync(MsgSubscribeSensors subscribeRequest)
 {
     return(SubscribeSensorsAsync(subscribeRequest, false));
 }