locka99 / opcua

A client and server implementation of the OPC UA specification written in Rust
Mozilla Public License 2.0
506 stars 136 forks source link

Add ServiceFault to`response_header` #60

Closed svanharmelen closed 4 years ago

svanharmelen commented 4 years ago

In addition I sorted al the big lists to make it easier to find anything in them. Let me know if you want that part reverted…

The only logical change is on lines 222 and 267.

Fixes #59

svanharmelen commented 4 years ago

FYI I understand that before the ordering was (more or less) following the logical order or how the protocol works, yet it was quite nasty to search for things in those big lists. If you don't like them being ordered alphabetically, please let me know so I can revert. No problem...

locka99 commented 4 years ago

Hi, the supported_message.rs is generated from gen_supported_message.js script. I've changed the script to treat ServiceFault as a response, so can you see if the head fixes your issue?

locka99 commented 4 years ago

I basically just changed gen_supported_message.js to create the source code that treats ServiceFault as a response

svanharmelen commented 4 years ago

Ow man, how did I miss the header in that file:

image

I did notice that in other files, but somehow seemed to have missed it here 😏

I tested master, but it gave a panic: thread 'tokio-runtime-worker-1' panicked at 'explicit panic', /Users/svanharmelen/code/svanharmelen/opcua/core/src/supported_message.rs:274:18 It seems it needs to also be added to the response_header, so added that (the correct way by adding to the js file and running the node cmd...