switched core emulator data files from using namedtuples to backported dataclasses
This commit is contained in:
parent
5d9b451b1d
commit
8186c62b19
11 changed files with 240 additions and 242 deletions
|
@ -23,14 +23,12 @@ def handle_node_event(event: NodeData) -> core_pb2.NodeEvent:
|
|||
:return: node event that contains node id, name, model, position, and services
|
||||
"""
|
||||
position = core_pb2.Position(x=event.x_position, y=event.y_position)
|
||||
services = event.services or ""
|
||||
services = services.split("|")
|
||||
node_proto = core_pb2.Node(
|
||||
id=event.id,
|
||||
name=event.name,
|
||||
model=event.model,
|
||||
position=position,
|
||||
services=services,
|
||||
services=event.services,
|
||||
)
|
||||
return core_pb2.NodeEvent(node=node_proto, source=event.source)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue