コード例 #1
0
        static void Main(string[] args)
        {
            // create a dictionnary
            string errmsg = "";

            KnownHubs = new List <string>();

            Console.WriteLine("Waiting for hubs to signal themselves...");

            // register the callback: HubDiscovered will be
            // invoked each time a hub signals its presence
            YAPI.RegisterHubDiscoveryCallback(HubDiscovered);

            // wait for 30 seconds, doing nothing.
            for (int i = 0; i < 30; i++)
            {
                YAPI.UpdateDeviceList(ref errmsg);
                YAPI.Sleep(1000, ref errmsg);
            }
        }