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,2 @@
#!/bin/sh
nanopb_generator.py -L "#include <nanopb/%s>" -I . -D . lo2hi.proto hi2lo.proto

View File

@@ -0,0 +1 @@
KeepAliveHi.sw_version_string max_length:50

View File

@@ -0,0 +1,33 @@
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.4.6 */
#include "hi2lo.pb.h"
#if PB_PROTO_HEADER_VERSION != 40
#error Regenerate this file with the current version of nanopb generator.
#endif
PB_BIND(HiToLo, HiToLo, AUTO)
PB_BIND(AllowPowerOn, AllowPowerOn, AUTO)
PB_BIND(SetBCDE, SetBCDE, AUTO)
PB_BIND(FirmwareUpdate, FirmwareUpdate, AUTO)
PB_BIND(KeepAliveHi, KeepAliveHi, AUTO)
PB_BIND(Enable, Enable, AUTO)
PB_BIND(Disable, Disable, AUTO)
PB_BIND(Reset, Reset, AUTO)

View File

@@ -0,0 +1,196 @@
/* Automatically generated nanopb header */
/* Generated by nanopb-0.4.6 */
#ifndef PB_HI2LO_PB_H_INCLUDED
#define PB_HI2LO_PB_H_INCLUDED
#include <everest/3rd_party/nanopb/pb.h>
#if PB_PROTO_HEADER_VERSION != 40
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Struct definitions */
typedef struct _Disable {
char dummy_field;
} Disable;
typedef struct _Enable {
char dummy_field;
} Enable;
typedef struct _Reset {
char dummy_field;
} Reset;
typedef struct _AllowPowerOn {
bool p;
} AllowPowerOn;
typedef struct _FirmwareUpdate {
bool invoke_rom_bootloader;
} FirmwareUpdate;
typedef struct _KeepAliveHi {
uint32_t time_stamp;
uint32_t hw_type;
uint32_t hw_revision;
uint32_t protocol_version_major;
uint32_t protocol_version_minor;
char sw_version_string[51];
} KeepAliveHi;
typedef struct _SetBCDE {
int32_t mode; /* 0: A, 1: B, 2: C, 3: D, 4: E */
} SetBCDE;
/* This container message is send from Hi Level to Low level and may contain any allowed message in that direction. */
typedef struct _HiToLo {
pb_size_t which_payload;
union {
/* Common/configuration messages */
Enable enable;
Disable disable;
KeepAliveHi keep_alive;
FirmwareUpdate firmware_update;
AllowPowerOn allow_power_on;
/* Commands for HIL simulator */
Reset reset;
/* Commands only available in control_mode = 2 (direct low level control) */
SetBCDE set_bcde;
} payload;
} HiToLo;
#ifdef __cplusplus
extern "C" {
#endif
/* Initializer values for message structs */
#define HiToLo_init_default {0, {Enable_init_default}}
#define AllowPowerOn_init_default {0}
#define SetBCDE_init_default {0}
#define FirmwareUpdate_init_default {0}
#define KeepAliveHi_init_default {0, 0, 0, 0, 0, ""}
#define Enable_init_default {0}
#define Disable_init_default {0}
#define Reset_init_default {0}
#define HiToLo_init_zero {0, {Enable_init_zero}}
#define AllowPowerOn_init_zero {0}
#define SetBCDE_init_zero {0}
#define FirmwareUpdate_init_zero {0}
#define KeepAliveHi_init_zero {0, 0, 0, 0, 0, ""}
#define Enable_init_zero {0}
#define Disable_init_zero {0}
#define Reset_init_zero {0}
/* Field tags (for use in manual encoding/decoding) */
#define AllowPowerOn_p_tag 1
#define FirmwareUpdate_invoke_rom_bootloader_tag 1
#define KeepAliveHi_time_stamp_tag 1
#define KeepAliveHi_hw_type_tag 2
#define KeepAliveHi_hw_revision_tag 3
#define KeepAliveHi_protocol_version_major_tag 4
#define KeepAliveHi_protocol_version_minor_tag 5
#define KeepAliveHi_sw_version_string_tag 6
#define SetBCDE_mode_tag 1
#define HiToLo_enable_tag 6
#define HiToLo_disable_tag 7
#define HiToLo_keep_alive_tag 13
#define HiToLo_firmware_update_tag 16
#define HiToLo_allow_power_on_tag 21
#define HiToLo_reset_tag 23
#define HiToLo_set_bcde_tag 25
/* Struct field encoding specification for nanopb */
#define HiToLo_FIELDLIST(X, a) \
X(a, STATIC, ONEOF, MESSAGE, (payload,enable,payload.enable), 6) \
X(a, STATIC, ONEOF, MESSAGE, (payload,disable,payload.disable), 7) \
X(a, STATIC, ONEOF, MESSAGE, (payload,keep_alive,payload.keep_alive), 13) \
X(a, STATIC, ONEOF, MESSAGE, (payload,firmware_update,payload.firmware_update), 16) \
X(a, STATIC, ONEOF, MESSAGE, (payload,allow_power_on,payload.allow_power_on), 21) \
X(a, STATIC, ONEOF, MESSAGE, (payload,reset,payload.reset), 23) \
X(a, STATIC, ONEOF, MESSAGE, (payload,set_bcde,payload.set_bcde), 25)
#define HiToLo_CALLBACK NULL
#define HiToLo_DEFAULT NULL
#define HiToLo_payload_enable_MSGTYPE Enable
#define HiToLo_payload_disable_MSGTYPE Disable
#define HiToLo_payload_keep_alive_MSGTYPE KeepAliveHi
#define HiToLo_payload_firmware_update_MSGTYPE FirmwareUpdate
#define HiToLo_payload_allow_power_on_MSGTYPE AllowPowerOn
#define HiToLo_payload_reset_MSGTYPE Reset
#define HiToLo_payload_set_bcde_MSGTYPE SetBCDE
#define AllowPowerOn_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, BOOL, p, 1)
#define AllowPowerOn_CALLBACK NULL
#define AllowPowerOn_DEFAULT NULL
#define SetBCDE_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, INT32, mode, 1)
#define SetBCDE_CALLBACK NULL
#define SetBCDE_DEFAULT NULL
#define FirmwareUpdate_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, BOOL, invoke_rom_bootloader, 1)
#define FirmwareUpdate_CALLBACK NULL
#define FirmwareUpdate_DEFAULT NULL
#define KeepAliveHi_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, UINT32, time_stamp, 1) \
X(a, STATIC, SINGULAR, UINT32, hw_type, 2) \
X(a, STATIC, SINGULAR, UINT32, hw_revision, 3) \
X(a, STATIC, SINGULAR, UINT32, protocol_version_major, 4) \
X(a, STATIC, SINGULAR, UINT32, protocol_version_minor, 5) \
X(a, STATIC, SINGULAR, STRING, sw_version_string, 6)
#define KeepAliveHi_CALLBACK NULL
#define KeepAliveHi_DEFAULT NULL
#define Enable_FIELDLIST(X, a) \
#define Enable_CALLBACK NULL
#define Enable_DEFAULT NULL
#define Disable_FIELDLIST(X, a) \
#define Disable_CALLBACK NULL
#define Disable_DEFAULT NULL
#define Reset_FIELDLIST(X, a) \
#define Reset_CALLBACK NULL
#define Reset_DEFAULT NULL
extern const pb_msgdesc_t HiToLo_msg;
extern const pb_msgdesc_t AllowPowerOn_msg;
extern const pb_msgdesc_t SetBCDE_msg;
extern const pb_msgdesc_t FirmwareUpdate_msg;
extern const pb_msgdesc_t KeepAliveHi_msg;
extern const pb_msgdesc_t Enable_msg;
extern const pb_msgdesc_t Disable_msg;
extern const pb_msgdesc_t Reset_msg;
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define HiToLo_fields &HiToLo_msg
#define AllowPowerOn_fields &AllowPowerOn_msg
#define SetBCDE_fields &SetBCDE_msg
#define FirmwareUpdate_fields &FirmwareUpdate_msg
#define KeepAliveHi_fields &KeepAliveHi_msg
#define Enable_fields &Enable_msg
#define Disable_fields &Disable_msg
#define Reset_fields &Reset_msg
/* Maximum encoded size of messages (where known) */
#define AllowPowerOn_size 2
#define Disable_size 0
#define Enable_size 0
#define FirmwareUpdate_size 2
#define HiToLo_size 84
#define KeepAliveHi_size 82
#define Reset_size 0
#define SetBCDE_size 11
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif

View File

@@ -0,0 +1,46 @@
syntax = "proto3";
/*
This container message is send from Hi Level to Low level and may contain any allowed message in that direction.
*/
message HiToLo {
oneof payload {
// Common/configuration messages
Enable enable = 6;
Disable disable = 7;
KeepAliveHi keep_alive = 13;
FirmwareUpdate firmware_update = 16;
// Commands only available in control_mode = 2 (direct low level control)
SetBCDE set_bcde = 25;
AllowPowerOn allow_power_on = 21;
// Commands for HIL simulator
Reset reset = 23;
}
}
message AllowPowerOn {
bool p = 1;
}
message SetBCDE {
int32 mode = 1; // 0: A, 1: B, 2: C, 3: D, 4: E
}
message FirmwareUpdate {
bool invoke_rom_bootloader = 1;
}
message KeepAliveHi {
uint32 time_stamp = 1;
uint32 hw_type = 2;
uint32 hw_revision = 3;
uint32 protocol_version_major = 4;
uint32 protocol_version_minor = 5;
string sw_version_string = 6;
}
message Enable { }
message Disable { }
message Reset { }

View File

@@ -0,0 +1 @@
KeepAliveLo.sw_version_string max_length:50

View File

@@ -0,0 +1,25 @@
/* Automatically generated nanopb constant definitions */
/* Generated by nanopb-0.4.6 */
#include "lo2hi.pb.h"
#if PB_PROTO_HEADER_VERSION != 40
#error Regenerate this file with the current version of nanopb generator.
#endif
PB_BIND(LoToHi, LoToHi, AUTO)
PB_BIND(Event, Event, AUTO)
PB_BIND(Measurements, Measurements, AUTO)
PB_BIND(KeepAliveLo, KeepAliveLo, AUTO)
PB_BIND(ResetDone, ResetDone, AUTO)

View File

@@ -0,0 +1,189 @@
/* Automatically generated nanopb header */
/* Generated by nanopb-0.4.6 */
#ifndef PB_LO2HI_PB_H_INCLUDED
#define PB_LO2HI_PB_H_INCLUDED
#include <everest/3rd_party/nanopb/pb.h>
#if PB_PROTO_HEADER_VERSION != 40
#error Regenerate this file with the current version of nanopb generator.
#endif
/* Enum definitions */
typedef enum _Event_InterfaceEvent {
Event_InterfaceEvent_A = 0,
Event_InterfaceEvent_B = 1,
Event_InterfaceEvent_C = 2,
Event_InterfaceEvent_D = 3,
Event_InterfaceEvent_E = 4,
Event_InterfaceEvent_F = 5,
Event_InterfaceEvent_EF = 6,
Event_InterfaceEvent_DISCONNECTED = 8,
Event_InterfaceEvent_ERROR_RELAIS = 9,
Event_InterfaceEvent_RELAIS_ON = 10,
Event_InterfaceEvent_RELAIS_OFF = 11
} Event_InterfaceEvent;
/* Struct definitions */
typedef struct _ResetDone {
char dummy_field;
} ResetDone;
typedef struct _Event {
Event_InterfaceEvent type;
} Event;
typedef struct _KeepAliveLo {
uint32_t time_stamp;
uint32_t hw_type;
uint32_t hw_revision;
uint32_t protocol_version_major;
uint32_t protocol_version_minor;
char sw_version_string[51];
float hwcap_max_current;
float hwcap_min_current;
uint32_t hwcap_max_phase_count;
uint32_t hwcap_min_phase_count;
bool supports_changing_phases_during_charging;
} KeepAliveLo;
typedef struct _Measurements {
float pwmDutyCycle;
float evse_pwm_voltage_hi;
float evse_pwm_voltage_lo;
bool evse_pwm_running;
uint32_t relais_on;
} Measurements;
/* This container message is send from Lo Level to Hi level and may contain any allowed message in that direction. */
typedef struct _LoToHi {
pb_size_t which_payload;
union {
/* Common Packets */
KeepAliveLo keep_alive;
/* HIL packets */
Measurements measurements;
/* Packets only available in control_mode = 2 (low level control) */
Event event;
ResetDone reset_done;
} payload;
} LoToHi;
/* Helper constants for enums */
#define _Event_InterfaceEvent_MIN Event_InterfaceEvent_A
#define _Event_InterfaceEvent_MAX Event_InterfaceEvent_RELAIS_OFF
#define _Event_InterfaceEvent_ARRAYSIZE ((Event_InterfaceEvent)(Event_InterfaceEvent_RELAIS_OFF+1))
#ifdef __cplusplus
extern "C" {
#endif
/* Initializer values for message structs */
#define LoToHi_init_default {0, {KeepAliveLo_init_default}}
#define Event_init_default {_Event_InterfaceEvent_MIN}
#define Measurements_init_default {0, 0, 0, 0, 0}
#define KeepAliveLo_init_default {0, 0, 0, 0, 0, "", 0, 0, 0, 0, 0}
#define ResetDone_init_default {0}
#define LoToHi_init_zero {0, {KeepAliveLo_init_zero}}
#define Event_init_zero {_Event_InterfaceEvent_MIN}
#define Measurements_init_zero {0, 0, 0, 0, 0}
#define KeepAliveLo_init_zero {0, 0, 0, 0, 0, "", 0, 0, 0, 0, 0}
#define ResetDone_init_zero {0}
/* Field tags (for use in manual encoding/decoding) */
#define Event_type_tag 1
#define KeepAliveLo_time_stamp_tag 1
#define KeepAliveLo_hw_type_tag 2
#define KeepAliveLo_hw_revision_tag 3
#define KeepAliveLo_protocol_version_major_tag 4
#define KeepAliveLo_protocol_version_minor_tag 5
#define KeepAliveLo_sw_version_string_tag 6
#define KeepAliveLo_hwcap_max_current_tag 7
#define KeepAliveLo_hwcap_min_current_tag 8
#define KeepAliveLo_hwcap_max_phase_count_tag 9
#define KeepAliveLo_hwcap_min_phase_count_tag 10
#define KeepAliveLo_supports_changing_phases_during_charging_tag 11
#define Measurements_pwmDutyCycle_tag 1
#define Measurements_evse_pwm_voltage_hi_tag 2
#define Measurements_evse_pwm_voltage_lo_tag 3
#define Measurements_evse_pwm_running_tag 4
#define Measurements_relais_on_tag 5
#define LoToHi_keep_alive_tag 3
#define LoToHi_measurements_tag 5
#define LoToHi_event_tag 6
#define LoToHi_reset_done_tag 7
/* Struct field encoding specification for nanopb */
#define LoToHi_FIELDLIST(X, a) \
X(a, STATIC, ONEOF, MESSAGE, (payload,keep_alive,payload.keep_alive), 3) \
X(a, STATIC, ONEOF, MESSAGE, (payload,measurements,payload.measurements), 5) \
X(a, STATIC, ONEOF, MESSAGE, (payload,event,payload.event), 6) \
X(a, STATIC, ONEOF, MESSAGE, (payload,reset_done,payload.reset_done), 7)
#define LoToHi_CALLBACK NULL
#define LoToHi_DEFAULT NULL
#define LoToHi_payload_keep_alive_MSGTYPE KeepAliveLo
#define LoToHi_payload_measurements_MSGTYPE Measurements
#define LoToHi_payload_event_MSGTYPE Event
#define LoToHi_payload_reset_done_MSGTYPE ResetDone
#define Event_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, UENUM, type, 1)
#define Event_CALLBACK NULL
#define Event_DEFAULT NULL
#define Measurements_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, FLOAT, pwmDutyCycle, 1) \
X(a, STATIC, SINGULAR, FLOAT, evse_pwm_voltage_hi, 2) \
X(a, STATIC, SINGULAR, FLOAT, evse_pwm_voltage_lo, 3) \
X(a, STATIC, SINGULAR, BOOL, evse_pwm_running, 4) \
X(a, STATIC, SINGULAR, UINT32, relais_on, 5)
#define Measurements_CALLBACK NULL
#define Measurements_DEFAULT NULL
#define KeepAliveLo_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, UINT32, time_stamp, 1) \
X(a, STATIC, SINGULAR, UINT32, hw_type, 2) \
X(a, STATIC, SINGULAR, UINT32, hw_revision, 3) \
X(a, STATIC, SINGULAR, UINT32, protocol_version_major, 4) \
X(a, STATIC, SINGULAR, UINT32, protocol_version_minor, 5) \
X(a, STATIC, SINGULAR, STRING, sw_version_string, 6) \
X(a, STATIC, SINGULAR, FLOAT, hwcap_max_current, 7) \
X(a, STATIC, SINGULAR, FLOAT, hwcap_min_current, 8) \
X(a, STATIC, SINGULAR, UINT32, hwcap_max_phase_count, 9) \
X(a, STATIC, SINGULAR, UINT32, hwcap_min_phase_count, 10) \
X(a, STATIC, SINGULAR, BOOL, supports_changing_phases_during_charging, 11)
#define KeepAliveLo_CALLBACK NULL
#define KeepAliveLo_DEFAULT NULL
#define ResetDone_FIELDLIST(X, a) \
#define ResetDone_CALLBACK NULL
#define ResetDone_DEFAULT NULL
extern const pb_msgdesc_t LoToHi_msg;
extern const pb_msgdesc_t Event_msg;
extern const pb_msgdesc_t Measurements_msg;
extern const pb_msgdesc_t KeepAliveLo_msg;
extern const pb_msgdesc_t ResetDone_msg;
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define LoToHi_fields &LoToHi_msg
#define Event_fields &Event_msg
#define Measurements_fields &Measurements_msg
#define KeepAliveLo_fields &KeepAliveLo_msg
#define ResetDone_fields &ResetDone_msg
/* Maximum encoded size of messages (where known) */
#define Event_size 2
#define KeepAliveLo_size 106
#define LoToHi_size 108
#define Measurements_size 23
#define ResetDone_size 0
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif

View File

@@ -0,0 +1,58 @@
syntax = "proto3";
/*
This container message is send from Lo Level to Hi level and may contain any allowed message in that direction.
*/
message LoToHi {
oneof payload {
// Common Packets
KeepAliveLo keep_alive = 3;
ResetDone reset_done = 7;
// Packets only available in control_mode = 2 (low level control)
Event event = 6;
// HIL packets
Measurements measurements = 5;
}
}
message Event {
enum InterfaceEvent {
A = 0;
B = 1;
C = 2;
D = 3;
E = 4;
F = 5;
EF = 6;
DISCONNECTED = 8;
ERROR_RELAIS = 9;
RELAIS_ON = 10;
RELAIS_OFF = 11;
}
InterfaceEvent type = 1;
}
message Measurements {
float pwmDutyCycle = 1;
float evse_pwm_voltage_hi = 2;
float evse_pwm_voltage_lo = 3;
bool evse_pwm_running = 4;
uint32 relais_on = 5;
}
message KeepAliveLo {
uint32 time_stamp = 1;
uint32 hw_type = 2;
uint32 hw_revision = 3;
uint32 protocol_version_major = 4;
uint32 protocol_version_minor = 5;
string sw_version_string = 6;
float hwcap_max_current = 7;
float hwcap_min_current = 8;
uint32 hwcap_max_phase_count = 9;
uint32 hwcap_min_phase_count = 10;
bool supports_changing_phases_during_charging = 11;
}
message ResetDone {
}