libdoip  0.1.0
DoIP (Diagnostics over Internet Protocol) ISO 13400 C++17 Library
doip::DoIPClient Class Reference

#include <DoIPClient.h>

Public Member Functions

 DoIPClient ()
 
void startTcpConnection ()
 
void startUdpConnection ()
 
void startAnnouncementListener ()
 
ssize_t sendRoutingActivationRequest ()
 
ssize_t sendVehicleIdentificationRequest (const char *inet_address)
 
void receiveRoutingActivationResponse ()
 
void receiveUdpMessage ()
 
bool receiveVehicleAnnouncement ()
 
void receiveMessage ()
 
ssize_t sendDiagnosticMessage (const ByteArray &payload)
 Sends a diagnostic message to the server. More...
 
ssize_t sendAliveCheckResponse ()
 Sends a alive check response containing the clients source address to the server. More...
 
void setSourceAddress (const DoIPAddress &address)
 Sets the source address for this client. More...
 
void printVehicleInformationResponse ()
 
void closeTcpConnection ()
 
void closeUdpConnection ()
 
void reconnectServer ()
 
int getSockFd ()
 
int getConnected ()
 

Detailed Description

Definition at line 22 of file DoIPClient.h.

Constructor & Destructor Documentation

◆ DoIPClient()

doip::DoIPClient::DoIPClient ( )
inline

Definition at line 25 of file DoIPClient.h.

Member Function Documentation

◆ closeTcpConnection()

void DoIPClient::closeTcpConnection ( )

Definition at line 92 of file DoIPClient.cpp.

Referenced by reconnectServer().

◆ closeUdpConnection()

void DoIPClient::closeUdpConnection ( )

Definition at line 96 of file DoIPClient.cpp.

◆ getConnected()

int DoIPClient::getConnected ( )

Definition at line 280 of file DoIPClient.cpp.

◆ getSockFd()

int DoIPClient::getSockFd ( )

Definition at line 273 of file DoIPClient.cpp.

◆ printVehicleInformationResponse()

void DoIPClient::printVehicleInformationResponse ( )

◆ receiveMessage()

void DoIPClient::receiveMessage ( )

◆ receiveRoutingActivationResponse()

void doip::DoIPClient::receiveRoutingActivationResponse ( )

◆ receiveUdpMessage()

void DoIPClient::receiveUdpMessage ( )

◆ receiveVehicleAnnouncement()

◆ reconnectServer()

void DoIPClient::reconnectServer ( )

Definition at line 103 of file DoIPClient.cpp.

References closeTcpConnection(), and startTcpConnection().

Referenced by receiveMessage().

◆ sendAliveCheckResponse()

ssize_t DoIPClient::sendAliveCheckResponse ( )

Sends a alive check response containing the clients source address to the server.

Definition at line 121 of file DoIPClient.cpp.

References doip::DoIPMessage::data(), LOG_DOIP_INFO, doip::message::makeAliveCheckResponse(), doip::DoIPMessage::size(), and fmt::streamed().

◆ sendDiagnosticMessage()

ssize_t DoIPClient::sendDiagnosticMessage ( const ByteArray payload)

Sends a diagnostic message to the server.

Parameters
payloaddata that will be given to the ecu

Definition at line 114 of file DoIPClient.cpp.

References doip::DoIPMessage::data(), LOG_DOIP_INFO, doip::message::makeDiagnosticMessage(), doip::DoIPMessage::size(), and fmt::streamed().

◆ sendRoutingActivationRequest()

ssize_t DoIPClient::sendRoutingActivationRequest ( )

◆ sendVehicleIdentificationRequest()

ssize_t DoIPClient::sendVehicleIdentificationRequest ( const char *  inet_address)

◆ setSourceAddress()

void DoIPClient::setSourceAddress ( const DoIPAddress address)

Sets the source address for this client.

Parameters
addresssource address for the client

Definition at line 266 of file DoIPClient.cpp.

◆ startAnnouncementListener()

void DoIPClient::startAnnouncementListener ( )

Definition at line 56 of file DoIPClient.cpp.

References LOG_UDP_ERROR, and LOG_UDP_INFO.

◆ startTcpConnection()

void DoIPClient::startTcpConnection ( )

Definition at line 13 of file DoIPClient.cpp.

References LOG_TCP_INFO.

Referenced by reconnectServer().

◆ startUdpConnection()

void DoIPClient::startUdpConnection ( )

Definition at line 36 of file DoIPClient.cpp.

References LOG_UDP_INFO.


The documentation for this class was generated from the following files: