示例#1
0
        public static void Init()
        {
            Console.WriteLine("Please enter applicaiton details");
            Console.Write("Enter your org id :");
            orgId = Console.ReadLine();

            Console.Write("Enter your app id :");
            appId = Console.ReadLine();

            Console.Write("Enter your api Key :");
            apiKey = Console.ReadLine();

            Console.Write("Enter your auth token :");
            authToken = Console.ReadLine();

            Console.WriteLine("Please enter device details to which you want to implement Infomation Mangement");

            Console.Write("Enter your device type :");
            deviceType = Console.ReadLine();

            Console.Write("Enter your device id :");
            deviceID = Console.ReadLine();

            Console.Write("Enter your device event :");
            deviceEvent = Console.ReadLine();

            client = new ApplicationClient(orgId, appId, apiKey, authToken);
            client.connect();
            cli         = client.GetAPIClient();
            cli.Timeout = 30000;
            //MQTT Topic subscription for IM State
            client.subscribeToIMState(deviceType, deviceID);
            client.IMStateCallback += processIM;
        }
示例#2
0
 public void ApplicationClientConnect()
 {
     testApp.connect();
     Assert.IsTrue(testApp.isConnected());
 }