STD.File.DfuPlusExec( commandline ] )
commandline | A null-terminated string containing the DFUPlus command line to execute. The valid arguments are documented in the Client Tools manual, in the section describing the Command Line DFU program. |
The DfuPlusExec action executes the specified commandline just as the DfuPlus executable program would. This allows you to have all the functionality of DfuPlus available within your ECL code.
Unless you need to access a foreign instance of the platform, the server= parameter for DfuPlus should be omitted, which then defaults to the value contained in the environment's configuration. In a containerized system, this defaults to the local eclservices service. If for some reason that doesn't work, the default can be overridden by the value set in global.defaultEsp. In a bare-metal system, this is the service named WsSMC (internal to ECLWatch).
Example:
IMPORT STD; usr := 'username=emilyd '; pwd := 'password=password '; ovr := 'overwrite=1 '; repl := 'replicate=1 '; action := 'action=spray '; srcplane := 'srcplane=mydropzone '; srcfile := 'srcfile=originalperson '; dstname := 'dstname=EmilyTutorial::originalperson '; dstcluster := 'dstcluster=data '; fmt := 'format=fixed '; recsize := 'recordsize=124 '; cmd := usr + pwd + ovr + repl + action + srcplane + srcfile + dstname + dstcluster + fmt + recsize; STD.File.DfuPlusExec(cmd);