- 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
18 lines
513 B
C++
18 lines
513 B
C++
#include <catch2/catch_test_macros.hpp>
|
|
|
|
#include <cbv2g/exi_v2gtp.h>
|
|
|
|
SCENARIO("V2GTP header test") {
|
|
GIVEN("A binary representation of a valid (pre -20) V2GTP header") {
|
|
uint8_t header[] = {0x01, 0xfe, 0x80, 0x01, 0x00, 0x00, 0x00, 0x24};
|
|
|
|
THEN("It should be decoded succussfully") {
|
|
uint32_t payload_len;
|
|
auto ec = V2GTP_ReadHeader(header, &payload_len);
|
|
|
|
REQUIRE(ec == V2GTP_ERROR__NO_ERROR);
|
|
REQUIRE(payload_len == 0x24);
|
|
}
|
|
}
|
|
}
|