Exemple #1
0
        // DESCRIPTION:
        // * Lets the client know how the state of the seerObj has changed.
        //
        // PRECONDITIONS:
        // * seerObj must not be null.

        static void pingMixer(numMixer numMixerObj,
                              numMixer.OutputController parity,
                              ref StreamWriter sw)
        {
            testParity(numMixerObj, parity, ref sw);

            const int SIZE = 10;

            int[] pingedData = new int[SIZE];
            if (numMixerObj.ping(ref pingedData))
            {
                sw.WriteLine("Ping successful ({0} elements requested):", SIZE);
                for (int i = 0; i < pingedData.Length; i++)
                {
                    sw.WriteLine(pingedData[i]);
                }
            }
            else
            {
                sw.WriteLine("Ping failed.");
            }

            sw.WriteLine("\r\n");
        }