250+ TOP MCQs on Handling Sensor Request and Answers

IOT Multiple Choice Questions on “Handling Sensor Request”.

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

Answer: a
Clarification: 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

Answer: c
Clarification: 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

Answer: a
Clarification: 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.

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

Answer: c
Clarification: 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

Answer: b
Clarification: 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.

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

Answer: a
Clarification: 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

Answer: d
Clarification: 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.

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

Answer: d
Clarification: 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

Answer: a
Clarification: For reading the current voltage, library class Analog Sensor that wraps an analog input port in an object that provides the method HandleGet.

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

Answer: a
Clarification: 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

Answer: d
Clarification: 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

Answer: b
Clarification: 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, in this case it 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

Answer: a
Clarification: 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

Answer: c
Clarification: 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

Answer: a
Clarification: 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.

Leave a Reply

Your email address will not be published. Required fields are marked *