Skip to content

Commit

Permalink
feat(bacnet): added on more mapping for static helper
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Jun 10, 2022
1 parent 139832b commit b227400
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions plc4go/protocols/bacnetip/readwrite/model/StaticHelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ func ReadEnumGeneric(readBuffer utils.ReadBuffer, actualLength uint32, template
return BACnetVendorId(rawValue), nil
case BACnetVTClass:
return BACnetVTClass(rawValue), nil
case BACnetAccumulatorRecordAccumulatorStatus:
return BACnetAccumulatorRecordAccumulatorStatus(rawValue), nil
default:
panic(fmt.Sprintf("doesn't work yet... implement manually support for %T", template))
// TODO: this doesn't work
Expand Down Expand Up @@ -524,6 +526,8 @@ func WriteEnumGeneric(writeBuffer utils.WriteBuffer, value interface{}) error {
valueValue = uint32(v)
case MaxApduLengthAccepted: // <<-- private enum is always defined
valueValue = uint32(v)
case BACnetAccumulatorRecordAccumulatorStatus: // <<-- private enum is always defined
valueValue = uint32(v)
default:
panic(fmt.Sprintf("doesn't work yet... implement manually support for %T", value))
}
Expand Down

0 comments on commit b227400

Please sign in to comment.