Click or drag to resize
OSIsoft, LLC

PISystem Class

The PISystem represents a single logical data store for the AF SDK.

Inheritance Hierarchy

Namespace:  OSIsoft.AF
Assembly:  OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 2.10.8.440
Syntax
[SerializableAttribute]
public sealed class PISystem : AFObject, 
	IAFSecurable, IAFTimeSource, IAFChangedEvent, IComparable<PISystem>, 
	IEquatable<PISystem>, IDisposable

The PISystem type exposes the following members.

Properties
  NameDescription
Public propertyAliasNames
The list of alias names for the PISystem.
Public propertyAnalysisRulePlugIns
Gets the collection of AFAnalysisRule plugin objects maintained by the PISystem.
Public propertyAnalysisService
This property returns the AFAnalysisService object associated with this PISystem.
Public propertyAutoCreateNotificationsEnabled
Gets or sets a value indicating if the AutoCreate option is enabled for the PISystem.
Public propertyCollective
This property returns information and status about the PI AF Server collective.
Public propertyConfigStringValidationEnabled
Gets or sets a value indicating if plugins are enabled to validate configuration strings when set.PISystem.
Public propertyConnectionInfo
This property returns information about the connection to the PI AF Server from the local computer.
Public propertyCurrentUserIdentities
Gets the list of AFSecurityIdentity identities of the person who is currently logged on to the PISystem server.
Public propertyCurrentUserIdentityString
Gets the security identity string of the person who is currently logged on to the PISystem server.
Public propertyCurrentUserName
Gets the user name of the person who is currently logged on to the PISystem server.
Public propertyDatabases
This property provides access to the AFDatabases collection that corresponds to the list of databases that have been created on this PISystem.
Public propertyDatabaseVersion
Read-only property that contains a string that uniquely identifies the current database version.
Public propertyDataReferencePlugIns
Gets the collection of AFDataReference plugin objects maintained by the PISystem.
Public propertyDefaultPIServerName
This property is the name of the default PIServer for this PISystem.
Public propertyDeliveryChannelPlugIns
Gets the collection of AFDeliveryChannel plugin objects maintained by the PISystem.
Public propertyDeliveryFormats
The collection of global AFDeliveryFormat objects.
Public propertyDescription
Read/write property that provides a more detailed description of the object.
Public propertyEventsEnabled
Gets or sets a value indicating if events are enabled for the PISystem.
Public propertyExtendedProperties
A dictionary of extended properties that can be used to store application specific information.
Public propertyFileAllowedExtensions
The list of valid file extensions for an AFFile.
Public propertyFileMaxLength
The maximum allowed file size for an AFFile.
Public propertyHasItemsCheckedOut
Determines if any items are currently checked out in the PISystem.
Public propertyHasItemsCheckedOutToMe
Determines if any items are currently checked out to the current user in the PISystem.
Public propertyID
Read-only property that provides a unique identifier for the object to be used for quick access that is not dependent upon the index.
(Inherited from AFObject.)
Public propertyIdentity
This read-only property contains identity of the object.
(Inherited from AFObject.)
Public propertyIsDeleted
This read-only property indicates whether the object has been deleted.
(Inherited from AFObject.)
Public propertyIsDirty
Indicates whether there are system level objects in the PISystem that have been modified since the last save in to persistent storage.
Public propertyIsReadOnly
True if operations that make modifications are blocked on this instance.
Public propertyIsShared
True if this instance is shared with other users with the same set of identities.
Public propertyLibraries
This property provides access to the AFLibraries collection that corresponds to the list of known libraries on the server.
Public propertyName
This property identifies the name of the PISystem.
Public propertyNotificationContactTemplates
Gets the collection of top-level pre-configured notification contacts maintained on this PISystem.
Public propertyPISystem
This read-only property allows access to the PISystem associated with this object.
(Inherited from AFObject.)
Public propertySecurity
This read-only property returns the AFSecurity information for the object.
Public propertySecurityIdentities
This property provides access to the AFSecurityIdentities collection that corresponds to the list of security identities on the server.
Public propertySecurityMappings
This property provides access to the AFSecurityMappings collection that corresponds to the list of security mappings on the server.
Public propertyServerTime
Gets the current time of the PI AF Server.
Public propertyServerTimeZone
Gets the current time zone of the PI AF Server.
Public propertyServerVersion
Read-only property that contains a string that uniquely identifies the current server version.
Public propertyTimeRulePlugIns
Gets the collection of AFTimeRule plugin objects maintained by the PISystem.
Public propertyUniqueID
Read-only property that provides the object's ID as a String.
(Inherited from AFObject.)
Public propertyUOMDatabase
This property provides access to the UnitsOfMeasure database UOMDatabase that contains the UnitsOfMeasure that have been created on the PISystem.
Top
Methods
  NameDescription
Public methodCode exampleApplyChanges
This method applies (saves) all the changes to objects modified at the system level by the current user and makes those changes available to other applications executing under the same user account.
Public methodCode exampleApplyChanges(AFCheckedOutMode)
This method applies (saves) all the changes to objects modified at the system level according to the specified AFCheckedOutMode and makes those changes available to other applications executing under the same user account.
Public methodCode exampleApplyChanges(IListIAFTransactable)
This method applies (saves) the changes to the specified modified objects and makes those changes available to other objects.
Public methodCanCreateCollective
Check if a collective can be created for this PISystem.
Public methodCode exampleCheckIn
This method checks in (commits) all the changes to all modified objects at the system level by saving the object's information to persistent storage.
Public methodCode exampleCheckIn(AFCheckedOutMode)
This method checks in (commits) all the changes to all modified objects at the system level by saving the object's information to persistent storage according to the specified AFCheckedOutMode.
Public methodCode exampleCheckIn(IListIAFTransactable)
This method checks in (commits) the changes to the specified modified objects by saving the object's information to persistent storage.
Public methodCompareTo(Object)
Compares this instance with a specified Object.
(Inherited from AFObject.)
Public methodCompareTo(AFObject)
Compares this instance with a specified AFObject.
(Inherited from AFObject.)
Public methodCode exampleConnect
Connects to the server using default credentials to allow sending and retrieving data.
Public methodCode exampleConnect(NetworkCredential)
Connects to the server using the specified credentials to allow sending and retrieving data.
Public methodCode exampleConnect(Boolean, IWin32Window)
Connects to the server with a credential prompt if necessary to allow sending and retrieving data.
Public methodCode exampleConnect(NetworkCredential, AFConnectionPreference)
Connects to the server using the specified credentials and connection preference to allow sending and retrieving data.
Public methodCode exampleConnect(Boolean, IWin32Window, AFConnectionPreference)
Connects to the server using the specified connection preference with a credential prompt if necessary to allow sending and retrieving data.
Public methodCode exampleConnect(Boolean, IWin32Window, AFConnectionPreference, Boolean)
Connects to the server using the specified connection preference with a credential prompt if necessary to allow sending and retrieving data and return an indication that dialog was canceled.
Public methodCode exampleConnectWithPrompt(IWin32Window)
Connects to the server prompting for credentials.
Public methodCode exampleConnectWithPrompt(IWin32Window, AFConnectionPreference)
Connects to the server prompting for credentials and specifying a connection preference.
Public methodCreateCollective
Convert the PISystem into a member of a new AFCollective.
Public methodStatic memberCreatePISystem
Create a new PISystem instance based upon the specified host address.
Public methodDisconnect
Disconnects an open connection to the PI AF Server.
Public methodEquals(Object)
Determines whether the specified Object is equal to the current object.
(Overrides AFObjectEquals(Object).)
Public methodEquals(AFObject)
Indicates whether the current object is equal to another object of the same type.
(Inherited from AFObject.)
Public methodEquals(PISystem)
Indicates whether the current object is equal to another object of the same type.
Public methodExportCsv(Object, IListType, IListString, CultureInfo)
Exports the CSV representation of requested object(s) and returns it as a string.
Public methodExportCsv(Object, IListType, IListString, PIExportMode, CultureInfo)
Exports the CSV representation of requested object(s) and returns it as a string.
Public methodExportCsv(Object, IListType, IListString, CultureInfo, String, Object, Object, EventHandlerAFProgressEventArgs)
Exports the representation of requested object(s) in comma-separated (CSV) format to a file.
Public methodExportCsv(Object, IListType, IListString, PIExportMode, CultureInfo, String, Object, Object, EventHandlerAFProgressEventArgs)
Exports the representation of requested object(s) in comma-separated (CSV) format to a file.
Public methodExportXml(Object, PIExportMode)
Exports the XML representation of any object(s) and returns it as a string.
Public methodExportXml(Object, PIExportMode, String, Object, Object, EventHandlerAFProgressEventArgs)
Exports the XML representation of any object(s) to a file.
Public methodExportXml(Object, PIExportMode, XmlWriter, Object, Object, EventHandlerAFProgressEventArgs)
Exports the XML representation of any object(s) to an XmlWriter.
Public methodCode exampleFindChangedItems(Boolean, AFTime, AFTime) Obsolete.
Find all the items that have changed in the PISystem.
Public methodCode exampleFindChangedItems(Boolean, Int32, Object, Object)
Find all the items that have changed in the PISystem for all types of objects.
Public methodCode exampleFindChangedItems(AFIdentity, Boolean, AFTime, AFTime) Obsolete.
Find all the items that have changed in the PISystem of the specified type.
Public methodCode exampleFindChangedItems(Boolean, Boolean, Int32, Object, Object)
Find all the items that have changed in the PISystem with the option to retrieve both the system and database level changes.
Public methodCode exampleFindChangedItems(AFIdentity, Boolean, Int32, Object, Object)
Find all the items that have changed in the PISystem of the specified type.
Public methodCode exampleFindChangedItems(AFIdentity, Boolean, Boolean, Int32, Object, Object)
Find all the items that have changed in the PISystem of the specified type with the option to retrieve both the system and database level changes.
Public methodFindCheckedOutItems
This method finds all the items that are currently checked out in the PISystem.
Public methodGetActiveDirectoryProperties
Retrieves the Active Directory settings the server uses to retrieve contact information.
Public methodCode exampleGetClientRpcMetrics
Get the remote procedure call metrics to the server for this PISystem.
Public methodGetCsvColumns(Type)
Retrieve a collection containing the required and optional CSV columns for the specified object type and its children.
Public methodGetCsvColumns(Type, IListType)
Retrieve a collection containing the required and optional CSV columns for the specified object type and its children.
Public methodCode exampleGetFindChangedItemsCookie
Retrieve the server cookie used in conjunction with FindChangedItems.
Public methodGetHashCode
Gets the hash code for this instance of the object which is suitable for use in hashing algorithms and data structures like a hash table.
(Overrides AFObjectGetHashCode.)
Public methodGetObjectCounts
Gets the total number of objects by type in the database.
Public methodGetPath
Returns the full path to the object, using just the names.
(Inherited from AFObject.)
Public methodGetPath(AFObject)
Returns the path to the object relative from another object.
(Inherited from AFObject.)
Public methodGetPath(AFEncodeType, AFObject)
Returns the path to the object relative from another object, using the name and/or id as specified by encodeType.
(Inherited from AFObject.)
Public methodCode exampleGetRpcMetrics
Get the remote procedure call metrics for the server.
Public methodGetSecurity
Gets the AFSecurity information of the specified security item associated with the object.
Public methodGetSessions(NullableAFTime, NullableAFTime, AFSortOrder, Int32, Int32)
Retrieves session data for the specified filter criteria.
Public methodGetSessions(NullableAFTime, NullableAFTime, AFSessionSortField, AFSortOrder, Int32, Int32)
Retrieves session data for the specified filter criteria.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodImportCsv(AFDatabase, PIImportMode, CultureInfo, Stream, EventHandlerAFProgressEventArgs)
Imports the comma-separated value (CSV) representation of any object from a stream.
Public methodImportCsv(AFDatabase, PIImportMode, CultureInfo, String, EventHandlerAFProgressEventArgs)
Imports the comma-separated value (CSV) representation of any object from a file.
Public methodImportXml(Object, PIImportMode, String)
Imports the XML representation of any object from either a file or string.
Public methodImportXml(Object, PIImportMode, Stream, EventHandlerAFProgressEventArgs)
Imports the XML representation of any object from a stream.
Public methodImportXml(Object, PIImportMode, XmlReader, EventHandlerAFProgressEventArgs)
Imports the XML representation of any object from an XmlTextReader.
Public methodPersist
This method returns the persistence string for the object.
(Inherited from AFObject.)
Public methodRefresh
Refreshes the client with any changes that have been made to any system-level object since loaded.
Public methodRefresh(Boolean)
Refreshes the client with any changes that have been made to any system-level and optionally database-level objects since loaded.
Public methodRefresh(IEnumerableAFObject)
Refreshes the client with any changes that have been made to the specified objects since they were loaded.
Public methodRemovePlugInAssembly
Removes a AFPlugIn assembly from the database.
Public methodRemovePlugInSupportAssembly
Removes an AFPlugIn support assembly from the database.
Public methodSetActiveDirectoryProperties
Sets the Active Directory settings the server uses to retrieve contact information.
Public methodSupports(PISystemFeatures)
Checks if the specified PISystemFeatures feature is supported by the PISystem.
Public methodSupports(String, Boolean)
Checks if the specified feature is supported by the PISystem.
Public methodToString
Returns a String that represents the current object.
(Inherited from AFObject.)
Public methodUndoCheckOut
Rolls back all the changes to the system since the last call to the CheckOut method of each object. Any changes since the check out will be lost.
Public methodUploadPlugInAssembly
Uploads a AFPlugIn assembly to the database.
Public methodUploadPlugInSupportAssembly
Uploads a AFPlugIn support assembly to the database.
Top
Events
  NameDescription
Public eventCode exampleChanged
Event is raised when the object or one of its sub-objects is changed.
Public eventCode exampleConnectChanged
Occurs when the connection status of this PISystem to the PI AF Server changes.
Top
Operators
  NameDescription
Public operatorStatic memberEquality
The equality operator (==) compares its operands to determine if they are equal.
Public operatorStatic memberInequality
The inequality operator (!=) compares its operands to determine if they are not equal.
Top
Remarks

PISystem objects are retrieved from the PISystems collection and provide access to the basic entities represented on the PISystem.

Typically, a program requires a network connection to the server where the PISystem is located. Connections are established by calling one of the Connect Overload methods. The Disconnect method is used to break the connection to the server. A PISystem could represent a AFCollective of servers which provide high-availability. If the Collective is not , then the PISystem represents a collective of servers.

Many of the services available through the PISystem are accessed through its properties, which return other objects.

Examples
PISystems myPISystems = new PISystems();

// Display information for Default PISystem
AFConnectionInfo myConnectionInfo = myPISystems.DefaultPISystem.ConnectionInfo;
Console.WriteLine("Name of Default PISystem = {0}", myPISystems.DefaultPISystem.Name);
Console.WriteLine("Description of Default PISystem = {0}", myPISystems.DefaultPISystem.Description);
Console.WriteLine("Host used to connect to Default PISystem = {0}", myConnectionInfo.Host);
Console.WriteLine("Port used to connect to Default PISystem = {0}", myConnectionInfo.Port);
Console.WriteLine("Protocol used to connect to Default PISystem = {0}", myConnectionInfo.Protocol);
Console.WriteLine();

// Display the version of the PISystems
Console.WriteLine("Version of the PISystems = {0}", myPISystems.Version);

// Display the number of PISystems
Console.WriteLine("PISystem count = {0}", myPISystems.Count);

// Display PISystem information
foreach (PISystem sys in myPISystems)
{
    Console.WriteLine("   Name of PISystem = {0}", sys.Name);
    Console.WriteLine("   Description of PISystem = {0}", sys.Description);
    Console.WriteLine("   UniqueID of PISystem = {0}", sys.UniqueID);
    Console.WriteLine();
}

// Add a new PISystem
PISystem newSys = myPISystems.Add("NewPISystem");
newSys.ConnectionInfo.Host = "localhost";
Version Information

AFSDK

Supported in: 2.10.5, 2.10, 2.9.5, 2.9, 2.8.5, 2.8, 2.7.5, 2.7, 2.6, 2.5, 2.4
See Also
Enabling Operational Intelligence