WFA_psychometric_chart.Form1_main.ReadDataFromDevice C# (CSharp) Method

ReadDataFromDevice() public method

helps to pull the data from the hardware of the device
public ReadDataFromDevice ( int deviceID, uint temp_panID, uint hum_panID, string param1_identifier_type, string param2_identifier_type ) : void
deviceID int
temp_panID uint
hum_panID uint
param1_identifier_type string
param2_identifier_type string
return void
        public void ReadDataFromDevice(int deviceID, uint temp_panID, uint hum_panID, string param1_identifier_type, string param2_identifier_type)
        {
            //lets do some operation regarding the pannel id and stuff

            //then perform this task 
            try
            {
                uint panID_1 = temp_panID;//0; //uint.Parse(panelID1);

                uint panID_2 = hum_panID;//1;//uint.Parse(panelID2);
                BACnetClass b = new BACnetClass();

                //for temperature value
                b.StartProgramForScanHardware(deviceID, panID_1, param1_identifier_type);
                double temperary1 = double.Parse(b.PresentValueFromBacnet.ToString());
                //tb_temp_panel_value.Text = temp;
                //For humidity value
                b.StartProgramForScanHardware(deviceID, panID_2, param2_identifier_type);
                double temperary2 = double.Parse(b.PresentValueFromBacnet.ToString());
                //tb_hum_panel_value.Text = humidity;
                hardwareValue1 = temperary1;
                hardwareValue2 = temperary2;
                //lets store these two values in a temporary list

            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);

            }

        }
Form1_main