public bool FeedData(uint channelId, InputStream buffer,uint length)
{
//1. Is the chanel number a valid chanel?
if (channelId >= 4)
{
FATAL("Invalid chanel number: {0}", channelId);
return false;
}
if (!_protocols.ContainsKey(channelId))
{
FATAL("Invalid chanel number: {0}", channelId);
return false;
}
_inputBuffer.IgnoreAll();
buffer.CopyPartTo(_inputBuffer,(int)length);
_inputBuffer.Published = length;
_inputBuffer.Position = 0;
//_protocols[channelId].InputBuffer.WriteBytes(buffer);
return _protocols[channelId].SignalInputData(_inputBuffer, _dummyAddress);
}