English 中文(简体)
简化RS-232 向浏览器投稿
原标题:Streaming RS-232 Output to the browser

这是可能的吗? 如果是的话,工业标准在软件上如何? 具体地说,我指的是蚊帐控制。

谢谢。

EDITED: Here is what I need. I have a thin client with a balance where RS-232 is used to interact with the thin client. Currently, it is a compact framework app. What I would like to know id whether it is possible to have the same set up in a web application. So that would entail that the RS-232 is NOT the server RS-232 - it is the user s computer RS-232 - RS-232 is on the client. So when the RS-232 spits out input, it should go to the browser. Is it possible in a web application?

问题回答

我可以考虑两种方式;

  • Buffer the serial data in an application object, and then use an ajax call triggered by a timer to grab and display the latest data.
  • 对于数据流的较短,你可以不使用p.net控制本身,而是采取类似做法;

    Response.ContentType = "text/plain";
    Response.Clear();
    
    String serialData;
    
    while(serialData = getSerialData() {
       Response.Write(serialData);
       Response.Flush();
    }
    

    这将实时向网络浏览器撰写文字内容。 也许你不想让本届会议保持太长时间。

    如果你想在另一页内显示数据流,那么该页与上述代码放在一栏。

    还指出,上述工作最好用的是作为手提的手提,而不是像头。





相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

NSArray s, Primitive types and Boxing Oh My!

I m pretty new to the Objective-C world and I have a long history with .net/C# so naturally I m inclined to use my C# wits. Now here s the question: I feel really inclined to create some type of ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

How to Use Ghostscript DLL to convert PDF to PDF/A

How to user GhostScript DLL to convert PDF to PDF/A. I know I kind of have to call the exported function of gsdll32.dll whose name is gsapi_init_with_args, but how do i pass the right arguments? BTW, ...

Linqy no matchy

Maybe it s something I m doing wrong. I m just learning Linq because I m bored. And so far so good. I made a little program and it basically just outputs all matches (foreach) into a label control. ...

热门标签