LAVA Forums Buy cool LAVA gear Forums RSS Feed

Welcome Guest ( Log In | Register )

Before you submit code to the Code Repository, please make sure you have read the following:
Introduction - Submission Guidelines - Submission Procedure - (post questions here)

  Search Files 

> General reference system

Screenshot
File Information
File Name General reference system by bsvingen
Submitted Sep 11 2006, 05:09 PM
Last Updated Sep 18 2006, 07:21 PM
File Type File Type (zip - application/zip)
Screenshot Click here for full screenshot
Statistics
File Size 298.34K (Estimated Download Times)
Views 1717
Downloads 324
Add Rating
An LVOOP class that creates and controls reference-data pairs. The basic idea is to simulate random access memory and malloc()/free() by using one single LV2 style global. The data can be of any type (including any LVOOP class and strict typedefs) and can be allocated in any order. The only restriction to the number of references is the physical memory on the computer. The global stores data in a Variant Array and uses a separate Bool Array to control access and free/protect the data.

The "address" to the data that is stored in the reference (LV Object) ,is the index in the Variant Array where the data is stored in the LV2 Global. By using Variant as the type, it is possible to get a reference to all types, and there is no need to manually change a typedef and possibly the names for every vi when more than one typedef will be used.

A small performance penalty is introduced due to the type conversions to/from Variant. However, due to the inherent effectiveness of LV2 style globals, this method is still 2-3 times faster than an equivalent scheme made with wrappers around queue primitives, but slightly slower than using queue primitives directly, (no wrappers around the queues, see example provided). For an even faster reference system, twice the speed of queue primitives, se the separate "Pointer System" on this Code Repository.

In contrast to queues that can be regarded as synchronous references to data, this reference system is fully asynchronous.

Allocation and freeing of data is done dynamically.

Allthough this reference system may at first glance have some resemblence to "classic" GOOP, it is by no means a GOOP system. The main purpose of the reference system is to have a fully asynchronous and fully reusable system for read and write access to one single instance of data in more than one place.

All the VIs in the library are documented.
Other Information
Support Topic Click here to visit support topic
File Version 01.00.03
LabVIEW Version 8.2.x
License Creative Commons Attribution 2.5 License
Operations
Approved by Michael_Aivaliotis on Sep 11 2006, 06:35 PM
Download File

Search Files 

Collapse

> Code Repository Statistics

Last ten submissions accepted · Downloads system statistics 
2 user(s) active in the past 15 minutes
Active Users 1 guests, 1 members, 0 anonymous members
Code Repository Statistics
Board Stats We have a total of 74 files in 13 categories
A total of 40 unique authors have submitted to our site
There have been 28747 logged downloads to date
The latest file submitted was Skype SDK by Antoine Châlons (submitted Dec 24 2008, 09:44 AM)


Time is now: 6th January 2009 - 09:17 PM