Documentation ¶
Index ¶
- Constants
- type Answers
- type AssetNode
- type BaseNode
- type Component
- type Criticality
- type IndustrySegment
- type InspectionPoint
- type LubricantUnit
- type LubricationPoint
- type MeasurementPoint
- type MeasurementType
- type Node
- type NodeSubType
- type NodeType
- type Orientation
- type Origin
- type Relation
- type ShaftSide
- type ValueType
- type VisualizationType
Constants ¶
const EnlightRootNodeUUID uuid.UUID = uuid.UUID("df3214a6-2db7-11e8-b467-0ed5f89f718b")
EnlightRootNodeUUID is the base/root node that all other nodes attach to, must not be deleted or updated
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetNode ¶
type AssetNode struct { Criticality Criticality `json:"criticality" example:"criticality_a"` AssetType string `json:"assetType,omitempty" example:"CO"` AssetClass string `json:"assetClass,omitempty" example:"AX"` AssetSequence string `json:"assetSequence,omitempty" example:"02"` Manufacturer string `json:"manufacturer,omitempty" example:"Atlas Copco"` Model string `json:"model,omitempty" example:"SF"` SerialNumber string `json:"serialNumber,omitempty"` Components []*Component `json:"components,omitempty"` }
type BaseNode ¶
type BaseNode struct { // ID of node, as a UUID ID uuid.UUID `json:"id" example:"7bcd1711-21bd-4eb7-8349-b053d6d5226f"` // ID of parent node, as a UUID ParentID uuid.UUID `json:"parentId" example:"8f7551c5-3357-406d-ab82-bcb138d0b13f"` // Type of node Type NodeType `` /* 157-byte string literal not displayed */ // Type of node SubType NodeSubType `` /* 157-byte string literal not displayed */ // Industry segment of this node Industry *IndustrySegment `` /* 207-byte string literal not displayed */ // Origin of node, if imported from another system Origin *Origin `json:"origin,omitempty"` // Descriptive name of the node Label string `json:"label" example:"01AA DE"` // Description of the node Description string `json:"description" example:"First bearing, driven end"` // Relative position of node in the Enlight Centre UI Position *int64 `json:"position"` // Comma separated list of free form tags on this node Tags *string `json:"tags"` }
Node represent a hierarchy node
type Component ¶ added in v1.23.0
type Criticality ¶
type Criticality string
const ( CriticalityA Criticality = "criticality_a" CriticalityB Criticality = "criticality_b" CriticalityC Criticality = "criticality_c" CriticalityUnknown Criticality = "criticality_unknown" )
func ParseCriticality ¶ added in v1.16.0
func ParseCriticality(dbCriticality string) Criticality
func (Criticality) ValidateCriticaltiy ¶ added in v1.16.0
func (cr Criticality) ValidateCriticaltiy() error
type IndustrySegment ¶ added in v1.27.0
type IndustrySegment string
const ( Agriculture IndustrySegment = "agriculture" Construction IndustrySegment = "construction" FoodAndBeverage IndustrySegment = "food_and_beverage" HydrocarbonProcessing IndustrySegment = "hydrocarbon_processing" MachineTool IndustrySegment = "machine_tool" Marine IndustrySegment = "marine" Metal IndustrySegment = "metal" Mining IndustrySegment = "mining" PowerGeneration IndustrySegment = "power_generation" PulpAndPaper IndustrySegment = "pulp_and_paper" Renewable IndustrySegment = "renewable" Undefined IndustrySegment = "undefined" )
func (IndustrySegment) String ¶ added in v1.27.0
func (seg IndustrySegment) String() string
func (IndustrySegment) Title ¶ added in v1.27.0
func (seg IndustrySegment) Title() string
type InspectionPoint ¶
type InspectionPoint struct { // Type of value to record ValueType ValueType `json:"valueType" example:"numeric" enums:"numeric,single_choice,multi_choice,unknown"` // Unit of the value recorded, in case of numeric inspection NumericUnit string `json:"unit" example:"bar"` // Possible answers for single_choice and multi_choice inspections Answers Answers `json:"answers" example:"[\"first\", \"second\"]"` // Type of visualization in Enlight Centre VisualizationType VisualizationType `` /* 145-byte string literal not displayed */ VisualizationMinValue string `json:"visualizationMinValue" example:"3"` VisualizationMaxValue string `json:"visualizationMaxValue" example:"13"` }
InspectionPoint - holds parameters for inspection point
func (*InspectionPoint) FromGRPC ¶ added in v1.27.0
func (p *InspectionPoint) FromGRPC(inspectPoint grpcapi.InspectionPoint)
func (InspectionPoint) ToGRPC ¶ added in v1.27.0
func (p InspectionPoint) ToGRPC() *grpcapi.InspectionPoint
func (InspectionPoint) Validate ¶ added in v1.27.0
func (p InspectionPoint) Validate() error
type LubricantUnit ¶ added in v1.27.0
type LubricantUnit string
const ( Gram LubricantUnit = "gram" Ounce LubricantUnit = "ounce" CM3 LubricantUnit = "cm3" Unknown_LubricantUnit LubricantUnit = "unknown" )
func ParseUnit ¶ added in v1.27.0
func ParseUnit(unit string) (returnUnit LubricantUnit)
func (LubricantUnit) String ¶ added in v1.27.0
func (lu LubricantUnit) String() string
func (LubricantUnit) Validate ¶ added in v1.27.0
func (lu LubricantUnit) Validate() error
type LubricationPoint ¶ added in v1.27.0
type LubricationPoint struct { // Type of lubricant used Lubricant string `json:"lubricant" example:"grease"` // Volume of lubricant, in the given unit Volume int32 `json:"lubricantVolume" example:"10"` // Unit that the volume is specified in Unit LubricantUnit `json:"lubricantUnit" example:"cm3" enums:"gram,ounce,cm3,unknown"` // Interval between lubrication in days Interval int32 `json:"lubricateInterval" example:"5"` }
func (*LubricationPoint) FromGRPC ¶ added in v1.27.0
func (p *LubricationPoint) FromGRPC(lubePoint hierarchy_proto.LubricationPoint)
func (LubricationPoint) ToGRPC ¶ added in v1.27.0
func (p LubricationPoint) ToGRPC() *hierarchy_proto.LubricationPoint
func (LubricationPoint) Validate ¶ added in v1.27.0
func (lp LubricationPoint) Validate() error
type MeasurementPoint ¶
type MeasurementPoint struct { // Bearing number on this asset Bearing int32 `json:"bearing" example:"1"` // Orientation of measurement Angular Orientation `json:"orientation" example:"vertical" enums:"axial,radial,horizontal,vertical,unknown"` // Type of measurement MeasurementType MeasurementType `` /* 158-byte string literal not displayed */ // Identifier of shaft that this measurement point belongs to Shaft string `json:"shaft" example:"C"` // Which side of the given shaft this measurement point belongs to ShaftSide ShaftSide `json:"shaftSide" example:"nde" enums:"de,nde"` // Speed in RPM if this shaft has a fixed speed FixedSpeedRPM float64 `json:"fixedSpeedRpm,omitempty" example:"150"` // ID of measurement point location LocationId *uuid.UUID `json:"locationId,omitempty"` // Type of device used to take measurements on this point DADType string `json:"dadType,omitempty"` }
MeasurementPoint describes an assets measurement points
func (*MeasurementPoint) FromGRPC ¶ added in v1.27.0
func (meas *MeasurementPoint) FromGRPC(measPoint grpcapi.MeasurementPoint)
FromGRPC - converts to a MeasurementPoint from the gRPC MeasurementPoint struct
func (MeasurementPoint) ToGRPC ¶ added in v1.27.0
func (meas MeasurementPoint) ToGRPC() *grpcapi.MeasurementPoint
ToGRPC - converts a MeasurementPoint struct to grpcapi.MeasurementPoint
func (MeasurementPoint) Validate ¶ added in v1.27.0
func (meas MeasurementPoint) Validate() error
Validate - validates a MeasurementPoint
type MeasurementType ¶
type MeasurementType string
MeasurementType is measurement type unit
const ( Displacement MeasurementType = "displacement" Acceleration MeasurementType = "acceleration" Velocity MeasurementType = "velocity" Temperature MeasurementType = "temperature" DCGAP MeasurementType = "dc_gap" AMPLPHASE MeasurementType = "ampl_phase" BOV MeasurementType = "bov" Speed MeasurementType = "speed" Envelope3 MeasurementType = "envelope_3" Envelope2 MeasurementType = "envelope_2" UnknownMeasurementType MeasurementType = "unknown" )
Valid measurement type values
func ParseMeasurementType ¶ added in v1.27.0
func ParseMeasurementType(measurementType string) MeasurementType
ParseMeasurementType takes a string and makes it a valid measurement type value
func (MeasurementType) String ¶ added in v1.27.0
func (mt MeasurementType) String() string
func (MeasurementType) Validate ¶ added in v1.27.0
func (mt MeasurementType) Validate() error
Validate - validates a MeasurementType
type Node ¶
type Node struct { BaseNode *AssetNode *MeasurementPoint *InspectionPoint *LubricationPoint }
func (*Node) FromGRPC ¶ added in v1.27.0
func (n *Node) FromGRPC(node hierarchy_proto.Node)
func (Node) ToGRPC ¶ added in v1.27.0
func (n Node) ToGRPC() (node *hierarchy_proto.Node)
func (Node) ToGRPCAncestorNode ¶ added in v1.27.0
func (n Node) ToGRPCAncestorNode() (node hierarchy_proto.AncestorNode)
type NodeSubType ¶
type NodeSubType string
const ( NodeSubTypeRoot NodeSubType = "root" NodeSubTypeCompany NodeSubType = "company" NodeSubTypeSite NodeSubType = "site" NodeSubTypePlant NodeSubType = "plant" NodeSubTypeShip NodeSubType = "ship" NodeSubTypeSystem NodeSubType = "system" NodeSubTypeFunctionalLocation NodeSubType = "functional_location" NodeSubTypeAsset NodeSubType = "asset" NodeSubTypeMeasurementPoint NodeSubType = "measurement_point" NodeSubTypeInspectionPoint NodeSubType = "inspection_point" NodeSubTypeLubricationPoint NodeSubType = "lubrication_point" )
func (NodeSubType) IsTypeOf ¶ added in v1.27.0
func (nc NodeSubType) IsTypeOf(nt NodeType) bool
func (NodeSubType) String ¶ added in v1.27.0
func (nc NodeSubType) String() string
func (NodeSubType) Validate ¶ added in v1.27.0
func (nc NodeSubType) Validate() error
type NodeType ¶
type NodeType string
const ( NodeTypeRoot NodeType = "root" NodeTypeCompany NodeType = "company" NodeTypeSite NodeType = "site" NodeTypePlant NodeType = "plant" NodeTypeSystem NodeType = "system" NodeTypeFunctionalLocation NodeType = "functional_location" NodeTypeAsset NodeType = "asset" NodeTypeMeasurementPoint NodeType = "measurement_point" NodeTypeInspectionPoint NodeType = "inspection_point" NodeTypeLubricationPoint NodeType = "lubrication_point" NodeTypeUnknown NodeType = "unknown" )
func ParseNodeType ¶ added in v1.27.0
func (NodeType) HasSubType ¶ added in v1.27.0
func (nt NodeType) HasSubType(cls NodeSubType) bool
type Orientation ¶
type Orientation string
Orientation describes a measurement points orientation
const ( Axial Orientation = "axial" Radial Orientation = "radial" Horizontal Orientation = "horizontal" Vertical Orientation = "vertical" UnknownOrientation Orientation = "unknown" )
Valid values of measurement points orientations
func ParseOrientation ¶ added in v1.27.0
func ParseOrientation(orientation string) Orientation
ParseOrientation takes a string and makes it a valid orientation value
func (Orientation) String ¶ added in v1.27.0
func (o Orientation) String() string
func (Orientation) Validate ¶ added in v1.27.0
func (o Orientation) Validate() error
Validate - validates an Orientation
type Origin ¶
type Relation ¶
type Relation struct { ID uuid.UUID `json:"id"` FromID uuid.UUID `json:"fromId"` ToID uuid.UUID `json:"toId"` }
Relation represents a relation between two nodes
type ShaftSide ¶
type ShaftSide string
ShaftSide describes on what side of a shaft the measurement point is located
Valid shaft side values
func ParseShaftSide ¶ added in v1.27.0
ParseShaftSide takes a string and makes it a valid shaft side value
type VisualizationType ¶
type VisualizationType string
VisualizationType - defines visualization type when value type is numeric
const ( VisualizationTypeNone VisualizationType = "visualization_none" VisualizationTypeCircularGauge VisualizationType = "visualization_circular_gauge" VisualizationTypeLevelGauge VisualizationType = "visualization_level_gauge" )
Constants for VisualizationType
func (VisualizationType) String ¶ added in v1.27.0
func (t VisualizationType) String() string
String - stringifies VisualizationType
func (VisualizationType) Validate ¶ added in v1.27.0
func (t VisualizationType) Validate() error
Validate - validates VisualizationType