C# Class MATLABfromCSharp.LogSystem

Mostra file Open project: osisoft/PI-to-MATLAB-Utility Class Usage Examples

Public Methods

Method Description
Clear ( ) : void

Clear the LogSystem, includes the listView.

ImportLog ( string FileName ) : string[]

Reads in the saved Log from a *.txt File.

SaveLog ( string Filename ) : void

Writes the Log to a *.txt File. Writing Style: Server = Database : KeyVariableName = Attribute = PathwayToElement = TimeRange

addLogInput ( string keySrv_Db, LogInput logInput, bool addToListView ) : void

Log the new export of Matlab data Steps: 1) Check for the Server_database key 2) Add variable name to server list and logs. 3) Add to the ListView - doesn't add to ListView when editting.

addView ( ListView lv ) : void

Passes the LogView from the LogDialog to the LogSystem.

getLogInput ( string keyVariableName ) : LogInput

Gets the LogInput based on the unique variable name.

isLogEmpty ( ) : bool

Returns whether not the Log is empty.

isVariableInLogSystem ( string varname ) : bool

Checks the log for the variable name.

parseServerDatabaseKey ( string srv_db ) : string[]

Parses the Server Database string representation into the server and database names.

removeLogInput ( string keyName, string srv_db ) : void

Removes a loginput connected to the KeyVariableName and removes it from the server_database.

Private Methods

Method Description
isServer_DatabasesInLogSystem ( string srv_db_name ) : bool

Check that the server_databae already exists.

Method Details

Clear() public static method

Clear the LogSystem, includes the listView.
public static Clear ( ) : void
return void

ImportLog() public static method

Reads in the saved Log from a *.txt File.
public static ImportLog ( string FileName ) : string[]
FileName string The location of the file.
return string[]

SaveLog() public static method

Writes the Log to a *.txt File. Writing Style: Server = Database : KeyVariableName = Attribute = PathwayToElement = TimeRange
public static SaveLog ( string Filename ) : void
Filename string The path to the file location.
return void

addLogInput() public static method

Log the new export of Matlab data Steps: 1) Check for the Server_database key 2) Add variable name to server list and logs. 3) Add to the ListView - doesn't add to ListView when editting.
public static addLogInput ( string keySrv_Db, LogInput logInput, bool addToListView ) : void
keySrv_Db string The string representing the server and database
logInput LogInput The LogInput entry.
addToListView bool true: adds a ListViewItem to the ListView (generally true, false when editting)
return void

addView() public static method

Passes the LogView from the LogDialog to the LogSystem.
public static addView ( ListView lv ) : void
lv System.Windows.Forms.ListView The Listview to display the LogSystem.
return void

getLogInput() public static method

Gets the LogInput based on the unique variable name.
public static getLogInput ( string keyVariableName ) : LogInput
keyVariableName string The unique variable name.
return LogInput

isLogEmpty() public static method

Returns whether not the Log is empty.
public static isLogEmpty ( ) : bool
return bool

isVariableInLogSystem() public static method

Checks the log for the variable name.
public static isVariableInLogSystem ( string varname ) : bool
varname string the unique variable name.
return bool

parseServerDatabaseKey() public static method

Parses the Server Database string representation into the server and database names.
public static parseServerDatabaseKey ( string srv_db ) : string[]
srv_db string String representation of server and database.
return string[]

removeLogInput() public static method

Removes a loginput connected to the KeyVariableName and removes it from the server_database.
public static removeLogInput ( string keyName, string srv_db ) : void
keyName string
srv_db string
return void