Skip to content

Commit

Permalink
More refactorings
Browse files Browse the repository at this point in the history
  • Loading branch information
ahzf committed Jul 27, 2024
1 parent 069dd69 commit 2514348
Show file tree
Hide file tree
Showing 32 changed files with 1,598 additions and 966 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,17 @@ this.Format. GetHashCode() * 3 ^
/// <param name="RequestId">The request identification.</param>
/// <param name="DestinationId">The charging station/networking node identification.</param>
/// <param name="NetworkPath">The network path of the request.</param>
/// <param name="RequestTimestamp">An optional request timestamp.</param>
/// <param name="RequestTimeout">An optional request timeout.</param>
/// <param name="EventTrackingId">An optional event tracking identification for correlating this request with other events.</param>
/// <param name="CustomDataTransferRequestParser">An optional delegate to parse custom BinaryDataTransfer requests.</param>
public static BinaryDataTransferRequest Parse(Byte[] Binary,
Request_Id RequestId,
NetworkingNode_Id DestinationId,
NetworkPath NetworkPath,
DateTime? RequestTimestamp = null,
TimeSpan? RequestTimeout = null,
EventTracking_Id? EventTrackingId = null,
CustomBinaryParserDelegate<BinaryDataTransferRequest>? CustomDataTransferRequestParser = null)
{

Expand All @@ -179,6 +185,9 @@ public static BinaryDataTransferRequest Parse(Byte[]
NetworkPath,
out var binaryDataTransferRequest,
out var errorResponse,
RequestTimestamp,
RequestTimeout,
EventTrackingId,
CustomDataTransferRequestParser))
{
return binaryDataTransferRequest;
Expand All @@ -202,13 +211,19 @@ public static BinaryDataTransferRequest Parse(Byte[]
/// <param name="NetworkPath">The network path of the request.</param>
/// <param name="BinaryDataTransferRequest">The parsed BinaryDataTransfer request.</param>
/// <param name="ErrorResponse">An optional error response.</param>
/// <param name="RequestTimestamp">An optional request timestamp.</param>
/// <param name="RequestTimeout">An optional request timeout.</param>
/// <param name="EventTrackingId">An optional event tracking identification for correlating this request with other events.</param>
/// <param name="CustomBinaryDataTransferRequestParser">An optional delegate to parse custom BinaryDataTransfer requests.</param>
public static Boolean TryParse(Byte[] Binary,
Request_Id RequestId,
NetworkingNode_Id DestinationId,
NetworkPath NetworkPath,
[NotNullWhen(true)] out BinaryDataTransferRequest? BinaryDataTransferRequest,
[NotNullWhen(false)] out String? ErrorResponse,
DateTime? RequestTimestamp = null,
TimeSpan? RequestTimeout = null,
EventTracking_Id? EventTrackingId = null,
CustomBinaryParserDelegate<BinaryDataTransferRequest>? CustomBinaryDataTransferRequestParser = null)
{

Expand Down Expand Up @@ -317,9 +332,9 @@ public static Boolean TryParse(Byte[]
null, //signatures,

RequestId,
null,
null,
null,
RequestTimestamp,
RequestTimeout,
EventTrackingId,
NetworkPath

);
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ public async Task<ForwardingDecision>
BinaryRequestMessage.NetworkPath,
out var request,
out var errorResponse,
BinaryRequestMessage.RequestTimestamp,
BinaryRequestMessage.RequestTimeout - Timestamp.Now,
BinaryRequestMessage.EventTrackingId,
parentNetworkingNode.OCPP.CustomBinaryDataTransferRequestParser))
{
return ForwardingDecision.REJECT(errorResponse);
Expand Down
Loading

0 comments on commit 2514348

Please sign in to comment.