Skip to content

Commit

Permalink
Use ObjectId instead of hard-coded int for DataValue type
Browse files Browse the repository at this point in the history
  • Loading branch information
torarvid authored and oroulet committed Feb 6, 2025
1 parent c95631e commit 772316d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion asyncua/ua/uatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
from enum import IntEnum
from typing import Any, Generic, List, Optional, Union

from asyncua.ua.object_ids import ObjectIds

# hack to support python < 3.8
if sys.version_info.minor < 10:

Expand Down Expand Up @@ -1087,7 +1089,7 @@ class DataValue:
:vartype ServerPicoseconds: int
"""

data_type = NodeId(23)
data_type = NodeId(Int32(ObjectIds.DataValue))

Encoding: Byte = field(default=0, repr=False, init=False, compare=False)
Value: Optional[Variant] = None
Expand Down

0 comments on commit 772316d

Please sign in to comment.