|
| 1 | +/* SPDX-License-Identifier: Apache-2.0 */ |
| 2 | +/* |
| 3 | + * Copyright (C) 2022 - 2023 chargebyte GmbH |
| 4 | + * Copyright (C) 2022 - 2023 Contributors to EVerest |
| 5 | + */ |
| 6 | + |
| 7 | +/***************************************************** |
| 8 | + * |
| 9 | + * @author |
| 10 | + * @version |
| 11 | + * |
| 12 | + * The Code is generated! Changes may be overwritten. |
| 13 | + * |
| 14 | + *****************************************************/ |
| 15 | + |
| 16 | +/** |
| 17 | + * @file appHand_Datatypes.h |
| 18 | + * @brief Description goes here |
| 19 | + * |
| 20 | + **/ |
| 21 | + |
| 22 | +#ifndef APP_HANDSHAKE_DATATYPES_H |
| 23 | +#define APP_HANDSHAKE_DATATYPES_H |
| 24 | + |
| 25 | +#ifdef __cplusplus |
| 26 | +extern "C" { |
| 27 | +#endif |
| 28 | + |
| 29 | + |
| 30 | +#include <stddef.h> |
| 31 | +#include <stdint.h> |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | +#define appHand_ProtocolNamespace_CHARACTER_SIZE 100 |
| 36 | +#define appHand_AppProtocolType_5_ARRAY_SIZE 5 |
| 37 | + |
| 38 | + |
| 39 | +// enum for function numbers |
| 40 | +typedef enum { |
| 41 | + appHand_supportedAppProtocolReq = 0, |
| 42 | + appHand_supportedAppProtocolRes = 1 |
| 43 | +} appHand_generatedFunctionNumbersType; |
| 44 | + |
| 45 | +// Element: definition=enum; name=ResponseCode; type={urn:iso:15118:2:2010:AppProtocol}responseCodeType; base type=string; content type=simple; |
| 46 | +// abstract=False; final=False; derivation=restriction; |
| 47 | +typedef enum { |
| 48 | + appHand_responseCodeType_OK_SuccessfulNegotiation = 0, |
| 49 | + appHand_responseCodeType_OK_SuccessfulNegotiationWithMinorDeviation = 1, |
| 50 | + appHand_responseCodeType_Failed_NoNegotiation = 2 |
| 51 | +} appHand_responseCodeType; |
| 52 | + |
| 53 | +// Element: definition=complex; name=AppProtocol; type={urn:iso:15118:2:2010:AppProtocol}AppProtocolType; base type=; content type=ELEMENT-ONLY; |
| 54 | +// abstract=False; final=False; |
| 55 | +// Particle: ProtocolNamespace, protocolNamespaceType (1, 1); VersionNumberMajor, unsignedInt (1, 1); VersionNumberMinor, unsignedInt (1, 1); SchemaID, idType (1, 1); Priority, priorityType (1, 1); |
| 56 | +struct appHand_AppProtocolType { |
| 57 | + // ProtocolNamespace, protocolNamespaceType (base: anyURI) |
| 58 | + struct { |
| 59 | + char characters[appHand_ProtocolNamespace_CHARACTER_SIZE]; |
| 60 | + uint16_t charactersLen; |
| 61 | + } ProtocolNamespace; |
| 62 | + // VersionNumberMajor, unsignedInt (base: unsignedLong) |
| 63 | + uint32_t VersionNumberMajor; |
| 64 | + // VersionNumberMinor, unsignedInt (base: unsignedLong) |
| 65 | + uint32_t VersionNumberMinor; |
| 66 | + // SchemaID, idType (base: unsignedByte) |
| 67 | + uint8_t SchemaID; |
| 68 | + // Priority, priorityType (base: unsignedByte) |
| 69 | + uint8_t Priority; |
| 70 | + |
| 71 | +}; |
| 72 | + |
| 73 | +// Element: definition=complex; name={urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolReq; type=AnonymousType; base type=; content type=ELEMENT-ONLY; |
| 74 | +// abstract=False; final=False; |
| 75 | +// Particle: AppProtocol, AppProtocolType (1, 5); |
| 76 | +struct appHand_supportedAppProtocolReq { |
| 77 | + // AppProtocol, AppProtocolType |
| 78 | + struct { |
| 79 | + struct appHand_AppProtocolType array[appHand_AppProtocolType_5_ARRAY_SIZE]; |
| 80 | + uint16_t arrayLen; |
| 81 | + } AppProtocol; |
| 82 | +}; |
| 83 | + |
| 84 | +// Element: definition=complex; name={urn:iso:15118:2:2010:AppProtocol}supportedAppProtocolRes; type=AnonymousType; base type=; content type=ELEMENT-ONLY; |
| 85 | +// abstract=False; final=False; |
| 86 | +// Particle: ResponseCode, responseCodeType (1, 1); SchemaID, idType (0, 1); |
| 87 | +struct appHand_supportedAppProtocolRes { |
| 88 | + // ResponseCode, responseCodeType (base: string) |
| 89 | + appHand_responseCodeType ResponseCode; |
| 90 | + // SchemaID, idType (base: unsignedByte) |
| 91 | + uint8_t SchemaID; |
| 92 | + unsigned int SchemaID_isUsed:1; |
| 93 | + |
| 94 | +}; |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | +// root elements of EXI doc |
| 99 | +struct appHand_exiDocument { |
| 100 | + union { |
| 101 | + struct appHand_supportedAppProtocolReq supportedAppProtocolReq; |
| 102 | + struct appHand_supportedAppProtocolRes supportedAppProtocolRes; |
| 103 | + }; |
| 104 | + unsigned int supportedAppProtocolReq_isUsed:1; |
| 105 | + unsigned int supportedAppProtocolRes_isUsed:1; |
| 106 | +}; |
| 107 | + |
| 108 | +// init for structs |
| 109 | +void init_appHand_exiDocument(struct appHand_exiDocument* exiDoc); |
| 110 | +void init_appHand_supportedAppProtocolReq(struct appHand_supportedAppProtocolReq* supportedAppProtocolReq); |
| 111 | +void init_appHand_supportedAppProtocolRes(struct appHand_supportedAppProtocolRes* supportedAppProtocolRes); |
| 112 | +void init_appHand_AppProtocolType(struct appHand_AppProtocolType* AppProtocolType); |
| 113 | + |
| 114 | + |
| 115 | +#ifdef __cplusplus |
| 116 | +} |
| 117 | +#endif |
| 118 | + |
| 119 | +#endif /* APP_HANDSHAKE_DATATYPES_H */ |
| 120 | + |
0 commit comments