public StartProgramForScanHardware ( int deviceId, uint inputnodeid, string identifier_type ) : void | ||
deviceId | int | |
inputnodeid | uint | |
identifier_type | string | |
return | void |
public void StartProgramForScanHardware(int deviceId, uint inputnodeid,string identifier_type)
{
Trace.Listeners.Add(new ConsoleTraceListener());
try
{
StartActivity();
//Console.WriteLine("Started");
Thread.Sleep(3000); // Wait a fiew time for WhoIs responses (managed in handler_OnIam)
//Console.WriteLine("BACnet Devices List");
//Console.WriteLine("Instance ID\tBACnetIP");
lock (DevicesList)
{
foreach (BacNode bn in DevicesList)
{
// Console.WriteLine("{0}\t{1}.{2}.{3}.{4}", bn.device_id, bn.adr.adr[0], bn.adr.adr[1], bn.adr.adr[2], bn.adr.adr[3]);
}
}
int BacnetID = deviceId;//24649;//int.Parse(StrBacnetID);
uint inputNodeID = inputnodeid;
//ReadWriteExample(BacnetID);
readBacnetDevieParameterForScanHardware(BacnetID, inputNodeID,identifier_type);//identifier type
}
catch { }
//Console.ReadKey();
}
public void ReadDataFromDeviceForTemperature(int deviceID, uint temp_panID, string param1_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; //--This one is temperature // hardwareValue2 = temperary2; //lets store these two values in a temporary list } catch (Exception ex) { MessageBox.Show(ex.Message); } }