Caution
The Virtual PCAN-Gateway product is available only for Windows systems. It is not supported under Linux.
This parameter is used to obtain the running status of the System service that is part of the Virtual PCAN-Gateway solution. This service works together with the device driver PCAN-LAN. Both make the interaction with PCAN-LAN hardware possible (PCAN-Gateway Ethernet/Wireless) by using the PCAN environment under Windows.
This parameter can be used to ensure that the Virtual PCAN-Gateway communication is working.
It is available since PCAN-Basic version 4.1.0.
None: The status of the service is not tied to any Channel connection, i.e. no specific Channel can be used for this query.
This parameter can only be read. It cannot be modified.
The information about a service status is returned as a numeric “flag” value, that matches the type ServiceStatus.
Important: The retrieved value must be converted to the ServiceStatus type. Example (C#): ServiceStatus status = (ServiceStatus)uintBuffer;
Does not apply.
Get: Not relevant since this parameter is not Channel dependent.
The following code shows how to retrieve the status of the Virtual PCAN-Gateway service:
uint serviceState;
if (Api.GetValue(PcanChannel.None, PcanParameter.VirtualPcanGatewayStatus, out serviceState) == PcanStatus.OK)
{
ServiceStatus status = (ServiceStatus)serviceState;
Console.WriteLine($"PCAN-LAN service status: {status}");
}
else
Console.WriteLine("Error retrieving the status of the Virtual PCAN-Gateway service.");Dim serviceState As UInteger
If Api.GetValue(PcanChannel.None, PcanParameter.VirtualPcanGatewayStatus, serviceState) = PcanStatus.OK Then
Dim status As ServiceStatus = CType(serviceState, ServiceStatus)
Console.WriteLine($"PCAN-LAN service status: {status}")
Else
Console.WriteLine("Error retrieving the status of the Virtual PCAN-Gateway service.")
End IfUInt32 serviceState;
if (Api::GetValue(PcanChannel::None, PcanParameter::VirtualPcanGatewayStatus, serviceState) == PcanStatus::OK)
{
ServiceStatus status = (ServiceStatus)serviceState;
Console::WriteLine("PCAN-LAN service status: {0}", status);
}
else
Console::WriteLine("Error retrieving the status of the Virtual PCAN-Gateway service.");