Skip to content

ViewDescription default Timestamp value should be OPC UA TimeBase#1779

Open
cacamille3 wants to merge 1 commit into
FreeOpcUa:masterfrom
cacamille3:cacamille3-patch-viewdescription-timestamp
Open

ViewDescription default Timestamp value should be OPC UA TimeBase#1779
cacamille3 wants to merge 1 commit into
FreeOpcUa:masterfrom
cacamille3:cacamille3-patch-viewdescription-timestamp

Conversation

@cacamille3

Copy link
Copy Markdown

OPC UA TimeBase is 1601-01-01 UTC
Otherwise, some OPC UA Server not supporting this Browse optional feature might return BadViewTimestampInvalid when the Timestamp is not set to null

#654

OPC UA TimeBase is 1601-01-01 UTC
Otherwise, some OPC UA Server not supporting this Browse optional feature might return BadViewTimestampInvalid when the Timestamp is not set to null
@cziebuhr

Copy link
Copy Markdown
Contributor

You can't just do changes in uaprotocol_auto.py, as it gets autogenerated.

https://reference.opcfoundation.org/Core/Part6/v105/docs/5.1 has a table with default values per built-in type. I think it makes sense to use all those defaults in all places where default values gets created:

  • common/structures104.py:get_default_value
    • Boolean: "False" (instead of "True")
    • DateTime: "FILETIME_EPOCH_AS_UTC_DATETIME"
  • ua/uatypes.py:get_default_value
    • ByteString: null (instead of b"")
    • DateTime: FILETIME_EPOCH_AS_UTC_DATETIME

(List may not be complete)

@oroulet

oroulet commented Mar 2, 2025

Copy link
Copy Markdown
Member

but you can simply move that code uaprotocol_hand.py or similar that overrides autogenerate classes. We do that already for a few classes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants