Skip to content

Commit

Permalink
typed quality descriptor constants
Browse files Browse the repository at this point in the history
  • Loading branch information
pascaldekloe committed Jul 24, 2024
1 parent a7ceb23 commit 7c8efff
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions info/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ type SinglePtQual uint8
func (pt SinglePtQual) Value() SinglePt { return SinglePt(pt & 1) }

// Qual returns the quality descriptor flags. Overflow is always zero and
// EllapedTimeInvalid does not apply.
// ElapsedTimeInvalid does not apply.
func (pt SinglePtQual) Qual() Qual { return Qual(pt & 0xfe) }

// DoublePt is double-point information (IEV 371-02-08), which should be either
Expand Down Expand Up @@ -240,7 +240,7 @@ type DoublePtQual uint8
func (pt DoublePtQual) Value() DoublePt { return DoublePt(pt & 3) }

// Qual returns the quality descriptor. Overflow is always zero and
// EllapesTimeInvalid does not apply.
// ElapsedTimeInvalid does not apply.
func (pt DoublePtQual) Qual() Qual { return Qual(pt & 0xfc) }

// Regul is a regulating-step command (IEV 371-03-13) state, which should be
Expand Down Expand Up @@ -275,7 +275,7 @@ const (
// The OV flag signals that the value of the information object is
// beyond a predefined range of value (mainly applicable to analog
// values).
Overflow = 1 << iota
Overflow Qual = 1 << iota

_ // reserve
_ // reserve
Expand Down Expand Up @@ -307,7 +307,7 @@ const (
// under this condition.
Invalid

OK = 0 // no remarks
OK Qual = 0 // no remarks
)

// String returns the flag tokens separated by comma, with "OK" for no flags.
Expand Down Expand Up @@ -406,7 +406,7 @@ func NewTransientStepQual(value int, flags Qual) StepQual {
// Value loses the quality descriptor.
func (p StepQual) Value() Step { return Step(p[0]) }

// Qual returns the quality descriptor. EllapesTimeInvalid does not apply.
// Qual returns the quality descriptor. ElapsedTimeInvalid does not apply.
func (p StepQual) Qual() Qual { return Qual(p[1]) }

// FlagQual sets [logical OR] the quality descriptor bits from flags.
Expand All @@ -433,7 +433,7 @@ func (bits *BitsQual) SetBigEndian(v uint32) {
binary.BigEndian.PutUint32(bits[:4], v)
}

// Qual returns the quality descriptor. EllapesTimeInvalid does not apply.
// Qual returns the quality descriptor. ElapsedTimeInvalid does not apply.
func (bits BitsQual) Qual() Qual { return Qual(bits[4]) }

// FlagQual sets [logical OR] the quality descriptor bits from flags.
Expand Down Expand Up @@ -480,7 +480,7 @@ type NormQual [3]uint8
// descriptor.
func (norm *NormQual) Link() *Norm { return (*Norm)(norm[:2]) }

// Qual returns the quality descriptor. EllapesTimeInvalid does not apply.
// Qual returns the quality descriptor. ElapsedTimeInvalid does not apply.
func (norm NormQual) Qual() Qual { return Qual(norm[2]) }

// FlagQual sets [logical OR] the quality descriptor bits from flags.
Expand Down

0 comments on commit 7c8efff

Please sign in to comment.