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,120 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file appHand_Datatypes.h
* @brief Description goes here
*
**/
#ifndef APP_HANDSHAKE_DATATYPES_H
#define APP_HANDSHAKE_DATATYPES_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include <stdint.h>
#define appHand_ProtocolNamespace_CHARACTER_SIZE (100)
#define appHand_AppProtocolType_5_ARRAY_SIZE (5)
// enum for function numbers
typedef enum {
appHand_supportedAppProtocolReq = 0,
appHand_supportedAppProtocolRes = 1
} appHand_generatedFunctionNumbersType;
// Element: definition=enum; name=ResponseCode; type={urn:iso:15118:2:2010:AppProtocol}responseCodeType; base type=string; content type=simple;
// abstract=False; final=False; derivation=restriction;
typedef enum {
appHand_responseCodeType_OK_SuccessfulNegotiation = 0,
appHand_responseCodeType_OK_SuccessfulNegotiationWithMinorDeviation = 1,
appHand_responseCodeType_Failed_NoNegotiation = 2
} appHand_responseCodeType;
// Element: definition=complex; name=AppProtocol; type={urn:iso:15118:2:2010:AppProtocol}AppProtocolType; base type=; content type=ELEMENT-ONLY;
// abstract=False; final=False;
// Particle: ProtocolNamespace, protocolNamespaceType (1, 1); VersionNumberMajor, unsignedInt (1, 1); VersionNumberMinor, unsignedInt (1, 1); SchemaID, idType (1, 1); Priority, priorityType (1, 1);
struct appHand_AppProtocolType {
// ProtocolNamespace, protocolNamespaceType (base: anyURI)
struct {
char characters[appHand_ProtocolNamespace_CHARACTER_SIZE];
uint16_t charactersLen;
} ProtocolNamespace;
// VersionNumberMajor, unsignedInt (base: unsignedLong)
uint32_t VersionNumberMajor;
// VersionNumberMinor, unsignedInt (base: unsignedLong)
uint32_t VersionNumberMinor;
// SchemaID, idType (base: unsignedByte)
uint8_t SchemaID;
// Priority, priorityType (base: unsignedByte)
uint8_t Priority;
};
// Element: definition=complex; name={urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq; type=AnonymousType; base type=; content type=ELEMENT-ONLY;
// abstract=False; final=False;
// Particle: AppProtocol, AppProtocolType (1, 5) (original max 20);
struct appHand_supportedAppProtocolReq {
// AppProtocol, AppProtocolType
struct {
struct appHand_AppProtocolType array[appHand_AppProtocolType_5_ARRAY_SIZE];
uint16_t arrayLen;
} AppProtocol;
};
// Element: definition=complex; name={urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes; type=AnonymousType; base type=; content type=ELEMENT-ONLY;
// abstract=False; final=False;
// Particle: ResponseCode, responseCodeType (1, 1); SchemaID, idType (0, 1);
struct appHand_supportedAppProtocolRes {
// ResponseCode, responseCodeType (base: string)
appHand_responseCodeType ResponseCode;
// SchemaID, idType (base: unsignedByte)
uint8_t SchemaID;
unsigned int SchemaID_isUsed:1;
};
// root elements of EXI doc
struct appHand_exiDocument {
union {
struct appHand_supportedAppProtocolReq supportedAppProtocolReq;
struct appHand_supportedAppProtocolRes supportedAppProtocolRes;
};
unsigned int supportedAppProtocolReq_isUsed:1;
unsigned int supportedAppProtocolRes_isUsed:1;
};
// init for structs
void init_appHand_exiDocument(struct appHand_exiDocument* exiDoc);
void init_appHand_supportedAppProtocolReq(struct appHand_supportedAppProtocolReq* supportedAppProtocolReq);
void init_appHand_supportedAppProtocolRes(struct appHand_supportedAppProtocolRes* supportedAppProtocolRes);
void init_appHand_AppProtocolType(struct appHand_AppProtocolType* AppProtocolType);
#ifdef __cplusplus
}
#endif
#endif /* APP_HANDSHAKE_DATATYPES_H */

View File

@@ -0,0 +1,43 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file appHand_Decoder.h
* @brief Description goes here
*
**/
#ifndef APP_HANDSHAKE_DECODER_H
#define APP_HANDSHAKE_DECODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cbv2g/common/exi_basetypes.h"
#include "cbv2g/common/exi_bitstream.h"
#include "appHand_Datatypes.h"
// main function for decoding
int decode_appHand_exiDocument(exi_bitstream_t* stream, struct appHand_exiDocument* exiDoc);
#ifdef __cplusplus
}
#endif
#endif /* APP_HANDSHAKE_DECODER_H */

View File

@@ -0,0 +1,43 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file appHand_Encoder.h
* @brief Description goes here
*
**/
#ifndef APP_HANDSHAKE_ENCODER_H
#define APP_HANDSHAKE_ENCODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cbv2g/common/exi_basetypes.h"
#include "cbv2g/common/exi_bitstream.h"
#include "appHand_Datatypes.h"
// main function for encoding
int encode_appHand_exiDocument(exi_bitstream_t* stream, struct appHand_exiDocument* exiDoc);
#ifdef __cplusplus
}
#endif
#endif /* APP_HANDSHAKE_ENCODER_H */

View File

@@ -0,0 +1,100 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file exi_basetypes.h
* @brief Description goes here
*
**/
#ifndef EXI_BASETYPES_H
#define EXI_BASETYPES_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include <stdint.h>
// TODO: delete me later! just for compiling the still not reworked parts.
#define EXI_ELEMENT_STACK_SIZE 24
#define EXTRA_CHAR 1
//
#define ASCII_EXTRA_CHAR 1
#define ASCII_CHAR_TERMINATOR '\0'
#define EXI_STRING_MAX_LEN 64
#define EXI_BYTE_ARRAY_MAX_LEN 350
// To support EXI integer 8/7 coding, this needs to be 8/7 of the desired
// size of 25 for EXI representation
#define EXI_BASETYPES_MAX_OCTETS_SUPPORTED 29
#define EXI_BASETYPES_OCTET_SEQ_FLAG_MASK 0x80
#define EXI_BASETYPES_OCTET_SEQ_VALUE_MASK 0x7F
#define EXI_BASETYPES_UINT8_MAX_OCTETS 2
#define EXI_BASETYPES_UINT16_MAX_OCTETS 3
#define EXI_BASETYPES_UINT32_MAX_OCTETS 5
#define EXI_BASETYPES_UINT64_MAX_OCTETS 10
typedef struct
{
size_t octets_size;
uint8_t* octets;
size_t octets_count;
} exi_binary_t;
typedef struct
{
uint8_t octets[EXI_BASETYPES_MAX_OCTETS_SUPPORTED];
size_t octets_count;
} exi_unsigned_t;
typedef struct exi_signed_t
{
exi_unsigned_t data;
uint8_t is_negative : 1;
} exi_signed_t;
typedef char exi_character_t;
int exi_basetypes_convert_to_unsigned(exi_unsigned_t* exi_unsigned, uint32_t value, size_t max_octets);
int exi_basetypes_convert_64_to_unsigned(exi_unsigned_t* exi_unsigned, uint64_t value);
int exi_basetypes_convert_from_unsigned(const exi_unsigned_t* exi_unsigned, uint32_t* value, size_t max_octets);
int exi_basetypes_convert_64_from_unsigned(const exi_unsigned_t* exi_unsigned, uint64_t* value);
int exi_basetypes_convert_to_signed(exi_signed_t* exi_signed, int32_t value, size_t max_octets);
int exi_basetypes_convert_64_to_signed(exi_signed_t* exi_signed, int64_t value);
int exi_basetypes_convert_from_signed(const exi_signed_t* exi_unsigned, int32_t* value, size_t max_octets);
int exi_basetypes_convert_64_from_signed(const exi_signed_t* exi_unsigned, int64_t* value);
int exi_basetypes_convert_bytes_from_unsigned(const exi_unsigned_t* exi_unsigned, uint8_t* data, size_t* data_len, size_t data_size);
int exi_basetypes_convert_bytes_to_unsigned(exi_unsigned_t* exi_unsigned, const uint8_t* data, size_t data_len);
#ifdef __cplusplus
}
#endif
#endif /* EXI_BASETYPES_H */

View File

@@ -0,0 +1,131 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file exi_basetypes_decoder.h
* @brief Description goes here
*
**/
#ifndef EXI_BASETYPES_DECODER_H
#define EXI_BASETYPES_DECODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include <stdint.h>
#include "exi_basetypes.h"
#include "exi_bitstream.h"
/**
* \brief decoder for type bool
*
* reads a boolean value from the bitstream and decodes it into value.
*
* \param stream EXI bitstream
* \param value decoded value
* \return NO_ERROR or error code
*
*/
int exi_basetypes_decoder_bool(exi_bitstream_t* stream, int* value);
/**
* \brief decoder for type byte array
*
* reads a bytes from the bitstream and writes it to the array.
*
* \param stream EXI bitstream
* \param bytes_len length of the used bytes inside the array
* \param bytes pointer to the first byte of the array
* \param bytes_size size of the byte array
* \return NO_ERROR or error code
*
*/
int exi_basetypes_decoder_bytes(exi_bitstream_t* stream, size_t bytes_len, uint8_t* bytes, size_t bytes_size);
/**
* \brief decoder for n-bit unsigned integer
*
* reads n-bits from the bitstream end decodes it into an unsigned integer value.
*
* \param stream EXI bitstream
* \param bit_count number of bits to read from the stream
* \param value Value into which the bit_count bits are decoded
* \return NO_ERROR or error code
*
*/
int exi_basetypes_decoder_nbit_uint(exi_bitstream_t* stream, size_t bit_count, uint32_t* value);
/**
* \brief decoder for type unsigned integer
*
* this description applies to the specified functions, as only the value type is different.
* reads an unsigned integer value from the bitstream and decodes it into value.
* this decoder is for unsigned integer values with no restriction or having a value > 4096.
*
* \param stream EXI bitstream
* \param value decoded value
* \return NO_ERROR or error code
*
*/
int exi_basetypes_decoder_uint_8(exi_bitstream_t* stream, uint8_t* value);
int exi_basetypes_decoder_uint_16(exi_bitstream_t* stream, uint16_t* value);
int exi_basetypes_decoder_uint_32(exi_bitstream_t* stream, uint32_t* value);
int exi_basetypes_decoder_uint_64(exi_bitstream_t* stream, uint64_t* value);
int exi_basetypes_decoder_unsigned(exi_bitstream_t* stream, exi_unsigned_t* value);
/**
* \brief decoder for type integer
*
* this description applies to the specified functions, as only the value type is different.
* reads an integer value from the bitstream and decodes it into value.
* this decoder is for integer values with no restriction or having a value > 4096.
*
* \param stream EXI bitstream
* \param value decoded value
* \return NO_ERROR or error code
*
*/
int exi_basetypes_decoder_integer_8(exi_bitstream_t* stream, int8_t* value);
int exi_basetypes_decoder_integer_16(exi_bitstream_t* stream, int16_t* value);
int exi_basetypes_decoder_integer_32(exi_bitstream_t* stream, int32_t* value);
int exi_basetypes_decoder_integer_64(exi_bitstream_t* stream, int64_t* value);
int exi_basetypes_decoder_signed(exi_bitstream_t* stream, exi_signed_t* value);
/**
* \brief decoder for type character array
*
* reads a characters from the bitstream and writes it to the array.
*
* \param stream EXI bitstream
* \param bytes_len length of the used characters inside the array
* \param bytes pointer to the first character of the array
* \param bytes_size size of the character array
* \return NO_ERROR or error code
*
*/
int exi_basetypes_decoder_characters(exi_bitstream_t* stream, size_t characters_len, exi_character_t* characters, size_t characters_size);
#ifdef __cplusplus
}
#endif
#endif /* EXI_BASETYPES_DECODER_H */

View File

@@ -0,0 +1,131 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file exi_basetypes_encoder.h
* @brief Description goes here
*
**/
#ifndef EXI_BASETYPES_ENCODER_H
#define EXI_BASETYPES_ENCODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include <stdint.h>
#include "exi_basetypes.h"
#include "exi_bitstream.h"
/**
* \brief encoder for type bool
*
* encodes a boolean value and writes it to the bitstream.
*
* \param stream EXI bitstream
* \param value value to encode
* \return NO_ERROR or error code
*
*/
int exi_basetypes_encoder_bool(exi_bitstream_t* stream, int value);
/**
* \brief encoder for type byte array
*
* encodes a byte array and writes it to the bitstream.
*
* \param stream EXI bitstream
* \param bytes_len length of the used bytes inside the array
* \param bytes pointer to the first byte of the array
* \param bytes_size size of the byte array
* \return NO_ERROR or error code
*
*/
int exi_basetypes_encoder_bytes(exi_bitstream_t* stream, size_t bytes_len, const uint8_t* bytes, size_t bytes_size);
/**
* \brief encoder for n-bit unsigned integer
*
* encodes a n-bit unsigned value and writes it to the bitstream.
*
* \param stream EXI bitstream
* \param bit_count number of bit representing the value
* \param value Value from which the bit_count least significant bits are to be encoded
* \return NO_ERROR or error code
*
*/
int exi_basetypes_encoder_nbit_uint(exi_bitstream_t* stream, size_t bit_count, uint32_t value);
/**
* \brief encoder for type unsigned integer
*
* this description applies to the specified functions, as only the value type is different.
* encodes an unsigned integer value and writes it to the bitstream.
* this encoder is for uint values with no restriction or having a value < 4096.
*
* \param stream EXI bitstream
* \param value value to encode
* \return NO_ERROR or error code
*
*/
int exi_basetypes_encoder_uint_8(exi_bitstream_t* stream, uint8_t value);
int exi_basetypes_encoder_uint_16(exi_bitstream_t* stream, uint16_t value);
int exi_basetypes_encoder_uint_32(exi_bitstream_t* stream, uint32_t value);
int exi_basetypes_encoder_uint_64(exi_bitstream_t* stream, uint64_t value);
int exi_basetypes_encoder_unsigned(exi_bitstream_t* stream, const exi_unsigned_t* value);
/**
* \brief encoder for type integer
*
* this description applies to the specified functions, as only the value type is different.
* encodes an integer value and writes it to the bitstream.
* this encoder is for int values with no restriction or having a value < 4096.
*
* \param stream EXI bitstream
* \param value value to encode
* \return NO_ERROR or error code
*
*/
int exi_basetypes_encoder_integer_8(exi_bitstream_t* stream, int8_t value);
int exi_basetypes_encoder_integer_16(exi_bitstream_t* stream, int16_t value);
int exi_basetypes_encoder_integer_32(exi_bitstream_t* stream, int32_t value);
int exi_basetypes_encoder_integer_64(exi_bitstream_t* stream, int64_t value);
int exi_basetypes_encoder_signed(exi_bitstream_t* stream, const exi_signed_t* value);
/**
* \brief encoder for type exi_character array
*
* encodes an exi_character (char) array and writes it to the bitstream.
*
* \param stream EXI bitstream
* \param bytes_len length of the used characters inside the array
* \param bytes pointer to the first character of the array
* \param bytes_size size of the character array
* \return NO_ERROR or error code
*
*/
int exi_basetypes_encoder_characters(exi_bitstream_t* stream, size_t characters_len, const exi_character_t* characters, size_t characters_size);
#ifdef __cplusplus
}
#endif
#endif /* EXI_BASETYPES_ENCODER_H */

View File

@@ -0,0 +1,151 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file exi_bitstream.h
* @brief Description goes here
*
**/
#ifndef EXI_BITSTREAM_H
#define EXI_BITSTREAM_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#include <stdint.h>
#define EXI_BITSTREAM_MAX_BIT_COUNT 8
typedef void (*exi_status_callback)(int message_id, int status_code, int value_1, int value_2);
typedef struct exi_bitstream {
/* byte array size and data */
uint8_t* data;
size_t data_size;
/* byte array current byte and bit position in array */
uint8_t bit_count;
size_t byte_pos;
/* flags for reset and length function */
uint8_t _init_called;
size_t _flag_byte_pos;
/* Pointer to callback for reporting errors or logging if assigned */
exi_status_callback status_callback;
} exi_bitstream_t;
/**
* \brief bitstream init
*
* Initializes the exi bitstream with the given parameters.
*
* \param stream input or output stream
* \param data pointer to EXI data
* \param data_size size of EXI data
* \param data_offset start of payload inside EXI data
* \param status_callback pointer to callback function for error reporting or logging
*
*/
void exi_bitstream_init(exi_bitstream_t* stream, uint8_t* data, size_t data_size, size_t data_offset, exi_status_callback status_callback);
/**
* \brief bitstream reset
*
* Resets the exi bitstream to the parameters from the last init state.
*
* \param stream input or output stream
*
*/
void exi_bitstream_reset(exi_bitstream_t* stream);
/**
* \brief bitstream get length
*
* Returns the length of the stream.
*
* \param stream output Stream
* \return length of stream
*
*/
size_t exi_bitstream_get_length(const exi_bitstream_t* stream);
/**
* \brief bitstream write bits
*
* Write the bit_count bits of value to the stream.
*
* \param stream output Stream
* \param bit_count number of bits to write
* \param value value to write
* \return NO_ERROR or error code
*
*/
int exi_bitstream_write_bits(exi_bitstream_t* stream, size_t bit_count, uint32_t value);
/**
* \brief bitstream write octet
*
* write an octet to the stream.
*
* \param stream output Stream
* \param value write octet value
* \return NO_ERROR or error code
*
*/
int exi_bitstream_write_octet(exi_bitstream_t* stream, uint8_t value);
/**
* \brief bitstream read bits
*
* read the bit_count bits from the stream and return the result.
*
* \param stream input Stream
* \param bit_count number of bits to read
* \param value read value
* \return NO_ERROR or error code
*
*/
int exi_bitstream_read_bits(exi_bitstream_t* stream, size_t bit_count, uint32_t* value);
/**
* \brief bitstream read octet
*
* read an octet from the stream and return the result.
*
* \param stream input Stream
* \param value read octet value
* \return NO_ERROR or error code
*
*/
int exi_bitstream_read_octet(exi_bitstream_t* stream, uint8_t* value);
#ifdef __cplusplus
}
#endif
#endif /* EXI_BITSTREAM_H */

View File

@@ -0,0 +1,92 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file exi_error_codes.h
* @brief Description goes here
*
**/
#ifndef EXI_ERROR_CODES_H
#define EXI_ERROR_CODES_H
#ifdef __cplusplus
extern "C" {
#endif
#define EXI_ERROR__NO_ERROR 0
// stream processing -1 to -19
#define EXI_ERROR__BITSTREAM_OVERFLOW -1
// stream header -20 to -29
#define EXI_ERROR__HEADER_COOKIE_NOT_SUPPORTED -20
#define EXI_ERROR__HEADER_OPTIONS_NOT_SUPPORTED -21
#define EXI_ERROR__HEADER_INCORRECT -22
// stream read -30 to -39
#define EXI_ERROR__SUPPORTED_MAX_OCTETS_OVERRUN -30
#define EXI_ERROR__OCTET_COUNT_LARGER_THAN_TYPE_SUPPORTS -31
// stream write -40 to -49
// decoder -50 to -69
#define EXI_ERROR__UNKNOWN_EVENT_FOR_DECODING -50
#define EXI_ERROR__DECODER_NOT_IMPLEMENTED -69
// encoder -70 to -89
#define EXI_ERROR__UNKNOWN_EVENT_FOR_ENCODING -70
#define EXI_ERROR__ENCODER_NOT_IMPLEMENTED -89
// common errors -100 to -129
#define EXI_ERROR__BIT_COUNT_LARGER_THAN_TYPE_SIZE -100
#define EXI_ERROR__BYTE_COUNT_LARGER_THAN_TYPE_SIZE -101
#define EXI_ERROR__ARRAY_OUT_OF_BOUNDS -110
#define EXI_ERROR__CHARACTER_BUFFER_TOO_SMALL -111
#define EXI_ERROR__BYTE_BUFFER_TOO_SMALL -112
#define EXI_ERROR__ENCODED_INTEGER_SIZE_LARGER_THAN_DESTINATION -113
// grammar errors -130 to -149
#define EXI_ERROR__UNKNOWN_GRAMMAR_ID -130
// event errors -150 to -169
#define EXI_ERROR__UNKNOWN_EVENT_CODE -150
#define EXI_ERROR__UNSUPPORTED_SUB_EVENT -151
// document errors -170 to -199
#define EXI_ERROR__DEVIANTS_NOT_SUPPORTED -170
// datatype errors -200 to -229
#define EXI_ERROR__STRINGVALUES_NOT_SUPPORTED -200
#define EXI_ERROR__UNSUPPORTED_INTEGER_VALUE_TYPE -210
#define EXI_ERROR__UNSUPPORTED_DATETIME_TYPE -211
#define EXI_ERROR__UNSUPPORTED_CHARACTER_VALUE -212
// fragment errors -230 to -259
#define EXI_ERROR__INCORRECT_END_FRAGMENT_VALUE -230
// internal errors
#define EXI_ERROR__NOT_IMPLEMENTED_YET -299
#ifdef __cplusplus
}
#endif
#endif /* EXI_ERROR_CODES_H */

View File

@@ -0,0 +1,72 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file exi_header.h
* @brief Description goes here
*
**/
#ifndef EXI_HEADER_H
#define EXI_HEADER_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include "exi_bitstream.h"
#define EXI_SIMPLE_HEADER_BIT_SIZE 8
#define EXI_SIMPLE_HEADER_VALUE 0x80
/**
* \brief Writes a simple EXI header (0x80)
*
* \param stream EXI bitstream
* \return NO_ERROR or an error code
*
*/
int exi_header_write(exi_bitstream_t* stream);
/**
* \brief Reads the simple EXI header
*
* \param stream EXI bitstream
* \param header EXI simple header value from the stream
* \return NO_ERROR or an error code
*
*/
int exi_header_read(exi_bitstream_t* stream, uint32_t* header);
/**
* \brief Reads and checks the simple EXI header
*
* \param stream EXI bitstream
* \return NO_ERROR or an error code
*
*/
int exi_header_read_and_check(exi_bitstream_t* stream);
#ifdef __cplusplus
}
#endif
#endif /* EXI_HEADER_H */

View File

@@ -0,0 +1,134 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file exi_types_decoder.h
* @brief Description goes here
*
**/
#ifndef EXI_TYPES_DECODER_H
#define EXI_TYPES_DECODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "exi_basetypes.h"
#include "exi_bitstream.h"
/**
* \brief Decode hexBinary
*
* \param stream EXI bitstream
* \param value_len uint16_t (out) used length of decoded value
* \param value_buffer byte buffer (out) decoded value
* \param value_buffer_size size of the buffer
* \return Error-Code <> 0, if no error 0
*
*/
int decode_exi_type_hex_binary(exi_bitstream_t* stream, uint16_t* value_len, uint8_t* value_buffer, size_t value_buffer_size);
/**
* \brief Decode 8-bit integer
*
* \param stream EXI bitstream
* \param value int8_t (out) decoded value
* \return Error-Code <> 0, if no error 0
*
*/
int decode_exi_type_integer8(exi_bitstream_t* stream, int8_t* value);
/**
* \brief Decode 16-bit integer
*
* \param stream EXI bitstream
* \param value int16_t (out) decoded value
* \return Error-Code <> 0, if no error 0
*
*/
int decode_exi_type_integer16(exi_bitstream_t* stream, int16_t* value);
/**
* \brief Decode 32-bit integer
*
* \param stream EXI bitstream
* \param value int32_t (out) decoded value
* \return Error-Code <> 0, if no error 0
*
*/
int decode_exi_type_integer32(exi_bitstream_t* stream, int32_t* value);
/**
* \brief Decode 64-bit integer
*
* \param stream EXI bitstream
* \param value int64_t (out) decoded value
* \return Error-Code <> 0, if no error 0
*
*/
int decode_exi_type_integer64(exi_bitstream_t* stream, int64_t* value);
/**
* \brief Decode 8-bit unsigned integer
*
* \param stream EXI bitstream
* \param value uint8_t (out) decoded value
* \return Error-Code <> 0, if no error 0
*
*/
int decode_exi_type_uint8(exi_bitstream_t* stream, uint8_t* value);
/**
* \brief Decode 16-bit unsigned integer
*
* \param stream EXI bitstream
* \param value uint16_t (out) decoded value
* \return Error-Code <> 0, if no error 0
*
*/
int decode_exi_type_uint16(exi_bitstream_t* stream, uint16_t* value);
/**
* \brief Decode 32-bit unsigned integer
*
* \param stream EXI bitstream
* \param value uint32_t (out) decoded value
* \return Error-Code <> 0, if no error 0
*
*/
int decode_exi_type_uint32(exi_bitstream_t* stream, uint32_t* value);
/**
* \brief Decode 64-bit unsigned integer
*
* \param stream EXI bitstream
* \param value uint64_t (out) decoded value
* \return Error-Code <> 0, if no error 0
*
*/
int decode_exi_type_uint64(exi_bitstream_t* stream, uint64_t* value);
#ifdef __cplusplus
}
#endif
#endif /* EXI_TYPES_DECODER_H */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,42 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file din_msgDefDecoder.h
* @brief Description goes here
*
**/
#ifndef DIN_MSG_DEF_DECODER_H
#define DIN_MSG_DEF_DECODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cbv2g/common/exi_bitstream.h"
#include "cbv2g/din/din_msgDefDatatypes.h"
// main function for decoding
int decode_din_exiDocument(exi_bitstream_t* stream, struct din_exiDocument* exiDoc);
#ifdef __cplusplus
}
#endif
#endif /* DIN_MSG_DEF_DECODER_H */

View File

@@ -0,0 +1,42 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file din_msgDefEncoder.h
* @brief Description goes here
*
**/
#ifndef DIN_MSG_DEF_ENCODER_H
#define DIN_MSG_DEF_ENCODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cbv2g/common/exi_bitstream.h"
#include "cbv2g/din/din_msgDefDatatypes.h"
// main function for encoding
int encode_din_exiDocument(exi_bitstream_t* stream, struct din_exiDocument* exiDoc);
#ifdef __cplusplus
}
#endif
#endif /* DIN_MSG_DEF_ENCODER_H */

View File

@@ -0,0 +1,92 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file exi_v2gtp.h
* @brief Description goes here
*
**/
#ifndef EXI_V2GTP_H
#define EXI_V2GTP_H
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
/*====================================================================*
* error defines;
*--------------------------------------------------------------------*/
#define V2GTP_ERROR__NO_ERROR 0
#define V2GTP_ERROR__VERSION_DOES_NOT_MATCH -1
#define V2GTP_ERROR__PAYLOAD_ID_DOES_NOT_MATCH -2
/*====================================================================*
* global defines;
*--------------------------------------------------------------------*/
#define V2GTP_HEADER_LENGTH 8u
#define V2GTP20_SAP_PAYLOAD_ID 0x8001u
#define V2GTP20_MAINSTREAM_PAYLOAD_ID 0x8002u
#define V2GTP20_AC_MAINSTREAM_PAYLOAD_ID 0x8003u
#define V2GTP20_DC_MAINSTREAM_PAYLOAD_ID 0x8004u
#define V2GTP20_ACDP_MAINSTREAM_PAYLOAD_ID 0x8005u
#define V2GTP20_WPT_MAINSTREAM_PAYLOAD_ID 0x8006u
#define V2GTP20_SCHEDULE_RENEGOTIATION_PAYLOAD_ID 0x8101u
#define V2GTP20_METERING_CONFIRMATION_PAYLOAD_ID 0x8102u
#define V2GTP20_ACDP_SYSTEM_STATUS_PAYLOAD_ID 0x8103u
#define V2GTP20_PARKING_STATUS_PAYLOAD_ID 0x8104u
#define V2GTP20_SDP_REQUEST_PAYLOAD_ID 0x9000u
#define V2GTP20_SDP_RESPONSE_PAYLOAD_ID 0x9001u
#define V2GTP20_SDP_REQUEST_WIRELESS_PAYLOAD_ID 0x9002u
#define V2GTP20_SDP_RESPONSE_WIRELESS_PAYLOAD_ID 0x9003u
/*====================================================================*
* interface
*--------------------------------------------------------------------*/
/**
* @brief Writes the V2GTP Header and the given payload length into the data stream
* 2nd function is the -20 version with different payload ids.
*
* @retval void
*
*/
void V2GTP_WriteHeader(uint8_t* stream_data, uint32_t stream_payload_length);
void V2GTP20_WriteHeader(uint8_t* stream_data, uint32_t stream_payload_length, uint16_t v2gtp20_payload_id);
/**
* @brief Verifies the V2GTP Header and returns the payload length from the data stream
* 2nd function is the -20 version with different payload ids.
*
* @retval on success V2GTP_ERROR__NO_ERROR otherwise an error code
*
*/
int V2GTP_ReadHeader(const uint8_t* stream_data, uint32_t* stream_payload_length);
int V2GTP20_ReadHeader(const uint8_t* stream_data, uint32_t* stream_payload_length, uint16_t v2gtp20_payload_id);
#ifdef __cplusplus
}
#endif
#endif /* EXI_V2GTP_H */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,46 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file iso2_msgDefDecoder.h
* @brief Description goes here
*
**/
#ifndef ISO2_MSG_DEF_DECODER_H
#define ISO2_MSG_DEF_DECODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cbv2g/common/exi_bitstream.h"
#include "iso2_msgDefDatatypes.h"
// main function for decoding
int decode_iso2_exiDocument(exi_bitstream_t* stream, struct iso2_exiDocument* exiDoc);
// decoding function for fragment
int decode_iso2_exiFragment(exi_bitstream_t* stream, struct iso2_exiFragment* exiFrag);
// decoding function for xmldsig fragment
int decode_iso2_xmldsigFragment(exi_bitstream_t* stream, struct iso2_xmldsigFragment* xmldsigFrag);
#ifdef __cplusplus
}
#endif
#endif /* ISO2_MSG_DEF_DECODER_H */

View File

@@ -0,0 +1,46 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file iso2_msgDefEncoder.h
* @brief Description goes here
*
**/
#ifndef ISO2_MSG_DEF_ENCODER_H
#define ISO2_MSG_DEF_ENCODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cbv2g/common/exi_bitstream.h"
#include "iso2_msgDefDatatypes.h"
// main function for encoding
int encode_iso2_exiDocument(exi_bitstream_t* stream, struct iso2_exiDocument* exiDoc);
// encoding function for fragment
int encode_iso2_exiFragment(exi_bitstream_t* stream, struct iso2_exiFragment* exiFrag);
// encoding function for xmldsig fragment
int encode_iso2_xmldsigFragment(exi_bitstream_t* stream, struct iso2_xmldsigFragment* xmldsigFrag);
#ifdef __cplusplus
}
#endif
#endif /* ISO2_MSG_DEF_ENCODER_H */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,42 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file iso20_ACDP_Decoder.h
* @brief Description goes here
*
**/
#ifndef ISO20_ACDP_DECODER_H
#define ISO20_ACDP_DECODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cbv2g/common/exi_bitstream.h"
#include "iso20_ACDP_Datatypes.h"
// main function for decoding
int decode_iso20_acdp_exiDocument(exi_bitstream_t* stream, struct iso20_acdp_exiDocument* exiDoc);
#ifdef __cplusplus
}
#endif
#endif /* ISO20_ACDP_DECODER_H */

View File

@@ -0,0 +1,42 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file iso20_ACDP_Encoder.h
* @brief Description goes here
*
**/
#ifndef ISO20_ACDP_ENCODER_H
#define ISO20_ACDP_ENCODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cbv2g/common/exi_bitstream.h"
#include "iso20_ACDP_Datatypes.h"
// main function for encoding
int encode_iso20_acdp_exiDocument(exi_bitstream_t* stream, struct iso20_acdp_exiDocument* exiDoc);
#ifdef __cplusplus
}
#endif
#endif /* ISO20_ACDP_ENCODER_H */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,46 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file iso20_AC_Decoder.h
* @brief Description goes here
*
**/
#ifndef ISO20_AC_DECODER_H
#define ISO20_AC_DECODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cbv2g/common/exi_bitstream.h"
#include "iso20_AC_Datatypes.h"
// main function for decoding
int decode_iso20_ac_exiDocument(exi_bitstream_t* stream, struct iso20_ac_exiDocument* exiDoc);
// decoding function for fragment
int decode_iso20_ac_exiFragment(exi_bitstream_t* stream, struct iso20_ac_exiFragment* exiFrag);
// decoding function for xmldsig fragment
int decode_iso20_ac_xmldsigFragment(exi_bitstream_t* stream, struct iso20_ac_xmldsigFragment* xmldsigFrag);
#ifdef __cplusplus
}
#endif
#endif /* ISO20_AC_DECODER_H */

View File

@@ -0,0 +1,46 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file iso20_AC_Encoder.h
* @brief Description goes here
*
**/
#ifndef ISO20_AC_ENCODER_H
#define ISO20_AC_ENCODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cbv2g/common/exi_bitstream.h"
#include "iso20_AC_Datatypes.h"
// main function for encoding
int encode_iso20_ac_exiDocument(exi_bitstream_t* stream, struct iso20_ac_exiDocument* exiDoc);
// encoding function for fragment
int encode_iso20_ac_exiFragment(exi_bitstream_t* stream, struct iso20_ac_exiFragment* exiFrag);
// encoding function for xmldsig fragment
int encode_iso20_ac_xmldsigFragment(exi_bitstream_t* stream, struct iso20_ac_xmldsigFragment* xmldsigFrag);
#ifdef __cplusplus
}
#endif
#endif /* ISO20_AC_ENCODER_H */

View File

@@ -0,0 +1,46 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file iso20_CommonMessages_Decoder.h
* @brief Description goes here
*
**/
#ifndef ISO20_COMMON_MESSAGES_DECODER_H
#define ISO20_COMMON_MESSAGES_DECODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cbv2g/common/exi_bitstream.h"
#include "iso20_CommonMessages_Datatypes.h"
// main function for decoding
int decode_iso20_exiDocument(exi_bitstream_t* stream, struct iso20_exiDocument* exiDoc);
// decoding function for fragment
int decode_iso20_exiFragment(exi_bitstream_t* stream, struct iso20_exiFragment* exiFrag);
// decoding function for xmldsig fragment
int decode_iso20_xmldsigFragment(exi_bitstream_t* stream, struct iso20_xmldsigFragment* xmldsigFrag);
#ifdef __cplusplus
}
#endif
#endif /* ISO20_COMMON_MESSAGES_DECODER_H */

View File

@@ -0,0 +1,46 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file iso20_CommonMessages_Encoder.h
* @brief Description goes here
*
**/
#ifndef ISO20_COMMON_MESSAGES_ENCODER_H
#define ISO20_COMMON_MESSAGES_ENCODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cbv2g/common/exi_bitstream.h"
#include "iso20_CommonMessages_Datatypes.h"
// main function for encoding
int encode_iso20_exiDocument(exi_bitstream_t* stream, struct iso20_exiDocument* exiDoc);
// encoding function for fragment
int encode_iso20_exiFragment(exi_bitstream_t* stream, struct iso20_exiFragment* exiFrag);
// encoding function for xmldsig fragment
int encode_iso20_xmldsigFragment(exi_bitstream_t* stream, struct iso20_xmldsigFragment* xmldsigFrag);
#ifdef __cplusplus
}
#endif
#endif /* ISO20_COMMON_MESSAGES_ENCODER_H */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,46 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file iso20_DC_Decoder.h
* @brief Description goes here
*
**/
#ifndef ISO20_DC_DECODER_H
#define ISO20_DC_DECODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cbv2g/common/exi_bitstream.h"
#include "iso20_DC_Datatypes.h"
// main function for decoding
int decode_iso20_dc_exiDocument(exi_bitstream_t* stream, struct iso20_dc_exiDocument* exiDoc);
// decoding function for fragment
int decode_iso20_dc_exiFragment(exi_bitstream_t* stream, struct iso20_dc_exiFragment* exiFrag);
// decoding function for xmldsig fragment
int decode_iso20_dc_xmldsigFragment(exi_bitstream_t* stream, struct iso20_dc_xmldsigFragment* xmldsigFrag);
#ifdef __cplusplus
}
#endif
#endif /* ISO20_DC_DECODER_H */

View File

@@ -0,0 +1,46 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file iso20_DC_Encoder.h
* @brief Description goes here
*
**/
#ifndef ISO20_DC_ENCODER_H
#define ISO20_DC_ENCODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cbv2g/common/exi_bitstream.h"
#include "iso20_DC_Datatypes.h"
// main function for encoding
int encode_iso20_dc_exiDocument(exi_bitstream_t* stream, struct iso20_dc_exiDocument* exiDoc);
// encoding function for fragment
int encode_iso20_dc_exiFragment(exi_bitstream_t* stream, struct iso20_dc_exiFragment* exiFrag);
// encoding function for xmldsig fragment
int encode_iso20_dc_xmldsigFragment(exi_bitstream_t* stream, struct iso20_dc_xmldsigFragment* xmldsigFrag);
#ifdef __cplusplus
}
#endif
#endif /* ISO20_DC_ENCODER_H */

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,42 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file iso20_WPT_Decoder.h
* @brief Description goes here
*
**/
#ifndef ISO20_WPT_DECODER_H
#define ISO20_WPT_DECODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cbv2g/common/exi_bitstream.h"
#include "iso20_WPT_Datatypes.h"
// main function for decoding
int decode_iso20_wpt_exiDocument(exi_bitstream_t* stream, struct iso20_wpt_exiDocument* exiDoc);
#ifdef __cplusplus
}
#endif
#endif /* ISO20_WPT_DECODER_H */

View File

@@ -0,0 +1,42 @@
/* SPDX-License-Identifier: Apache-2.0 */
/*
* Copyright (C) 2022 - 2023 chargebyte GmbH
* Copyright (C) 2022 - 2023 Contributors to EVerest
*/
/*****************************************************
*
* @author
* @version
*
* The Code is generated! Changes may be overwritten.
*
*****************************************************/
/**
* @file iso20_WPT_Encoder.h
* @brief Description goes here
*
**/
#ifndef ISO20_WPT_ENCODER_H
#define ISO20_WPT_ENCODER_H
#ifdef __cplusplus
extern "C" {
#endif
#include "cbv2g/common/exi_bitstream.h"
#include "iso20_WPT_Datatypes.h"
// main function for encoding
int encode_iso20_wpt_exiDocument(exi_bitstream_t* stream, struct iso20_wpt_exiDocument* exiDoc);
#ifdef __cplusplus
}
#endif
#endif /* ISO20_WPT_ENCODER_H */