RE: IM33: Modifying and/or sending messages received

From: Bojsen, Per <bojsen@zaiqtech.com>
Date: Wed Nov 10 2004 - 06:15:07 PST

Hi John,

> I carefully reviewed this thread and thought about it a bit.
> One thing I think we still want to do is keep SceMiMessageData
> construction and re-use to be something managed by the user.

And this implies you believe reuse of input messages at least
should be allowed, right?

> On the one hand, I think this would be useful to receive
> an output message and within the same receive callback function
> tweek a couple of fields and turn it right around and send
> back to H/W on an input port.

While this could be useful, the definition of the receive callback
strongly suggests modifying the message is not supported due to
the const message argument. Of course, there will be implementations
that would allow casting away const'ness and modifying the message,
but that would be non-portable. So it seems we are forced to
accept that the standard does not condone modifying output messages
and given that, reuse of output messages have limited value. After
all, one can always copy the contents of the message to another
one. In fact, we could define a SceMiMessageData copy constructor
to make it convenient for the user.

So it seems to make sense to ban reuse of output messages which gives
implementations that extra degree of freedom in choosing message
internals.

Per

-- 
Per Bojsen                                Email: <bojsen@zaiqtech.com>
Zaiq Technologies, Inc.                   WWW:   http://www.zaiqtech.com
78 Dragon Ct.                             Tel:   781 721 8229
Woburn, MA 01801                          Fax:   781 932 7488
Received on Wed Nov 10 06:14:18 2004

This archive was generated by hypermail 2.1.8 : Wed Nov 10 2004 - 06:14:21 PST