cooja icon indicating copy to clipboard operation
cooja copied to clipboard

Provide handy cooja:mote:serialUI (with perks)

Open alexrayne opened this issue 4 years ago • 10 comments

This patch split cooja:mote:DebugLog from cooja:mote:serialUI, allowing split DbgIO output from Serial io. Therefore we have pure serial connection to host, with no debug prints. And introduce new SerialUI visualiser, with hex,dump views, and receive/send display.

  • This patch relays to contiki-ng add-cooja-dbglog patch look contiki-ng PR#1218. That one separate
    rs232_interface from simlog_interface, so that -> simlog_interface, and slip, rs232_print/putc -> rs232_interface. To provide tests pass, this branch migrate cooja to that related branch.
  • this patch establisg new interface DebugLog, that listens rs232_interface only. And ContikiRS232 now connects only with rs232_interface. Therefore log printing now separated from serial io.
  • Log can listen serial for received lines. This is turn on by default, and controls UI.
  • Mote:Interfaces:getSerial - establish SerialPort interface separated from Log.

  • ApplicationLogPort - establish separate LogUI for debugLog interface.

  • SerialUI now shows received and sent data over serial. Also this data can be view as text, hex bytes, and dump16.

  • SerialUI:bufReceived - provide block response on received from mote data. this use for immediate display received data, not waiting for \n char - suppose that serial is binary, so \n is no relyable marker of sequence end. Assume that prints happen over significant pieces, that can be shown imediate.

  • SerialSocketServer now pass received frame to SerialUI by whole block, that is shown as one piece.

alexrayne avatar Mar 30 '20 20:03 alexrayne

cleanup occasional code, that was left due build cache. Checked that ant build cooja from cleanup.

alexrayne avatar Mar 30 '20 23:03 alexrayne

Fix receive data misses. And cleanup debug messages from serial. Now looks pretty.

alexrayne avatar Mar 31 '20 00:03 alexrayne

Now checked an fixed transfer data from srial to tun6 host via socket connect. Simulation looks now correct

alexrayne avatar Mar 31 '20 14:03 alexrayne

Since DebugLog interface now not used as SerialPort, cleanup it from SerialNotification on every byte. Now Log call handles only for message line.

alexrayne avatar Mar 31 '20 21:03 alexrayne

There was wrong design of new MessageListUI render for wraped text. That leads to huge memory leaks, and grand slowdow cpu after messages log comes a few thousands messages. Render now fixed, and

MessageUI now more clever - it can style messages with border, it now can use not only MessageContainer with text, but also MessageRanged - with overriden text render.

Also some rework of debug strings collect in DebugLog interface - hope it now faster.

alexrayne avatar Apr 07 '20 09:04 alexrayne

I change behaviour of RSR232 interface sends data to mote - there infers \n char at end of received bufer. This may crush data transfer on binary trafics. Now cooja SerialUI inserts \n after comands byself. And no need to infer lineends. also fixes DebugLog - was missed last char in debul message

alexrayne avatar Apr 10 '20 15:04 alexrayne

MesageContainer changes was not good, so i revert old MessageContainer behaviour, for compatibily with old code. Here StringMessage introduced by MessageListUI, to pass strings. looks like nowhere it is used, so new code is comatible high.

alexrayne avatar Apr 14 '20 10:04 alexrayne

Provide compatibily for legacy projects - thay now load ContikiLog interface if have ContikiRS232.

Old projects test may rely for serial receives data showed in mote log. Therefore provided mote log listening for incoming messages from serial. this turn on by default, and can be controled by UI.

alexrayne avatar May 18 '20 10:05 alexrayne

with last changes sucessful loads Z1 motes project, and seen it's log in MoteOutput, in serial and DefaultLog of mote.

alexrayne avatar Jul 02 '20 17:07 alexrayne

import here PR #44, to provide tests pass on contiki-ng/contiki-ng#1218

alexrayne avatar Oct 02 '20 18:10 alexrayne