Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add type id 0x00 support #284

Merged
merged 1 commit into from
Sep 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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