Commit 46117c00 authored by Joey Faulkner's avatar Joey Faulkner Committed by oroulet

add ability to find endpoints for unauthenticated user

parent 8cf4eda0
......@@ -146,7 +146,8 @@ class UaProcessor:
async def _process_message(self, typeid, requesthdr, seqhdr, body):
if typeid in [ua.NodeId(ua.ObjectIds.CreateSessionRequest_Encoding_DefaultBinary),
ua.NodeId(ua.ObjectIds.ActivateSessionRequest_Encoding_DefaultBinary)]:
ua.NodeId(ua.ObjectIds.ActivateSessionRequest_Encoding_DefaultBinary),
ua.NodeId(ua.ObjectIds.GetEndpointsRequest_Encoding_DefaultBinary)]:
# The connection is first created without a user being attached, and then during activation the
user = None
elif self.session is None:
......
......@@ -35,12 +35,11 @@ async def main():
await server.nodes.objects.add_method(ua.NodeId('ServerMethod', 2), ua.QualifiedName('ServerMethod', 2), func, [ua.VariantType.Int64], [ua.VariantType.Int64])
_logger.info('Starting server!')
async with server:
count = 0
while True:
await asyncio.sleep(1)
count += 0.1
_logger.info('Set value of %s to %.1f', myvar, count)
await myvar.write_value(count)
new_val = await myvar.get_value() + 0.1
_logger.info('Set value of %s to %.1f', myvar, new_val)
await myvar.write_value(new_val)
if __name__ == '__main__':
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment