GetFirmwareVersion()

Gets the current firmware version of the logger.

C#

[DllImport("RGUSBdrv.dll", CallingConvention = CallingConvention.Cdecl)]
public static extern byte GetFirmwareVersion(out ushort MajorVersion, out byte 
MinVersion, out byte BranchVersion, out byte FwType);

Returns:

out ushort MajorVersion, out byte MinVersion, out byte BranchVersion, out byte FwType

C# Example:

public static string GetFirmware()
{
 string[] FirmwareReleaseType = new string[4] { "", "A", "B", "RC" };
 byte MinVersion, Res, BranchVersion, fwType;
 ushort MajorVersion;
 Res = GetFirmwareVersion(out MajorVersion, out MinVersion, out BranchVersion, out fwType);
 return $"{MajorVersion}.{MinVersion}.{BranchVersion} {FirmwareReleaseType[fwType]}";
}
private void btnGetFirmware_Click(object sender, EventArgs e)
{
  if (USBDllComm.Connected)
  lblGetFirmware.Text = GetFirmware();
}

Last updated