|
|
|
@ -353,7 +353,7 @@ IsoClientConnection_handleConnection(IsoClientConnection self)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (sendConnectionRequestMessage(self))
|
|
|
|
if (sendConnectionRequestMessage(self))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
self->nextReadTimeout = Hal_getTimeInMs() + self->readTimeoutInMs;
|
|
|
|
self->nextReadTimeout = Hal_getMonotonicTimeInMs() + self->readTimeoutInMs;
|
|
|
|
nextState = INT_STATE_WAIT_FOR_COTP_CONNECT_RESP;
|
|
|
|
nextState = INT_STATE_WAIT_FOR_COTP_CONNECT_RESP;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
@ -373,7 +373,7 @@ IsoClientConnection_handleConnection(IsoClientConnection self)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
/* check connect timeout */
|
|
|
|
/* check connect timeout */
|
|
|
|
|
|
|
|
|
|
|
|
uint64_t currentTime = Hal_getTimeInMs();
|
|
|
|
uint64_t currentTime = Hal_getMonotonicTimeInMs();
|
|
|
|
|
|
|
|
|
|
|
|
if (currentTime > self->nextReadTimeout)
|
|
|
|
if (currentTime > self->nextReadTimeout)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -392,7 +392,7 @@ IsoClientConnection_handleConnection(IsoClientConnection self)
|
|
|
|
|
|
|
|
|
|
|
|
case INT_STATE_WAIT_FOR_COTP_CONNECT_RESP:
|
|
|
|
case INT_STATE_WAIT_FOR_COTP_CONNECT_RESP:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint64_t currentTime = Hal_getTimeInMs();
|
|
|
|
uint64_t currentTime = Hal_getMonotonicTimeInMs();
|
|
|
|
|
|
|
|
|
|
|
|
if (currentTime > self->nextReadTimeout)
|
|
|
|
if (currentTime > self->nextReadTimeout)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -428,7 +428,7 @@ IsoClientConnection_handleConnection(IsoClientConnection self)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
sendAcseInitiateRequest(self);
|
|
|
|
sendAcseInitiateRequest(self);
|
|
|
|
|
|
|
|
|
|
|
|
self->nextReadTimeout = Hal_getTimeInMs() + self->readTimeoutInMs;
|
|
|
|
self->nextReadTimeout = Hal_getMonotonicTimeInMs() + self->readTimeoutInMs;
|
|
|
|
|
|
|
|
|
|
|
|
nextState = INT_STATE_WAIT_FOR_ACSE_RESP;
|
|
|
|
nextState = INT_STATE_WAIT_FOR_ACSE_RESP;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -453,7 +453,7 @@ IsoClientConnection_handleConnection(IsoClientConnection self)
|
|
|
|
|
|
|
|
|
|
|
|
case INT_STATE_WAIT_FOR_ACSE_RESP:
|
|
|
|
case INT_STATE_WAIT_FOR_ACSE_RESP:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
uint64_t currentTime = Hal_getTimeInMs();
|
|
|
|
uint64_t currentTime = Hal_getMonotonicTimeInMs();
|
|
|
|
|
|
|
|
|
|
|
|
if (currentTime > self->nextReadTimeout)
|
|
|
|
if (currentTime > self->nextReadTimeout)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@ -706,7 +706,7 @@ IsoClientConnection_associateAsync(IsoClientConnection self, uint32_t connectTim
|
|
|
|
self->readTimeoutInMs = readTimeoutInMs;
|
|
|
|
self->readTimeoutInMs = readTimeoutInMs;
|
|
|
|
|
|
|
|
|
|
|
|
/* set timeout for connect */
|
|
|
|
/* set timeout for connect */
|
|
|
|
self->nextReadTimeout = Hal_getTimeInMs() + connectTimeoutInMs;
|
|
|
|
self->nextReadTimeout = Hal_getMonotonicTimeInMs() + connectTimeoutInMs;
|
|
|
|
|
|
|
|
|
|
|
|
/* Connect to Local Ip Address*/
|
|
|
|
/* Connect to Local Ip Address*/
|
|
|
|
if (self->parameters->localIpAddress) {
|
|
|
|
if (self->parameters->localIpAddress) {
|
|
|
|
|