Max length of DATA.TEXT ?
vincen
Posts: 526
Hi
I'm writing a new program and I need to parse some datas incoming through IP connection. As I heard that DEFINE_PROGRAM is no more usable in new NX processors, I'm stuck with DATA.TEXT but limit is around 2K characters Is there a way to upper this limit ? so I can get my full IP strings without losing characters !!
Thanks for advices,
Vincèn
I'm writing a new program and I need to parse some datas incoming through IP connection. As I heard that DEFINE_PROGRAM is no more usable in new NX processors, I'm stuck with DATA.TEXT but limit is around 2K characters Is there a way to upper this limit ? so I can get my full IP strings without losing characters !!
Thanks for advices,
Vincèn
0
Comments
You should still be able to create a buffer, and just do your processing in the data_event instead of define_program. (I'm assuming you were creating a buffer and parsing it's contents in define_program before).
Right now I do it in Netlnx way with a DATA_Event and I parse the data.text but I lose 3/4 of incoming datas due to very lenghty strings received
You aren't forced to deal with the buffer in define_program, but many people use it to constantly check for content in the buffer and then do something with it. That might not work with the new controllers and isn't the best way to do it imho. I only use data.text and have parsed XML documents that are 1 MB in size so you can too. The fact that data.text has a size limit shouldn't be a problem, and if you are losing incoming data then there is a problem with your code. Post it and then maybe someone can help you with it.
Paul
This example assumes messages from the IP device have CR,LF termination, adapt as needed...
You can use create_buffer and still do the processing in the data_event. if you have a defined message termination character you can do something like this to make sure you process all the messages in the buffer: