How often is TCP_DATAREADY generated?

What I'm doing:
I'm working on adding a Wi-Fi module to a product that uses a small embedded micro-controller.
The micro operates as a TCP server communicating via Wi-Fi.
I've developed a LabWindows/CVI application to display the data that the micro collects.
In one mode of operation the micro delivers a continuous stream of 20 byte frames.
The frames are sent at 3200 Hz.
The LabWindows/CVI code connects to the micro as a client and then sends a command to start the 3200 Hz stream of frames.
In the TCP callback function (the one that is registered with the call to ConnectToTCPServer(...) )the TCP data is read and handed off to the rest of the application.
The problem:
The TCP callback where it handles the TCP_DATAREADY case is not called often enough to keep up with
the stream of data.  ( I am calling ProcessSystemEvents() in the loop that waits for data)
My questions:
How often can I expect to get a TCP_DATAREADY in the TCP callback?
How much buffering of the incoming TCP data is there?
In other words how long can my code be "away" from the callback before things get too backed up?
One other thought:
Everything has been working well using a directly connected serial interface running at 2 mega-baud
to connect to the micro.  With the serial connection there is large buffer on the COM port so I have
a fairly long time before the code has to get back to process more incoming frames.  I'm trying to
emulate this same behavior with the TCP client-server setup.
Any ideas will be appreciated, thanks,
Kirk

Hi kirkm,
I was able to do a little digging and did find an available knowledgebase article on this particular flag. You can find it here
http://digital.ni.com/public.nsf/allkb/C5CC85D98C771FC78625768500565FAF
It appears the TCP_DATAREADY event of a callback still requires a call to ClientTCPRead. In that function you can specify your data buffer size. That could be one approach to making sure you get the data needed, by specifying your given buffer size.
Reading up on TCP Communication found at http://www.ni.com/white-paper/3067/en There is a section on how to react to the streaming nature of TCP. I will quote that section for reference:
"In TCP, because data is sent in a byte stream, it is not possible to know how many bytes are present in the data stream. Therefore, you cannot query the LabWindows/CVI TCP Support Library to get the amount of data available. When you call ServerTCPRead or ClientTCPRead, the library returns the number of bytes read into the data buffer. If the number of bytes read is the same as the data buffer size, then more data still might be present in the data stream. You can read the remaining data immediately by calling the read functions again or wait until the TCP callback is called again with the TCP_DATAREADY event. The LabWindows/CVI TCP Support Library calls the TCP callback with the TCP_DATAREADY event whenever events are processed and there is data in the TCP stream. Refer to the LabWindows/CVI samples\tcp\message.cws sample program for code that shows how to read all the data in the TCP stream whenever the TCP callback receives a TCP_DATAREADY event. The ServerTCPWrite and ClientTCPWrite functions return the number of bytes written to the TCP stream, which might be less than the number of bytes in your data buffer. You must check for this condition and make sure all the bytes in your data buffer are written out successfully. The following code, based on code in the samples\tcp\messagewriter.c sample file, demonstrates how to check for this condition."
Hopefully that will get things started.
Regards,
James W.
Applications Engineer
National Instruments

Similar Messages

  • How often LAP in L3 LWAPP mode performs a broadcast LWAPP DISCOVERY?

    How often LAP in L3 LWAPP mode performs a broadcast DICOVERY UDP port 12223?
    During the boot or even during its regular operation?
    I saw that the AP is running the broadcast or to be more precise to arrives WLC LWAPP DISCOVERY REQUEST only
    when booting the AP.
    It is correct?
    Regards.
    Mirko Severi.

    Dan,
    in this case, the AP does not generate a broadcast, but only a unicast to the primary controller with the IP found in NVRAM.
    In a network L3 must enable broadcast via helper-address when the AP does not have WLC primary, secondary, tertiary configured, because otherwise you must configure in the AP through the console, option 53 or DNS the Ip address of the controllers.
    Is correct?
    Regards.
    MirkoS.

  • How Often ContactQueueDetail and ContactCallDetail update

    Hello,
    We are running on UCCX 8.0(2). There is a requirement from call center supervisor to have a real-time service level and ASA but these are not in Cisco Supervisor Desktop. We tried to query data from table ContactQueueDetail and ContactCallDetail for data to generate service level and ASA.
    Does anyone know how often these tables update? I tried to find it from document Database Schema but could not find this information.
    Thanks,

    The document mention "The Unified CCX system creates a new record in the ContactCallDetail table for each call or call leg processed by the system".
    And Historical Reporting Administrator and Developer Guide, the document describe about Writting Database Record. 
    http://www.cisco.com/en/US/docs/voice_ip_comm/cust_contact/contact_center/crs/express_8_0/programming/guide/uccx80hradm.pdf
    The record is written to database base on call flow (it write to the table immediate when certain call leg processed).

  • How to display or generate PDF417 barcode dynamically in PDF form? I am using Acrobat XI Professional and there is a Bar Code Field in the same through which I generated the same. But I want to generate the same dynamically.

    How to display or generate PDF417 barcode dynamically in PDF form? I am using Acrobat XI Professional and there is a Bar Code Field in the same through which I generated the same. But I want to generate the same dynamically.

    What do you mean by dynamically? When yo set up a 2D bar code field you specify which field name/value pairs you want to include, along with other parameters. But be aware that they won't work with Reader unless you Reader-enable the document with LiveCycle Reader Extensions and include the bar code usage right. It will work with Acrobat Standard/Pro.

  • How many users and how often a particular discoverer report is being run?

    Hi there,
    We run discoverer(4i) reports from portal. The question is:
    How to find out the number of users and how often a particular discoverer report is being run?
    Many Thanks in advance.
    Naren

    I know in the 9 versions of discoverer is there is a Discoverer v5 Business Area that is included out of the box. You have to have the stats turned on inside of the pref.txt. But that BA has all of the information to create queries about who, what, parameters, etc. You'll have to check and see if its part of 4i.
    Matt Topper
    Senior Consultant
    TUSC, The Oracle Experts.

  • How often should I charge my new macbook pro with retina display?

    hi everybody! I just got my macbook today and I want to take good care of it so it lasts me a while, and I'm particularly concerned about the battery life. what ensures that I can maintain a battery that will drain the slowest? or in other words, what are healthy charging habits? I'm a student so I'll be using it more than  a few hours daily. should I turn off my macbook or set it to sleep when I'm going to sleep for the night (~6 hours). is there ever a time when sleep is preferable to shut down? when I'm using it for an extended period of time, is it better to run it down and charge it or to leave it charging at 100%? how often should I run down the battery, or if not, what level should I run it down to before charging it again? I read somewhere that it's best to charge it to 80% instead of 100%, is there any truth to this? any input is appreciated, thanks.

    Here you go: https://www.apple.com/batteries/maximizing-performance/#macbook, and here: http://apple.stackexchange.com/questions/61401/how-to-maximize-macbook-pro-retin as-battery-life-when-working-with-ac-power, and of course this: http://forums.macrumors.com/showpost.php?p=9875442&postcount=23 (:

  • My apple id is not working on my ipad no matter how often i reset it

    My apple id doesn't work no matter how often i reset it so I cant download any apps

    You change the name of your ID at https://appleid.apple.com.  See http://support.apple.com/kb/HE40.

  • How often does the Apple TV sync with updated home sharing playlists?

    I am trying to use several Apple TV's at my business for content management throughout our campus.  I want to be able to have a playlist of pictures and videos that is easy to update.  Can anyone tell me how often the Apple TV syncs with the home sharing network for an updated playlist?  It would be very inconvenient if the only way was to do a reboot on every device each time content was updated.

    Welcome to the Apple community.
    I can't really say for sure how often the Apple TV updates its shared libraries.
    I do however know that once the Apple TV as completed playing something, it will sync with the shared library in order to update the play count. So I'd be reasonably sure that the shared library is updated at least once every time something is played.

  • How to examine the generated SQL statement in Receiver JDBC Adapter

    I have been searching this forum how to display te generated sql statement (by the jdbc receiver adapter).
    The only suggestion is to use RWB, but I was unable to find any details about how to do so.
    Any help is appreciated

    Hi,
    To add, u can see the SQL Statements in Audit log of RWB.
    Select Message Monitoring-> Adapter Engine. choose ur entry and click on Details option button, u can see the SQL Statements in Audit Log.
    Regards,
    Sudharshan
    Message was edited by:
            Sudharshan Aravamudan

  • I need new pc. is it possible to instal Photoshop CC again ? How often can I install?

    I need new pc. is it possible to instal Photoshop CC again ? How often can I install?

    Moineauhh you can install and utilize your Creative Cloud Membership on up to two computers.  You can find more details regarding the installation process at Install and update apps - https://helpx.adobe.com/creative-cloud/help/install-apps.html.

  • How to get auto generated column in spring jdbc

    Hi guys ,
    I am using springJDBC and sybase db.
    I think what i am facing is a standard problem but whatever support i am getting from google is not working.
    My problem is :
    "While inserting values in database one colum is autogenerated .....how do i get the value of that column??"
    FYI,
    I have tried using the following code :
    "final String INSERT_SQL = "insert into my_test (name) values(?)";
    final String name = "Rob";
    KeyHolder keyHolder = new GeneratedKeyHolder();
    jdbcTemplate.update(
    new PreparedStatementCreator() {
    public PreparedStatement createPreparedStatement(Connection connection) throws SQLException {
    PreparedStatement ps =
    connection.prepareStatement(INSERT_SQL, new String[] {"id"});
    ps.setString(1, name);
    return ps;
    keyHolder);
    // keyHolder.getKey() now contains the generated key"
    but i am getting this error : "java.lang.AbstractMethodError: com.sybase.jdbc2.jdbc.SybConnection.prepareStatement(Ljava/lang/String;I)Ljava/sql/PreparedStatement"
    I think this code works well with Oracle but not with sybase .........does anyone know the solution of this problem .......and by "this problem" i mean how to retrieve auto generate value in spring jdbc ...........without using SimpleJdbcInsert class

    Looking at the previous post it doesn't look like a Spring issue.
    You are using a JDBC driver which does not support getting generated keys so you have 2 choices:
    - Use a different driver that supports generated keys
    - Get the generated key by issuing some vendor specific SQL e.g. 'select @@identity' for SQL server

  • How often cube or ods is loaded

    Hi all,
    Can you plz help to find the easy way to find out how often a cube or ods or any object is loaded say daily or weekly . how to find it easily when i have many objects.

    Hi Bhavani,
    if your cube is getting loaded from ODS then copy the technical name of the update rules of ODS go to infosource tree and then find that particular technical name there. You will find the infosource associated with the ODS then find the infopackage which is associated with the process chain. Double click on every infopackage, the moment you ll double click it then it will display the msg saying  "infopkg already in process chain". click ok and go ahead.
    You will find yourself under schedule tab there you can find your process chain name just click on the icon which is in the other side of start button.
    Copy the technical name of the process chain and go to RSPC and find this pc. Open the pc and right click the start process-> change selection->Periodic job button. There you can find the schedule frequency .
    Hope this helps
    Edited by: Anup Chaudhari on Nov 19, 2008 5:56 AM

  • I have imported an mp3 to my Library.  I want to keep it as media kind = podcast but no matter how often I change the tag in get info options media kind, the change will not persist.

    I have imported an mp3 to my Library.  I want to keep it as media kind = podcast but no matter how often I change the tag in get info > options > media kind, the change will not persist, and the file remains in my Music list not my Podcast list.

    Resolved in update.

  • How often is email checked?

    I have an E6 and I periodically send test emails.  I noticed that sometimes I receive my test emails instantly. 
    Other times I receive them after a good while. 
    On past phones I was able to set how often to check email, but on my E6 for some reason I cant. 
    Can anyone explain the inconsistency?

    Hi there!
    I noticed on my E6 that "Soonest" means the phone is in sync all the time. You can see a green circule appear at the left top corner of e-mail app. It should send/receive directly (push mail). It works good, didn't notice any disturbances.
    I wouldn't recommend to choose that option otherwise you're really in need of that because it will draw your battery down. My recommendation is 30 minutes max to 1 hour in comparison with usability and energy saving.
    By the way, you should check at your home screen options menu if your widgets are at "On-line" mode. It's omportant too if you want your mails displayed soonest.
    Nokia E6-00

  • How often does the m7 take a steps measurement?

    I have an iPhone 5s. I checked my steps in the health app and if I am to believe what I saw, the m7 takes 5 or 6 measurements per minute (that part I believe) and the hard part is that I took 200 or so steps in 1 minute. How often is the iPhone taking a steps measurement? It's not like I was running. I was in the grocery store, I think.

    Hi Kumar,
    I wasn't sure if it is done dynamically whenever there are changes or if there were timers that it uses to conduct it's table refresh rates and are those timers adjustable?  The documentation on the Cisco site is very vague when it comes to CEF tables on IOS's 15.1 and above.  Any good links you have on how it does it's updating would be very helpful to me - thanks!

Maybe you are looking for

  • Getting integer values from a JTable

    Hello The table's cells contain integer values. I would like to save each one of theme them in an array of integers. The problem is, I don't know how to do so. I tried to use the getValueAt method, but I always get error messages. I tried something l

  • OBIEE 11g How to pass variable from one prompt to another prompt in dashboard page.

      How to pass variable from one prompt to another prompt in dashboard page. I have two prompt in dashboard page as below. Reporttype prompt: values(Accounting, Operational) Note: values stored as presentation variable and they are not coming from tab

  • Help directing btns embeded in mc in AS 2.0

    Basically, there are three movie clips on the stage in Scene 1 that are acting as nav buttons. Each movie clip has a button embedded in them. One of the movie clips named "CONTACT" works with the getURL command. The second named "RESUME"(code attache

  • Will only print to Microsoft Document Writer

    When I try to print a page in Firefox Microsoft Document Writer comes up as the default printer. Goes back to that selection even when the network printer is selected from the list box. How do I stop this to I can print from Firefox?

  • How to best deal with a 330GB psd?

    I used PTGui to create a gigapixel panorama from 570 16 bit TIFF images. PTGui has the ability to output a layed psb file... 1 layer for each photo in the picture, along with the full photo and an alpha mask to facilitate touch up work. But the size