Skip to content

Commit 937d221

Browse files
committed
Added more functions
1 parent f7a9dda commit 937d221

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

BmwDeepObd/BmwRpcCoding.cs

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,52 @@ public async Task<bool> ConnectVehicle()
660660
EdiabasNet.GetExceptionText(ex, false, false));
661661
return false;
662662
}
663+
}
663664

665+
public async Task<bool> DisconnectVehicle()
666+
{
667+
try
668+
{
669+
bool result = await _psdzRpcClient.RpcService.DisconnectVehicle().ConfigureAwait(false);
670+
if (result)
671+
{
672+
await RpcClientTaskStarted().ConfigureAwait(false);
673+
}
674+
else
675+
{
676+
_ediabasProxyClient?.EdiabasLogFormat(EdiabasNet.EdLogLevel.Ifh, "DisconnectVehicle failed");
677+
}
678+
return result;
679+
}
680+
catch (Exception ex)
681+
{
682+
_ediabasProxyClient?.EdiabasLogFormat(EdiabasNet.EdLogLevel.Ifh, "DisconnectVehicle: Exception={0}",
683+
EdiabasNet.GetExceptionText(ex, false, false));
684+
return false;
685+
}
686+
}
687+
688+
public async Task<bool> VehicleFunctions(PsdzOperationType operationType)
689+
{
690+
try
691+
{
692+
bool result = await _psdzRpcClient.RpcService.VehicleFunctions(operationType).ConfigureAwait(false);
693+
if (result)
694+
{
695+
await RpcClientTaskStarted().ConfigureAwait(false);
696+
}
697+
else
698+
{
699+
_ediabasProxyClient?.EdiabasLogFormat(EdiabasNet.EdLogLevel.Ifh, "VehicleFunctions {0} failed", operationType);
700+
}
701+
return result;
702+
}
703+
catch (Exception ex)
704+
{
705+
_ediabasProxyClient?.EdiabasLogFormat(EdiabasNet.EdLogLevel.Ifh, "VehicleFunctions {0}: Exception={1}", operationType,
706+
EdiabasNet.GetExceptionText(ex, false, false));
707+
return false;
708+
}
664709
}
665710

666711
public async Task DisposeRpcClient()

0 commit comments

Comments
 (0)