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:
Eric F
2026-06-08 00:38:27 -04:00
parent 468cfeaa50
commit d398a6ced2
7326 changed files with 1177561 additions and 7 deletions

View File

@@ -0,0 +1,22 @@
#
# AUTO GENERATED - MARKED REGIONS WILL BE KEPT
# template version 3
#
# module setup:
# - ${MODULE_NAME}: module name
ev_setup_cpp_module()
# ev@bcc62523-e22b-41d7-ba2f-825b493a3c97:v1
# insert your custom targets and additional config variables here
# ev@bcc62523-e22b-41d7-ba2f-825b493a3c97:v1
target_sources(${MODULE_NAME}
PRIVATE
"example/exampleImpl.cpp"
"store/kvsImpl.cpp"
)
# ev@c55432ab-152c-45a9-9d2e-7281d50c69c3:v1
# insert other things like install cmds etc here
# ev@c55432ab-152c-45a9-9d2e-7281d50c69c3:v1

View File

@@ -0,0 +1,19 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 - 2021 Pionix GmbH and Contributors to EVerest
#include "Example.hpp"
namespace module {
void Example::init() {
invoke_init(*p_example);
invoke_init(*p_store);
}
void Example::ready() {
invoke_ready(*p_example);
invoke_ready(*p_store);
mqtt.publish("external/topic", "data");
}
} // namespace module

View File

@@ -0,0 +1,71 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Pionix GmbH and Contributors to EVerest
#ifndef EXAMPLE_HPP
#define EXAMPLE_HPP
//
// AUTO GENERATED - MARKED REGIONS WILL BE KEPT
// template version 2
//
#include "ld-ev.hpp"
// headers for provided interface implementations
#include <generated/interfaces/example/Implementation.hpp>
#include <generated/interfaces/kvs/Implementation.hpp>
// headers for required interface implementations
#include <generated/interfaces/kvs/Interface.hpp>
// ev@4bf81b14-a215-475c-a1d3-0a484ae48918:v1
// insert your custom include headers here
// ev@4bf81b14-a215-475c-a1d3-0a484ae48918:v1
namespace module {
struct Conf {};
class Example : public Everest::ModuleBase {
public:
Example() = delete;
Example(const ModuleInfo& info, Everest::MqttProvider& mqtt_provider, std::unique_ptr<exampleImplBase> p_example,
std::unique_ptr<kvsImplBase> p_store, std::unique_ptr<kvsIntf> r_kvs, Conf& config) :
ModuleBase(info),
mqtt(mqtt_provider),
p_example(std::move(p_example)),
p_store(std::move(p_store)),
r_kvs(std::move(r_kvs)),
config(config){};
Everest::MqttProvider& mqtt;
const std::unique_ptr<exampleImplBase> p_example;
const std::unique_ptr<kvsImplBase> p_store;
const std::unique_ptr<kvsIntf> r_kvs;
const Conf& config;
// ev@1fce4c5e-0ab8-41bb-90f7-14277703d2ac:v1
// insert your public definitions here
// ev@1fce4c5e-0ab8-41bb-90f7-14277703d2ac:v1
protected:
// ev@4714b2ab-a24f-4b95-ab81-36439e1478de:v1
// insert your protected definitions here
// ev@4714b2ab-a24f-4b95-ab81-36439e1478de:v1
private:
friend class LdEverest;
void init();
void ready();
// ev@211cfdbe-f69a-4cd6-a4ec-f8aaa3d1b6c8:v1
// insert your private definitions here
// ev@211cfdbe-f69a-4cd6-a4ec-f8aaa3d1b6c8:v1
};
// ev@087e516b-124c-48df-94fb-109508c7cda9:v1
// insert other definitions here
// ev@087e516b-124c-48df-94fb-109508c7cda9:v1
} // namespace module
#endif // EXAMPLE_HPP

View File

@@ -0,0 +1,45 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 - 2021 Pionix GmbH and Contributors to EVerest
#include "exampleImpl.hpp"
// initial cpp template for interface example_child
// this file should not be overwritten by the code generator again
namespace module {
namespace example {
void exampleImpl::init() {
mod->mqtt.subscribe("external/a",
[](json data) { EVLOG_error << "received data from external MQTT handler: " << data.dump(); });
}
void exampleImpl::ready() {
publish_max_current(config.current);
mod->r_kvs->call_store("test", "test");
}
bool exampleImpl::handle_uses_something(std::string& key) {
if (mod->r_kvs->call_exists(key)) {
EVLOG_debug << "IT SHOULD NOT AND DOES NOT EXIST";
}
Array test_array = {1, 2, 3};
mod->r_kvs->call_store(key, test_array);
bool exi = mod->r_kvs->call_exists(key);
if (exi) {
EVLOG_debug << "IT ACTUALLY EXISTS";
}
auto ret = mod->r_kvs->call_load(key);
Array arr = std::get<Array>(ret);
EVLOG_debug << "loaded array: " << arr << ", original array: " << test_array;
return exi;
};
} // namespace example
} // namespace module

View File

@@ -0,0 +1,65 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Pionix GmbH and Contributors to EVerest
#ifndef EXAMPLE_EXAMPLE_IMPL_HPP
#define EXAMPLE_EXAMPLE_IMPL_HPP
//
// AUTO GENERATED - MARKED REGIONS WILL BE KEPT
// template version 3
//
#include <generated/interfaces/example/Implementation.hpp>
#include "../Example.hpp"
// ev@75ac1216-19eb-4182-a85c-820f1fc2c091:v1
// insert your custom include headers here
// ev@75ac1216-19eb-4182-a85c-820f1fc2c091:v1
namespace module {
namespace example {
struct Conf {
double current;
std::string enum_test;
int enum_test2;
};
class exampleImpl : public exampleImplBase {
public:
exampleImpl() = delete;
exampleImpl(Everest::ModuleAdapter* ev, const Everest::PtrContainer<Example>& mod, Conf& config) :
exampleImplBase(ev, "example"), mod(mod), config(config){};
// ev@8ea32d28-373f-4c90-ae5e-b4fcc74e2a61:v1
// insert your public definitions here
// ev@8ea32d28-373f-4c90-ae5e-b4fcc74e2a61:v1
protected:
// command handler functions (virtual)
virtual bool handle_uses_something(std::string& key) override;
// ev@d2d1847a-7b88-41dd-ad07-92785f06f5c4:v1
// insert your protected definitions here
// ev@d2d1847a-7b88-41dd-ad07-92785f06f5c4:v1
private:
const Everest::PtrContainer<Example>& mod;
const Conf& config;
virtual void init() override;
virtual void ready() override;
// ev@3370e4dd-95f4-47a9-aaec-ea76f34a66c9:v1
// insert your private definitions here
// ev@3370e4dd-95f4-47a9-aaec-ea76f34a66c9:v1
};
// ev@3d7da0ad-02c2-493d-9920-0bbbd56b9876:v1
// insert other definitions here
// ev@3d7da0ad-02c2-493d-9920-0bbbd56b9876:v1
} // namespace example
} // namespace module
#endif // EXAMPLE_EXAMPLE_IMPL_HPP

View File

@@ -0,0 +1,37 @@
description: Simple example module written in C++
provides:
example:
interface: example
description: This implements an example interface that uses multiple framework features
config:
current:
description: The current the physical connector can supply
type: number
minimum: 1
maximum: 60
enum_test:
description: A config value that tests the enum type
type: string
enum:
- one
- two
- three
enum_test2:
description: Another config value that tests the enum type
type: integer
enum:
- 1
- 2
- 3
store:
interface: kvs
description: This implements the kvs interface, mostly for testing multiple interfaces in one manifest
requires:
kvs:
interface: kvs
enable_external_mqtt: true
metadata:
license: https://opensource.org/licenses/Apache-2.0
authors:
- Kai-Uwe Hermann
- Andreas Heinrich

View File

@@ -0,0 +1,32 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright 2020 - 2021 Pionix GmbH and Contributors to EVerest
#include "kvsImpl.hpp"
namespace module {
namespace store {
void kvsImpl::init() {
}
void kvsImpl::ready() {
}
void kvsImpl::handle_store(std::string& key,
std::variant<std::nullptr_t, Array, Object, bool, double, int, std::string>& value) {
mod->r_kvs->call_store(key, value);
};
std::variant<std::nullptr_t, Array, Object, bool, double, int, std::string> kvsImpl::handle_load(std::string& key) {
return mod->r_kvs->call_load(key);
};
void kvsImpl::handle_delete(std::string& key) {
mod->r_kvs->call_delete(key);
};
bool kvsImpl::handle_exists(std::string& key) {
return mod->r_kvs->call_exists(key);
};
} // namespace store
} // namespace module

View File

@@ -0,0 +1,67 @@
// SPDX-License-Identifier: Apache-2.0
// Copyright Pionix GmbH and Contributors to EVerest
#ifndef STORE_KVS_IMPL_HPP
#define STORE_KVS_IMPL_HPP
//
// AUTO GENERATED - MARKED REGIONS WILL BE KEPT
// template version 3
//
#include <generated/interfaces/kvs/Implementation.hpp>
#include "../Example.hpp"
// ev@75ac1216-19eb-4182-a85c-820f1fc2c091:v1
// insert your custom include headers here
// ev@75ac1216-19eb-4182-a85c-820f1fc2c091:v1
namespace module {
namespace store {
struct Conf {};
class kvsImpl : public kvsImplBase {
public:
kvsImpl() = delete;
kvsImpl(Everest::ModuleAdapter* ev, const Everest::PtrContainer<Example>& mod, Conf& config) :
kvsImplBase(ev, "store"), mod(mod), config(config){};
// ev@8ea32d28-373f-4c90-ae5e-b4fcc74e2a61:v1
// insert your public definitions here
// ev@8ea32d28-373f-4c90-ae5e-b4fcc74e2a61:v1
protected:
// command handler functions (virtual)
virtual void
handle_store(std::string& key,
std::variant<std::nullptr_t, Array, Object, bool, double, int, std::string>& value) override;
virtual std::variant<std::nullptr_t, Array, Object, bool, double, int, std::string>
handle_load(std::string& key) override;
virtual void handle_delete(std::string& key) override;
virtual bool handle_exists(std::string& key) override;
// ev@d2d1847a-7b88-41dd-ad07-92785f06f5c4:v1
// insert your protected definitions here
// ev@d2d1847a-7b88-41dd-ad07-92785f06f5c4:v1
private:
const Everest::PtrContainer<Example>& mod;
const Conf& config;
virtual void init() override;
virtual void ready() override;
// ev@3370e4dd-95f4-47a9-aaec-ea76f34a66c9:v1
// insert your private definitions here
// ev@3370e4dd-95f4-47a9-aaec-ea76f34a66c9:v1
};
// ev@3d7da0ad-02c2-493d-9920-0bbbd56b9876:v1
// insert other definitions here
// ev@3d7da0ad-02c2-493d-9920-0bbbd56b9876:v1
} // namespace store
} // namespace module
#endif // STORE_KVS_IMPL_HPP