github.com/enbility/spine-go@v0.7.0/model/threshold.go (about) 1 package model 2 3 type ThresholdIdType uint 4 5 type ThresholdTypeType string 6 7 const ( 8 ThresholdTypeTypeGoodAbove ThresholdTypeType = "goodAbove" 9 ThresholdTypeTypeBadAbove ThresholdTypeType = "badAbove" 10 ThresholdTypeTypeGoodBelow ThresholdTypeType = "goodBelow" 11 ThresholdTypeTypeBadBelow ThresholdTypeType = "badBelow" 12 ThresholdTypeTypeMinValueThreshold ThresholdTypeType = "minValueThreshold" 13 ThresholdTypeTypeMaxValueThreshold ThresholdTypeType = "maxValueThreshold" 14 ThresholdTypeTypeMinValueThresholdExtreme ThresholdTypeType = "minValueThresholdExtreme" 15 ThresholdTypeTypeMaxValueThresholdExtreme ThresholdTypeType = "maxValueThresholdExtreme" 16 ThresholdTypeTypeSagThreshold ThresholdTypeType = "sagThreshold" 17 ThresholdTypeTypeSwellThreshold ThresholdTypeType = "swellThreshold" 18 ) 19 20 type ThresholdDataType struct { 21 ThresholdId *ThresholdIdType `json:"thresholdId,omitempty" eebus:"key"` 22 ThresholdValue *ScaledNumberType `json:"thresholdValue,omitempty"` 23 } 24 25 type ThresholdDataElementsType struct { 26 ThresholdId *ElementTagType `json:"thresholdId,omitempty"` 27 ThresholdValue *ScaledNumberElementsType `json:"thresholdValue,omitempty"` 28 } 29 30 type ThresholdListDataType struct { 31 ThresholdData []ThresholdDataType `json:"thresholdData,omitempty"` 32 } 33 34 type ThresholdListDataSelectorsType struct { 35 ThresholdId *ThresholdIdType `json:"thresholdId,omitempty"` 36 } 37 38 type ThresholdConstraintsDataType struct { 39 ThresholdId *ThresholdIdType `json:"thresholdId,omitempty" eebus:"key"` 40 ThresholdRangeMin *ScaledNumberType `json:"thresholdRangeMin,omitempty"` 41 ThresholdRangeMax *ScaledNumberType `json:"thresholdRangeMax,omitempty"` 42 ThresholdStepSize *ScaledNumberType `json:"thresholdStepSize,omitempty"` 43 } 44 45 type ThresholdConstraintsDataElementsType struct { 46 ThresholdId *ElementTagType `json:"thresholdId,omitempty"` 47 ThresholdRangeMin *ScaledNumberElementsType `json:"thresholdRangeMin,omitempty"` 48 ThresholdRangeMax *ScaledNumberElementsType `json:"thresholdRangeMax,omitempty"` 49 ThresholdStepSize *ScaledNumberElementsType `json:"thresholdStepSize,omitempty"` 50 } 51 52 type ThresholdConstraintsListDataType struct { 53 ThresholdConstraintsData []ThresholdConstraintsDataType `json:"thresholdConstraintsData,omitempty"` 54 } 55 56 type ThresholdConstraintsListDataSelectorsType struct { 57 ThresholdId *ThresholdIdType `json:"thresholdId,omitempty"` 58 } 59 60 type ThresholdDescriptionDataType struct { 61 ThresholdId *ThresholdIdType `json:"thresholdId,omitempty" eebus:"key"` 62 ThresholdType *ThresholdTypeType `json:"thresholdType,omitempty"` 63 Unit *UnitOfMeasurementType `json:"unit,omitempty"` 64 ScopeType *ScopeTypeType `json:"scopeType,omitempty"` 65 Label *LabelType `json:"label,omitempty"` 66 Description *DescriptionType `json:"description,omitempty"` 67 } 68 69 type ThresholdDescriptionDataElementsType struct { 70 ThresholdId *ElementTagType `json:"thresholdId,omitempty"` 71 ThresholdType *ElementTagType `json:"thresholdType,omitempty"` 72 Unit *ElementTagType `json:"unit,omitempty"` 73 ScopeType *ElementTagType `json:"scopeType,omitempty"` 74 Label *ElementTagType `json:"label,omitempty"` 75 Description *ElementTagType `json:"description,omitempty"` 76 } 77 78 type ThresholdDescriptionListDataType struct { 79 ThresholdDescriptionData []ThresholdDescriptionDataType `json:"thresholdDescriptionData,omitempty"` 80 } 81 82 type ThresholdDescriptionListDataSelectorsType struct { 83 ThresholdId *ThresholdIdType `json:"thresholdId,omitempty"` 84 ScopeType *ScopeTypeType `json:"scopeType,omitempty"` 85 }