AFConnectionPreference Enumeration
- Last UpdatedNov 18, 2025
- 2 minute read
- PI System
- AF SDK 2024 R2
- Developer
Defines the connection preference when connecting to an AFCollective
or PICollective.
Namespace: OSIsoft.AF
Assembly: OSIsoft.AFSDK (in OSIsoft.AFSDK.dll) Version: 3.1.1.1182
Syntax
public enum AFConnectionPreference
Public Enumeration AFConnectionPreference Dim instance As AFConnectionPreference
public enum class AFConnectionPreference
type AFConnectionPreference
Members
| Member name | Value | Description | |
|---|---|---|---|
| PreferPrimary | 0 | Connect to the Primary server if it is available. If not, then act as if Any were specified. | |
| RequirePrimary | 1 | Only the Primary server is acceptable for a connection. If the primary server is not available, the connection fails. | |
| Any | 2 | No preference to a AFCollectiveMember or PICollectiveMember is specified. Use the individual priority settings of the collective member to influence selection of the server connection. |
Remarks
The connection preference is used when defining the
AFConnectionInfo.Preference,
PIConnectionInfo.DefaultPreference,
or PIConnectionInfo.Preference property.