Exemplo n.º 1
0
        public Task <MsgBrowseSensorsResponse> ProviderBrowseSensorsAsync(TheThing.MsgBrowseSensors browseRequest, bool bypassCapabilityCheck)
        {
            if (!bypassCapabilityCheck && !this.Capabilities.Contains(eThingCaps.SensorProvider))
            {
                return(TheCommonUtils.TaskFromResult(new MsgBrowseSensorsResponse {
                    Error = "Thing is not a sensor provider"
                }));
            }
            ;
            var browseResponseTask = TheCommRequestResponse.PublishRequestJSonAsync <TheThing.MsgBrowseSensors, TheThing.MsgBrowseSensorsResponse>(this, browseRequest);

            return(browseResponseTask);
        }
Exemplo n.º 2
0
 public Task <MsgBrowseSensorsResponse> ProviderBrowseSensorsAsync(TheThing.MsgBrowseSensors browseRequest)
 {
     return(ProviderBrowseSensorsAsync(browseRequest, false));
 }