real-time

An accurate python sleep function

蹲街弑〆低调 提交于 2019-12-25 18:17:57
问题 I've tried time.sleep(), but its accuracy is total garbage. Consider this loop, for instance: for i in range(10000000): print(i) sleep(.334) Watch the numbers it prints. If it's anything like my computer, it's not even remotely regular. Is this function supposed to be accurate? Have I found a bug somewhere in my system? If this function is not supposed to be accurate, what function would be more accurate? 回答1: If you're just looking at the output, buffering might make it appear slightly

Error in running trace32 with command line

半世苍凉 提交于 2019-12-25 03:39:09
问题 I have a .cmm file which helps in debugging of Qcomm chipsets. This file has a line : cd ../../../../../modem_proc When I run this same cmm file using T32 GUI, it runs fine and does the work. But when I am trying to run the same file using windows command line using, C:\T32\bin\windows64>t32mqdsp6.exe -c C:\T32\config.t32 -s D:\path\to\xxx.cmm Following error is thrown in T32: syntax error in B::cd ../../../../../modem_proc What am I missing here? I have no hands-on experience with T32 what

Rails + Pubnub Integration Architecture

假装没事ソ 提交于 2019-12-25 03:26:27
问题 I am new to Pubnub and real-time application. I wrote some ruby application before and I am currently research an option to integrate pubnub into my rails application. I read pubnub docs already and have an basic architecture in my head but not quite sure if it is good or even feasible. I appreciate any opinions. In the application, there will be a peer to peer chat window, and one person can talk to any person he wants. 1) Rails will not store any messages, and it will only stores which

Real time web tracking app

此生再无相见时 提交于 2019-12-25 02:34:48
问题 There is a fleet management system. In a simplified form, it consists of: Service (Java, JDBC), which communicates with all devices on the car by socket (receives new data, parses and puts to the database (Mysql)). Web interface (Server side: Tomcat, Java, Spring, JDBC, Mysql. Client side: GWT, GWTP, GoogleMaps). It requests data from the server every 10 seconds using a GWT-RPC and makes the appropriate changes on the client. Objective: to make real time applications. All data on the page are

Persistent HTTPS Connections in Python

跟風遠走 提交于 2019-12-25 02:19:22
问题 I want to make an HTTPS request to a real-time stream and keep the connection open so that I can keep reading content from it and processing it. I want to write the script in python. I am unsure how to keep the connection open in my script. I have tested the endpoint with curl which keeps the connection open successfully. But how do I do it in Python. Currently, I have the following code: c = httplib.HTTPSConnection('userstream.twitter.com') c.request("GET", "/2/user.json?" + req.to_postdata(

Scilab 5.5.2 function as a block in xcos : Variable returned by scilab argument function is incorrect [

拜拜、爱过 提交于 2019-12-25 00:38:08
问题 I have been trying to get the ultrasonic data from an arduino using serial communication toolbox in scilab to be brought in the xcos simulation. To do this I followed Include a Scilab function/script as a block in xcos/scicos and created my own function. Is there a way to plot the serialread data in xcos scope? or i think my implementation is wrong in the scilab function. Iam Using Windows 10 64bit SCILAB function function y = serialREAD(a) h = openserial(7, "9600,n,8,1") // open COM7 for ii

Need to improve the Linux performance for embedded system

余生颓废 提交于 2019-12-24 20:54:16
问题 I have a ARM OMAP based embedded system with 1 GHZ processor running Linux 2.6.33 cross compiled as CONFIG_PREEMPT. One of the Processes (process 1) is critical and need to run every 4 or 8 milli sec which is configurable. There is another process's (process 2) thread which transfers image to FTP or any other configured application. To trigger the time critical process 1 i use a high resolution timer as a seperate thread (FIFO, say 60) with highest Real time priority in the system. Process 2

iOS: How to parse XML for real-time search

∥☆過路亽.° 提交于 2019-12-24 19:33:28
问题 For now I am parsing a XML file like the example from Apple (LazyTableImages). Everything works fine. I'd like to add a real-time search (UISearch) which has to parse another XML file (specially programmed for the search). How can I parse this file without freezing the screen? 回答1: You use a GCD and dispatch a block to do this while parsing in the background (and maybe showing a spinner). Your XML parser delegate should be looking at a "cancel" flag, so if the user does something like hit

Real time plots in matlab standalone application

爱⌒轻易说出口 提交于 2019-12-24 16:25:03
问题 The application is a GUI designed with GUIDE with lots of subplots that have an refresh interval approx ~1s adding new data to the time series, for example: I have read through making-graphs-responsive-with-data-linking, but the efficient linkdata on does not work in standalone applications when exporting with application compiler: Error using linkdata (line 24) Plots cannot be linked in deployed applications because linked plots require the MATLAB workspace. ,while refreshdata works but

Running a repeating task in background on a real time application

久未见 提交于 2019-12-24 14:00:00
问题 I'm writing an application which is continuously listening and checking the sensors (almost all available) and saving that data into the database in the device. I need to make some calculations every X second with that data and throw a new event if the calculations check says so. I'm thinking about requesting to have the device plugged in while using the application (regarding battery drain). What's the best approach for the task that needs to make the calculations and throw the event? Timer?