Gewachshaus

Docuementation for the Request class

Request Class

The Request class is used to handle the request from the client. It is used to get the request method, the request URI, the request body and the request headers.

Methods

Testing

SensorData

Name Type
temperature_1 float
temperature_2 float
humidity_1 float
humidity_2 float
soilMoisture_1 float
soilMoisture_2 float
statusPumpe bool
statusLufter_Low bool
statusLufter_High bool
statusLight bool
getRgbLed char

SettingsData

Name Type
temperature_Min int
temperature_Avg int
temperature_Max int
soilMoisture_Min int
soilMoisture_Max int
setBrightness int
setLufter_Low bool
setLufter_High bool
setPumpe bool
setLight bool
setRgbLed char
setMatrixLed char

Example

#include <Request.h>
#define TYPE DEF_SENSOR

Request Object("http://localhost:80", TYPE);

Object.start();

Object.get.temperature_1();
Object.set.temperature_1(20.0);

Object.post(false);

Object.end();

Expiation of Methods

Request

start

post

end

get

SensorData

SettingsData

set

SensorData

SettingsData

getTest

setTest

License

   Copyright 2023 the original author or authors.

Licensed under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.