Skip to content

Commit

Permalink
SetVariables op type
Browse files Browse the repository at this point in the history
  • Loading branch information
matth-x committed Feb 4, 2024
1 parent 10c0b7d commit c50899f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/MicroOcpp/Model/Variables/Variable.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
// Copyright Matthias Akstaller 2019 - 2024
// MIT License

/*
* Implementation of the UCs B05 - B07
*/

#ifndef MO_VARIABLE_H
#define MO_VARIABLE_H

Expand Down
45 changes: 45 additions & 0 deletions src/MicroOcpp/Operations/SetVariables.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// matth-x/MicroOcpp
// Copyright Matthias Akstaller 2019 - 2024
// MIT License

#ifndef MO_SETVARIABLES_H
#define MO_SETVARIABLES_H

#include <MicroOcpp/Version.h>

#if MO_ENABLE_V201

#include <MicroOcpp/Core/Operation.h>

#include <MicroOcpp/Model/Variables/Variable.h>

namespace MicroOcpp {

namespace Ocpp201 {

class SetVariables : public Operation {
private:
const char *attributeType = nullptr;
const char *attributeStatus = nullptr;
Variable *variable = nullptr; //contains ptr to `component`

const char *errorCode = nullptr;
public:
SetVariables();

const char* getOperationType() override;

void processReq(JsonObject payload) override;

std::unique_ptr<DynamicJsonDocument> createConf() override;

const char *getErrorCode() override {return errorCode;}

};

} //namespace Ocpp201
} //namespace MicroOcpp

#endif //MO_ENABLE_V201

#endif

0 comments on commit c50899f

Please sign in to comment.