IOT Questions and Answers – Handling Sensor Request

This set of IOT Multiple Choice Questions & Answers (MCQs) focuses on “Handling Sensor Request”.

1. HelloWeb is an example of ____________ server.
a) HTTP
b) MQTP
c) SMTP
d) CoAP
View Answer

Answer: a
Explanation: HelloWeb is an example of an HTTP server, but it does not use any sensors or actuators.

2. ________ will show how to handle GET request to a sensor resources.
a) Monitor
b) VoltageMonitor
c) Voltage
d) Voltage-Monitor
View Answer

Answer: b
Explanation: VoltageMonitor, shows how to handle GET request to a sensor resource, more specially one that represent some voltage.

3. Can we use any web browser as client.
a) True
b) False
View Answer

Answer: a
Explanation: You can use any web browser as a client to inspect the current voltage. After all, a web browser is basically an engine for initiating GET request.
advertisement
advertisement

4. An HTTP server manages ____________
a) Websites
b) Devices
c) Resources
d) Sensors
View Answer

Answer: c
Explanation: An HTTP server manages resources. In this example, a resource is provided that has the meaning, “actual voltage value, as measured by a sensor attached to the board”.

5. A resource that contains an actual value is called as ________
a) Potential variable
b) Measured variable
c) Resource variable
d) Physical variable
View Answer

Answer: b
Explanation: A resource that contains an actual value is called a measured variable. A measured variable changes its value over time, depending on a physical process.
Sanfoundry Certification Contest of the Month is Live. 100+ Subjects. Participate Now!

6. When the user turns the potentiometer’s knob, the value is changed.
a) True
b) False
View Answer

Answer: a
Explanation: When the user physically turns the potentiometer’s knob, the measured variable changes its value accordingly. This means that subsequent GET request to the same resource may yield different responses.

7. A resource with measured variable will reflect ________
a) Potential phenomenon
b) Resource phenomenon
c) Measured phenomenon
d) Physical phenomenon
View Answer

Answer: d
Explanation: A resource with measured variable will reflect a physical phenomenon as it currently is. The resource is updated with new sensor values from time to time.
advertisement

8. What should an URL contain?
a) ASCII values
b) Digits
c) Characters
d) ASCII values, digits, and characters
View Answer

Answer: d
Explanation: You can use any URL as long you use ASCII letters, digits, and Characters. For example, the URL /root/sensor/analog/I would look like:
http://192.168.5.100/root/sensor/analog/1.

9. For reading the current voltage ________ library class is used.
a) Digital sensor
b) Analog sensor
c) Actuator
d) Potential sensor
View Answer

Answer: b
Explanation: For reading the current voltage, library class Analog Sensor is used that wraps an analog input port in an object that provides the method HandleGet.
advertisement

10. Variable voltage Sensor is an instance of Analog Sensor.
a) True
b) False
View Answer

Answer: a
Explanation: For reading the current voltage, library class Analog Sensor that wraps an analog input port in an object that provides the method HandleGet.
Variable voltage Sensor is an instance of Analog Sensor, initialized with pinA1.

11. Which property makes it possible for the analog sensor object to convert the integer input?
a) MinValue
b) MaxValue
c) Either MinValue or MaxValue
d) Both MinValue and MaxValue
View Answer

Answer: d
Explanation: Properties MinValue and MaxValue make it possible for the analog sensor object to convert the integer input of the analog input port to a value in the given range.

12. What is the range of analog input port?
a) 0 to 3
b) 0 to 3.3
c) 0 to 4
d) 0 to 4.5
View Answer

Answer: b
Explanation: Properties MinValue and MaxValue make it possible for the analog sensor object to convert the integer input of the analog input port to a value in the given range which is between 0.0 to 3.3.

13. ________ is used to provide an object of type MeasuredVariable.
a) HandleRequest
b) RequetHandle
c) Handle_Request
d) Handle-Request
View Answer

Answer: a
Explanation: In the WebServer initialization, We use the request handler HandleRequest provided by an object of type MeasuredVariable. A MeasuredVariable object has a property FromSensor.

14. When a client makes a GET request for /voltage/actual, the request is passed to ________
a) MeasuredVariable
b) HandleRequest
c) Measured Variable’s HandleRequest
d) HandleRequest’s MeasuredVariable
View Answer

Answer: c
Explanation: When a client makes a GET request for /voltage/actual, the request is passed to Measured Variable’s HandleRequest method. When this happens, the MeasuredVariable object first calls FromSensor.

15. Delegate properties must be compatible with the delegate types they represent.
a) True
b) False
View Answer

Answer: a
Explanation: FromSensor is a property to which you can assign a method I.e., a C#delegate property. Delegate properties must be compatible with the delegate types they represent.

Sanfoundry Global Education & Learning Series – IOT.

To practice all areas of IOT, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.