Exemple #1
0
        public static ushort SendToChild(MACPipe mac, ushort destination, byte[] msgBytes, int length)
        {
            ushort next_neighbor = RoutingGlobal.GetChild(destination);

            // If in a reset, do not forward
            if (RoutingGlobal._color == Color.Red)
            {
#if DBG_VERBOSE
                Debug.Print("\tIn a Reset wave... not forwarded");
#endif
                return(999);
            }

            ushort index = mac.EnqueueToSend(next_neighbor, msgBytes, 0, (ushort)length);
            return(mac.IsMsgIDValid(index) ? index : (ushort)999);
        }