Ejemplo n.º 1
0
        public Task <MsgGetSensorSubscriptionsResponse> GetSensorProviderSubscriptionsAsync(MsgGetSensorSubscriptions getSubscriptionsRequest, bool bypassCapabilityCheck)
        {
            if (!bypassCapabilityCheck && !this.Capabilities.Contains(eThingCaps.SensorProvider))
            {
                return(TheCommonUtils.TaskFromResult(new MsgGetSensorSubscriptionsResponse {
                    Error = "Thing is not a sensor provider"
                }));
            }
            ;
            var getSubscriptionResponseTask = TheCommRequestResponse.PublishRequestJSonAsync <MsgGetSensorSubscriptions, MsgGetSensorSubscriptionsResponse>(this, getSubscriptionsRequest);

            return(getSubscriptionResponseTask);
        }
Ejemplo n.º 2
0
 public Task <MsgGetSensorSubscriptionsResponse> GetSensorProviderSubscriptionsAsync(MsgGetSensorSubscriptions getSubscriptionsRequest)
 {
     return(GetSensorProviderSubscriptionsAsync(getSubscriptionsRequest, false));
 }