Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertNewToOld(NewState int) (OldState int)
- func ConvertOldToNew(OldState int) (NewState int)
- func ConvertStateToString(state int, languageCode int) (stateString string)
- func GetStateFromString(stateString string) uint64
- func IsChangeover(state int) (returnValue bool)
- func IsCleaning(state int) (returnValue bool)
- func IsCongestionBypass(state int) (returnValue bool)
- func IsEmptying(state int) (returnValue bool)
- func IsEquipmentFailure(state int) (returnValue bool)
- func IsExternalFailure(state int) (returnValue bool)
- func IsExternalInterference(state int) (returnValue bool)
- func IsInletJam(state int) (returnValue bool)
- func IsMaterialIssueOther(state int) (returnValue bool)
- func IsMicrostop(state int) (returnValue bool)
- func IsNoOrder(state int) (returnValue bool)
- func IsNoShift(state int) (returnValue bool)
- func IsOperatorBreak(state int) (returnValue bool)
- func IsOperatorNotAtMachine(state int) (returnValue bool)
- func IsOutletJam(state int) (returnValue bool)
- func IsPreventiveMaintenance(state int) (returnValue bool)
- func IsProducing(state int) (returnValue bool)
- func IsProducingFullSpeed(state int) (returnValue bool)
- func IsProducingLowerThanFullSpeed(state int) (returnValue bool)
- func IsSettingUp(state int) (returnValue bool)
- func IsSpecifiedStop(state int) (returnValue bool)
- func IsTechnicalOtherStop(state int) (returnValue bool)
- func IsUnknown(state int) (returnValue bool)
- func IsUnspecifiedStop(state int) (returnValue bool)
- type CountEntry
- type CustomerConfiguration
- type DataResponseAny
- type OrderEntry
- type OrdersRaw
- type ParetoEntry
- type ShiftEntry
- type StateEntry
- type UpcomingTimeBasedMaintenanceActivities
Constants ¶
const ( // ProducingAtFullSpeedState means that the asset is producing at full speed ProducingAtFullSpeedState = 10000 // ProducingAtLowerThanFullSpeedState means that the asset is producing lower than full speed ProducingAtLowerThanFullSpeedState = 20000 // UnknownState means that the asset is in an unknown state UnknownState = 30000 // UnspecifiedStopState means that the asset is in an unspecified stop UnspecifiedStopState = 40000 // IdleState means that the asset is in an unspecified state, but theoretically ready to run IdleState = 40100 // OperatorInteractionState means that the asset is in an unspecified state, because the operator has stopped the asset manually OperatorInteractionState = 40200 // MicrostopState means that the asset is in an unspecified stop shorter than a certain amount of time // (typically between 2 to 10 minutes) MicrostopState = 50000 // InletJamState means that the asset has a jam in the inlet InletJamState = 60000 // OutletJamState means that the asset has a jam in the outlet OutletJamState = 70000 // CongestionBypassState means that the asset has a congestion or deficiency in the bypass flow CongestionBypassState = 80000 // MissingBottleCapsRinneState means that the asset has a congestion or deficiency in the bypass flow, specifically "Kronkorken Rinne" MissingBottleCapsRinneState = 80001 // MissingBottleCapsUebergabeState means that the asset has a congestion or deficiency in the bypass flow, specifically "Kronkorken Uebergabe" MissingBottleCapsUebergabeState = 80002 // MaterialIssueOtherState means that the asset has unknown or other material issue, which is not further specified MaterialIssueOtherState = 90000 // ChangeoverState means that the asset is currently undergoing a changeover ChangeoverState = 100000 // ChangeoverPreparationState means that the asset is currently undergoing a changeover in the preparation step // (time between order is started till the machine is first running) ChangeoverPreparationState = 100010 // ChangeoverPostprocessingState means that the asset is currently undergoing a changeover in the postprocessing step // (time between machien was last running and the time when the order is ended ) ChangeoverPostprocessingState = 100020 // CleaningState means that the asset is currently undergoing a cleaning process CleaningState = 110000 // EmptyingState means that the asset is currently undergoing a emptying process EmptyingState = 120000 // SettingUpState means that the asset is currently setting up (e.g. warming up) SettingUpState = 130000 // OperatorNotAtMachineState means that the asset is not running because there is no operator available OperatorNotAtMachineState = 140000 // OperatorBreakState means that the asset is not running because the operators are in a break OperatorBreakState = 150000 // NoShiftState means that there is no planned shift at the asset NoShiftState = 160000 // NoOrderState means that there is no order at the asset NoOrderState = 170000 // EquipmentFailureState means that there is an equipment failure (e.g. broken engine) EquipmentFailureState = 180000 // EquipmentFailureState means that there is an equipment failure at the welder EquipmentFailureStateWelder = 180001 // EquipmentFailureState means that there is an equipment failure at the welder EquipmentFailureStateExpender = 180002 // EquipmentFailureState means that there is an equipment failure Palletizer EquipmentFailureStatePalletizer = 180003 // EquipmentFailureState means that there is an equipment failure Underbody-machine EquipmentFailureStateUnderbody = 180004 // EquipmentFailureState means that there is an equipment failure (e.g. broken engine) EquipmentFailureStateTopcover = 180005 // ExternalFailureState means that there is an external failure (e.g. missing compressed air) ExternalFailureState = 190000 // ExternalInterferenceState means that the asset is not running because of an external interference ExternalInterferenceState = 200000 // CraneNotAvailableState means that the asset is not running because the crane is currently not available CraneNotAvailableState = 200010 // PreventiveMaintenanceStop means that the asset is currently undergoing a preventive maintenance action PreventiveMaintenanceStop = 210000 // TechnicalOtherStop means that the asset is currently having a not further specified technical issue TechnicalOtherStop = 220000 // MaxState is the highest possible state MaxState = 230000 )
Variables ¶
var ModelState = newModelStateRegistry()
Functions ¶
func ConvertNewToOld ¶
ConvertNewToOld converts a state from the new data model to the old one (used to keep the old test files)
func ConvertOldToNew ¶
ConvertOldToNew converts a state from the old data model to the new one
func ConvertStateToString ¶
ConvertStateToString converts a state in integer format to a human readable string
func GetStateFromString ¶
GetStateFromString returns the state number from its string representation
func IsCongestionBypass ¶
IsCongestionBypass checks whether
func IsEquipmentFailure ¶
IsEquipmentFailure checks whether
func IsExternalFailure ¶
IsExternalFailure checks whether
func IsExternalInterference ¶
IsExternalInterference checks whether
func IsMaterialIssueOther ¶
IsMaterialIssueOther checks whether
func IsMicrostop ¶
IsMicrostop checks whether the asset is in a microstop
func IsOperatorBreak ¶
IsOperatorBreak checks whether the asset is not running because the operators are in a break
func IsOperatorNotAtMachine ¶
IsOperatorNotAtMachine checks whether
func IsPreventiveMaintenance ¶
IsPreventiveMaintenance checks whether
func IsProducing ¶
IsProducing checks whether the asset is producing
func IsProducingFullSpeed ¶
IsProducingFullSpeed checks whether the asset is producing on the full speed
func IsProducingLowerThanFullSpeed ¶
IsProducingLowerThanFullSpeed checks whether the asset is producing lower than the full speed
func IsSpecifiedStop ¶
IsSpecifiedStop checks whether the asset is in an specified stop (is not running, is not a microstop or unknown stop, and is defined)
func IsTechnicalOtherStop ¶
IsTechnicalOtherStop checks whether
func IsUnspecifiedStop ¶
IsUnspecifiedStop checks whether the asset is in an unspecified stop
Types ¶
type CountEntry ¶
CountEntry contains the count and its corresponding timestamp
type CustomerConfiguration ¶
type CustomerConfiguration struct { MicrostopDurationInSeconds float64 IgnoreMicrostopUnderThisDurationInSeconds float64 MinimumRunningTimeInSeconds float64 ThresholdForNoShiftsConsideredBreakInSeconds float64 AvailabilityLossStates []int32 PerformanceLossStates []int32 LowSpeedThresholdInPcsPerHour float64 AutomaticallyIdentifyChangeovers bool LanguageCode int }
CustomerConfiguration contains all configurations for that specific customer (incl. machine specific configurations)
type DataResponseAny ¶
type DataResponseAny struct { ColumnNames []string `json:"columnNames"` Datapoints [][]interface{} `json:"datapoints"` }
DataResponseAny is the format of the returned JSON.
type OrderEntry ¶
OrderEntry contains the begin and end time of a order
type OrdersRaw ¶
type OrdersRaw struct { OrderName string TargetUnits int BeginTimestamp time.Time EndTimestamp time.Time ProductName string TimePerUnitInSeconds float64 }
OrdersRaw contains information about orders including their products
type ParetoEntry ¶
ParetoEntry contains the state and its corresponding total duration
type ShiftEntry ¶
type ShiftEntry struct { TimestampBegin time.Time TimestampEnd time.Time ShiftType int //shiftType =0 is noShift }
ShiftEntry contains the begin and end time of a shift
type StateEntry ¶
StateEntry contains the state and its corresponding timestamp
type UpcomingTimeBasedMaintenanceActivities ¶
type UpcomingTimeBasedMaintenanceActivities struct { ComponentName string IntervallInHours int ActivityType int LatestActivity pq.NullTime NextActivity pq.NullTime DurationInDays sql.NullFloat64 }
UpcomingTimeBasedMaintenanceActivities contains information about upcoming time based maintenance activities