Skip to content

Commit

Permalink
add type id 0x00 support
Browse files Browse the repository at this point in the history
  • Loading branch information
kung-foo committed Sep 26, 2019
1 parent 4d7f414 commit cae888b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ua/enums.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const (
type TypeID byte

const (
TypeIDNull TypeID = 0 // not part of specification but some servers (e.g. Prosys) return it anyway
TypeIDBoolean TypeID = 1
TypeIDSByte TypeID = 2
TypeIDByte TypeID = 3
Expand Down
1 change: 1 addition & 0 deletions ua/variant.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ func (m *Variant) Time() time.Time {

var variantTypeToTypeID = map[reflect.Type]TypeID{}
var variantTypeIDToType = map[TypeID]reflect.Type{
TypeIDNull: reflect.TypeOf(nil),
TypeIDBoolean: reflect.TypeOf(false),
TypeIDSByte: reflect.TypeOf(int8(0)),
TypeIDByte: reflect.TypeOf(uint8(0)),
Expand Down

0 comments on commit cae888b

Please sign in to comment.