Programmatic Interface - ConfigFile Commands |
These commands implement the interface to the Configuration Files method of saving and restoring system control states. A Configuration File is a collection of control settings for one or more functions within the NetRS. The current settings in the system can be collected into a new Configuration File, and given a name. Those settings can be re-installed into the system. The files can also be downloaded to an external computer an later uploaded into this or another NetRS system.
This command returns a multi-line response which lists all available configuration files, which were either created or uploaded into this NetRS.
Note that this command (with the final 's' character) is different from 'Show ConfigFile' which returns the contents of a single Configuration File.
<Show ConfigFiles> ConfigFile name=ConfigFile size=23957 ConfigFile name=Logging size=839 ConfigFile name=testing.cfg size=12896 <end of Show ConfigFiles>
This command returns a multi-line response containing the complete contents of the specified Configuration File. 'Show ConfigFile' can be used to programmatically download a configuration file to an external computer. After receiving the response, all that is needed is to remove the first and last lines.
The exact formating of Configuration Files is subject to change. At this point, Configuration Files are not guaranteed to be compatible across all fimmware versions. This may change in future releases.
Trimble does not recommend that you edit Configuration Files. The exact details are not well documented, and you would do so at your own risk.
name=ConfigName | The existing Configuration File's name.
The name is case sensitive. |
<Show ConfigFile name=ConfigName> # ++ FBCfg v1 # Configuration File, Original Name = ConfigName # created Mon Nov 10 17:01:42 UTC 2003 ## file /etc/sysconfig/sessions #Name Enb Type Date/Time Duration DataType FileTemplate CORSA 1 cont 0 60 T00:15:60:0:0 a:1:0:0 CORSB 1 cont 0 5 T00:0.1:0.1:1:0 b:1:1:0 CORSC 1 cont 0 3 T00:0.1:0.1:0:1 c:1:0:0 Once 0 once 751476240 60 T00:15:60:0:0 o:0:0:0 daily 1 daily 83700 2 T00:15:60:0:0 d:0:0:0 man 0 manual 752006935 1 T00:15:60:0:0 m:0:0:0 t 1 cont 0 60 T00:15:60:0:0 a:0:0:0 test 0 cont 0 60 T00:15:60:0:0 b:1:1:0 testing 0 cont 0 5 T00:15:60:0:0 t:0:0:0 ## end of file /etc/sysconfig/sessions ## file /etc/sysconfig/sleepmode no yes 4 10 ## end of file /etc/sysconfig/sleepmode <end of Show ConfigFile name=ConfigName>
## file /PathToFile
## end of file /PathToFile
.
This command is used to create a Configuration File that contains the current settings of one or more functions within the NetRS. You must specify a name for the new Configuration File, along with a list of functions whose settings should be included in the new file.
name=ConfigName | The name to give the new Configuration File.
The name is case sensitive. |
||||||||||||||||||||||||||||||||||||||||||||||||
functions=Sessions,FTP,... | A comma-separated list of functions from the following choices:
|
OK: ConfigFile name=Testing created.
This command deletes a specified Configuration File from the set of previously created or uploaded files.
name=ConfigName | The name to give the new Configuration File.
The name is case sensitive. |
OK: ConfigFile name=ConfigName is deleted.
This command is used to transfer a Configuration File from an external computer into the NetRS. This is refered to as an Upload. The uploaded file becomes available for applying its control settings in the NetRS, using Install ConfigFile.
The upload URL-CGI command is submitted as with other commands, but uses
an http POST request instead of a GET request. This process is a bit
complicated. See these links for sample code using
Curl and
Perl.
Regardless of the programming technique, the process must attach a
multipart/form-data document to the POST request. The document
will contain the raw binary data to be uploaded. The "section" of the
multipart document that contains a firmware upload file must be given a
name "configFile", and may include a suggested name for the file once
it arrives in the NetRS. For example, in the curl sample, there is an
option "-F configFile=@fname
". This tells
curl to attach the file named 'fname' in a section named 'configFile',
and to use 'fname' as the default name for the file in the NetRS.
Optionally the CGI request can overrule the default name for the file
when it reaches the target system, by using the parameter
name=fname
.
name=filename | This parameter is optional. If specified, then the file that is uploaded will be renamed to the given name. Otherwise, the name will be derived from the filename supplied in the multipart document containing the uploaded file. |
OK: ConfigFile name=testing was successfully uploaded.
This command applies the control settings in a named Configuration File to the NetRS controls. Whichever functions are contained in the Configuration File will have their settings adjusted to match the contents of the file. This process requires a NetRS shutdown and restart, which can take several minutes. During this time, data logging, streaming output, browser access and programmatic controls will not be available.
The reponse to the Install ConfigFile command will come back immediately. The actual system shutdown will be delayed for about five seconds.
name=ConfigName | The name to give the new Configuration File.
The name is case sensitive. |
OK: Installing ConfigFile name=ConfigName