GetBottleneckEntsForPeriod Method
- Last UpdatedNov 06, 2025
- 3 minute read
'Declaration
Public Shared Function GetBottleneckEntsForPeriod( _
ByVal lineId As Integer, _
ByVal filterType As LineFilterType, _
ByVal filterDuration As Nullable(Of Integer), _
ByVal filterTimeUnit As LineFilterTimeUnit, _
ByVal filterStartOffset As Nullable(Of Integer), _
ByVal filterEndOffset As Nullable(Of Integer) _
) As DataSet
'Usage
Dim lineId As Integer
Dim filterType As LineFilterType
Dim filterDuration As Nullable(Of Integer)
Dim filterTimeUnit As LineFilterTimeUnit
Dim filterStartOffset As Nullable(Of Integer)
Dim filterEndOffset As Nullable(Of Integer)
Dim value As DataSet
value = Line.GetBottleneckEntsForPeriod(lineId, filterType, filterDuration, filterTimeUnit, filterStartOffset, filterEndOffset)
public static DataSet GetBottleneckEntsForPeriod(
int lineId,
LineFilterType filterType,
Nullable<int> filterDuration,
LineFilterTimeUnit filterTimeUnit,
Nullable<int> filterStartOffset,
Nullable<int> filterEndOffset
)
Parameters
- lineId
Required. Holds the ID of the line whose bottleneck entity data is being retrieved.
- filterType
Required. Holds a LineFilterType enumeration value that specifies the type of time period by which to filter the data. For more information, see the LineFilterType enumeration help topic for the FactMES.API.Core namespace.
- filterDuration
Optional. Holds an integer value that specifies the value of N if filterType is LastNHours.
- filterTimeUnit
Required. Holds a LineFilterTimeUnit enumeration value that specifies the time unit for a custom filter if filterType is Custom. For more information, see the LineFilterTimeUnit enumeration help topic for the FactMES.API.Core namespace.
If filterType is not Custom, this parameter is ignored.
- filterStartOffset
Optional. Holds an integer that specifies the start point of the time interval for which the events are to be filtered. See the Remarks section below for more information about how this parameter is used.
- filterEndOffset
Optional. Specifies the end point of the time interval for which the events are to be filtered. See the Remarks section below for more information about how this parameter is used.
Return Value
Returns a DataSet that contains a datarow for each entity that is a bottleneck entity for the specified period. If no matching records are found, an empty DataSet is returned.
The columns of the returned DataSet are described below.
|
Column Name |
Description |
|---|---|
|
ent_id |
An integer that is the ID of the entity. |
|
ent_name |
A string that is the name of the entity. |
The filter_start_offset and the filter_end_offset together define an interval that filters the data to be returned (that is, only data that falls within the interval will be returned). These offsets both go backwards from the current time; a value of 1 indicates the current time, a value of 2 indicates one time unit ago, etc.
The filter_start_offset must be greater (that is, further back in time) than the filter_end_offset. If the filter_end_offset is 0, it is ignored (that is, the end of the interval will be the current time). For example, if filter_time_unit is set to 2 (Day), filter_start_offset is set to 2, and filter_end_offset is set to 1, then only the data with an event time that occurred yesterday will be returned. If filter_time_unit is set to 1 (Shift), filter_start_offset is set to 1, and filter_end_offset is set to 0, then only the events that occurred during the current shift will be returned.
Note: Because this method queries historical tables and supports custom time periods, use caution when querying large time periods (greater than a day), as system performance can be adversely affected.