Diag-Client-Lib
|
Immutable class to store received doip message. More...
#include <doip_message.h>
Public Types | |
enum class | MessageType : std::uint8_t { kUdp , kTcp } |
Definition of message type. More... | |
enum class | RxSocketType : std::uint8_t { kBroadcast , kUnicast } |
Definition of socket type from where the request was received. More... | |
using | IpAddressType = std::string_view |
Type alias of IP address type. More... | |
Public Member Functions | |
DoipMessage (MessageType message_type, IpAddressType host_ip_address, std::uint16_t host_port_number, core_type::Span< std::uint8_t const > payload) | |
Constructs an instance of DoipMessage. More... | |
DoipMessage (const DoipMessage &other)=default | |
Default copy assignment, copy constructor, move assignment and move constructor. More... | |
DoipMessage (DoipMessage &&other) noexcept=default | |
DoipMessage & | operator= (const DoipMessage &other)=default |
DoipMessage & | operator= (DoipMessage &&other) noexcept=default |
~DoipMessage () noexcept=default | |
Destructs an instance of DoipMessage. More... | |
IpAddressType | GetHostIpAddress () const |
Get the host ip address. More... | |
std::uint16_t | GetHostPortNumber () const |
Get the host port number. More... | |
std::uint8_t | GetProtocolVersion () const |
Get the protocol version. More... | |
std::uint8_t | GetInverseProtocolVersion () const |
Get the inverse protocol version. More... | |
std::uint16_t | GetPayloadType () const |
Get the payload type. More... | |
std::uint16_t | GetServerAddress () const |
Get the payload type. More... | |
std::uint16_t | GetClientAddress () const |
Get the payload type. More... | |
std::uint32_t | GetPayloadLength () const |
Get the payload length. More... | |
core_type::Span< std::uint8_t const > | GetPayload () const |
Get the payload. More... | |
Private Attributes | |
std::string | host_ip_address_ |
Store remote ip address. More... | |
std::uint16_t | host_port_number_ |
Store remote port number. More... | |
std::uint8_t | protocol_version_ |
Store protocol version. More... | |
std::uint8_t | protocol_version_inv_ |
Store protocol inverse version. More... | |
std::uint16_t | server_address_ |
Store server address. More... | |
std::uint16_t | client_address_ |
Store server address. More... | |
std::uint16_t | payload_type_ |
Store payload type. More... | |
std::uint32_t | payload_length_ |
Store payload length. More... | |
core_type::Span< std::uint8_t const > | payload_ |
Store payload. More... | |
Immutable class to store received doip message.
Definition at line 21 of file doip_message.h.
using doip_client::DoipMessage::IpAddressType = std::string_view |
Type alias of IP address type.
Definition at line 36 of file doip_message.h.
|
strong |
|
strong |
Definition of socket type from where the request was received.
Enumerator | |
---|---|
kBroadcast | |
kUnicast |
Definition at line 31 of file doip_message.h.
doip_client::DoipMessage::DoipMessage | ( | MessageType | message_type, |
DoipMessage::IpAddressType | host_ip_address, | ||
std::uint16_t | host_port_number, | ||
core_type::Span< std::uint8_t const > | payload | ||
) |
Constructs an instance of DoipMessage.
[in] | message_type | The type of message constructed |
[in] | host_ip_address | The host ip address |
[in] | host_port_number | The host port number |
[in] | payload | The received data payload |
Definition at line 30 of file doip_message.cpp.
References client_address_, doip_client::anonymous_namespace{doip_message.cpp}::ConvertToAddr(), kTcp, payload_, server_address_, and core_type::Span< T, Extent >::size().
|
default |
Default copy assignment, copy constructor, move assignment and move constructor.
|
defaultnoexcept |
|
defaultnoexcept |
Destructs an instance of DoipMessage.
|
inline |
Get the payload type.
Definition at line 106 of file doip_message.h.
References client_address_.
|
inline |
Get the host ip address.
Definition at line 70 of file doip_message.h.
References host_ip_address_.
|
inline |
Get the host port number.
Definition at line 76 of file doip_message.h.
References host_port_number_.
|
inline |
Get the inverse protocol version.
Definition at line 88 of file doip_message.h.
References protocol_version_inv_.
|
inline |
Get the payload.
Definition at line 118 of file doip_message.h.
References payload_.
|
inline |
Get the payload length.
Definition at line 112 of file doip_message.h.
References payload_length_.
|
inline |
Get the payload type.
Definition at line 94 of file doip_message.h.
References payload_type_.
Referenced by doip_client::channel::udp_channel::DoipUdpChannelHandler::ProcessDoIPPayload().
|
inline |
Get the protocol version.
Definition at line 82 of file doip_message.h.
References protocol_version_.
|
inline |
Get the payload type.
Definition at line 100 of file doip_message.h.
References server_address_.
|
default |
|
defaultnoexcept |
|
private |
Store server address.
Definition at line 149 of file doip_message.h.
Referenced by DoipMessage(), and GetClientAddress().
|
private |
Store remote ip address.
Definition at line 124 of file doip_message.h.
Referenced by GetHostIpAddress().
|
private |
Store remote port number.
Definition at line 129 of file doip_message.h.
Referenced by GetHostPortNumber().
|
private |
Store payload.
Definition at line 164 of file doip_message.h.
Referenced by DoipMessage(), and GetPayload().
|
private |
Store payload length.
Definition at line 159 of file doip_message.h.
Referenced by GetPayloadLength().
|
private |
|
private |
Store protocol version.
Definition at line 134 of file doip_message.h.
Referenced by GetProtocolVersion().
|
private |
Store protocol inverse version.
Definition at line 139 of file doip_message.h.
Referenced by GetInverseProtocolVersion().
|
private |
Store server address.
Definition at line 144 of file doip_message.h.
Referenced by DoipMessage(), and GetServerAddress().