Skip to content

Commit

Permalink
add support for glitch datatype
Browse files Browse the repository at this point in the history
  • Loading branch information
fionera committed Feb 27, 2024
1 parent 07078e6 commit 410980b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions peers/sticktable/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ func (d DataType) String() string {
return "gpc"
case DataTypeGPCRateArray:
return "gpc_rate"
case DataTypeGlitchCounter:
return "glitch_cnt"
case DataTypeGlitchRate:
return "glitch_rate"
default:
return "StickTableUpdateMessageType(" + strconv.FormatInt(int64(d), 10) + ")"
}
Expand Down Expand Up @@ -166,6 +170,10 @@ const (
DataTypeGPCArray
// DataTypeGPCRateArray represents an array of gpc_rate
DataTypeGPCRateArray
// DataTypeGlitchCounter represents a cumulated number of front glitches
DataTypeGlitchCounter
// DataTypeGlitchRate represents a rate of front glitches
DataTypeGlitchRate
)

func (d DataType) New() MapData {
Expand Down Expand Up @@ -220,6 +228,10 @@ func (d DataType) New() MapData {
return new(DictData)
case DataTypeGPCRateArray:
return new(DictData)
case DataTypeGlitchCounter:
return new(UnsignedIntegerData)
case DataTypeGlitchRate:
return new(FreqData)
default:
return nil
}
Expand Down

0 comments on commit 410980b

Please sign in to comment.