Applicable to Entuity v20.0 upwards.
Please find below a list of FirmwareManager functions. To use them, you must import the class at the top of the script:
import.com.entuity.configManager.model.ConfigManagerBO;
The functions available to Groovy are static, and therefore should be used as follows:
def output = FirmwareManager.fileOnly("input text");
Function | Description | Parameters | Returns |
---|---|---|---|
fileOnly | gives only the filename of a filepath. |
|
string: filename of file. |
copyImage | copies the target firmware from the firmware folder to the transfer folder. |
|
string: filepath of the copied file. Null if failed. |
copyTransferImage | copies the target firmware from the transfer folder to the firmware folder. |
|
string: filepath of the copied file. Null if failed. |
getFirmwareFile | returns the firmware file from the firmware folder. |
|
file: firmware file. |
getTransferProperties | gets the transfer properties for the given method. This includes all supported transfer methods as of Entuity v21.0 P01. |
|
map<string, string>: map of properties to values (transferServer, transferUsername, transferPassword). |
getTransferFolder | returns the transfer folder path if it is valid. | string: transfer folder filepath. | |
getTransferFile | returns the firmware file from the transfer folder. |
|
file: firmware file. |
genSetSW | generates a StormWorks statement that sets an attribute to a value. |
|
string: stormworks string. |
getMd5 (Entuity v21.0 P01 and Entuity v20.0 P06 upwards) | generates the MD5 hash of a given file. |
|
string: MD5 hash. |
copyFileToTransferDir (Entuity v21.0 P01 and Entuity v20.0 P06 upwards) | copies the given file to the Transfer directory. |
|
string: error message if an error occurs, null otherwise. |
deleteFile (Entuity v21.0 P01 and Entuity v20.0 P06 upwards) | deletes given file. File must be in Transfer directory. |
|
string: error message if an error occurs, null otherwise. |
getTransferFile (Entuity v21.0 P01 and Entuity v20.0 P06 upwards) | returns the firmware file from the Transfer folder. Duplicate method, except the method is not required. |
|
file: firmware file. |
getFirmwareFolder (Entuity v21.0 P01 and Entuity v20.0 P06 upwards) | returns the firmware folder path. | string: firmware folder filepath. | |
getTransferUsername (Entuity v21.0 P01 and Entuity v20.0 P06 upwards) | returns the username of the given transfer method. |
|
string: username |
getTransferPassword (Entuity v21.0 P01 and Entuity v20.0 P06 upwards) | returns the password of the given transfer method. |
|
string: password |
Comments
0 comments
Please sign in to leave a comment.