Added ngrest project structure and absolutehumidity rest

This commit is contained in:
2017-09-15 22:36:35 +02:00
parent d75632c61d
commit 7a4d08ea3c
3 changed files with 71 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
// This file generated by ngrestcg
// For more information, please visit: https://github.com/loentar/ngrest
#include "humidityserver.h"
/*std::string humidityserver::echo(const std::string& text)
{
return "Hi, " + text;
}*/
float humidityserver::absolutehumidity(float temperature, float humidity) {
return temperature + humidity;
}

View File

@@ -0,0 +1,25 @@
// This file generated by ngrestcg
// For more information, please visit: https://github.com/loentar/ngrest
#ifndef HUMIDITYSERVER_H
#define HUMIDITYSERVER_H
#include <ngrest/common/Service.h>
//! Dummy description for the service
/*! Some detailed description of the service */
// '*location' comment sets resource path for this service
// *location: humidityserver
class humidityserver: public ngrest::Service
{
public:
// *method: GET
// *location: /abshum?temperature={temperature}&humidity={humidity}
float absolutehumidity(float temperature, float humidity);
};
#endif // HUMIDITYSERVER_H