C# 클래스 MATLABfromCSharp.MainControl

파일 보기 프로젝트 열기: osisoft/PI-to-MATLAB-Utility 1 사용 예제들

공개 메소드들

메소드 설명
ImportToAF ( string path, string workspaceVariableName, string AFName ) : void

Gets value from Matlab and writes it to AF.

Will not write, if the Attribute is read-only. A Matlab Variable Name must be input.

MainControl ( ) : System

Starts up the Desktop Matlab or attaches to COM-Enabled Matlab. to Com-Enable Matlab use [ enableservice('AutomationServer',true);]

checkMatlab ( bool showDialog ) : void

Checks to see if Matlab is still open and asks to Reload the logged data and reopens matlab.

currentDataPrefChanges ( bool timestamp, int datapref, string format ) : void

Passes the Data Preferences from the MainForm to the AFAccess.

getAFData ( string server_database, string attName, string MatlabName, string searchPath, string start, string end, bool edit ) : void

Accesses the AFServer to get data.

getAFDatabase ( ) : AFDatabase

Returns the AFDatabase that the MainControl is using.

getAttributes ( string path ) : AFAttributes

Uses the Element Path to access the Attributes.

The AFTreeView is implemented with ToolTipText is the path to the selected Element.

getPIData ( string point, string server, string MatlabName, string start, string end, bool edit ) : void

Get the Data from PIServer using AFSDK.

getPIPoints ( PISystem sys, PIServer serv ) : List

Accesses the PIServer to get the PIPoints that are available.

importLog ( string path ) : string[]

Imports a saved file into Matlab.

saveCurrentLog ( string filePath ) : void

Calls the LogSystem.Save method.

saveMatlabLog ( string filePath ) : void

Not implemented. Future use: writes a matlab that imports the same data.

setAFDatabase ( string currentDatabase ) : void

Sets the AFDatabase that the MainControl will use.

setMainForm ( MainForm form ) : void

Give the MainControl access to the MainForm

메소드 상세

ImportToAF() 공개 메소드

Gets value from Matlab and writes it to AF.
Will not write, if the Attribute is read-only. A Matlab Variable Name must be input.
public ImportToAF ( string path, string workspaceVariableName, string AFName ) : void
path string The path to the Element to search with.
workspaceVariableName string The variable name in Matlab being used.
AFName string The attribute name in AF being written to.
리턴 void

MainControl() 공개 메소드

Starts up the Desktop Matlab or attaches to COM-Enabled Matlab. to Com-Enable Matlab use [ enableservice('AutomationServer',true);]
public MainControl ( ) : System
리턴 System

checkMatlab() 공개 메소드

Checks to see if Matlab is still open and asks to Reload the logged data and reopens matlab.
public checkMatlab ( bool showDialog ) : void
showDialog bool Whether to show a dialog with yes or no.
리턴 void

currentDataPrefChanges() 공개 메소드

Passes the Data Preferences from the MainForm to the AFAccess.
public currentDataPrefChanges ( bool timestamp, int datapref, string format ) : void
timestamp bool true: exports the timestamp to Matlab.
datapref int Integer for Attribute.GetValues; 0(raw), negative(sampling), positive(profiled sampling)
format string String representation of the Data Preferences.
리턴 void

getAFData() 공개 메소드

Accesses the AFServer to get data.
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)
리턴 void

getAFDatabase() 공개 메소드

Returns the AFDatabase that the MainControl is using.
public getAFDatabase ( ) : AFDatabase
리턴 AFDatabase

getAttributes() 공개 메소드

Uses the Element Path to access the Attributes.
The AFTreeView is implemented with ToolTipText is the path to the selected Element.
public getAttributes ( string path ) : AFAttributes
path string The pathway to the Element
리턴 AFAttributes

getPIData() 공개 메소드

Get the Data from PIServer using AFSDK.
public getPIData ( string point, string server, string MatlabName, string start, string end, bool edit ) : void
point string The name of the PIPoint.
server string The PIServer
MatlabName string The name of the variable to be used for Matlab.
start string The time to start taking data from.
end string The time to stop taking data from.
edit bool true: Adds the log to the LogSystem (generally true)
리턴 void

getPIPoints() 공개 메소드

Accesses the PIServer to get the PIPoints that are available.
public getPIPoints ( PISystem sys, PIServer serv ) : List
sys PISystem The current PISystem
serv PIServer The current PIServer
리턴 List

importLog() 공개 메소드

Imports a saved file into Matlab.
public importLog ( string path ) : string[]
path string The path to the importe File.
리턴 string[]

saveCurrentLog() 공개 메소드

Calls the LogSystem.Save method.
public saveCurrentLog ( string filePath ) : void
filePath string The path to where the file will be written.
리턴 void

saveMatlabLog() 공개 메소드

Not implemented. Future use: writes a matlab that imports the same data.
public saveMatlabLog ( string filePath ) : void
filePath string The path to where the file will be written.
리턴 void

setAFDatabase() 공개 메소드

Sets the AFDatabase that the MainControl will use.
public setAFDatabase ( string currentDatabase ) : void
currentDatabase string The name of the AFDatabase.
리턴 void

setMainForm() 공개 메소드

Give the MainControl access to the MainForm
public setMainForm ( MainForm form ) : void
form MainForm The Main Form
리턴 void