Callback function as soon as animation complete

Hi all,
My question is very straight forward:
I would like to fire up a function as soon as a symbol has finished playing, and i would like to write the code in the stage event.
Ive created a very simple exmple for the matter:
I have two symbols each with a very simple animation taking them out of the screen, and each with a trigger on 0ms - sym.stop();
I start rect1 animation in the stage event and i would like to call a callback function as soon as rect1's playback is complete.
screensohts attached:
I think a lot of people would like to see a sulotion to this issue.
thank you!
Asafg84

Hi Anne, thank you for your reply
I generate children of a symbol dinamically, in very large numbers. The symbols playing could be brothers (children of the same symbol) and i want only one of their animation complete to trigger a callback function,
additionally in the child symbols there are a lot of sequences of animation (I play them according to certain events), and it doesnt make good practice that i call a function at the end of each sequence.
putting all my code at stage level gives me the most control and its the best practice, and sometimes necessary. i should be able to do that.
Have a wonderful day and thanks again for the answer!
Asafg84

Similar Messages

  • Asynchronously writing and callback function

    hi everybody,
    i am working on an asynchronous write operation as described in
    'Asynchronously Reading and Writing with the NI-DAQmx Visual C++ Class Library'
    in the Visual Studio .NET documentation.
    I've worked with asynchronous read functions and callbacks (the OnEvent function in this example) before, and it worked
    well.
    Atm i am doing output to 16 digital outputs on my PCI6259 card. I want to output a waveform stored in a vector containing about 1000 samples.
    So i installed the event handler for my writer object, and started the output by calling
    'WriteMultiSamplePortAsync'.
    The problem is, that the callback function 'OnEvent' is called after the first sample of my vector is sent, and not after the complete vector.
    i need to know when my whole buffer is through, because i have to recalculate it and send it again...
    Anyone has an idea where the problem is?
    Thx in advance
    markus

    Well i've attached a somehow simplified code of my problem.
    First i start two tasks, one counter, which acts as sample clock for my digital output, and the digital output task itself.
    In this example i use a output frequency of 100kHz.
    Then an event handler for my digital write operation is installed.
    Next, i create a vector with size 1000, fill it with some data and write it out calling 'WriteMultiSamplePortAsync'
    What i would expect now, is that the OnEvent-function is called, as soon as all of the 1000 samples of my output vector have been sent.
    But what really happens is that OnEvent is called after the first of the 1000 samples has been written.
    As i said before, the same procedure works fine with analog input tasks.
    Regards
    Markus
    Attachments:
    AsyncDigitalOut.cpp ‏3 KB

  • JNI Multithreading/Callback Function Design Issues

    Ok, I have been working on this for quite some time now and I simply can not figure it out. So any ideas are more than welcome. :)
    I have Java code that uses a DLL that I created in C++. My C++ code links with a library made by a 3rd party (don't have access to the source or anything). The 3rd party's code creates a new thread and calls a callback function that I define in my C++ code. This callback is called continuously until I perform some other code to stop it. Now for the tricky part. In my callback function I need to pass some data back in Java. Here is where my design falls apart. Since the callback function is technically part of the 3rd party's thread, I have to call AttachCurrentThread() in the callback to get the JNIEnv pointer in order to ultimately call my desired Java method. The problem is that my Java method (or even the C++ callback function) are only invoked if I do a sleep() in my C++ code after I start the 3rd party code which creates the thread. If I do a Thread.sleep() in Java after I call the native function code, it just sleeps and the callbacks never get called. It appears as though the thread dies as soon as I return from my C++ code.
    So now I am stuck. I have tried creating a thread in Java which simply calls the C++ code and the C++ code just loops waiting for an updated flag, however, this causes the 3rd party's thread creation code to fail (not quite sure why). However, even if their code worked, I'm not convinced this is even proper design. I apologize if this is simply a threading design principle as my multithreading programming techniques are a bit rusty and I've never done a multithreaded application this complex (this is a simplified version, but the idea is the same).
    I welcome any suggestions or even documentation that may lead me in the right direction. Thanks in advance.

    I have a similar issue.
    from java I call a dll I wrote, which calls a third party scanner dll (cyber.dll). Everything works ok, except, when an event in the scanner occurs, it calls the call backin my dll, which calls the callback in java, which kills the vm with an access violation. If I execute the call back to java from a c method which I just called from java, it works, but if it gets called outside of the java execution of the native code, it fails.
    I havent done anything with treads or syncronisation. Do I need to do this AttachCurrentThread stuff? If so, where do I get the _jvm handle as Im not starting the vm from c?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • CALLBACK functions in cvi

    hi,
    Need a simple clarification on working with callback function.
    i have 3 different callback buttons function as start test, stop test, quit.
    Whenever Start test button is pressed by EVENT_COMMIT, it calls some functions and executes the same. in the middle of this function execution i need to stop the test by pressing stop test button or i need to quit the interface. How can i do this?
    i am facing problem like once i press the start button i am not getting controls to other button until the all functions available inside start button gets completed.
    Thanks in advance
    Solved!
    Go to Solution.

    The sleep (1000) and not calling ProcessSystemEvents () are the reasons!
    Sleep () completely blocks the program until the time has expired. It is advisable that you dont call it for long intervals!
    If you don't call ProcessSystemEvents () you cannot get stop button press
    Try modifying the code this way:
    int    requestToStop;    // Define this at module level
    int CVICALLBACK Btn_Start_Test (int panel, int control, int event,
      void *callbackData, int eventData1, int eventData2)
    switch (event)  {
     case EVENT_COMMIT:
       requestToStop = 0;    // Clear stop flag and start the test
       if (Tree_getselectedChilditems())
           MessagePopup ("Info", "Operator stopped the test!");
       else
           MessagePopup("Info","TEST COMPLETED SUCCESSFULLY");
       break;
     return 0;
    int CVICALLBACK btn_stop_test (int panel, int control, int event,
      void *callbackData, int eventData1, int eventData2)
     switch (event)  {
      case EVENT_COMMIT:
        requestToStop = 1;
    //  XL_KillWindowsProcess("EXCEL.EXE");//not exactly excel file,it may be any file which is running 
        break;
     return 0;
    int Tree_getselectedChilditems (void)     //double testcaseno)
     int noOfItems;int val,i;  //int index;
     int noOfChild,index=1;
     char treelabel[500]={0};
     char charval;char TCno[100];
     int select;  char testno[100]={0};
     double tini;
      for(error = GetTreeItem (panelHandle, PANEL_TREE, VAL_CHILD, 0, VAL_FIRST, VAL_NEXT_PLUS_SELF, VAL_MARKED, &index);
              index >= 0&&error<=0;error = GetTreeItem(panelHandle, PANEL_TREE, VAL_ALL, 0,
                    index, VAL_NEXT, VAL_MARKED, &index))
             GetTreeCellAttribute(panelHandle, PANEL_TREE,
                index, 0, ATTR_LABEL_TEXT, treelabel);
       Scan(treelabel,"%s",TCno);
       strcpy(testcaseno,TCno);
    //   Sleep(1000);     // Substitute this line with the following code
         tini = Timer ();
         while (Timer () - tini < 1.0) {
            ProcessSystemEvents ();
            if (RequestToStop) break;     // Operator stoo
       readTestcasesheet(ExcelWorkbookHandle, ExcelWorksheetHandle,testcaseno);
       Fmt(treelabel,"%s",""); 
       if (RequestToStop) break;     // Operator stop
      return requestToStop;
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Edge Triggered Callback Function with E Series DAQCard

    Hardware: DAQCard-AI-16XE-50
    Software: NI-DAQ 6.9.1 call from C++
    Q- Does anyone have sample code to initiate a callback function in C++ when a pulse edge is input to a DAQCard-AI-16XE-50? I am using ACH1 as the input channel. Pulse edge occurance will be low duty cycle.Below code doesnt work..
    (I could use a latch & poll but edge triggering would be cleaner!)
    status = Set_DAQ_Device_Info(1,ND_AI_FIFO_INTERRUPTS,
    ND_INTERRUPT_EVERY_SAMPLE);
    retValue=NIDAQErrorHandler(status,"Set_DAQ_Device_Info (FIFO Interrupts)",0);
    status = Set_DAQ_Device_Info(1,ND_DATA_XFER_MODE_AI,
    ND_INTERRUPTS);
    retValue=NIDAQErrorHandler(status,"Set_DAQ_Device_Info",0);
    status = Config_ATrig_Even
    t_Message(1,1,"AI1",3,1,1,0,
    0,0,0,0,(unsigned int)EdgeCallbackFunction);
    retValue=NIDAQErrorHandler(status,"Config_ATrig_Event_Message",0);
    Thanks Millions if you help!!

    Hi kittyKat,
    The easiest way to create an interrupt service routine or callback function triggered on a digital edge is to use DAQ Event Messaging. In C, you can program for your DAQ board by using the function Config_DAQ_Event_Message. The different events you can account for are:
    DAQ Event type 0 � Acquire or Generate N Scans
    DAQ Event type 1 � Every N Scans
    DAQ Event type 2 � Completed Operation or Stopped by Error
    DAQ Event type 3 � Voltage out of bounds
    DAQ Event type 4 � Voltage within bounds
    DAQ Event type 5 � Analog Positive Slope Triggering
    DAQ Event type 6 � Analog Negative Slope Triggering
    DAQ Event type 7 � Digital Pattern Not Matched
    DAQ Event type 8 � Digital Pattern Matched
    DAQ Event type 9 � Counter Pulse Event
    If you are not
    using your analog input on your DAQ board, you can setup an analog input and use your external signal as an external clock. This would involve you using one of the shipping examples for analog input with an external clock and adding the DAQ Event Messaging for Event 1 and have the interval be 1 value. Therefore, your callback function will be called every scan or every time your signal pulses high (as the external clock). I've included some useful resources below.
    Using DAQ Event Messaging under Windows NT/95/3.1
    http://zone.ni.com/devzone/conceptd.nsf/webmain/159C194435C8CA5786256869005EF6AE?opendocument
    DAQ Events and Occurrences
    http://digital.ni.com/public.nsf/websearch/9F3DAD3E227E4203862566C2005B11EB?OpenDocument
    Hope that helps. Have a good day.
    Ron
    Applications Engineering
    National Instruments

  • Callback function for addtocart()

    Hi everyone,
    I need to setup a callback function after addtocart(). Is there a way to do this?
    Thanks.

    Official one coming soon. You would have to override the addtoCart with your own currently (Standard overriding of javascript functions method)

  • Queue with callback function - strange behaviour when using max_retries

    Hi,
    I hope someone can tell me what is wrong or can explain the following strange behaviour to me.
    I am using one queue with a registered callback function. To test the behavoiur in case of an error I tested different settings, with or without explicit exception queue and with or without parameter max_retries.
    Database Version is 11.2.0.2.   Enterprise Edition
    I enqueue 10 messages in a loop.
    I define no exception queue and do not set max_retries
    ==> all messages stay in the queuetable with q_name = AQ$_... (implicit exception queue) and retry_count = 5
    I define no exception queue and set max_retries = 4
    ==> 1 message stays in the queuetable with q_name = AQ$_... (implicit exception queue) and retry_count = 4
           9 messages stay in the queuetable with q_name = nomal queue name and retry_count = 0
    I define an exception queue and set max_retries = 4
    ==> 1 message is transfered to the Exception Queuetable with retry_count = 4
           9 messages stay in the normal Queuetable and retry_count = 0
    I define an exception queue and do not set max_retries
    ==> all 10 messages are transferred to the Exception Queuetable with retry_count = 5
    I have no explanation for the behaviour in case 2 and case 3.
    To create the queue and the callback I use this code (reduced to minimum):
    begin
       DBMS_AQADM.CREATE_QUEUE_TABLE(Queue_table        => 'TESTUSER.TEST_TABELLE'
                                   , Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE'
                                   , sort_list          => 'enq_time'
                                   , multiple_consumers => FALSE
       DBMS_AQADM.CREATE_QUEUE( queue_name  => 'TESTUSER.TEST_QUEUE'
                              , queue_table => 'TESTUSER.TEST_TABELLE'
    --                          , max_retries => 4                     uncomment this line to set max_retries
    -- uncomment the following Block to use an explicit Exception Queue
    /*   DBMS_AQADM.CREATE_QUEUE_TABLE(Queue_table        => 'TESTUSER.TEST_TABELLE_EXC'
                                   , Queue_payload_type => 'SYS.AQ$_JMS_TEXT_MESSAGE'
                                   , sort_list          => 'enq_time'
                                   , multiple_consumers => FALSE
       DBMS_AQADM.CREATE_QUEUE( queue_name  => 'TESTUSER.TEST_QUEUE_EXC'
                              , queue_table => 'TESTUSER.TEST_TABELLE_EXC'
                              , queue_type  => dbms_aqadm.EXCEPTION_QUEUE);
       DBMS_AQADM.START_QUEUE('TESTUSER.TEST_QUEUE');
    end;
    create or replace procedure test_procedure
      (context  RAW
      ,reginfo  sys.AQ$_reg_info
      ,descr    sys.AQ$_descriptor
      ,payload  VARCHAR2
      ,payloadl NUMBER
      ) authid definer
      IS
      -- für Queue
      dequeue_options   DBMS_AQ.dequeue_options_t;
      message_prop      DBMS_AQ.message_properties_t;
      message_hdl       raw(16);
      message           sys.aq$_jms_text_message;
      l_daten           VARCHAR2(32767);
      ex_hugo          EXCEPTION;
      BEGIN
        dequeue_options.msgid         := descr.msg_id;
        dequeue_options.consumer_name := descr.consumer_name;
        dbms_aq.dequeue(descr.queue_name, dequeue_options, message_prop, message, message_hdl);
        -- to provoke an error
        RAISE ex_hugo;
        -- regurlar coding
        commit;
    exception
      when others then
           rollback;
           RAISE;
    end;
    DECLARE
       reginfo1    sys.aq$_reg_info;
       reginfolist sys.aq$_reg_info_list;
    BEGIN
       reginfo1 := sys.aq$_reg_info('TESTUSER.TEST_QUEUE', DBMS_AQ.NAMESPACE_AQ, 'plsql://TESTUSER.TEST_PROCEDURE?PR=0',HEXTORAW('FF'));
       reginfolist := sys.aq$_reg_info_list(reginfo1);
       sys.dbms_aq.register(reginfolist, 1);
       commit;
    END;
    to enqueue my messages i use:
    DECLARE
      message            sys.aq$_jms_text_message;
      enqueue_options    dbms_aq.enqueue_options_t;
      message_properties dbms_aq.message_properties_t;
      msgid              raw(16);
      v_daten            clob;
    BEGIN
       message := sys.aq$_jms_text_message.construct;
       for i in 1..10
       loop
          v_daten := '{ dummy_text }';
          message.set_text(v_daten);
    -- uncomment the following line to use an explicit Exception Queue     
    --      message_properties.exception_queue := 'TESTUSER.TEST_QUEUE_EXC'; 
          dbms_aq.enqueue(queue_name         => 'TESTUSER.TEST_QUEUE',
                          enqueue_options    => enqueue_options,
                          message_properties => message_properties,
                          payload            => message,
                          msgid              => msgid);
          message.clear_properties();
       end loop;
       commit;
    END;

    Hi Chris,
    I tried to reproduce your complaint, but was unable to. I didnt use auditting however, just a series of "select user from dual" with proxy authentication. You might want to see if you can put together a small complete testcase for this and open a sr with support.
    Cheers
    Greg

  • Declaring Callback Functions in CSXS Extension (for Flash)

    A few features offered in Flash's scripting language are handful of event listeners you can attach to Flash that will in tern call any associated JSFL function you've attached to them while Flash is running. You can then listen for events like "documentNew", "documentChange", "mouseMove", etc.
    JSFL Code Would Look Something Like this:
    fl.addEventListener("documentOpened", myDocumentOpenedHandler);
    function myDocumentOpenedHandler()
         swfObject.call("callBackFunction_InsideFlashPanel");
    My swfPanel registers a callback function, "callBackFunction_InsideFlashPanel" which would handle the event inside the panel.
    This is a way of ensuring my Panel is notified when a change takes place in Flash.
    Adobe has an article about it here:
           http://help.adobe.com/en_US/Flash/10.0_ExtendingFlash/WS4B030CF7-0681-47e3-9E2C-9A6D799980 AA.html
    My question is, how should this be implemented in a CS Extension using the CS SDK?
    Thanks,
    Clint G.

    Right. The whole point of the question is if is possible to
    dynamically declare functions for use as callbacks.
    For example, in the standard loading functions, you register
    a callback like this:
    var load:Loader = new Loader();
    var req:URLRequest = new URLRequest(swf);
    load.contentLoaderInfo.addEventListener(Event.COMPLETE,
    swfloadcallback);
    load.load(req);
    function swfloadcallback(e:Event):void
    The problem with the standard callback function is that I
    can't add additional arguments to it. For example, I couldn't have
    swfloadcallback take in an additional argument (for example the
    index of the swf I'm trying to load). What I'm wondering is if in
    actionscript 3 it's possible to dynamically declare callbacks such
    that I only have to write the code once, but in essence I am adding
    additional parameters to the callback.
    Hence the example I listed above. What I was trying to
    accomplish there was basically dynamically creating callbacks that
    understood which index to insert the loaded image into. But clearly
    that example doesn't work.

  • How to write c wrapper it containing callback functions

    hi here shambhu below call can be containing some call back functions ,how can create wrapper for this,please suggest me
    _export int GDSRegisterStation(char *sPort, char* sPanel, int iStation, GDSCallback lpGDSTaskCall); /*
    This call hooks up user application onto the GDS environment. From this point on, the GDS application has continuous, concurrent access to the virtual machine representing the test system. As multiple independent test systems may be hooked onto the same host computer, the call needs to specify a "Port" (unsigned uPort) to which GDS memory access is sought. Character string sPanel (up to 63 chars) identifies the calling GDS task to the Virtual Machine. This entry will assist the System Manager in monitoring active GDS tasks by their assigned names. As multiple test stations (each with one or more control channels) may be associated with the same controller, (int) iStation specifies the station to which this application will be connected. (GDSCallback) lpGDSTaskCal specifies the subroutine in the user application that is to be installed as the real-time callback into the Virtual Machine. From this moment on, the specified subroutine will be automatically called by the Virtual Machine to periodically All subsequent calls to the GDS library will apply to this Station and its control channels. This call is made only once and prior to other GDS calls. 0 is returned upon normal completion -1 is returned if the call was a failure due to absence of GDS space associated with the call. Make sure station is connected and On-Line and make sure Port No was correct in the call -2 is returned if the application was already registered by a previous call

    You will have to write a wrapper DLL in C which converts the callback event into a LabVIEW compatible event. The most versatile way would be to generate a user event with the PostLVUserEvent() LabVIEW manager function. Callback functions are however an advanced C programming construct, so you should definitely have a pretty decent understanding of C programming before starting this endeavour. Otherwise you end up with a not working solution or maybe even worse, one that seems to work sometimes but doesn't really do the right thing.
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • Notification custom callback function

    Hi,
    I want use a custom callback function instead of the default wf_engine.cb.
    Can someone tell me how to proceed?
    Thanks.

    Hi Dany,
    Is your scenario is where you have a custom application and want to complete that application process using the callback function? In such cases, you should be using the callback function.
    You should the Notification APIs to send such notifications. The Notification Send API includes a parameter for the Custom Callback function.
    The Notification API section of the workflow guide also documents the signature and other details of a custom callback function.
    Workflow also provides a Post Notification Function api which could perform back-end logic to either validate the legitimacy of the forward/transfer or execute some other supporting logic.
    Hope this helps,
    Raja

  • How to create a callback function module

    Hi all,
    I am working in a requirement where we need to call a function module at a 'after change' event. So how to create a callback function module and register it with the crmvevent ?_
    I created a sample function module and try to create entries in table crmv_event_cust, but i got an error message saying that the function module name I provided is not in table CRMC_FUNC_ASSIGN. When I try to create entry there, I got a message that function module is not in CRMC_OBJ_FUNC and that table is a standard table with no maintanance options !!
    looks like i am going in wrong way ... can any one please help ??

    Looking at my system all you need to do is create the entry for the callback function in maint view: CRMV_FUNC_ASSIGN.
    Your entry should be as simple as Z-function name Object Function - <same as others in the segment you are assigning>
    IE for the partner it would be CRM_PARTNER as object function, for general order processing CRM_ORDER
    Take care,
    Stephen

  • Calling a method from a callback function under ARC

    Hi All
    I previously wrote some HIDManager software. The HIDManager references were done in a Objective C class so within this object you have the code:
        IOHIDManagerRegisterDeviceMatchingCallback( k8055HIDManager, k8055BoardWasAdded, (__bridge void*)self );
    Which registers with the HIDManager
    The Callback function which is outside the class was as follows:
    static void k8055BoardWasAdded(void* inContext, IOReturn inResult, void* inSender, IOHIDDeviceRef k8055HIDDevice)
        IOHIDDeviceOpen(k8055HIDDevice, kIOHIDOptionsTypeNone);
        CCVellemanK8055Driver * k8055 = (__bridge CCVellemanK8055Driver *)inContext;
        [k8055 setHardwareConnectionStatus : YES];
    Any how my problem is in converting the code to ARC as under OS X 10.9 SDK and 64bit I'm now getting a EXC_BAD_ACCESS (Code=EXC_I386_GPFLT) at this line
        CCVellemanK8055Driver * k8055 = (__bridge CCVellemanK8055Driver *)inContext;
    although removing the method
    [k8055 setHardwareConnectionStatus : YES];
    will alow it to build but then obviously the app won't work as required.
    Could someone suggest a ARC safe way of accessing the passed instance so I can again call methods on it.
    Cheers
    Steve

    Try using blocks instead. This is the callback I am using for libcurl.
    static size_t callback(
      void * contents, size_t size, size_t nmemb, void * context)
      size_t (^block)(void *, size_t) =
        (__bridge size_t (^)(void *, size_t))context;
      size_t result = block(contents, size * nmemb);
      return result;

  • How to change the Callback function of a GUI button?

    I would like to change the callback function associated with a GUI button dynamically in the programming way.
    Here is the code piece I tried, but it does not seem to work:
    const char* pstrLabelSaveJpeg = "SaveJpegCb";
    SetCtrlAttribute(pahel_id, ctrl_id ,ATTR_LABEL_TEXT, pstrLabelSaveJpeg);
    int CVICALLBACK SaveJpegCb(int panel, int control, int event, void *callbackData, int eventData1, int eventData2);
    Solved!
    Go to Solution.

    The attribute you used is about the "label" of the button.
    It is just an appearence attribute. You can write your own name on it, but that does not change the callback function.
    You should change the ATTR_CALLBACK_FUNCTION_POINTER attribute, and you should not pass the function name as a string.
    So your function call will look like this:
    SetCtrlAttribute(pahel_id, ctrl_id, ATTR_CALLBACK_FUNCTION_POINTER, SaveJpegCb);
    Of course, you have to declare the SaveJpegCb function somewhere above that line.
    I think you have already done that.
    S. Eren BALCI
    www.aselsan.com.tr

  • Queue with callback function not dequeuing

    Hi,
    I would like to ask you for help or for a hint regarding our problem with the queue:
    A trigger is enqueuing to a queue. This works fine, but the callback function is never called. The queue already worked for a while, but since i changed something at the procedure called by the callback it does not work anymore.
    I already have tried the following:
    -Stopping and restarting
    -Dropping and recreating (with the scheduler having no jobs anymore)
    -Dropping, restarting the database and recreating
    None of these worked. Where do I fail, when considering that the queue with the same scripts worked already? I post the script for creating the queue and adding the subscriber:
    CREATE OR REPLACE TYPE pat_history_queue_payload_type AS OBJECT
    ( TSTAMP VARCHAR2(22 CHAR),
    TYP VARCHAR2(10 CHAR),
    DELTA_MENGE NUMBER,
    ORIGIN VARCHAR2(1 CHAR),
    TEXT VARCHAR2(1000 CHAR),
    QL_TSTAMP VARCHAR2(22 CHAR)
    BEGIN
    DBMS_AQADM.CREATE_QUEUE_TABLE (
    queue_table => 'pat_history_queue_table',
    queue_payload_type => 'pat_history_queue_payload_type',
    multiple_consumers => TRUE
    END;
    BEGIN
    DBMS_AQADM.CREATE_QUEUE (
    queue_name => 'pat_history_queue',
    queue_table => 'pat_history_queue_table',
    max_retries => 10
    DBMS_AQADM.START_QUEUE (
    queue_name => 'pat_history_queue'
    END;
    BEGIN
    DBMS_AQADM.ADD_SUBSCRIBER (
    queue_name => 'pat_history_queue',
    subscriber => SYS.AQ$_AGENT(
    'pat_history_queue_subscriber',
    NULL,
    NULL )
    DBMS_AQ.REGISTER (
    SYS.AQ$_REG_INFO_LIST(
    SYS.AQ$_REG_INFO(
    'pat_history_queue:pat_history_queue_subscriber',
    DBMS_AQ.NAMESPACE_AQ,
    'plsql://PAT.HISTORY_QUEUE_DISTRIBUTION.CALLBACK',
    HEXTORAW('FF')
    1
    END;
    The function CALLBACK which is called by the queue, is never called, I checked that with log messages. Also the package that contains the function is compiled ok.
    Thanks.
    Roland

    Hi,
    Does the subscription show up correct in sys.reg$ ?
    Regards,
    Harry
    http://dbaharrison.blogspot.com/

  • TCP Callback function passing data to teststand

    Hi,
    I'm trying to pass data via a TCP Callback function to teststand using the TCP steptype that I downloaded from Ni.
    When I open a connection, container data is passed to the dll on which it creates a connection, the dll in part creates a TCP Callback function.
    The handle obtained from the connection is then passed back through the container data, and the dll returns back to the sequence editor which will execute the next steps.
    The problem is that when the TCP Callback function gets an TCP_READY event it can not pass data to TestStand because it can not access the container data.
    How can this TCP Callback function pass/alter data to/in Testand?
    Thank you...

    Yes ThiCop,
    That's exactly what I want to establish!
    Here is the example code:
    //Function needed by the TCP functions
    int CVICALLBACK MsgHandler (unsigned handle, int event, int error, void *callbackData)
        char receiveBuf[256] = {0};
        char displayBuf[7] = {0};
        char * tempLookup;
        int  dataSize = sizeof (receiveBuf) - 1;
       switch (event)
          case TCP_CONNECT:
             break;
          case TCP_DISCONNECT:
             break;
          case TCP_DATAREADY:
             if ((dataSize = ClientTCPRead (handle, receiveBuf, dataSize, 1000)) > 0)
                   //  Send data from receiveBuf to a variable in teststand ????
                   //  TS_PropertyGetValString (HandleObject, NULL, "Step.Result.Data", 0, &tempLookup);
                   //  TS_PropertySetValString (HandleObject, NULL, tempLookup, 0, receiveBuf);
             else
                   receiveBuf[dataSize] = '\0';
            break;  
     return 0;
    void __declspec(dllexport) TX_TEST TCPConnectF(tTestData * testData, tTestError * testError)
        int                 error = 0;
        int                 TCPerror;
        double           Port;
        double           Timeout;
        char              *HandleLookup;
        char              *ServerAdd;
        char              *CallbackData;
        ErrMsg           errMsg = {'\0'};
        ERRORINFO   errorInfo;
        tsErrChk (TS_PropertyGetValString (testData->seqContextCVI, &errorInfo, "Step.Result.Handle", 0, &HandleLookup));
        tsErrChk (TS_PropertyGetValNumber (testData->seqContextCVI, &errorInfo, "Step.Result.Port", 0, &Port));
        tsErrChk (TS_PropertyGetValString (testData->seqContextCVI, &errorInfo, "Step.Result.IP", 0, &ServerAdd));
        tsErrChk (TS_PropertyGetValNumber (testData->seqContextCVI, &errorInfo, "Step.Result.Timeout", 0, &Timeout));
        tsErrChk (TS_PropertyGetValString (testData->seqContextCVI, &errorInfo, "Step.Result.Data", 0, &CallbackData));
        TCPerror = ConnectToTCPServer (((unsigned int *) &ConnectionHandle), ((unsigned int) Port), ServerAdd, MsgHandler, 0, Timeout);
        if (TCPerror != 0)
         //Get TCP Error Message
           sprintf(errMsg,"%s",GetTCPErrorString ( TCPerror ));
           error = TCPerror;
           goto Error;
        tsErrChk (TS_PropertySetValNumber (testData->seqContextCVI, &errorInfo, HandleLookup, 0, ((double) ConnectionHandle)));
    Error: 
        // FREE RESOURCES
        CA_FreeMemory(HandleLookup);
        CA_FreeMemory(ServerAdd);
        // If an error occurred, set the error flag to cause a run-time error in TestStand.
        if (error < 0)
            testError->errorFlag = TRUE;
            testError->errorCode = error;
            testData->replaceStringFuncPtr(&testError->errorMessage, errMsg);
        return;   

Maybe you are looking for