I really don't like this for the reasons I posted above.  You are using enums where they HAVE to have a special number for the code to work properly.  MAVStreams[i] must equal i for this code to work.  The MAVRates[i] should correspond to whichever enum value is in MAVStreams[i] in my opinion.