Skip to content

Conversation

@rousku
Copy link

@rousku rousku commented Mar 18, 2021

RISE-V2G-EVCC/src/main/java/com/v2gclarity/risev2g/evcc/session/V2GCommunicationSessionHandlerEVCC.java

if (!startTransportLayerClient(seccDiscoveryRes, seccAddress)) return false;
                        
setV2gCommunicationSessionEVCC(new V2GCommunicationSessionEVCC(getTransportLayerClient()));

/*
 * Tell the TCP- or TLSClient to notify if 
 * - a new V2GTPMessage has arrived
 * - a timeout has occurred while waiting for the respective response message
 */
getTransportLayerClient().addObserver(getV2gCommunicationSessionEVCC());

getV2gCommunicationSessionEVCC().addObserver(this);

// Set TLS security flag for communication session
boolean secureConn = (((Byte) getSecurity()).compareTo((Byte) GlobalValues.V2G_SECURITY_WITH_TLS.getByteValue()) == 0) ? true : false;
getV2gCommunicationSessionEVCC().setTlsConnection(secureConn);

sendSupportedAppProtocolReq();

The timeout for receiving a message in TCPClient/TCPClient can expire before SupportedAppProtocolReq is sent if the creation of an evController takes too long (in new V2GCommunicationSessionEVCC).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant