Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
VANet
Commits
209ab551
Commit
209ab551
authored
Oct 08, 2020
by
Dipl.-Ing. Jonas Stienen
Browse files
Adding more debug print lines part 2
parent
a2fd5c37
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/VANetMessage.cpp
View file @
209ab551
...
...
@@ -202,10 +202,19 @@ void CVANetMessage::WriteAnswer()
{
if
(
!
m_pConnection
)
VISTA_THROW
(
"Seems like the VA connections is lost, can not write VA net message answer"
,
255
);
#ifdef VANET_NETWORK_COM_PRINT_DEBUG_INFOS
std
::
cout
<<
"[ VANetMessage ][ DEBUG ] All seems good, will hand over buffer to network connection now"
<<
std
::
endl
;
#endif
// It appears to be safe to transmit an entire buffer of arbitrary size on sender side
int
nRet
=
m_pConnection
->
WriteRawBuffer
(
m_oOutgoing
.
GetBuffer
(),
m_oOutgoing
.
GetBufferSize
()
);
m_pConnection
->
WaitForSendFinish
();
#ifdef VANET_NETWORK_COM_PRINT_DEBUG_INFOS
std
::
cout
<<
"[ VANetMessage ][ DEBUG ] ... acknowledged."
<<
std
::
endl
;
#endif
if
(
nRet
!=
m_oOutgoing
.
GetBufferSize
()
)
VISTA_THROW
(
"Could not write the expected number of bytes"
,
255
);
}
...
...
src/VANetNetworkProtocol.cpp
View file @
209ab551
...
...
@@ -350,6 +350,11 @@ void CVANetNetworkProtocol::ServerCallFunctionByMessageType( const int nMessageT
bool
CVANetNetworkProtocol
::
ProcessMessageFromClient
(
VistaConnectionIP
*
pConnection
)
{
#ifdef VANET_NETWORK_COM_PRINT_DEBUG_INFOS
std
::
cout
<<
"[ VANetProtocol ][ DEBUG ] Processing message from client"
<<
std
::
endl
;
#endif
assert
(
m_pRealCore
!=
NULL
);
// just to avoid false connection notifies - these can happen
...
...
@@ -437,6 +442,10 @@ bool CVANetNetworkProtocol::ProcessMessageFromClient( VistaConnectionIP* pConnec
m_pMessage
->
WriteAnswer
();
}
#ifdef VANET_NETWORK_COM_PRINT_DEBUG_INFOS
std
::
cout
<<
"[ VANetProtocol ][ DEBUG ] Processing has successfully processed messagew from client"
<<
std
::
endl
;
#endif
return
true
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment