|
libdoip
0.1.0
DoIP (Diagnostics over Internet Protocol) ISO 13400 C++17 Library
|
#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 () |
Definition at line 22 of file DoIPClient.h.
|
inline |
Definition at line 25 of file DoIPClient.h.
| void DoIPClient::closeTcpConnection | ( | ) |
Definition at line 92 of file DoIPClient.cpp.
Referenced by reconnectServer().
| void DoIPClient::closeUdpConnection | ( | ) |
Definition at line 96 of file DoIPClient.cpp.
| int DoIPClient::getConnected | ( | ) |
Definition at line 280 of file DoIPClient.cpp.
| int DoIPClient::getSockFd | ( | ) |
Definition at line 273 of file DoIPClient.cpp.
| void DoIPClient::printVehicleInformationResponse | ( | ) |
Definition at line 302 of file DoIPClient.cpp.
References doip::ansi::bold_green, doip::Logger::colorsSupported(), LOG_DOIP_INFO, and doip::ansi::reset.
| void DoIPClient::receiveMessage | ( | ) |
Definition at line 130 of file DoIPClient.cpp.
References doip::_maxDataSize, LOG_DOIP_ERROR, LOG_DOIP_WARN, LOG_TCP_INFO, reconnectServer(), fmt::streamed(), and doip::DoIPMessage::tryParse().
| void doip::DoIPClient::receiveRoutingActivationResponse | ( | ) |
| void DoIPClient::receiveUdpMessage | ( | ) |
Definition at line 160 of file DoIPClient.cpp.
References doip::_maxDataSize, LOG_UDP_ERROR, LOG_UDP_INFO, LOG_UDP_WARN, fmt::streamed(), and doip::DoIPMessage::tryParse().
| bool DoIPClient::receiveVehicleAnnouncement | ( | ) |
Definition at line 195 of file DoIPClient.cpp.
References doip::_maxDataSize, doip::DoIPMessage::getPayloadType(), LOG_UDP_DEBUG, LOG_UDP_ERROR, LOG_UDP_INFO, LOG_UDP_WARN, fmt::streamed(), doip::DoIPMessage::tryParse(), and doip::VehicleIdentificationResponse.
| void DoIPClient::reconnectServer | ( | ) |
Definition at line 103 of file DoIPClient.cpp.
References closeTcpConnection(), and startTcpConnection().
Referenced by receiveMessage().
| 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().
| ssize_t DoIPClient::sendDiagnosticMessage | ( | const ByteArray & | payload | ) |
Sends a diagnostic message to the server.
| payload | data 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().
| ssize_t DoIPClient::sendRoutingActivationRequest | ( | ) |
Definition at line 108 of file DoIPClient.cpp.
References doip::DoIPMessage::data(), LOG_DOIP_INFO, doip::message::makeRoutingActivationRequest(), doip::DoIPMessage::size(), and fmt::streamed().
| ssize_t DoIPClient::sendVehicleIdentificationRequest | ( | const char * | inet_address | ) |
Definition at line 234 of file DoIPClient.cpp.
References doip::DoIPMessage::data(), LOG_DOIP_INFO, LOG_UDP_ERROR, LOG_UDP_INFO, doip::message::makeVehicleIdentificationRequest(), and doip::DoIPMessage::size().
| void DoIPClient::setSourceAddress | ( | const DoIPAddress & | address | ) |
Sets the source address for this client.
| address | source address for the client |
Definition at line 266 of file DoIPClient.cpp.
| void DoIPClient::startAnnouncementListener | ( | ) |
Definition at line 56 of file DoIPClient.cpp.
References LOG_UDP_ERROR, and LOG_UDP_INFO.
| void DoIPClient::startTcpConnection | ( | ) |
Definition at line 13 of file DoIPClient.cpp.
References LOG_TCP_INFO.
Referenced by reconnectServer().
| void DoIPClient::startUdpConnection | ( | ) |
Definition at line 36 of file DoIPClient.cpp.
References LOG_UDP_INFO.