57 MT_REQUEST_NO_RETURN = 0x01,
59 MT_NOTIFICATION = 0x02,
66 MT_REQUEST_ACK = 0x40,
67 MT_REQUEST_NO_RETURN_ACK = 0x41,
68 MT_NOTIFICATION_ACK = 0x42,
69 MT_RESPONSE_ACK = 0xC0,
74 MT_TP_REQUEST_NO_RETURN = 0x21,
75 MT_TP_NOTIFICATION = 0x22,
76 MT_TP_RESPONSE0 = 0xA0,
89 E_UNKNOWN_SERVICE = 0x02,
90 E_UNKNOWN_METHOD = 0x03,
92 E_NOT_REACHABLE = 0x05,
94 E_WRONG_PROTOCOL_VERSION = 0x07,
95 E_WRONG_INTERFACE_VERSION = 0x08,
96 E_MALFORMED_MESSAGE = 0x09,
97 E_WRONG_MESSAGE_TYPE = 0x0a,
98 E_RESERVED_MIN = 0x0b,
112 #pragma warning(disable:4200)
114 #pragma pack(push, 1)
117 static_assert (
sizeof(
bool) == 1,
"Unsupported Compiler: sizeof(bool) is greater than 1");
118 uint16_t nVLANId = 0;
120 bool bIsIPv6 =
false;
121 uint16_t nMessageCount = 0;
122 std::array<uint8_t, 16> aSrcIP = { };
123 std::array<uint8_t, 16> aDstIP = { };
124 uint16_t nSrcPort = 0;
125 uint16_t nDstPort = 0;
126 uint32_t nMessageDataSize = 0;
127 uint8_t aMessageData[0] = { };
131 #pragma warning(default:4200)
138 lhs.nVLANId != rhs.nVLANId ||
139 lhs.bIsTCP != rhs.bIsTCP ||
140 lhs.bIsIPv6 != rhs.bIsIPv6 ||
141 lhs.nMessageCount != rhs.nMessageCount ||
142 lhs.aSrcIP != rhs.aSrcIP ||
143 lhs.aDstIP != rhs.aDstIP ||
144 lhs.nSrcPort != rhs.nSrcPort ||
145 lhs.nDstPort != rhs.nDstPort ||
146 lhs.nMessageDataSize != rhs.nMessageDataSize;
151 return !(lhs != rhs);
166 #pragma warning(disable:4200)
168 #pragma pack(push, 1)
177 uint16_t nServiceId = 0;
179 uint16_t nMethodId = 0;
181 uint32_t nLength = 0;
184 uint32_t GetHeaderId()
const {
185 const auto d =
reinterpret_cast<const uint8_t*
>(&nServiceId);
186 return (
static_cast<uint32_t
>(d[0]) << 24) + (
static_cast<uint32_t
>(d[1]) << 16) + (
static_cast<uint32_t
>(d[2]) << 8) +
static_cast<uint32_t
>(d[3]);
190 uint32_t GetLength()
const {
191 const auto d =
reinterpret_cast<const uint8_t*
>(&nLength);
192 return (
static_cast<uint32_t
>(d[0]) << 24) + (
static_cast<uint32_t
>(d[1]) << 16) + (
static_cast<uint32_t
>(d[2]) << 8) +
static_cast<uint32_t
>(d[3]);
202 static_assert (
sizeof(
bool) == 1,
"Unsupported Compiler: sizeof(bool) is greater than 1");
203 uint16_t nVLANId = 0;
205 bool bIsIPv6 =
false;
206 uint16_t nMessageCount = 0;
207 uint8_t aSrcIP[16] = { 0 };
208 uint8_t aDstIP[16] = { 0 };
209 uint16_t nSrcPort = 0;
210 uint16_t nDstPort = 0;
211 uint32_t nMessageDataSize = 0;
221 uint16_t nClientId = 0;
222 uint16_t nSessionId = 0;
223 uint8_t nProtocolVersion = 0;
224 uint8_t nInterfaceVersion = 0;
228 bool IsSegmented()
const {
229 return (
static_cast<uint8_t
>(eMessageType) &
static_cast<uint8_t
>(tMessageType::MT_TP_REQUEST)) != 0;
239 uint32_t nOffset = 0;
241 uint32_t GetOffset()
const {
242 const auto d =
reinterpret_cast<const uint8_t*
>(&nOffset);
243 return (
static_cast<uint32_t
>(d[0]) << 24) + (
static_cast<uint32_t
>(d[1]) << 16) + (
static_cast<uint32_t
>(d[2]) << 8) +
static_cast<uint32_t
>(d[3] & 0xf0);
245 bool HasMoreSegments()
const {
246 const auto d =
reinterpret_cast<const uint8_t*
>(&nOffset);
247 return (d[3] & 0x01) != 0;
310 enum eCompuScaleType : uint8_t
324 const char* pStrElementName;
326 const char* pStrTypeName;
329 uint8_t nAlignment = 1;
334 uint8_t nLengthBytes;
339 uint32_t nNextSiblingOffset;
362 enum eTLVWireType : uint8_t
368 WT_COMPLEX_DEFAULT_LENGTH = 4,
369 WT_COMPLEX_1_BYTE_LENGTH = 5,
370 WT_COMPLEX_2_BYTE_LENGTH = 6,
371 WT_COMPLEX_4_BYTE_LENGTH = 7
375 enum eSerializationType : uint8_t
383 eSerializationType oType = ST_BASIC;
389 enum eBasicSignalType : uint8_t
399 eBasicSignalType nType;
405 bool bByteOrderMotorola;
410 size_t nCountCompuScales;
421 enum eSomeIpArrayType : uint8_t
434 eSomeIpArrayType nType;
448 bool bContainsOptionals;
471 uint64_t nLengthInBit;
474 uint64_t nUpdateBitPosition;
478 uint8_t _reserved[64];
480 static_assert(
sizeof(oDetail) ==
sizeof(uDetails::_reserved),
"tSomeIpSerializationInfo is incompatible with original hood::tSomeIpSerializationInfo");
481 static_assert(
alignof(
uDetails) == 1,
"tSomeIpSerializationInfo is incompatible with original hood::tSomeIpSerializationInfo");
489 enum eTransformationType : uint8_t
502 TT_SOME_IP_TRANSFORMER,
504 TT_SOME_IP_SERVICE_DISCOVERY
506 eTransformationType nTransformationType = TT_NONE;
510 uint16_t nHeaderBits = 0;
513 uint16_t nTrailingBits = 0;
516 uint32_t nAliasedMessageId;
521 uint8_t _reserved[64];
523 static_assert(
sizeof(oDetail) ==
sizeof(uDetails::_reserved),
"tSomeIpTransformation is incompatible with original hood::tSomeIpSerializationInfo");
524 static_assert(
alignof(
uDetails) == 1,
"tSomeIpTransformation is incompatible with original hood::tSomeIpSerializationInfo");
537 uint32_t nMessageId = 0;
539 const char* pstrName =
nullptr;
540 const char* pstrPath =
nullptr;
544 uint64_t nMessageSizeInBit = 0;
548 uint8_t nDefaultLengthBytes = 0;
552 size_t nTransformationChainLength = 0;
556 size_t nMemberCount = 0;
566 const char* pstrName =
nullptr;
567 const char* pstrPath =
nullptr;
584 uint8_t aIP[16] = { 0 };
597 uint32_t nConnectionId = 0;
606 size_t nSocketMessageInfoCount = 0;
615 uint32_t nChannelId = 0;
617 const char* pstrName =
nullptr;
618 const char* pstrPath =
nullptr;
619 uint16_t nVLANId = 0;
628 uint32_t nClusterId = 0;
630 const char* pstrName =
nullptr;
631 const char* pstrPath =
nullptr;
635 #pragma warning(default:4200)
642 lhs.nVLANId != rhs.nVLANId ||
643 lhs.bIsTCP != rhs.bIsTCP ||
644 lhs.bIsIPv6 != rhs.bIsIPv6 ||
645 lhs.nMessageCount != rhs.nMessageCount ||
646 lhs.aSrcIP != rhs.aSrcIP ||
647 lhs.aDstIP != rhs.aDstIP ||
648 lhs.nSrcPort != rhs.nSrcPort ||
649 lhs.nDstPort != rhs.nDstPort ||
650 lhs.nMessageDataSize != rhs.nMessageDataSize;
655 return !(lhs != rhs);
661 lhs.nClientId != rhs.nClientId ||
662 lhs.nSessionId != rhs.nSessionId ||
663 lhs.nProtocolVersion != rhs.nProtocolVersion ||
664 lhs.nInterfaceVersion != rhs.nInterfaceVersion ||
665 lhs.eMessageType != rhs.eMessageType ||
666 lhs.eReturnCode != rhs.eReturnCode;
671 return !(lhs != rhs);
696 using hood::operator!=;
698 using hood::operator==;
tReturnCode
Return codes as defined by the SOME/IP spec.
tMessageType
The message types as defined by the SOME/IP spec.
hood::tCompuScale tCompuScale
This struct represents one of a set of computation rules which map a raw value onto a physical value ...
hood::tSomeIpSessionHeader tSomeIpSessionHeader
This struct represents the first 8 payload bytes of a standard SOME/IP request.
hood::tSomeIpSampleHeader tSomeIpSampleHeader
This struct describes the SOME/IP sample header which is placed in the beginning of every SOME/IP sam...
hood::tSomeIpTpHeader tSomeIpTpHeader
This struct represents the next 4 payload bytes of a SOME/IP-TP message.
hood::tSomeIpSerializationInfo tSomeIpSerializationInfo
Serialization instructions covering SOME/IP standard.
hood::tDataConstraint tDataConstraint
This struct represents the limits of a value.
hood::tSomeIpMessageHeader tSomeIpMessageHeader
This struct represents the payload header of one SOME/IP (alike) message as defined by the SOME/IP sp...
hood::tSomeIpTransformation tSomeIpTransformation
Special transformations which must be applied to reconstruct nested payloads.
hood::tClusterInfo tClusterInfo
This struct contains the data of one cluster.
hood::tSomeIpMessageInfo tSomeIpMessageInfo
This struct describes the actual payload which is encapsulated in either ethernet frame or result of ...
This struct contains the data of one ethernet channel.
This struct contains the data of one cluster.
This struct represents one of a set of computation rules which map a raw value onto a physical value ...
This struct represents the limits of a value.
This struct contains the data of one ecu.
This struct describes the SOME/IP connection info.
This struct describes the actual payload which is encapsulated in either ethernet frame or result of ...
Serialization instructions covering SOME/IP standard.
This struct contains the message id and header id of one SOME/IP message.
Required types for tCompuScale and tDataConstraint vary based on tSomeIpSerializationInfo::tBasicType...