Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8513055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:26:59+00:00 2026-06-11T04:26:59+00:00

So, I have worked on large systems in the past, like an iso stack

  • 0

So, I have worked on large systems in the past, like an iso stack session layer, and something like that is too big for what I need, but I do have some understanding of the big picture. What I have now is a serial point to point communications link, where some component is dropping data (often).

So I am going to have to write my own, reliable delivery system using it for transport. Can someone point me in the directions for basic algorithms, or even give a clue as to what they are called? I tried a Google, but end up with post graduate theories on genetic algorithms and such. I need the basics. e.g. 10-20 lines of pure C.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T04:27:00+00:00Added an answer on June 11, 2026 at 4:27 am

    on the sending side;

    /////////////////////////////////////////  XBee logging
    void dataLog(int idx, int t, float f)
    {
        ubyte stx[2] = { 0x10, 0x02 };
        ubyte etx[2] = { 0x10, 0x03 };
    
        nxtWriteRawHS(stx, 2, 1);
        wait1Msec(1);
    
        nxtWriteRawHS(idx, 2, 1);
        wait1Msec(1);
    
        nxtWriteRawHS(t, 2, 1);
        wait1Msec(1);
    
        nxtWriteRawHS(f, 4, 1);
        wait1Msec(1);
    
        nxtWriteRawHS(etx, 2, 1);
        wait1Msec(1);
    }
    

    on the receiving side

    void XBeeMonitorTask()
            {
                int[] lastTick = Enumerable.Repeat<int>(int.MaxValue, 10).ToArray();
                int[] wrapCounter = new int[10];
    
    
                while (!XBeeMonitorEnd)
                {
                    if (XBee != null && XBee.BytesToRead >= expectedMessageSize)
                    {
                        // read a data element, parse, add it to collection, see above for message format
                        if (XBee.BaseStream.Read(XBeeIncoming, 0, expectedMessageSize) != expectedMessageSize)
                            throw new InvalidProgramException();
    
                        //System.Diagnostics.Trace.WriteLine(BitConverter.ToString(XBeeIncoming, 0, expectedMessageSize));
    
                        if ((XBeeIncoming[0] != 0x10 && XBeeIncoming[1] != 0x02) ||  // dle stx
                            (XBeeIncoming[10] != 0x10 && XBeeIncoming[11] != 0x03))   // dle etx
                        {
                            System.Diagnostics.Trace.WriteLine("recover sync");
                            while (true)
                            {
                                int b = XBee.BaseStream.ReadByte();
                                if (b == 0x10)
                                {
                                    int c = XBee.BaseStream.ReadByte();
                                    if (c == 0x03)
                                        break;     // realigned (maybe)
                                }
                            }
                            continue;   // resume at loop start
                        }
    
                        UInt16 idx = BitConverter.ToUInt16(XBeeIncoming, 2);
                        UInt16 tick = BitConverter.ToUInt16(XBeeIncoming, 4);
                        Single val = BitConverter.ToSingle(XBeeIncoming, 6);
    
                        if (tick < lastTick[idx])
                            wrapCounter[idx]++;
                        lastTick[idx] = tick;
    
                        Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, new Action(() => DataAdd(idx, tick * wrapCounter[idx], val)));
                    }
                    Thread.Sleep(2);  // surely we can up with the NXT
                }
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have worked with Apache before, so I am aware that the default public
I have a large application that currently exists as a hybrid of WebForms and
We have a web application that needs to process a large amount of data
I've regularly read that the framework is just too large for one developer to
I would like to know from highly experienced Java professionals who have worked with
I have worked on generating PDF about 3 years ago and used FPDF lib
i have worked for a year now , on server side applications and everytime
I have worked on this problem for my entire day and can't solve it.
I have worked within a web development company where we had our local machines,
I have worked with SOAP in SAAJ and JAXM, and I want to extend

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.