processMessage(..)
method so that
is does this.UPDATE
to add the primitive to the command dictionary. It takes in 0+ parameters.pipe on ... plot/id=plot1 ... plot/id=plot2 ... plot/id=plot3 ... plot/id=plot4 ... primlab8 plot1 plot2 plot3 plot4 pipe offWhenever
primlab8
receives a message, it should send a copy of
that message to plot1
, plot2
, plot3
, and
plot4
; then it should process the message by calling
super.processMessage(..)
.
open()
method the msgHandlers
array is
initialized with the message handlers to use. (This is
done for you.)MQ.put(..)
methods in order to send a copy of the message's name, info, and data
to a given message handler (target destination). Checkout the docs for
nxm.sys.lib.MessageQueue
to find out which one.processMessage(..)
method. You do not need to add code anywhere else in
the file, all is done for you.Don't Make This Mistake: |
---|
![]() processMessage(..) to MQ.put(..)
doing so can cause one of the following problems: (1) infinite loop if msg.to is
still set to the current primitive, (2) sharing of the Message object between
multiple primitives simultaneously (remember, the different primitives process the message
in their own threads, if the same Message object is sent to multiple commands,
invalid messages may get processed due to the changing of msg.to between calls).
|