public UAVStructure(string name, string port) : base(name, port) { this.Name = name; values = new MonitoredDictionary <string, UAVSingleParameter>(this); values.ValueChanged += new MonitoredDictionary <string, UAVSingleParameter> .ValueChangedHandler(gpsValues_ValueChanged); }
public static HierachyItem GetItembyPath(UAVParameter param, string path) { string key = path; string newpath = ""; MonitoredDictionary <string, UAVParameter> .GetKeyPath(ref key, ref newpath); if (param is UAVStructure) { UAVStructure mystructure = ((UAVStructure)param); foreach (UAVParameter myparams in mystructure.values.Values) { if (myparams.Name == key) { GetItembyPath(myparams, newpath); } } } else if (param is UAVParameter) { if (param.Name == key) { return(param); } // remotedata.Add(newparam); } return(null); }
public static HierachyItem GetItembyPath(UAVBase core, string path) { List <UAVParameter> uavData = new List <UAVParameter>(); string key = path; string newpath = ""; MonitoredDictionary <string, UAVParameter> .GetKeyPath(ref key, ref newpath); foreach (UAVParameter param in core.uavData.Values) { if (param.Name == key) { if (newpath == key) { return(param); } if (param is UAVStructure) { return(GetItembyPath(param, newpath)); } } } return(null); }
/// <summary> /// Constructor /// </summary> public UAVBase() { uavData = new MonitoredDictionary <string, UAVSingleParameter>(this); uavData.ValueChanged += new MonitoredDictionary <string, UAVSingleParameter> .ValueChangedHandler(uavData_ValueChanged); mySendRegulator.forwarded += new UpdateRateRegulator.ForwardEventhandler(SendDataForwardNow); CommunicationStatusChanged += new CommunicationStatusHandler(UAVBase_CommunicationStatusChanged); }
public static List <UAVSingleParameter> NormaliseDictionary(MonitoredDictionary <T1, T2> uavdata) { List <UAVSingleParameter> uavData = new List <UAVSingleParameter>(); foreach (UAVSingleParameter param in uavdata.Values) { NormaliseStructure(param, uavData); } return(uavData); }
public UAVDataMapping(string p, string p_2, MonitoredDictionary <string, UAVSingleParameter> uavData) : base(p, p_2) { uavData.ValueChanged += new MonitoredDictionary <string, UAVSingleParameter> .ValueChangedHandler(Source_ValueChanged); }