Sepasoft MES Module Suite
Use Sample Interval Event methods to intercept sample-taking live and then do some other trigger.
Sample Interval Event Methods
- getActiveSample()
- getComingDueMin()
- getCreateSample()
- getDefUUID()
- getDuration()
- getElapsedSeconds()
- getInterval()
- getLocationPath()
- getOverDueMin()
- getPathSegment(segmentName)
- getProductCode()
- getRefNo()
- getRefresh()
- getScheduleFinish()
- getScheduleStart()
- getSecSinceLastSampleScheduled()
- getSecSinceLastSampleTaken()
- getSequenceDate()
- getSequenceNo()
- getShift()
- getTag()
- getTraceEnabled()
- getTraceEndedAt()
- getTraceStartedAt()
- getValue()
- getValueChangeCount()
- getValueChangedTimeStamp()
- isShiftChangeEvent()
- isTracedEndedEvent()
- isTracedStartedEvent()
- isValueChangedEvent()
- setCreateSample(createSample)
- setRefresh(refresh)
- setScheduleFinish(Date)
- setScheduleStart(Date)
getActiveSample()
Returns a list of samples that are currently active.
Syntax
getActiveSamples()
- Parameters
None
- Returns
List<ActiveSample> activeSamples - The list of active samples.
getComingDueMin()
Returns the default coming due minutes setting for this interval event. The value represents the number of minutes required before a sample is due until the sample is considered coming due.
Syntax
getComingDueMin()
- Parameters
None
- Returns
double comingDueMin - The coming due minute setting for this event.
getCreateSample()
Get the existing sample, or creates one if it can't find it.
Syntax
getCreateSample()
- Parameters
None
- Returns
boolean createSample - True if the sample exist or a sample is created and False if there doesn't exist a sample and a sample is not created.
getDefUUID()
Returns the definition UUID for the sample corresponding to this event.
Syntax
getDefUUID()
- Parameters
None
- Returns
String defUUID - The uuid definition for this sample associated with this event.
getDuration()
Returns the duration for the interval in minutes. It is the estimated amount of time to take the sample.
Syntax
getDuration()
- Parameters
None
- Returns
double duration - The time duration in minutes for this interval.
getElapsedSeconds()
Description
Gets the elapsed time in seconds for this event. It is the time elapsed while taking the sample.
Syntax
getElapsedSeconds()
- Parameters
None
- Returns
Integer elapsedSeconds - The elapsed time for this event.
getInterval()
Returns the calculated interval in seconds.
Syntax
getInterval()
- Parameters
None
- Returns
double interval - The interval defined for this sample.
getLocationPath()
Gets the location path for this event.
Syntax
getLocationPath()
- Parameters
None
- Returns
String path - The location path for interval event.
getOverDueMin()
Description
Gets the duration this sample is overdue in minutes.
Syntax
getOverDueMin()
- Parameters
None
- Returns
double overdueMin - The value represents the number of minutes required after a sample is due until the sample is considered overdue.
getPathSegment(segmentName)
Gets the path of the segment associated with this event.
Syntax
getPathSegment(segmentName)
- Parameters
String segmentName - The name of the segment to return the path for. Options: Enterprise, Site, Area, Line, Cell, Cell_group, Location, Storage_zone, Storage_unit.
- Returns
String path - The path of the segment.
getProductCode()
Returns the product code associated with this sample event.
Syntax
getProductCode()
- Parameters
None
- Returns
String productCode - The product code associated with the sample event.
getRefNo()
Returns the reference number associated with this sample event.
Syntax
getRefNo()
- Parameters
None
- Returns
String refNo - The reference number associated with this sample event.
getRefresh()
Checks whether automatic refresh is set.
Syntax
getRefresh()
- Parameters
None
- Returns
boolean refresh - True, if automatic refresh is set and False otherwise.
getScheduleFinish()
Returns the date for taking this sample is scheduled to be complete.
Syntax
getScheduleFinish()
- Parameters
None
- Returns
Date scheduleFinish - The date for the schedule to end.
getScheduleStart()
Returns the date for this sample is scheduled to be taken.
Syntax
getScheduleStart()
- Parameters
None
- Returns
Date scheduledStart - The date for the sample to start.
getSecSinceLastSampleScheduled()
Returns the last time that a sample was scheduled.
Syntax
getSecSinceLastSampleScheduled()
- Parameters
None
- Returns
Integer secSinceLastSampleScheduled - The time in seconds since the last sample was scheduled.
getSecSinceLastSampleTaken()
Get the amount of time that has passed since the last sample was taken.
Syntax
getSecSinceLastSampleTaken()
- Parameters
None
- Returns
Integer secSinceLastSampleTaken - The time in seconds since the last sample was taken.
getSequenceDate()
Returns the sequence date of the sample interval. Sequence date is the date representing the start of the current interval.
Syntax
getSequenceDate()
- Parameters
None
- Returns
Date sequenceDate - Start date of the current interval.
getSequenceNo()
Returns the sequence number corresponding to the sample event.
Syntax
getSequenceNo()
- Parameters
None
- Returns
Integer sequenceNo - The sequence number associated with this event.
getShift()
Returns the shift number.
Syntax
getShift()
- Parameters
None
- Returns
int shift - Shift for which the sample was taken.
getTag()
Returns the tag associated with this sample.
Syntax
getTag()
- Parameters
None
- Returns
String tag - The tag associated with the sample.
getTraceEnabled()
Checks whether the trace is enabled or not.
Syntax
getTraceEnabled()
- Parameters
None
- Returns
boolean True if trace is enabled and False otherwise.
getTraceEndedAt()
Returns the date at which trace ended.
Syntax
getTraceEndedAt()
- Parameters
None
- Returns
Date traceEndedAt - The trace ended date.
getTraceStartedAt()
Returns the Date at which the trace started.
Syntax
getTraceStartedAt()
- Parameters
None
- Returns
Date traceStartedAt - The date at which trace started.
getValue()
Returns the value of the sample interval event.
Syntax
getValue()
- Parameters
None
- Returns
Object value - The value for this interval.
getValueChangeCount()
Returns the number of time the associated value has changed.
Syntax
getValueChangeCount()
- Parameters
None
- Returns
Integer valueChangeCount - The count of the value change.
getValueChangedTimeStamp()
Returns the time stamp of the value changed.
Syntax
getValueChangedTimeStamp()
- Parameters
None
- Returns
Date timeStamp - The date at which the value changed.
isShiftChangeEvent()
Checks if the shift has changed.
Syntax
isShiftChangeEvent()
- Parameters
None
- Returns
boolean shiftChangeEvent - True if the shift has changed and False otherwise.
isTracedEndedEvent()
Checks whether the trace has ended.
Syntax
isTracedEndedEvent()
- Parameters
None
- Returns
boolean True if trace ended and False otherwise.
isTracedStartedEvent()
Checks whether trace has started.
Syntax
isTracedStartedEvent()
- Parameters
None
- Returns
boolean traceStartedEvent - True if trace has started and False otherwise.
isValueChangedEvent()
Checks whether the value has changed.
Syntax
isValueChangedEvent()
- Parameters
None
- Returns
boolean valueChangedEvent - True if value has changed and False otherwise.
setCreateSample(createSample)
Sets this event to create a sample.
Syntax
setCreateSample(createSample)
- Parameters
boolean createSample - The boolean to set this property.
- Returns
Nothing
setRefresh(refresh)
Sets the refresh property for this event.
Syntax
setRefresh()
- Parameters
boolean refresh - Set it to True if the event should be automatically refreshed and False otherwise.
- Returns
Nothing
setScheduleFinish(Date)
Sets the date that this event is scheduled to be completed.
Syntax
setScheduleFinish(Date)
- Parameters
Date scheduleFinish - The date for the schedule to end.
- Returns
Nothing
setScheduleStart(Date)
Sets the date that this sample is scheduled to be taken.
Syntax
setScheduleStart(Date)
- Parameters
Date scheduleStart - The date for the schedule to start.
- Returns
Sepasoft MES Module Suite