diff --git a/Notes.md b/Notes.md index e40d170..a90c629 100644 --- a/Notes.md +++ b/Notes.md @@ -1,3 +1,18 @@ # Resources - [vrpn-rs description of VRPN protocol](https://github.com/vrpn/vrpn-rs/blob/main/Protocol.md) + + +# Design + +Allow for a session based design - data needs to be collected per block +and immediatly made available. Minimal or no internal state keeping! + +- first collect names and ids of message_types and senders (stored in session) +- register listeners in session +- listeners inject captured data with signals + + +- keep naming "classic" ??? ... above session is a tracker with a sender with sensors + + diff --git a/Root.tscn b/Root.tscn index 2e37dfb..ddc3977 100644 --- a/Root.tscn +++ b/Root.tscn @@ -4,6 +4,7 @@ [node name="Node3D" type="Node3D"] script = ExtResource("1_gxo8o") +vrpn_server = "212.201.64.122" [connection signal="connected" from="." to="." method="_on_connected"] [connection signal="data" from="." to="." method="_on_data"] diff --git a/SocketClient.gd b/SocketClient.gd index ae12224..d75c83d 100644 --- a/SocketClient.gd +++ b/SocketClient.gd @@ -5,10 +5,14 @@ signal data(data:Array) signal disconnected signal error + @onready var _stream: StreamPeerTCP = StreamPeerTCP.new() +@export var vrpn_server : String = "localhost" +@export var vrpn_port : int = 3883 + func _ready() -> void: - self.connect_to_host("127.0.0.1",3883) + self.connect_to_host(vrpn_server,vrpn_port) func _process(delta: float) -> void: var old_status = _stream.get_status()