Is there any possible to transfer the files between uim robots using any of the probes. Same like distrv probe.but the probe should transfer the files.
In Dr.Nimbus there is an option to transfer files from NimBus Robot.
Please check if this meets your needs.
Look into the controller callback text_file_get/put. Works pretty well - make sure that you set your buffers large enough to get the file in one chunk to keep things simple. Otherwise there is a methodology related to sessions to help deal with not getting all the work done in one issuance of the callback.
How about any binary file? Does it support only TEXT File?
Such as PDF it does not transfer.. Is there any other method to transfer the file between robots?
You can take a look at the file_get_* and file_put_* callbacks, these give you the ability to transfer a binary or ascii file.
Get the first part of a file. The controller will return the following parameters:
‘file_content’ string or void data area containing the first section of the file (see type below to determine type).
‘id’ string identifier to be used in file_get_next and file_get_end calls.
‘position’ current file position
‘read’ bytes read by this call. If this value is 0, the next call should be file_get_end.
The directory containing the file.
The file to fetch.
The file type, basically “binary”, “ascii” or “string”. Specify “binary” if the ‘raw’ contents of the file are needed. Specify “string” if you want the file contents returned as a PDS_PCH instead of PDS_VOID. This is useful for interactive checking of a file, but note that the file must be a ‘clean’ text file.
Specify the size of each chunk you want to fetch from the file. The default is 1k. Note that the default buffer_size is only appropriate for small files.
Seek to this file position before starting to read the file. The default is 0.
Get the next part of the file. Returns the same as the file_get_first call above.
The file identifier returned by the file_get_start call.
Finish fetching from the file.
Write the first part of a file. The file contents to be written are supplied in an additional parameter ‘file_content’ of type VOID. The following parameters are returned:
‘id’ – string identifier to be used with subsequent calls to file_put_next and file_put_end.
‘written’ – total bytes written to the file.
The directory that will contain the file. A directory hierarchy will be created if it does not exist.
The file to store.
The file type, “binary” or “ascii”. “ascii” is the default if not specified.
Octal string defining the file permissions on file creation. Only significant on UNIX/Linux platforms.
Write the next part of the file. The data to be added to the file are supplied in an additional parameter ‘file_content’ of type VOID. The following parameters are returned:
The file identifier returned by the file_put_start call.
Finish writing to the file. The controller will clean up internal information about the file identified by the ‘id’ parameter. The following parameters are returned:
I'm trying to understand this, but when I use the file_get commands I get an ID back. But using a file_put command it creates a different ID. So how do I get the file contents I got with the file_get commands to a different location with the file_put commands? I can run the file_get (start,next,end) commands succesfully, but I'm missing the part of how to put the content in a new file. The file_put command just creates a new empty file for me on the destination location.
Bryan,Where can we get the documentation for file_get_* and file_put_* commands?Thanks!
Bryan posted the documentation that is known to exist and that's publically available.
Many of these functions require you to reverse engineer them. Often the documentation is wrong too but it's a starting point.
My suggestion on this is to put together a LUA script with the callback and try it - look at the results returned. Even if the the documentation is missing or wrong, usually you can figure out what the developer was intending if you baby step through the process.
If you get something working post it back so that in the future someone can find the correct information by searching here.
I will do that.Thanks!
I also have an issue with file transfer. I tried the following command:
pu -u administrator -p password /address/to/controller text_file_get (filename) 30000 > (outputfilename)
And all I get is the first coupe of line. How can I get the whole file and not just part of it.
Increase the buffer size.
I think that you will find that pu is truncating the results regardless of the buffer size.
pu will only display the first hundred or so characters before truncating the rest of the output.
So there's no way to transfer the complete file...only portion of it?
btw I did increase the buffer size to 300000000000000....and got the same result
You have to understand the limitation of the tools you are using.
You are using pu. By design, it executes the command you ask of it - in this case it transfers the file you requested. It then posts to stdout a maximum number of characters from each of the items in the result.
Because of this intentional design, pu will only display a portion of the file unless the file is shorter than that display limit.
You need to use one of the other methods mentioned in order to get the full result.