ScriptFileAccessDemo script errors

Discuss issues and ideas you have to configuring displays with PowerVision
dberezowski
Posts: 65
Joined: Wed Sep 08, 2010 4:03 pm

ScriptFileAccessDemo script errors

Post by dberezowski » Thu Jun 16, 2011 11:06 am

I have downloaded and am trying to use the ScriptFileAccessDemo configuration. When I select "Compile All Scripts" I get the following errors. What do they mean? How do I get rid of them?

ERR :No matching signatures to 'statFile(string&, const uint)'
ERR :No matching signatures to 'listFiles(string&, string&)'
ERR :No matching signatures to 'file::delete()'
ERR :No matching signatures to 'copyFile(string&, string&, string&)'
Attachments
ScriptFileAccessDemoB.db3
(8.38 MiB) Downloaded 11 times
jpratt
Enovation Controls Development
Enovation Controls Development
Posts: 222
Joined: Mon Jun 21, 2010 11:18 am

Re: ScriptFileAccessDemo script errors

Post by jpratt » Tue Jun 21, 2011 3:51 pm

Sorry for the delay. Here are the correct signatures. I think these changed between 2.1 and 2.2. In the next version we will be including updated documentation as part of PowerVision tool itself and these will be included in those updates

listFiles( string results, int eventId)
statFile(string fileName)
copyFile(string src, string dst, int eventId)
deleteFile(string fileName, int eventId)

file::delete doesn’t exist

The eventids are to fire and event when the operation is complete

Give these a try and hopefully they will work better for ya.
Jake Pratt
Software Development Manager
dberezowski
Posts: 65
Joined: Wed Sep 08, 2010 4:03 pm

Re: ScriptFileAccessDemo script errors

Post by dberezowski » Tue Jun 21, 2011 5:45 pm

Thanks Jake. How does one use statFile given that all it takes is a filename? Where is the result?
dwills
Enovation Controls Development
Enovation Controls Development
Posts: 26
Joined: Fri Jul 30, 2010 8:27 am

Re: ScriptFileAccessDemo script errors

Post by dwills » Tue Jun 21, 2011 7:49 pm

statFile has a boolean return value. The return code is true if the file exists, false otherwise.
dberezowski
Posts: 65
Joined: Wed Sep 08, 2010 4:03 pm

Re: ScriptFileAccessDemo script errors

Post by dberezowski » Wed Jun 22, 2011 3:45 pm

Attached is a configuration and document with comments regarding the output. Note that this configuration purposely does not change states. It focuses on testing File system scripts with a focus on error detection. I am interested in:

If you would look at the blue comments.
Anything that is in red in the document.
copyFromUSB() does not fail when the user has removed the stick. Instead it sends the successEvent. To duplicate, insert stick, press MountUSB, remove the stick, press CopyFromUSB. The success event will be sent instead of the fail event. I have not been able to get the fail event to ever be sent when using copyFromUSB(). Note: copyToUSB() does not have this issue. I know that one should not do this BUT a user will and I need to be able to handle it gracefully.

Thank you for taking the time to look at this.
Attachments
ScriptFileAccessDemo_20110622.db3
Configuration
(3.15 MiB) Downloaded 19 times
ScriptFileAccessDemo_20110622.docx
(16.3 KiB) Downloaded 29 times
dwills
Enovation Controls Development
Enovation Controls Development
Posts: 26
Joined: Fri Jul 30, 2010 8:27 am

Re: ScriptFileAccessDemo script errors

Post by dwills » Tue Jul 05, 2011 1:52 pm

Hi,

When we attempt to mount the USB stick, we have to try to mount several different versions of the stick. We do this until we get one that succeeds. We have to do this since we have know way of knowing which type of stick is getting plugged in. This will cause the failure messages that you mentioned above to be sent out.

The detailed information is sent the first time that the mount is executed because we are starting the usb device driver. We only start this driver the first time that the mount is called.

There does seem to be a bug in the scritpint code, we are sending the same event Id for both success and failure. This is a straightforward fix, and we'll incorporate it into a future version. You should be able to work around this in the meantime with the stat function. Testing for the file before and after the copy.