Add extracted tools: CitrineOS, OpenOCPP, ShapeShifter
- CitrineOS core extracted (CSMS OCPP 2.0.1) - OpenOCPP extracted (firmware OCPP 1.6J/2.0.1) - ShapeShifter library installed (pip install -e) - ShapeShifter specification extracted - EVerest extracted TODO updated with progress
This commit is contained in:
48
tools/EVerest-main/modules/API/RpcApi/rpc/methods/Api.hpp
Normal file
48
tools/EVerest-main/modules/API/RpcApi/rpc/methods/Api.hpp
Normal file
@@ -0,0 +1,48 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
// Copyright chargebyte GmbH and Contributors to EVerest
|
||||
#ifndef METHODS_API_HPP
|
||||
#define METHODS_API_HPP
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#include "../../data/DataStore.hpp"
|
||||
|
||||
using namespace data;
|
||||
|
||||
namespace RPCDataTypes = types::json_rpc_api;
|
||||
|
||||
namespace methods {
|
||||
|
||||
static const std::string METHOD_API_HELLO = "API.Hello";
|
||||
|
||||
/// This class includes all methods of the API namespace.
|
||||
/// It contains the data object and the methods to access it.
|
||||
class Api {
|
||||
public:
|
||||
// Constructor and Destructor
|
||||
Api() = delete;
|
||||
explicit Api(DataStoreCharger& dataobj) : m_dataobj(dataobj), m_authentication_required(false){};
|
||||
|
||||
~Api() = default;
|
||||
|
||||
// Methods
|
||||
RPCDataTypes::HelloResObj hello();
|
||||
void set_authentication_required(bool required);
|
||||
bool is_authentication_required() const;
|
||||
void set_api_version(const std::string& version);
|
||||
const std::string& get_api_version() const;
|
||||
void set_authenticated(bool authenticated);
|
||||
bool is_authenticated() const;
|
||||
|
||||
private:
|
||||
DataStoreCharger& m_dataobj;
|
||||
bool m_authentication_required;
|
||||
// optional
|
||||
std::optional<bool> m_authenticated;
|
||||
std::string m_api_version;
|
||||
};
|
||||
|
||||
} // namespace methods
|
||||
|
||||
#endif // METHODS_API_HPP
|
||||
Reference in New Issue
Block a user