Woman, Life, Freedom


DoIP Library
Diagnostics over Internet Protocol (DoIP) C++ library
DoipLib::EntityStatusResponse Class Reference

Diagnostic entity status response. More...

#include <entity_status_response.h>

Inheritance diagram for DoipLib::EntityStatusResponse:
DoipLib::Message

Public Member Functions

 EntityStatusResponse (uint8_t protocolVersion, NodeType entityType, uint8_t maxOpenSockets, uint8_t currentlyOpenSocket) noexcept
 Constructor without maximum data size field. More...
 
 EntityStatusResponse (uint8_t protocolVersion, NodeType entityType, uint8_t maxOpenSockets, uint8_t currentlyOpenSocket, uint32_t maxDataSize) noexcept
 Constructor using maximum data size field. More...
 
NodeType GetEntityType () const noexcept
 Get entity type. More...
 
uint8_t GetMaxOpenSockets () const noexcept
 Get maximum open sockets number. More...
 
uint8_t GetCurrentlyOpenSocket () const noexcept
 Get currently open socket number. More...
 
bool TryGetMaxDataSize (uint32_t &maxDataSize) const noexcept
 Try to get the maximum data size. More...
 
- Public Member Functions inherited from DoipLib::Message
void Serialize (std::vector< uint8_t > &serializedMessage) const
 Serialize DoIP message. More...
 
bool TryDeserialize (const std::vector< uint8_t > &serializedMessage, GenericNackType &nackCode)
 Try to deserialize DoIP message. More...
 

Protected Member Functions

void GetPayload (std::vector< uint8_t > &payload) const override
 Get message payload. More...
 
virtual bool TrySetPayload (const std::vector< uint8_t > &payload, uint32_t payloadLength) override
 Try to set message payload. More...
 
- Protected Member Functions inherited from DoipLib::Message
 Message (PayloadType payloadType) noexcept
 Constructor. More...
 
 Message (uint8_t protocolVersion, PayloadType payloadType) noexcept
 Constructor. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from DoipLib::Message
static bool TryExtractPayloadType (const std::vector< uint8_t > &serializedMessage, PayloadType &payloadType)
 Try to extract the payload type from the given serialized message. More...
 
- Static Protected Attributes inherited from DoipLib::Message
static const std::size_t cHeaderSize {8}
 DoIP message header size.
 

Detailed Description

Diagnostic entity status response.

Constructor & Destructor Documentation

◆ EntityStatusResponse() [1/2]

DoipLib::EntityStatusResponse::EntityStatusResponse ( uint8_t  protocolVersion,
NodeType  entityType,
uint8_t  maxOpenSockets,
uint8_t  currentlyOpenSocket 
)
noexcept

Constructor without maximum data size field.

Parameters
protocolVersionDoIP ISO protocol version
entityTypeDoIP entity type
maxOpenSocketsMaximum number of concurrent open TCP sockets at the entity
currentlyOpenSocketCurrent number of open TCP socket at the entity

◆ EntityStatusResponse() [2/2]

DoipLib::EntityStatusResponse::EntityStatusResponse ( uint8_t  protocolVersion,
NodeType  entityType,
uint8_t  maxOpenSockets,
uint8_t  currentlyOpenSocket,
uint32_t  maxDataSize 
)
noexcept

Constructor using maximum data size field.

Parameters
protocolVersionDoIP ISO protocol version
entityTypeDoIP entity type
maxOpenSocketsMaximum number of concurrent open TCP sockets at the entity
currentlyOpenSocketCurrent number of open TCP socket at the entity
maxDataSizeMaximum processable request data size

Member Function Documentation

◆ GetCurrentlyOpenSocket()

uint8_t DoipLib::EntityStatusResponse::GetCurrentlyOpenSocket ( ) const
noexcept

Get currently open socket number.

Returns
Current number of open TCP socket at the entity

◆ GetEntityType()

NodeType DoipLib::EntityStatusResponse::GetEntityType ( ) const
noexcept

Get entity type.

Returns
DoIP entity type

◆ GetMaxOpenSockets()

uint8_t DoipLib::EntityStatusResponse::GetMaxOpenSockets ( ) const
noexcept

Get maximum open sockets number.

Returns
Maximum number of concurrent open TCP sockets at the entity

◆ GetPayload()

void DoipLib::EntityStatusResponse::GetPayload ( std::vector< uint8_t > &  payload) const
overrideprotectedvirtual

Get message payload.

Parameters
[out]payloadPayload byte array

Implements DoipLib::Message.

◆ TryGetMaxDataSize()

bool DoipLib::EntityStatusResponse::TryGetMaxDataSize ( uint32_t &  maxDataSize) const
noexcept

Try to get the maximum data size.

Parameters
[out]maxDataSizeMaximum processable request data size
Returns
True if the maximum size is available, otherwise false

◆ TrySetPayload()

virtual bool DoipLib::EntityStatusResponse::TrySetPayload ( const std::vector< uint8_t > &  payload,
uint32_t  payloadLength 
)
overrideprotectedvirtual

Try to set message payload.

Parameters
[in]payloadPayload byte array
[in]payloadLengthPayload length from the message header
Returns
True if the payload is set successfully, otherwise false

Implements DoipLib::Message.