Skip to content

How to prevent an out of range value to be written? #1563

Closed Answered by schroeder-
FMeinicke asked this question in Q&A
Discussion options

You must be logged in to vote

Then I tried to use a callback function and register it using server.subscribe_server_callback(CallbackType.PreWrite, callback) in order to intercept the value coming from the client before it was written to the node. This does work (i.e. the callback is called before the actual write happens), but as I see it, there is no possibility to "return early" from the whole write process.

Did you try to raise a exception?
raise ua.uaerrors.BadOutOfRange()
raise ServiceError(ua.StatusCodes.BadOutOfRange)

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
2 replies
@FMeinicke
Comment options

@FMeinicke
Comment options

Answer selected by FMeinicke
Comment options

You must be logged in to vote
5 replies
@FMeinicke
Comment options

@AndreasHeine
Comment options

@FMeinicke
Comment options

@AndreasHeine
Comment options

@FMeinicke
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants