Value List
With VALUELIST_REQUEST request the client can get the list of OPC UA Variables
described in OpcUaClient Configuration Settings.
Value List Request
Field |
Description |
Header |
|
|
|
MessageType |
Must be VALUELIST_REQUEST. |
|
ClientHandler |
See Message Format. |
Body |
|
Empty. |
Value List Response
Field |
Description |
Header |
|
|
|
MessageType |
Must be VALUELIST_RESPONSE. |
|
ClientHandler |
See Message Format. |
Body |
|
|
|
@Variables |
The list of the variable names. |
Status Codes
Status Code |
Description |
BadInternalError |
The server failed to process the request due to internal
error. |
Example in Python
import websocket
import json
msg = {
'Header': {
'MessageType':'VALUELIST_REQUEST',
'ClientHandle':'1'
},
'Body': {}
}
ws = websocket.create_connection('ws://127.0.0.1:8081')
ws.send(json.dumps(msg))
resp = ws.recv()
json.loads(resp) #=> {
# 'Header': {
# 'ClientHandle': '1',
# 'MessageType': 'VALUELIST_RESPONSE'
# },
#
# 'Body': {
# 'Variables': [
# 'Var1',
# 'Var2', ..
# ]
# }
#}