10-27-2017 11:38 AM - edited 10-27-2017 11:42 AM
The sbRIO-9626 uses Datalight's Reliance transactional file system. According to documentation, Reliance supports three transactional models:
1. Automatic transactions in conjunction with file system operations defined by the developer. (e.g. Doing a transaction every time a file is closed.)
2. Timed transactions.
3. Explicit transactions. (e.g. Require app developer to manually execute a transaction point.)
We have use cases where we would like to do atomic operations on groups of files. I've successfully used the kernel shell to set my own file system transactions, but as far as I know LabVIEW doesn't expose the kernel shell to developers. Is there a way for LabVIEW developers to access the API for explicit file system transactions?
(Edit - I contacted WindRiver in an attempt to get VxWorks documentation and find the OS system calls to do this, but they wouldn't give it to me without purchasing a license.)
Solved! Go to Solution.
10-30-2017 06:53 PM
Daklu, based that there is no information at hand I believe there is no access for that API
10-31-2017 01:41 PM
Thanks for searching the internal databases. Can put me in touch with R&D to see if I can use the Call Library Function Node to call the functions from a .out file or perhaps even the vxWorks file on the target?
Thanks,
Dave
11-01-2017 06:52 AM
Hello Daklu,
I recommend creating a service request in our webpage www.ni.com/support is the best way to get in touch with R&D this way an Applications Engineer can be your point of contact
11-08-2017 12:49 PM
All of the following is unsupported, and almost entirely untested. Let us know how it works. If it breaks, we might be able to tell you how to put it back together.
Yes, you can use the CLN to call VxWorks APIs. In fact, by specifying the library name to simply be "LabVIEW", you can access any function present in the VxWorks global symbol table. We can't quote-unquote "support" this, because it's not a supported feature, and getting the arguments or prototype wrong could cause a crash, and you might be touching an API in a way that is not compatible with how that API is used by the rest of the system... yadda yadda yadda. All of this is also analogously true of Pharlap and Linux RT.
You have correctly ascertained that you need to trigger your own transactions to ensure file consistency. However, you also need to inhibit transactions generated by the rest of the system, because Reliance filesystem transactions are global. This means you need to disable automatic and timed transactions and prevent other manual transactions from happening. Fortunately, you probably don't need to worry about manual transactions. (Do not quote me on that). So you will need to do something like this, through CLNs:
Obviously there are going to be a few caveats to this besides "it's completely unsupported". Here are two off the top of my head.
We can't really ensure any kind of performance whatsoever. If performance is impacted, you might be able to turn off automated/timed transactions at system startup, but that is going to affect all file I/O on the system. At a minimum, you will want to explicitly trigger transactions on some sort of schedule to effect timed transactions again.
This process, as described, is not reentrant: running this more than once at a time is going to screw up your transactions. You are responsible for your own critical section management.
Good luck.
11-10-2017 11:25 AM
Excellent! Setting the library name to "LabVIEW" was the part I was missing. I created a few test vis and everything seems to be working as expected. Thank you very much!