Did you try CumulativeProtocolDecoder ?

I had a very similar problem once and once I switched over to this class
everything worked great.


On Tue, Jul 29, 2008 at 2:08 PM, boB Gage <[EMAIL PROTECTED]> wrote:

> I have searched far and wide for an answer on this before resorting to
> bothering anyone...
> but I can't quite work this out on my own.
>
> We're using MINA classes to implement serial and socket connections to
> external devices and decode the data streams from these devices.   I'm
> trying to use VmPipe classes to create a test mode that fakes an external
> device, using data files to define specific device behaviors.
>
> So far it's working fairly well, with one pretty major glitch.    The
> server-side (the fake hardware device) of the VmPipe is receiving
> byte-by-byte data from the client-side (our normal device monitor) and can
> deal with it accordingly.
>
> Problem is in the other direction.   The server-side uses
> "session.write(b)" to write a byte at a time to the stream (at properly
> faked baud rate even).    But instead of those accumulated bytes feeding
> into our MessageDecoderAdapter descendants as incoming data would from the
> hardware, they are getting picked up by our IoHandlerAdapter descendant as
> individual Byte objects (messageReceived() method).
>
> How would I get these bytes into the proper decode chain to fully test the
> low-level device data decoding (as per the DemuxingProtocolCodecFactory
> definition from the monitor under test)???
>
> Thanks in advance!!
> boB Gage
> eko systems, Inc.
>

Reply via email to