简体   繁体   English

如何从/ dev / console将数据上传到DataTables插件

[英]How to upload the data to DataTables plug-in from /dev/console

It seems that I need your expert opinion. 看来我需要您的专家意见。

I have embedded system with installed Linux. 我有安装了Linux的嵌入式系统。 I would like to use this system to show web page with dynamically content in DataTables plug-in ( http://datatables.net/ ). 我想使用此系统在DataTables插件( http://datatables.net/ )中显示具有动态内容的网页。 The date which I would like to show in DataTables will be received on console port (by sending request for data to console and as result the data will be received to this port). 我想在DataTables中显示的日期将在控制台端口上接收(通过向控制台发送数据请求,结果数据将被接收到该端口)。 As I am using embedded system I cannot include peyton/perl and etc Interpreters in my system due to the root fs is too small. 当我使用嵌入式系统时,由于根fs太小,因此无法在系统中包含peyton / perl等解释器。

Suggestion solution is to use daemon written on C. It will be every second sending request for data to console port, receiving the data, parse it and updating file with JSON data. 建议的解决方案是使用编写在C上的守护程序。这将是每秒向控制台端口发送数据请求,接收数据,解析数据并使用JSON数据更新文件。 This data will be used as AJAX source for DataTables plug-in on my web page. 这些数据将用作我网页上DataTables插件的AJAX源。

But I think it is not gracefully way. 但是我认为这不是优雅的方式。 Maybe is there some existing solutions, how to dynamically get the data from console port and upload it to DataTables plug-in? 也许有一些现有的解决方案,如何从控制台端口动态获取数据并将其上传到DataTables插件?

Thanks in advance. 提前致谢。

I take it that some other machine is connected to the embedded system. 我认为其他计算机已连接到嵌入式系统。 In which case the easiest is probably to simply send the raw data to the console using a simple program ( cat if it's available!), and then convert it to DataTables format on the machine that collects the data. 在这种情况下,最简单的可能是简单地用一个简单的程序(发送原始数据到控制台cat ,如果它是可用的!),然后将其转换成DataTables格式的机器,收集数据上。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM