PIconnect.PIConsts module¶
- class PIconnect.PIConsts.AuthenticationMode(value)¶
Bases:
IntEnum
AuthenticationMode indicates how a user authenticates to a PI Server
Detailed information is available at AF.PI.PIAuthenticationMode.
- PI_USER_AUTHENTICATION = 1¶
Use the PI User authentication mode when making a connection
- WINDOWS_AUTHENTICATION = 0¶
Use Windows authentication when making a connection
- class PIconnect.PIConsts.BufferMode(value)¶
Bases:
IntEnum
Indicates buffering option in updating values, when supported by the Data Reference.
Detailed information is available at AF.Data.AFBufferOption
- BUFFER = 2¶
- BUFFER_IF_POSSIBLE = 1¶
Try updating data reference values with buffer. If fails (e.g. data reference AFDataMethods does not support Buffering, or its Buffering system is not available), then try updating directly without buffer.
- DO_NOT_BUFFER = 0¶
Updating data reference values without buffer.
- class PIconnect.PIConsts.CalculationBasis(value)¶
Bases:
IntEnum
CalculationBasis indicates how values should be weighted over a time range
Detailed information is available at AF.Data.AFCalculationBasis.
- EVENT_WEIGHTED = 1¶
Each event is weighted equally.
- EVENT_WEIGHTED_EXCLUDE_EARLIEST = 5¶
Each event is weighted equally, except data at the beginning of the interval is excluded.
- EVENT_WEIGHTED_EXCLUDE_MOST_RECENT = 4¶
Each event is weighted equally, except data at the end of the interval is excluded.
- EVENT_WEIGHTED_INCLUDE_BOTH_ENDS = 6¶
Each event is weighted equally, data at both boundaries of the interval are explicitly included.
- TIME_WEIGHTED = 0¶
Each event is weighted according to the time over which it applies.
- TIME_WEIGHTED_CONTINUOUS = 2¶
Each event is time weighted, but interpolation is always done as if it is continous data.
- TIME_WEIGHTED_DISCRETE = 3¶
Each event is time weighted, but interpolation is always done as if it is discrete, stepped, data.
- class PIconnect.PIConsts.EventFrameSearchMode(value)¶
Bases:
IntEnum
EventFrameSearchMode defines the interpretation and direction from the start time when searching for event frames.
Detailed information is available at https://techsupport.osisoft.com/Documentation/PI-AF-SDK/html/T_OSIsoft_AF_EventFrame_AFEventFrameSearchMode.htm, including a graphical display of event frames that are returned for a given search mode.
- BACKWARD_FROM_END_TIME = 3¶
Backward from end time, also known as ending before
- BACKWARD_FROM_START_TIME = 1¶
Backward from start time, also known as starting before
- BACKWARD_IN_PROGRESS = 5¶
Backward in progress, also known as starting before and in progress
- ENDING_AFTER = 4¶
- ENDING_BEFORE = 3¶
- FORWARD_FROM_END_TIME = 4¶
Forward from end time, also known as ending after
- FORWARD_FROM_START_TIME = 2¶
Forward from start time, also known as starting after
- FORWARD_IN_PROGRESS = 6¶
Forward in progress, also known as starting after and in progress
- NONE = 0¶
Uninitialized
- STARTING_AFTER = 2¶
- STARTING_AFTER_IN_PROGRESS = 6¶
- STARTING_BEFORE = 1¶
- STARTING_BEFORE_IN_PROGRESS = 5¶
- class PIconnect.PIConsts.ExpressionSampleType(value)¶
Bases:
IntEnum
ExpressionSampleType indicates how expressions are evaluated over a time range.
Detailed information is available at AF.Data.AFSampleType.
- EXPRESSION_RECORDED_VALUES = 0¶
The expression is evaluated at each archive event.
- INTERVAL = 1¶
The expression is evaluated at a sampling interval, passed as a separate argument.
- class PIconnect.PIConsts.RetrievalMode(value)¶
Bases:
IntEnum
RetrievalMode indicates which recorded value should be returned
Detailed information is available at AF.Data.AFRetrievalMode.
- AFTER = 7¶
The first after the requested time
- AT_OR_AFTER = 2¶
At the exact time if available, else the first after the requested time
- AT_OR_BEFORE = 1¶
At the exact time if available, else the first before the requested time
- AUTO = 0¶
Autmatic detection
- BEFORE = 6¶
The first before the requested time
- EXACT = 4¶
At the exact time if available, else return an error
- class PIconnect.PIConsts.SummaryType(value)¶
Bases:
IntFlag
SummaryType indicates which types of summary should be calculated.
Based on
enum.IntEnum
in Python 3.5 or earlier. SummaryType’s can be or’ed together. Python 3.6 or higher returns a new IntFlag, while in previous versions it will be casted down to int.>>> SummaryType.MINIMUM | SummaryType.MAXIMUM # Returns minimum and maximum <SummaryType.MAXIMUM|MINIMUM: 12> # On Python 3.6+ 12 # On previous versions
Detailed information is available at AF.Data.AFSummaryTypes.
- ALL = 24831¶
A convenience to retrieve all summary types
- ALL_FOR_NON_NUMERIC = 8320¶
A convenience to retrieve all summary types for non-numeric data
- AVERAGE = 2¶
Average value over the time span
- COUNT = 128¶
The sum of the event count (when the calculation is event weighted). The sum of the event time duration (when the calculation is time weighted.)
- MAXIMUM = 8¶
The maximum value in the time span
- MINIMUM = 4¶
The minimum value in the time span
- NONE = 0¶
No summary data
- PERCENT_GOOD = 8192¶
The percentage of the data with a good value over the time range. Based on time for time weighted calculations, based on event count for event weigthed calculations.
- POP_STD_DEV = 64¶
The population standard deviation of the values over the time span
- RANGE = 16¶
The range of the values (max-min) in the time span
- STD_DEV = 32¶
The sample standard deviation of the values over the time span
- TOTAL = 1¶
A total over the time span
- TOTAL_WITH_UOM = 16384¶
The total over the time span, with the unit of measurement that’s associated with the input (or no units if not defined for the input).
- class PIconnect.PIConsts.TimestampCalculation(value)¶
Bases:
IntEnum
TimestampCalculation defines the timestamp returned for a given summary calculation
Detailed information is available at AF.Data.AFTimeStampCalculation.
- AUTO = 0¶
The timestamp is the event time of the minimum or maximum for those summaries or the beginning of the interval otherwise.
- EARLIEST_TIME = 1¶
The timestamp is always the beginning of the interval.
- MOST_RECENT_TIME = 2¶
The timestamp is always the end of the interval.
- class PIconnect.PIConsts.UpdateMode(value)¶
Bases:
IntEnum
Indicates how to treat duplicate values in the archive, when supported by the Data Reference.
Detailed information is available at AF.Data.AFUpdateOption
- INSERT = 1¶
Add the value to the archive. Any existing values at the same time are not overwritten.
- INSERT_NO_COMPRESSION = 5¶
Add the value to the archive without compression. If this value is written to the snapshot, the previous snapshot value will be written to the archive, without regard to compression settings. Note that if a subsequent snapshot value is written without the InsertNoCompression option, the value added with the InsertNoCompression option is still subject to compression.
- NO_REPLACE = 2¶
Add the value to the archive only if no value exists at the same time. If a value already exists for that time, the passed value is ignored.
- REMOVE = 6¶
Remove the value from the archive if a value exists at the passed time.
- REPLACE = 0¶
Add the value to the archive. If any values exist at the same time, will overwrite one of them and set its Substituted flag.
- REPLACE_ONLY = 3¶
Replace an existing value in the archive at the specified time. If no existing value is found, the passed value is ignored.