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 8407697
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:26:15+00:00 2026-06-09T23:26:15+00:00

I’m writing an application using C and ncurses library. My program is intensively exchanging

  • 0

I’m writing an application using C and ncurses library. My program is intensively exchanging data with some sensors (sends and receives some data). There are many sensors (up to 500). Now I want to display information about each of the sensor in the ‘user-friendly’ way: it has to be kinda of scrollable list with items, each of which the user can choose. My best idea now is to use ncurses ‘Menus library’. The steps are following:

  1. Create list of items (actually some array of strings, where each string contains sensor number, type and other information.
  2. Create menu and add these items to menu
  3. Display menu

It might sound ok, but the problem is that information (actually state) of each sensor is dynamically updated. Ok, I can implement some ‘hot-button’ for updating information, but it might be very very time consuming: rebuilding and redisplaying all items is not a good idea.
So how would you do this?

  • 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-09T23:26:17+00:00Added an answer on June 9, 2026 at 11:26 pm

    You basically have a view of a data source and the data source is being updated and modified and you need to signal to the viewer that a particular data item has been modified so that the viewer can update its view.

    Typically what I do in a situation like this is to have an event pathway so that when the data source that is shared between the viewer, the consumer of the data, and the producer, your sensor threads, the shared data is updated and then an event message is sent to the viewer.

    The event messages are usually sent using some kind of a FIFO queuing mechanism so that the viewer will receive the events in the order in which they are sent by the producer.

    With an event driven windowing system such as Windows, there is usually a PostMessage() function that allows you to post a message to a particular window or to a particular thread.

    So the basic window design is to accept the messages which have a message identifier indicating that the source data has been updated along with some identifier or index to indicate which of the items was updated. The Viewer would then access the storage area to pull that particular data item from the area and then use that data to update the specific item text in the view.

    This is pretty much standard MVC pattern. The nasty bit is how you communicate the source data update event to the viewer.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

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.