public override void Start()
        {
            logger.Log("Started: {0} ", ToString());

            AirConditionCtrlService airConditionCtrlService = new AirConditionCtrlService(logger, this);

            serviceHost = new SafeServiceHost(logger, typeof(IAirConditionCtrlContract), airConditionCtrlService, this, Constants.AjaxSuffix, moduleInfo.BaseURL());
            serviceHost.Open();

            appServer = new WebFileServer(moduleInfo.BinaryDir(), moduleInfo.BaseURL(), logger);


            //........... instantiate the list of other ports that we are interested in
            accessibleAirConditionCtrlPorts = new List <VPort>();

            //..... get the list of current ports from the platform
            IList <VPort> allPortsList = GetAllPortsFromPlatform();

            if (allPortsList != null)
            {
                ProcessAllPortsList(allPortsList);
            }

            receivedMessageList = new List <string>();

            readMsgByIdList = new List <string>();
            rcvdNewMsgList  = new List <string>();
            //remoteSync flag can be set to true, if the Platform Settings has the Cloud storage
            //information i.e., DataStoreAccountName, DataStoreAccountKey values
            datastream = base.CreateFileStream <StrKey, StrValue>("dumb", false /* remoteSync */);

            worker = new SafeThread(delegate()
            {
                Work();
            }, "AppAirConditionCtrl-worker", logger);
            worker.Start();


            //gm.ComPort = "COM6";
            //gm.BaudRate = 9600;
            //gm.Open();


            //gm.SmsRecieved += new EventHandler(gm_SmsRecieved);
        }
        public override void Start()
        {
            logger.Log("Started: {0} ", ToString());

            AirConditionCtrlService airConditionCtrlService = new AirConditionCtrlService(logger, this);
            serviceHost = new SafeServiceHost(logger, typeof(IAirConditionCtrlContract), airConditionCtrlService, this, Constants.AjaxSuffix, moduleInfo.BaseURL());
            serviceHost.Open();

            appServer = new WebFileServer(moduleInfo.BinaryDir(), moduleInfo.BaseURL(), logger);
            
 
            //........... instantiate the list of other ports that we are interested in
            accessibleAirConditionCtrlPorts = new List<VPort>();

            //..... get the list of current ports from the platform
            IList<VPort> allPortsList = GetAllPortsFromPlatform();

            if (allPortsList != null)
                ProcessAllPortsList(allPortsList);

            receivedMessageList = new List<string>();

            readMsgByIdList = new List<string>();
            rcvdNewMsgList = new List<string>();
             //remoteSync flag can be set to true, if the Platform Settings has the Cloud storage
             //information i.e., DataStoreAccountName, DataStoreAccountKey values
            datastream = base.CreateFileStream<StrKey, StrValue>("dumb", false /* remoteSync */);

            worker = new SafeThread(delegate()
            {
                Work();
            }, "AppAirConditionCtrl-worker", logger);
            worker.Start();

             
            //gm.ComPort = "COM6";
            //gm.BaudRate = 9600;
            //gm.Open();

             
            //gm.SmsRecieved += new EventHandler(gm_SmsRecieved);

          }