Array of variable-length lists in Action Engine

I'm starting work on a application that consists of multiple sub-panels which each present a specific subset of the hardware functionality.  The hardware appears to the host mostly as memory-mapped registers.  I'm considering implementing the hardware interface in an Action Engine (AE) so that LV will automatically arbitrate among the hardware access requests from the sub-panels and because it (seems to me) to make the data flow more clear than the current implementation that uses a veritable plethora of queues, notifiers, and rendezvous to send requests and results between the sub-panels and the hardware interface at the top-level.
The challenge is this, though:  Certain hardware addresses need to be modeled in multiple sub-panels -- maybe data at a certain address changes the functionality of some other addresses, or maybe different bit-fields within an address are part of different functional groups.   
So any of sub-panel can request a read or write to the hardware, but often several of them need to see the resulting data.
In order to keep the design modular and expandable I don't want to hard-code anything in the hardware AE that is specific to the sub-panels.   Instead, I intend to have the sub-panels "register" with the hardware AE indicating for which addresses they need to receive updates when some hardware address is read or written to.  This means the AE will have to keep the "registration" data in an un-initialized shift-register (USR).  But I want the hardware accesses to run as fast as possible, so I would like to ask for some suggestions how to implement this as efficiently as possible (avoiding, for example, clusters of arrays...)
I imagine the sub-panel registration info might consist of a user-defined event reference (created inside the sub-panel VI) and a list of hardware addresses that the sub-panel is modeling.   Then when the hardware AE gets a request to read or write at some address it will also generate events to broadcast the data to the sub-panels that have registered for that address.   This will probably include 20-25 subpanels registering for a collective total of about 700 hardware addresses.  
I'm less concerned about memory than speed.
So, a few possibilities come to mind for how to implement the registration data in the AE USR:
A) Have one 2-D array where the array contains one row per hardware address (~320), and columns contain the event refs for all the sub-panels registered for that address.   The width of the array would depend on whichever address has the greatest number of sub-panels registered for it (maybe 4-5?), but that still means the array would be pretty large (about 6.5 kbytes if a reference is a 32-bit value?)
On the other hand, indexing into this array to look up the sub-panel references for the current address would be relatively quick and easy since the hardware address is the row number.
B) Have two arrays where the array size is the number of sub-panels:  One 1D array for the registered event refs and one 2-D array for the addresses.  But different sub-panels will have different quantity of addresses registered, so that means the "width" of the address array would be as big as the largest number of addresses registered by one sub-panel (maybe 20?).   This would use a total of only about 1.5 kbytes, but I would have to search through all 25 address arrays to see if the current address is registered.
C) or, some other way that I have not though of.   
Once the "registration" data is received from the sub-panels during program initialization it is never changed, only read.   So at first glance it would seem (A) would be the faster implementation.  But I don't know what, if any, performance hit there would be from having such a large array in a USR, which is why I'm asking here.
Any thoughts or suggestions would be greatly appreciated.
Thank you and Best Regards,
-- J.

JeffBuckles wrote:
Any thoughts or suggestions would be greatly appreciated.
Thank you and Best Regards,
-- J.
Quick thought (hardly!)...
I have used a "Self-Addressed Stamped Envelope" architectrure for those type os apps.
DAQ device has a queue it monitors for subscription requests (Think of a in-box for Marketing deparetment).
When client is created it submits a request via the queue for the subscription request that included a ref to its update queue and a list of teh channels it wants to watch. The clients then wait for updates.
The Marketing department pass the request for updates (in-box of marketing department) to the production department (I used an AE to pass the mailing list) who picks through the acquired data and passes updates as requested to all of teh subscribing clients.
Just sharing ideas,
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction

Similar Messages

  • Getting a C variable length array

    Hello,
    I'm working on a DLL library. One of the functions should return to LabView a lot of data.
    By the moment I'm doing something like this (using 'by reference' parameters):
    int getDataFromC(int* data1, char* data2, double* data3); 
    The function returns an error code, which is used to know everything goes fine. The memory of each parameter is allocated by LabView when it calls the library function. In C, the function doesn't allocate memory, it just copy the information to the space allocated by LabView (*data1 = xxx. Then LabView uses it by reading each parameter. It works fine.
    The problem is that part of the data that comes from the DLL are arrays. These arrays are generally variable length arrays. Each array always comes with other value, which describes the length of the array. So the returned array can change its length.
    By the moment I'm assuming LabView allocates enough memory to let the C code writes all the array data. But it's not a good practice...
    For example:
    int getArrayFromC(int* len, int array[]);
    The C code writes the length value to the '*len' variable to inform LabView the size of the array, and writes the N ints to the array (assuming there is enough space allocated by LabView). 
    What's the array's length that LabView uses in this case?
    On the other hand, I'd prefer to use something like:
    int getArrayFromC(int* len, int* array[]);
    In this case I can control the length of the array. It is a array-by-reference situation. I could change the array used by LabView.
    What do you recommend? I just need to get a variable length array.
    Thanks!
    Mauricio

    LabVIEW allocates as much memory for an array as is needed.  They are always variable length, as LabVIEW dynamically resizes the array if you add to it.  However, when you call a DLL, the DLL cannot tell LabVIEW to increase the size of the array as it builds it.  So, the array needs to be large enough for the DLL to fill it up, or you could cause memory corruption/crashing.
    Depending on how your DLL has been written, you may be able to use the DLL to help you.  A lot of times, you specify the length as an input with the array, and the DLL checks to see if you have enough memory allocated.  If not, then the call generates an error, and the output of the len input is how big an array is needed.  So, you make a call with a size that typically is going to be large enough, and check for the error.  If you get the error, then you resize your LabVIEW array, and call the function again to get all the data.  Another option is to always call it with 0 elements, knowing you will get an error, then allocate the array.
    If the DLL has not been written to verify you have specified enough memory, then you need to allocate an array you believe is big enough.

  • What is the proper way to javadoc a variable length argument list

    What is the proper way to javadoc a variable length argument list?
    Lets say I have the following function:
    public void foo(Integer... intArray){
    }I am just not sure how I would doc that, well, is there anything special I should note?
    Thank you for your time,
    Brandon

    Same as any other argument. Name it and say what it's for.

  • Action engine/array question

    Im sure there is an easily corrected mistake I'm making. I am going to be making an action engine where I need elements added to an array, and after the array is full, toss away old data and add the new data. If someone can tell me why this array is continuing to be all zeros i'd appreciate it. Probably misuse or misunderstanding of one of the array functions. If someone could put a photo of the corrected VI rather than attach the actual VI it I'd appreciate it as I wont be on a computer with Labview until Monday. Thanks.
    CLA, LabVIEW Versions 2010-2013
    Solved!
    Go to Solution.
    Attachments:
    actionengine.vi ‏22 KB

    If you could just take a last look at this and make any more comments I'd appreciate it. I'm trying to learn how to do this stuff as efficiently as possible the first time so I don't have to backtrack/relearn. I'll take advice on anything, except tunnel and wiring as I think I can fix that myself. I'm more worried about the actual coding. And yes, I am aware my front panels aren't organized
    Message Edited by for(imstuck) on 01-22-2009 02:59 PM
    CLA, LabVIEW Versions 2010-2013
    Attachments:
    actionengine.vi ‏67 KB
    test_action_engine.vi ‏144 KB

  • Community Nugget 4/08/2007 Action Engines

    Action Engines, What are They?
    “An action engine is Ben's term for a functional global which includes extra actions other than just holding the data.”
     (tst , 03-13-2007 01:18 PM)
    In a nut shell tst has nailed it except for the “Ben’s term” part. I was originally exposed to the term "Action Engine"
    by reading the book ""LabVIEW Applications Development A Course on Advanced LabVIEW Programming Techniques*”.  But
    before I get into details of the Action Engine (AE), I will attempt to clarify some terminology.
    Functional Globals
    Functional Globals (FG) are VIs that are functionally equivalent to LabVIEW globals. Functional Globals store
    information. You can read them or write them and that is it. No fancy stuff. Functional Globals are also referred to as
    LV2 globals because LV2 did not have globals but it did support Un-initialized Shift Registers (USRs). The USR is the
    entity that stores the information.
    USR.jpg
    USR’s
    Shift Registers (SR) come in two varieties “Initialized” and “un-initialized”. The presence or absence of a wire
    feeding the SR from outside the loop distinguishes how LabVIEW will implement the SR. If there is NO wire feeding a
    shift register (A), then the SR is not initialized. This is called an “Un-Initialized Shift Register”. The USR variety
    is implemented as static buffer that is re-used from call to call. The values written to the USR in and earlier call
    persist for access (B) in latter calls**. A Functional Global exploits this behavior by implementing two methods of
    interacting with the contents of the USR.
    Functional Global.JPG
    In the “Write” action (not shown) the value of “Numeric in” is placed in the USR. In the “Read” action the contents of
    the USR are returned via Numeric out.
    Action Engines
    An Action Engine (AE) can be thought of as a machine (Engine) that performs some useful task (action) often on
    something (typically but not limited to data in a USR). Functional Globals are very specific type of Action Engine.
    They have two actions “Write” and “Read”. They operate on the data stored in the USR either by replacing or using the
    contents of the USR. So AE’s are a superset of Functional Globals. In many documents the terms AE and FG are
    interchangeable. A recent poll on LAVA has indicated that Functional Global is the most popular term. Since this Nugget
    was prompted by answering the question “what is an AE?” in the remainder of this document you will find that I will
    generally use the term AE.
    Do What to What?
    AE design revolves around the ways the shared resource must be accessed manipulated or monitored. In a Functional
    Global, the actions “Write” and “Read” are appropriate. That is not necessarily the case for AEs. AEs can have entirely
    different set of actions depending on the interaction requirements for the information stored in the USR. A short list
    follows.
     A Configuration AE could allow for multiple processes to share a single copy of the system configuration (in a USR) by
    providing actions like “Set Device ID”, Set Device ON-Line…
    A hardware device can be realized as an AE that presents actions appropriate to the physical phenomenon being measured
    or controlled.
    A DO Port Controller AE could store a reference to the physical device in one SR and the port status in another SR and
    have action like: Set Main Motor On”, “E-Stop”, …
    An Instrument can be implemented to store the device name and settings with actions like “Set Input ON” “Auto-Scale Y”
    and “Get Trace”,…
    Screen Stacks can be implemented by using control references in one USR and maintain a screen view stack in another
    then implementing actions like “Set Config Screen”, “Set Login Screen”, “Back”…
    Users can be managed using an AE with action such as “Add New User” “Set Password”, “Disable User”…
    The list goes on and is limited only by our imagination. Here is an example that shows how a running average can be
    maintained.
    Running_Average_Example.jpg
    Running Average Example
    The Running Average Example shown above shows how a running average can be maintained using an AE. The AE is
    initialized before the While Loop executes. On each iteration of the loop the simulated measurement value (random
    number) is used to update the history of all measurements (Add Number(s)) and the mean is calculated (Calc Mean).
    Please note that although the buffer of all measurements is affected in every step of this example, the buffer (USR in
    the sub-VI) contents are never part of this VI’s diagram. Since the history is stored in the sub-VI, the history can be
    acted on from more than one thread as shown below.
    Parallel_Loops.jpg
    In the parallel Loops Example the history is initialized and then two loops run in parallel with one updating the
    history and the other plotting the average. Since the History resides inside the USR of the sub-VI the two while loops
    are effectively sharing the same block of memory, the block used to store the USR. The Sub-VI was implemented as shown
    in the following sequence of images.
    Init.jpg
    As was the case with Functional Globals, the actions are implemented as a type def’d enum***** driven case structure.
    Appropriate code is present in each case to realize the intended actions. In the “Init” case, contents of “Array in”
    are used to initialize the history. In our example above we did not pass an initial array value. Therefore the “Init”
    resets the history (cleared the array).
    Add Num.JPG
    The operation of the AE when the “Add Number(s)” action is called varies depending on its usage. If the caller passes a
    non-empty array, it is appended to the array. Alternatively, passing a value via the Numeric in” control, and leaving
    the “Array in” un-wired adds a single element to the history. We used the Numeric In input so we were continually
    building our history one value at a time.
    Calc_Mean.JPG
    When the “Calc Mean” action is invoked, the average is calculated and returned.
    This Nugget is continued in the next post
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Solved!
    Go to Solution.

    Nugget continued
    The Traffic Cop Behind the Scenes
    A detail I have not mentioned up until now is that AEs should be implemented as VIs that are not reentrant***. VIs that are not reentrant can only be executing in one context at a time. LabVIEW will ensure that if there is ever a situation were two contexts are attempting to act on the same AE at the same time, LabVIEW will schedule the first and the subsequent will wait until the first call completes. This is similar to a traffic cop preventing more than one vehicle from entering an intersection at the same time. The Traffic Cop is illustrated in the following timing diagram were we look at how the processing of two threads is affected by using a single AE.
    Execution_Timeline.JPG
    In the figure above the processing time of two processes “P1” and “P2” are illustrated by a red or blue solid arrow respectively. In the parallel loops example shown earlier, P1 could be the “Calc Mean” loop and P2 could be the “Add Number(s)” loop.
     t0 - t1
    Both processes are executable and run their assigned tasks. Neither process is accessing the AE.
    t1 – t2
    P2 continues to run while P1 calls the AE. Since the AE is idle it is available to run so P1 continues execution running inside the AE until all work inside the AE completes. The dotted arrow shows that the thread for P1 is executing in the data space allocated for the AE.
    t2 –t3
    At t2 the AE terminates and both process run as in t0 – t1.
    t3 – t4
    This time segment is similar to t1 – t2 with P2 running in the AE.
    t4 – t5
    Similar to t2 – t3 the AE terminates and both process run.
    t5 – t6
    Similar to t1 – t2. P1 take control of the AE.
    t6 - t7
    At t6 P2 attempts to call the AE. Since the AE is not idle it is not available to run. P2 is placed in a resource wait state (it is NOT running) waiting for the resource to become available. The dotted horizontal arrow indicates the process is not executing.
    t7 –t8
    At t7 the call of the AE by P1 that started at t5 completes and P1 continues to execute outside of the AE. When the call by P1 completes the AE becomes available. The process P2 is marked as executable. The scheduler includes P2 in its executable threads and the AE is available. P2 then executes inside the AE until the call completes.
    The Beauty of the AE
    This behavior of a non-reentrant VI is a wonderful feature we can exploit to eliminate race conditions. Race conditions are the nemesis of many a developer. In hardware this was solved with clocked enabled logic. In LV we solve race conditions with Queues, Semaphores, Rendezvous, Occurrences, and Action Engines!AEs can eliminate race conditions when all operations involving updates of the data stored in the USR are done INSIDE the AE. A very simple illustration of how the encapsulation of USR manipulation is shown in the following set of examples.
    Port_With_Global.jpg
    This VI is intended to demonstrate how two bits of an eight-bit port can be used to control the running state of two pumps. To illustrate the control process, one pump will be set running at start-up and then every half second the state of both pumps will be toggled to simulate switching of the supply. This example uses globals and fails miserably.
    Port_With_Global.jpg
    In this example we start out by initializing a global variable so that bit “1” (zero based) is the only bit set in an array of eight bits. This turns on Pump 2 to start. Then the “Port Update” and a “State Change” loops run in parallel. In the “Port Update” loop the state of the port is read from the global and used to update the GUI.
    In the “State Change” loop, the port status is read and the first Boolean is inverted before being written back to the global. Similarly for the second Boolean. Since the read of the globals both occur before the subsequent data processing, one of the threads will be processing old data.
    Port_With_Action_Engine.jpg
    The Action Engine version codes up the same way as the global version but now all of the data manipulation of the port states are encapsulated in the Action Engine  “Port Controller”. This encapsulation ensures all operations involving the data in the USR are forced to happen sequentially even though we did not have to implement any code to achieve this affect.
    The key point to take away from this example is a shared resource (the port status in the case) when implemented as AEs come with resource contention resolution built in provided that all manipulation of the shared resource takes place inside the AE.
    Action Engines to the rescue!
    Action Engines are not a replacement for Queues, Rendezvous and the other synchronization techniques. They are typically called for when your design dictates that a single resource must be shared by more than one parallel process and none of the LabVIEW provided techniques are sufficient. They require a design of their own to ensure they work correctly. They also have to be developed and supported.
    This Nugget is continued in the next post
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • [CS3][JS] How to get list of Actions and Action Groups

    Does anyone know of a Javascript method for retrieving the list of Action Group names and Action names as an array? I'm trying to do a check that the requested Action Group and Action is available before starting a script.
    Thank you.

    If you look at Image Processor.jsx you shuld find them near the bottom of the script.

  • Using Variable Length Argument in Constructor

    Hi All,
    I am tring to create class Address which represent Address of different people, However not all the information will be available for all the entries.I am thinking of using a Variable Length Argument in Constructor (String).Now I am unable to create a proper constructor as If few of the information say city is missing then how should the cons behave.Any help is highly appreciated.
    Below is the class
    package javaProg.completeReferance;
    import java.util.*;
    import javaProg.completeReferance.*;
    public class Address
         private String name,address,city,pincode;
         public Address(String ...)
    }

    The problem with using a variable argument constructor here is that you don't know which of the pieces of information are being supplied. Var args is nice if the information being passed has a known "meaning", but may consist of an unknown number of parts (although it's little better than an array): but that's not what you have here.
    If some of the arguments have sensible default values (even null) you could have something likepublic Address(String name, String address, String city, String pincode) {
        this.name = name;
        this.address = address;
        this.city = city;
        this.pincode = pincode;
    public Address(String name, String address) {
        this(name, address, null, null, -1);
    }(I'm treating pincode as an int by way of example.)

  • CER for multisite variable length on-net dialplan customer

    Hello -
    I am working to deploy CER for a large customer.  They have a CCM cluster supporting, as expmple, 10 sites with the following characteristics:
    1. each site has 4 digit DNs
    2. each site has it's own phone partition
    3. sites have overlapping DNs
    4. calling from one site to another requites "8" +"3 digit site code"
    5. CCM 7.x;
    6. CER 8.0
    CER is populated with switches from multiple sites so therefore will have CER database entry for DN=4000 in site1, site2, and site 7.
    Question are:
    1. If site2, DN 4000 phone calls 911, how does CER associate this caller with ERL2?
        - I am not sure what parameters are passed in the JTAPI messaging to the 911 CER Route Point to make this association?
        - assume the basics are signalled like calling/called numbers, but is additional info like mac address passed allowing CER to map ERL accurately
    2. PSAP Callback
       -assuming ERL is mapped correctly on the outbound 911 call, if PSAP calls  back and ELIN is routed back to CER properly ...
       - CER would perform callback using ELIN<=>Phone cached mapping
                      o hence CER would send JTAPI call request to CCM for x4000
                      o x4000 exists in 3 partitions
       - if I have the CER911 CTI Route Point CSS populated with each sites phone partition, it would seem that CCM would incorrectly ring the first partition listed that contained x4000
    SRND for variable length onnet design has section on CER but nothing of value (at least that I could find).   Same with the CER docs.
    Any guidance here would really be appreciated.
    Thanks
    Andy

    So, while the switchport is pecified and used to populate the CER db, that is all done before any call is made.  At that point, CER has DN, MAC, IP,...
    Correct, you build CER configuration to your design
    Phone makes 911 call, and at this point, CER has to tie this "inbound call" to a phone in the database.  That association has to use information from the JTAPI messaging which I assume to be standard compliant.  I could be way off here because we just did a test where a phone, defined in CER using switch port, was matched up properly even though I totally changed the callerid on 911 call (i.e. phone dn=4613, phone translation for 911 prefixed changed to 1111 so CER sees calling num=1111).  This callerID was not stored anywhere in CER database but it did match up the correct zone.  I have no idea how.  JTAPI must pass in mac/IP which CER uses.
    For outbound call, when phone dials 911 and the call is routed to CER via CTI RP, CER maps this call to a phone that dialed 911 through discovered DN from the Switch via SNMP/CDP, it then identifies which port the phone is connected to, looks at what ERL is assigned to the port and uses next available ELIN on that ERL to mask ANI to it and route it to CUCM. CUCM routes the call via Route Pattern to CUCM with the modified Caller ID.
    When the call drops and 911 agent needs to call back, they dial the ELIN DID, call is routed to CUCM, matches translation pattern that routes the call to CER via another CTI RP (usually 913XXXXXXXXXX), CER sees the call coming in with ELIN and checks internal db for who last called out using this ELIN, and extends the call to that phone DN, it keeps that relationship for up to 3 hours after the call was made.
    HTH, please rate all useful posts!
    Chris

  • How to deal with variable length data struct in C/JNI

    I have another JNI related question. How do you handle variable length
    data structures in Java and pointer to a pointer?
    Basically, I have a backend in C which has records but we don't know
    how many. The API looks like
    typedef struct rec_list_s {
    int rec_list_cnt;
    rec_list_data_t rec_list_data[1];
    } rec_list_t;
    int rec_list_show(void handle, rec_list_t *list_ptr);
    /* Code snippet for rec_list_show */
    int rec_list_show(void handle, rec_list_t *list_ptr)
    rec_list_t *ptr;
    sz = sizeof (rec_list_t) +
    ((record_count - 1) * sizeof (rec_list_data_t));
    ptr = malloc(sz);
    /* fill the data */
    *list_ptr = ptr;
    return (0);
    So I need to wrap rec_list_show() in JNI call so I can have Java call
    it. How do i pass a pointer to a pointer from Java? I tried in the
    native C code for JNI to return the pointer to pointer as a result
    and store in a member in the Java class rec_list_t and then I pass
    that to JNI call for rec_list_show. The C backend code was fine
    since it got the pointer to pointer but Java become unhappy when
    the object it was referencing changed memory location (I suspect
    the garbage collection becomes unhappy).
    So what would be a good way to deal with this kind of code?
    Thanks,
    Sunay
    Edited by: st9 on Aug 30, 2010 5:47 PM

    I did not imply that you don't know C but you are implying that I don't understand C. Perhaps
    google Sunay Tripathi and click I am feeling lucky so that we don't get into teaching C
    discussions :) On the other hand, I am definitely looking for someone to teach me Java
    otherwise I wouldn't be asking.
    Anyway, let me explain again. The sample function rec_list_show() runs on the backend. It
    is a different process with a different VM space. It of course knows the size of the array
    and what to fill in. As a caller to that API (which is a separate process), I don't know
    what that size is but I need to get the size and corresponding data in one shot because
    the backend locks the table when its providing me the info to make sure its synchronous.
    Now I (the Java process) needs to get that count and data in one shot. Since the C library
    underneath me (wrapped around my JNI interface) has private IPC mechanism to copy
    the contiguous memory from the backend into my memory space, all I need is to provide
    a pointer to a pointer which gets filled in by backend and is available to my process. So
    my equivalent C frontend just passes a pointer to a pointer and casts the return value in
    rec_list_t. The rec_list_cnt tells it how many members it got. The first member is part of
    the struct itself but then following members are right after.
    Another way to help you understand this is with this code snippet from front end C program
    rec_list_t     *ptr, *save_ptr;
    rec_list_data_t *data_ptr;
    int          cnt;
    save_ptr = ptr = malloc(sizeof(rec_list_t));
    rec_list_show(handle, &ptr);
    assert(save_ptr != ptr);
    cnt = ptr->rec_list_cnt;
    for (i = 0; i < cnt; i++) {
         data_ptr = &ptr->rec_list_data;
    Notice the assert(). Also notice the for loop. How do I expect to walk more that one
    member when rec_list_data is a fixed size array of one member?typedef struct rec_list_s {
         int               rec_list_cnt;
         rec_list_data_t          rec_list_data[1];
    } rec_list_t;
    Anyway, I do understand that Java will not allow me to get a reference to a long and
    how Java memory management works. But the JNI native implementation is C
    and I was wondering if people have managed to do some tricks there between C
    and Java.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How to use the "IN"  method in ejb3ql  -------variable of LIST

    public List findExamScoreinterface(List userid){
    String connselect="select o from TCJExamScore o where o.userID IN(:userID)";
    Query query=em.createQuery(connselect);
    query.setParameter("userID",userid);
    return query.getResultList();
    It can not perform correctly above.Can anyone can help me?
    TCJExamScore is the name of entity.
    I want to find the correct record where the field (userID) is contained in the variable of LIST which value id userid.

    In APEX if we are submitting the page the parameters( Variables ) will pass through URL.No they won't. Submission POSTs the <tt>wwv_flow</tt> form.
    Sometimes a branch may be performed after submission, generating a URL in which parameter values are visible. To avoid this, use the save state before branching option.
    Other actions&mdash;like using navigation lists, or clicking a link in a report&mdash;will perform a GET using parameters in the URL. In these cases using Session State Protection is advised.

  • C-style variable arg list handling in Call To Library VI?

    I have Labview 6.0 on a Windows 2000 PC and I have a DLL with routine that I am trying to call in a VI. I am using the Call Library Function VI to call this routine. My problem is this. The routine uses a C-style variable argument list (like the printf function). In other words, the routine can accept any number of arguments and will decide how many of those arguments to process and what those arguments mean based on the values of the arguments.
    Is there a way to handle such variable argument lists in Labview, or do I have to create a different VI for each possible argument list length?

    Thanks. So, just to double check, the only way to work with a DLL routine that can have arbitrary numbers of arguments is to guess ahead of time how many arguments there will be and create the appropriate number of terminals? I have a related question which you might be able to answer. I've noticed that some VIs offer a "add terminal" contextual menu option. If wanted to create a wrapper VI for a Call to Library Function VI that calls on a variable argument function and handles some intermediate processing, could I give such a VI a "add terminal" option? If so, how do I manage added terminals within the wrapper VI?
    Thanks,
    Neal

  • Action Engine indicators do not update?

    This action engine is part of a larger test. I call it every 15 minutes to test for temperature stabilization (four consecutive readings at 15 minute intervals within three degrees)
    It seems to work as far as detecting stabilization but I don't understand why it's numerical array indicators do not update.
    If you run this by it's self and fill numbers in the Temperatures array control all the indicators work.
    But when it is a sub-vi all the indicators remain grayed out or in their initialized state when I open it while it is running.
    I even have brought the Stab Array out with a terminal thinking it would be updated every time the sub-vi ran, but it is not.
    What is going on here?
    Solved!
    Go to Solution.
    Attachments:
    Check Stab.png ‏50 KB

    It seems to work OK for me.
    Here's what I did:
    Put snippet on block diagram
    Disconnected Function control from Type Def
    Wired controls and indicators to connector pane
    Then I placed the AE in a main program. Being lazy, the main uses a breakpoint to stop each execution of the loop so you can vary the Temperature inputs.
    steve
    Weinberg's Second Law: If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization.
    Help the forum when you get help. Click the "Solution?" icon on the reply that answers your
    question. Give "Kudos" to replies that help.
    Attachments:
    main.vi ‏10 KB
    AE.vi ‏18 KB

  • Telnet Read VI and variable length response

    I am trying out Internet Toolkit's Telnet VIs.
    It seems that the Telnet Read VI defaults to 60 bytes.
    I am not sure what is the best way to deal with the situation of a variable length response.
    Some responses are 3 lines; others can be 50 lines.

    the line seperator is explicitedly <CR><LF> or carriage return and line feed. No other line seperator is automatically supported.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Orphaned Group Headers in Variable length Subreports.

    I have a report is composed of a number of subreports that each have 3 nested groupings.  I am trying to figure out how to keep the subreports from printing GH1 on a page when GH3 will not fit on that same page of the main report.  I have read the knowledgebase articles and forum posts about preventing widowed headers when your results are in the details.  Unfortunately, for the purposes of our reports, these do not apply because we have to put our "details" data in GH3 and supress the actual Details section.  As a further complication, I cannot uncheck "Repeat Group Header On Each Page" or check "Keep Group Together" for GH1 within the subreport because it is appropriate for these headers to repeat most of the time and each subreport is of variable length and keeping the group together could leave too much white space between subreports when the each GH1 has to start on a new page.  For similar reasons, I cannot use "Keep Object Together" on the subreport.
    Any help is appreciated.

    Post Author: hamish_sco
    CA Forum: General
    In Design View, right-click on the group header area on the left of the screen (in CR10 it is grey and has a list of page sections - RH, PH, D etc)Choose 'Change Group' optionOptions tab - Tick the 'Keep Group Together' option.When I did this I also had all the 'Keep Together' options in the Section Expert unchecked.  This may or may not make a difference.CheersHamish

  • First foray in LVOOP mixed with Action Engine functionality, would appreciate comments

    Hello (LVOOP) experts!
    I am a big fan of Action Engines (AEs), and use them very regularly.
    Now, say I wanted to have a Logging module that writes text to a log file, I can create an Action Engine for this and all is well, i.e. I can drop this VI anywhere in my hierachy and it basically just works. I like to encapsulate AE in a lvlib.
    So, what if I wanted a second Logging module, doing exactly the same thing, but operating on a different file. Well, I could create a new copy of the Action Engine in the project, duplicating the code and giving the second AE a different name. This is of course a bit clumsy, as what if I wanted 100 of these!
    I suppose I could make the AE re-entrant (cloned) use VI server to obtain a second copy of the AE, but I have not tried this.
    So what I decided to do is make a LV Class, and just instantiate a second class as needed. I really really really like the ability of AEs to drop them anywhere without wiring all the way through the hierachy, so that was a design goal with my LVOOP implementation. As far as I can tell, one way to do this is using single element named queues (sort of a singleton design pattern).
    The attached code is my attempt, I would really appreciate comments, both positive and negative.
    nrp
    CLA
    Attachments:
    Logger LVOOP.zip ‏54 KB

    tst wrote:
    What you've basically built is a SEQ-based, by-ref class (although you pass a name, not a reference), which is certainly a valid construct. dqGOOP has been doing that for years and the singleton example also uses this, as you mentioned.
    Some comments:
    You really don't need the object as an input. It can be a constant on the diagram.
    You could make this a by-ref system and pass the object which holds the queue reference, similar to the singleton example. This has less chance of braking, IMO.
    Instead of acquiring the queue in each member VI, create an LV2 manager VI - when it gets a name it looks up its reference in an array. If it doesn't find it, it creates a new ref and returns it. If it does find it, it returns it. That simplifies some of the code you have to replicate for every member VI.
    The fact that you have to replicate code at all for member VIs is annoying. It would be great if LVOOP had by-ref support built-in or could at least create data access VIs from a template.
    1. Fixed. I copied this technique from Dr D's Xylophone project. I thought if you drop the class constant on the BD it actually creates a new object each time?
    2. Not sure I get you on this one, could you provide some more enlightenment please.
    3. Done. Probably not the most efficient implementation though...
    4. Agree it sure is annoying!
    New version with basic queue manager attached!
    nrp
    CLA
    Attachments:
    Logger LVOOP v2.zip ‏75 KB

Maybe you are looking for

  • My Seagate Expansion 500GB external hard drive no longer works with my Mac

    Hi i have had a seagate expansion hard drive for the last year ish and it has worked as a time machine without any problem. when i first got it i had to format it to windows but that was simple and worked well. recently i unplugged it for a few weeks

  • Photoshop CC crashes when exporting image to PDF file

    Hello all, I have recently started using PS, and when I attempt to save an image as a PDF, it makes it to about 97% and leaves a temp file, but crashes before it can complete. I have provided a copy of the crash log below: Faulting application name:

  • How can I move image in a div box on hover?

    I have an image 50 x 1000 (tall/thin) The div is 50 x 500 Now what I need is for the top half of the image to show only when the div is displayed normally, The rest of the image needs to be concealed. But when I hover over the said div I need the ima

  • Icons are not displayed, Weblogic Application server 11 network: Cache entr

    I am using weblogic application server 11g operating system windows 64 bit I have created jar file, I signed the jar file using sign_webuitl.bat. My jar exist in C:\Oracle\Middleware\as_1\forms\java folder. I configured formsweb.cfg file archive= myi

  • Want to disable the pricing conditions in VA02

    Hi, When we create or change the Sales Order from VA01/VA02 with refrenced to contract always. It copies the pricing conditions from Contract. We are using PR00 pricing conditions. In Sales order it is Write mode. But we need to disable that, so no o