public getAFData ( string server_database, string attName, string MatlabName, string searchPath, string start, string end, bool edit ) : void | ||
server_database | string | The string of the server and database 'server'-'database' |
attName | string | Name of the Attribute. |
MatlabName | string | Variable name to be used in Matlab workspace. |
searchPath | string | The path to the Element. |
start | string | The time at which data will start being imported from. |
end | string | The time when data will stop being imported. |
edit | bool | true: Adds the log input into the LogSystem (generally true) |
return | void |
/// <summary> /// Resulting Action of editting the List View. /// 1) Edit the List Item /// 2) Re-log the item /// 3) Edit the Matlab workspace. /// </summary> /// <param name="name"> The new variable name. (or the same)</param> /// <param name="start"> The new start time. (or the same)</param> /// <param name="end"> The new end time. (or the same)</param> /// <param name="previous"></param> public void EditLog(string name, string start, string end, LogInput previous) { MatlabAccess.removeMatlabVariable(previous.getKeyVariableName()); if (previous.getKeyVariableName() != name) { name = MatlabAccess.modifyMatlabName(name); } if (name == string.Empty) { name = previous.getKeyVariableName(); } string attName = previous.getAttribute(); string path = previous.getPath(); string elem = previous.getElement(); //EDIT LIST VIEW if (AFAccess.isAbsoluteTimeString(start, end, previous)) { lv_LogDialog.SelectedItems[0].SubItems[3].Text = start + " = " + end; lv_LogDialog.SelectedItems[0].Text = name; } else { AFTimeRange range = new AFTimeRange(start, end); lv_LogDialog.SelectedItems[0].SubItems[3].Text = range.ToString(); lv_LogDialog.SelectedItems[0].Text = name; } //EDIT ACTUAL LOG LogSystem.removeLogInput(previous.getKeyVariableName(), previous.getServerDatabase()); //Workspace Edit - remove variable, getNewData if (path == "PI.Point") { string[] info = Regex.Split(previous.getServerDatabase(), "'"); control.getPIData(attName, info[1], name, start, end, false); } else { control.getAFData(previous.getServerDatabase(), attName, name, path, start, end, false); } }