- The var <file> DASL language construct can be used in DASL code with the following syntax (from the DASL guide available on Powerlink):
var <file> myFile = "myFileName"; Reads from or writes to a temporary file
- The temporary myFileName file mentioned above will be created in the /tftpboot directory by default. This is because /etc/voyence.conf has /tftpboot set as the default TFTP home directory with the following variable:
# TFTP Home Directory
TFTPHOMEDIR=/tftpboot
- The TFTPHOMEDIR line can be edited from the default /tftpboot to some other path. Whatever path you specify for the TFTPHOMEDIR is where the var <file> construct will create its temporary file.
IMPORTANT! Making changes to the TFTPHOMEDIR variable is global, meaning VoyenceControl will now use the new path for file transfers instead of /tftpboot.
- The path must be edited on the device server(s) and a voyence service restart must be conducted after making this change. The voyence service can be restarted with the following command:
/etc/init.d/voyence restart
- Example: Specifying a path with var <file>
The var <file> construct can be edited to include a path, but whatever path is given will be appended to the end of the path specified for $TFTPHOMEDIR. Consider the following example:
-
The TFTPHOMEDIR is changed from /tftpboot to /opt,
-
The following syntax is then used for the var <file> construct:
-
The myFileName file in the above example will be created in /opt/voyence/data directory.