Documentation
¶
Index ¶
- Constants
- type AlarmStatus
- type AlarmStatusEvent
- type AlarmStatusType
- type BandAlarm
- type BandAlarmFrequency
- func (f *BandAlarmFrequency) FromInternalAlarmStatus(internal *models.ModelsGetAlarmStatusResponseFrequency)
- func (f *BandAlarmFrequency) FromInternalThreshold(internal *models.ModelsBandAlarmFrequency)
- func (f *BandAlarmFrequency) FromProto(internal *pas.Frequency)
- func (f BandAlarmFrequency) ToInternal() *models.ModelsBandAlarmFrequency
- type BandAlarmFrequencyValueType
- type BandAlarmOverallThreshold
- type BandAlarmStatus
- type BandAlarmStatusCalculatedOverall
- type BandAlarmThreshold
- type BandAlarmThresholdType
- type Bearing
- type ContentType
- type Coordinate
- type DataPoint
- type ExternalAlarmStatus
- type GenericAlarmStatus
- type HALAlarm
- type HALAlarmStatus
- type HALAlarmType
- type Inspection
- type InspectionChoice
- type Measurement
- type Overall
- type Patch
- type RateOfChange
- type Spectrum
- type Threshold
- type ThresholdEvent
- type ThresholdType
Constants ¶
View Source
const ( EventAttributeEventType = "SKF.Hierarchy.EventType" EventAttributeAggregate = "SKF.Hierarchy.Aggregate" )
View Source
const ( EventTypeThreshold = "SetPointAlarmThresholdEvent" EventTypeAlarmStatus = "PointAlarmStatusEvent" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlarmStatus ¶
type AlarmStatus struct {
Status AlarmStatusType
UpdatedAt time.Time
Overall *GenericAlarmStatus
RateOfChange *GenericAlarmStatus
Inspection *GenericAlarmStatus
Band []BandAlarmStatus
HAL []HALAlarmStatus
External *ExternalAlarmStatus
}
func (*AlarmStatus) FromInternal ¶
func (a *AlarmStatus) FromInternal(internal models.ModelsGetAlarmStatusResponse)
type AlarmStatusEvent ¶
type AlarmStatusEvent struct {
AggregateID uuid.UUID
UserID uuid.UUID
Changed bool
AlarmStatus AlarmStatus
}
func (*AlarmStatusEvent) FromInternal ¶
func (a *AlarmStatusEvent) FromInternal(buf []byte) error
type AlarmStatusType ¶
type AlarmStatusType int32
const ( AlarmStatusNotConfigured AlarmStatusType = iota AlarmStatusNoData AlarmStatusGood AlarmStatusAlert AlarmStatusDanger )
type BandAlarm ¶
type BandAlarm struct {
Label string
MinFrequency BandAlarmFrequency
MaxFrequency BandAlarmFrequency
OverallThreshold *BandAlarmOverallThreshold
}
func (*BandAlarm) FromInternal ¶
func (b *BandAlarm) FromInternal(internal *models.ModelsBandAlarm)
func (BandAlarm) ToInternal ¶
func (b BandAlarm) ToInternal() *models.ModelsBandAlarm
type BandAlarmFrequency ¶
type BandAlarmFrequency struct {
ValueType BandAlarmFrequencyValueType
Value float64
}
func (*BandAlarmFrequency) FromInternalAlarmStatus ¶
func (f *BandAlarmFrequency) FromInternalAlarmStatus(internal *models.ModelsGetAlarmStatusResponseFrequency)
func (*BandAlarmFrequency) FromInternalThreshold ¶
func (f *BandAlarmFrequency) FromInternalThreshold(internal *models.ModelsBandAlarmFrequency)
func (*BandAlarmFrequency) FromProto ¶
func (f *BandAlarmFrequency) FromProto(internal *pas.Frequency)
func (BandAlarmFrequency) ToInternal ¶
func (f BandAlarmFrequency) ToInternal() *models.ModelsBandAlarmFrequency
type BandAlarmFrequencyValueType ¶
type BandAlarmFrequencyValueType int32
const ( BandAlarmFrequencyUnknown BandAlarmFrequencyValueType = iota BandAlarmFrequencyFixed BandAlarmFrequencySpeedMultiple )
type BandAlarmOverallThreshold ¶
type BandAlarmOverallThreshold struct {
Unit string
UpperAlert *BandAlarmThreshold
UpperDanger *BandAlarmThreshold
}
func (*BandAlarmOverallThreshold) FromInternal ¶
func (b *BandAlarmOverallThreshold) FromInternal(internal *models.ModelsBandAlarmOverallThreshold)
func (*BandAlarmOverallThreshold) FromProto ¶
func (b *BandAlarmOverallThreshold) FromProto(internal *pas.BandAlarmOverallThreshold)
func (BandAlarmOverallThreshold) ToInternal ¶
func (b BandAlarmOverallThreshold) ToInternal() *models.ModelsBandAlarmOverallThreshold
type BandAlarmStatus ¶
type BandAlarmStatus struct {
GenericAlarmStatus
Label string
MinFrequency BandAlarmFrequency
MaxFrequency BandAlarmFrequency
CalculatedOverall *BandAlarmStatusCalculatedOverall
}
func (*BandAlarmStatus) FromEvent ¶
func (b *BandAlarmStatus) FromEvent(internal events.BandAlarmStatus)
func (*BandAlarmStatus) FromInternal ¶
func (b *BandAlarmStatus) FromInternal(internal *models.ModelsGetAlarmStatusResponseBandAlarm)
type BandAlarmThreshold ¶
type BandAlarmThreshold struct {
ValueType BandAlarmThresholdType
Value float64
}
func (*BandAlarmThreshold) FromInternal ¶
func (t *BandAlarmThreshold) FromInternal(internal *models.ModelsBandAlarmThreshold)
func (*BandAlarmThreshold) FromProto ¶
func (t *BandAlarmThreshold) FromProto(internal *pas.ThresholdValue)
func (BandAlarmThreshold) ToInternal ¶
func (t BandAlarmThreshold) ToInternal() *models.ModelsBandAlarmThreshold
type BandAlarmThresholdType ¶
type BandAlarmThresholdType int32
const ( BandAlarmThresholdTypeUnknown BandAlarmThresholdType = iota BandAlarmThresholdTypeAbsolute BandAlarmThresholdTypeRelativeFullscale )
type Bearing ¶
func (Bearing) ToInternal ¶ added in v0.1.1
func (b Bearing) ToInternal() *models.ModelsBearing
type ContentType ¶
type ContentType string
const ( ContentTypeDataPoint ContentType = "DATA_POINT" ContentTypeSpectrum ContentType = "SPECTRUM" ContentTypeQuestionAnswers ContentType = "QUESTION_ANSWERS" )
type Coordinate ¶
type DataPoint ¶
type DataPoint struct {
Coordinate Coordinate
XUnit string
YUnit string
}
type ExternalAlarmStatus ¶
type ExternalAlarmStatus struct {
Status AlarmStatusType
SetBy *uuid.UUID
}
func (*ExternalAlarmStatus) FromEvent ¶
func (e *ExternalAlarmStatus) FromEvent(internal *events.ExternalAlarm)
func (*ExternalAlarmStatus) FromInternal ¶
func (e *ExternalAlarmStatus) FromInternal(internal *models.ModelsGetAlarmStatusResponseExternal)
func (*ExternalAlarmStatus) ToSetRequest ¶
func (e *ExternalAlarmStatus) ToSetRequest() models.ModelsSetExternalAlarmStatusRequest
type GenericAlarmStatus ¶
type GenericAlarmStatus struct {
TriggeringMeasurement uuid.UUID
Status AlarmStatusType
}
func (*GenericAlarmStatus) FromEvent ¶
func (g *GenericAlarmStatus) FromEvent(internal *events.GenericAlarm)
func (*GenericAlarmStatus) FromInternal ¶
func (g *GenericAlarmStatus) FromInternal(internal *models.ModelsGetAlarmStatusResponseGeneric)
type HALAlarm ¶
type HALAlarm struct {
Label string
Bearing *Bearing
HALAlarmType HALAlarmType
UpperDanger *float64
UpperAlert *float64
}
func (*HALAlarm) FromInternal ¶
func (h *HALAlarm) FromInternal(internal *models.ModelsHALAlarm)
func (HALAlarm) ToInternal ¶
func (h HALAlarm) ToInternal() *models.ModelsHALAlarm
type HALAlarmStatus ¶
type HALAlarmStatus struct {
GenericAlarmStatus
Label string
Bearing *Bearing
HALIndex *float64
FaultFrequency *float64
RPMFactor *float64
NumberOfHarmonicsUsed *int64
ErrorDescription *string
}
func (*HALAlarmStatus) FromEvent ¶
func (h *HALAlarmStatus) FromEvent(internal events.HalAlarmStatus)
func (*HALAlarmStatus) FromInternal ¶
func (h *HALAlarmStatus) FromInternal(internal *models.ModelsGetAlarmStatusResponseHALAlarm)
type HALAlarmType ¶
type HALAlarmType string
const ( HALAlarmTypeGlobal HALAlarmType = "GLOBAL" HALAlarmTypeFaultFrequency HALAlarmType = "FREQUENCY" )
type Inspection ¶
type Inspection struct {
Choices []InspectionChoice
}
func (*Inspection) FromInternal ¶
func (i *Inspection) FromInternal(internal *models.ModelsInspection)
func (*Inspection) FromProto ¶
func (i *Inspection) FromProto(buf []byte) error
func (Inspection) ToInternal ¶
func (i Inspection) ToInternal() *models.ModelsInspection
type InspectionChoice ¶
type InspectionChoice struct {
Answer string
Instruction string
Status AlarmStatusType
}
func (*InspectionChoice) FromInternal ¶
func (i *InspectionChoice) FromInternal(internal *models.ModelsInspectionChoice)
func (*InspectionChoice) FromProto ¶
func (i *InspectionChoice) FromProto(internal *pas.InspectionChoice)
func (InspectionChoice) ToInternal ¶
func (i InspectionChoice) ToInternal() *models.ModelsInspectionChoice
type Measurement ¶
type Measurement struct {
MeasurementID uuid.UUID
CreatedAt time.Time
ContentType ContentType
DataPoint *DataPoint
Spectrum *Spectrum
QuestionAnswers []string
RateOfChange *float64
Tags map[string]interface{}
}
func (*Measurement) ToInternal ¶
func (m *Measurement) ToInternal() models.ModelsUpdateAlarmStatusRequest
type Overall ¶
type Overall struct {
OuterHigh *float64
InnerHigh *float64
InnerLow *float64
OuterLow *float64
Unit string
}
func (*Overall) FromInternal ¶
func (o *Overall) FromInternal(internal *models.ModelsOverall)
func (Overall) ToInternal ¶
func (o Overall) ToInternal() *models.ModelsOverall
type RateOfChange ¶
type RateOfChange struct {
OuterHigh *float64
InnerHigh *float64
InnerLow *float64
OuterLow *float64
Unit string
}
func (*RateOfChange) FromInternal ¶
func (r *RateOfChange) FromInternal(internal *models.ModelsRateOfChange)
func (*RateOfChange) FromProto ¶
func (r *RateOfChange) FromProto(buf []byte) error
func (RateOfChange) ToInternal ¶
func (r RateOfChange) ToInternal() *models.ModelsRateOfChange
type Threshold ¶
type Threshold struct {
NodeID uuid.UUID
ThresholdType ThresholdType
Overall *Overall
RateOfChange *RateOfChange
Inspection *Inspection
FullScale *float64
BandAlarms []BandAlarm
HALAlarms []HALAlarm
}
func (*Threshold) FromInternal ¶
func (t *Threshold) FromInternal(internal models.ModelsGetPointAlarmThresholdResponse) (err error)
func (Threshold) ToInternal ¶
func (t Threshold) ToInternal() models.ModelsSetPointAlarmThresholdRequest
type ThresholdEvent ¶
func (*ThresholdEvent) FromInternal ¶
func (t *ThresholdEvent) FromInternal(buf []byte) error
type ThresholdType ¶
type ThresholdType int32
const ( ThresholdTypeNone ThresholdType = iota ThresholdTypeOverallInWindow ThresholdTypeOverallOutOfWindow ThresholdTypeInspection )
Click to show internal directories.
Click to hide internal directories.