D
Daniel
HI all,
I have an application that recieves a rather large ammount of data
through a serial connection. Since serial connections are rather slow
the data takes a fair while to recieve (10-90 sec).
To show the user that something is indeed happening I print the data
out on the screen as it comes in (it is a log, so it makes sense to
display it). Now the program gives the user the option of parsing the
log and mark certain things with colours, and and such.
Anyway, at present I display all data unparsed, and then if the user
selected to parse it I clear the screen once all data is recieved and
the put the parsed version on the screen.
I would like to parse the data pretty much as it comes in. Any
suggestions on how to do that?
The problem is that regexp is basically neccesary as I for one thing
have to detect which rows (terminated with \r\n) contains alarms, and
if they contain alarms, which alarmnumer it happens to be. From my
understanding of regexp in java I can not run a matcher (several
matchers in my case) on something while I append data "to the other
end" (for clearity, I would only append data to the end of the buffer
if it is not currently in use by some other part of the program,
simple thread safty aplies)
Any suggestions?
Any help is greatly appreciated!
regards
Daniel
I have an application that recieves a rather large ammount of data
through a serial connection. Since serial connections are rather slow
the data takes a fair while to recieve (10-90 sec).
To show the user that something is indeed happening I print the data
out on the screen as it comes in (it is a log, so it makes sense to
display it). Now the program gives the user the option of parsing the
log and mark certain things with colours, and and such.
Anyway, at present I display all data unparsed, and then if the user
selected to parse it I clear the screen once all data is recieved and
the put the parsed version on the screen.
I would like to parse the data pretty much as it comes in. Any
suggestions on how to do that?
The problem is that regexp is basically neccesary as I for one thing
have to detect which rows (terminated with \r\n) contains alarms, and
if they contain alarms, which alarmnumer it happens to be. From my
understanding of regexp in java I can not run a matcher (several
matchers in my case) on something while I append data "to the other
end" (for clearity, I would only append data to the end of the buffer
if it is not currently in use by some other part of the program,
simple thread safty aplies)
Any suggestions?
Any help is greatly appreciated!
regards
Daniel