Gets firmware from the Drive

Namespace: EAL.Interfaces.System
Assembly: EAL (in EAL.dll) Version: 1.1.5.0 (1.1.5.0)

Syntax

C#
void GetFirmwareFile(
	string dstFilePath
)
Visual Basic
Sub GetFirmwareFile ( 
	dstFilePath As String
)
Visual C++
void GetFirmwareFile(
	String^ dstFilePath
)

Parameters

dstFilePath
Type: System..::..String
Destination folder path to store the firmware file.

Examples

Synchronous method
 Copy imageCopy
private static void Method1()
{
    try
    {
        IEALConnection ealConnection = new EALConnection(false);
        ealConnection.Connect("192.168.0.6");
        ealConnection.System.FirmwareManagement.OnTransfer += new EAL.Interfaces.System.OnTransferEventHandler(FirmwareManagement_OnTransfer);
        ealConnection.System.FirmwareManagement.OnError += new EAL.Interfaces.System.OnErrorEventHandler(FirmwareManagement_OnError);
        ealConnection.System.FirmwareManagement.OnFinish += new EAL.Interfaces.System.OnFinishEventHandler(FirmwareManagement_OnFinish);                

        ealConnection.Motion.Axes[0].SetCondition(AxisCondition.AXIS_CONDITION_ACTIVE_PARAMETERIZATION);
        string fileName = ealConnection.System.FirmwareManagement.GetFirmwareFilename();
        string dstPath = Path.Combine(@"D:\", fileName);
        ealConnection.System.FirmwareManagement.GetFirmwareFile(dstPath);

        ealConnection.System.Reboot();                
        Console.WriteLine("Rebooted.");
    }
    catch (FwMngmtEALException ex)
    {
        Console.WriteLine("Download could not be carried out. Message:" + ex.Message);
    }
    catch (Exception ex)
    {
        Console.WriteLine("Un known error. Message:" + ex.Message);
    }
}

private static void FirmwareManagement_OnTransfer(object sender, TransferDataEventArgs e)
{
    const string msgFormat = "On transfer.  BytesTransferred:{0}, BytesTotal:{1}";
    string dispMsg = string.Format(msgFormat, e.BytesTransferred, e.BytesTotal);
    Console.WriteLine(dispMsg);
}

private static void FirmwareManagement_OnError(object sender, TransferErrorEventArgs e)
{
    const string msgFormat = "On error.  ErrorCode:{0}, ErrorMessage:{1}";
    string dispMsg = string.Format(msgFormat, e.ErrorCode, e.ErrorMessage);
    Console.WriteLine(dispMsg);
}

private static void FirmwareManagement_OnFinish(object sender, TransferFinishEventArgs e)
{
    const string msgFormat = "On finish.  BytesTransferred:{0}";
    string dispMsg = string.Format(msgFormat, e.BytesTransferred);
    Console.WriteLine(dispMsg);
}
Asynchronous method
 Copy imageCopy
private static void Method1()
{
    try
    {
        IEALConnection ealConnection = new EALConnection(true);
        ealConnection.Connect("192.168.0.6");
        ealConnection.System.FirmwareManagement.OnTransfer += new EAL.Interfaces.System.OnTransferEventHandler(FirmwareManagement_OnTransfer);
        ealConnection.System.FirmwareManagement.OnError += new EAL.Interfaces.System.OnErrorEventHandler(FirmwareManagement_OnError);
        ealConnection.System.FirmwareManagement.OnFinish += new EAL.Interfaces.System.OnFinishEventHandler(FirmwareManagement_OnFinish);

        IEALConnection ealConnection1 = new EALConnection(true);
        ealConnection1.Connect("192.168.0.2");
        ealConnection1.System.FirmwareManagement.OnTransfer += new EAL.Interfaces.System.OnTransferEventHandler(FirmwareManagement_OnTransfer);
        ealConnection1.System.FirmwareManagement.OnError += new EAL.Interfaces.System.OnErrorEventHandler(FirmwareManagement_OnError);
        ealConnection1.System.FirmwareManagement.OnFinish += new EAL.Interfaces.System.OnFinishEventHandler(FirmwareManagement_OnFinish);

        ealConnection.Motion.Axes[0].SetCondition(AxisCondition.AXIS_CONDITION_ACTIVE_PARAMETERIZATION);
        ealConnection1.Motion.Axes[0].SetCondition(AxisCondition.AXIS_CONDITION_ACTIVE_PARAMETERIZATION);

        ealConnection.WaitUntilQueueComplete();
        ealConnection1.WaitUntilQueueComplete();

        string fileName = ealConnection.System.FirmwareManagement.GetFirmwareFilename();
        string dstPath = Path.Combine(@"D:\", fileName);
        string fileName1 = ealConnection.System.FirmwareManagement.GetFirmwareFilename();
        string dstPath1 = Path.Combine(@"D:\", fileName1);
        ealConnection.System.FirmwareManagement.GetFirmwareFile(dstPath);
        ealConnection1.System.FirmwareManagement.GetFirmwareFile(dstPath1);

        ealConnection.WaitUntilQueueComplete();
        ealConnection1.WaitUntilQueueComplete();
    }
    catch (FwMngmtEALException ex)
    {
        Console.WriteLine("Download could not be carried out. Message:" + ex.Message);
    }
    catch (Exception ex)
    {
        Console.WriteLine("Un known error. Message:" + ex.Message);
    }
}

private static void FirmwareManagement_OnTransfer(object sender, TransferDataEventArgs e)
{
    const string msgFormat = "On transfer.  BytesTransferred:{0}, BytesTotal:{1}";
    string dispMsg = string.Format(msgFormat, e.BytesTransferred, e.BytesTotal);
    Console.WriteLine(dispMsg);
}

private static void FirmwareManagement_OnError(object sender, TransferErrorEventArgs e)
{
    const string msgFormat = "On error.  ErrorCode:{0}, ErrorMessage:{1}";
    string dispMsg = string.Format(msgFormat, e.ErrorCode, e.ErrorMessage);
    Console.WriteLine(dispMsg);
}

private static void FirmwareManagement_OnFinish(object sender, TransferFinishEventArgs e)
{
    const string msgFormat = "On finish.  BytesTransferred:{0}";
    string dispMsg = string.Format(msgFormat, e.BytesTransferred);
    Console.WriteLine(dispMsg);
}

See Also