From 93b512885ea0d7ce96746f9f84df6b9c7a520d10 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Sun, 6 Apr 2025 12:00:42 +0200 Subject: [PATCH 1/4] Renamed LocalParticipant, removed Register --- Examples/BB2B_networking.py | 4 +-- LocalParticipant.py => ParticipantUDP.py | 42 ++++++++++++------------ SiteServer.py | 4 +-- Thing.py | 4 +-- __init__.py | 4 +-- test/BB2B_dummytest.py | 4 +-- test/thing_test.py | 8 ++--- 7 files changed, 35 insertions(+), 35 deletions(-) rename LocalParticipant.py => ParticipantUDP.py (88%) diff --git a/Examples/BB2B_networking.py b/Examples/BB2B_networking.py index 7f5ea8c..c65f749 100644 --- a/Examples/BB2B_networking.py +++ b/Examples/BB2B_networking.py @@ -3,14 +3,14 @@ from os import path sys.path.append(path.abspath(path.join(path.dirname(__file__), '..'))) import time -from LocalParticipant import LocalParticipant +from ParticipantUDP import ParticipantUDP from Thing import * from Things.DifferentialDrive import DifferentialDrive from Things.TouchSensor import TouchSensor # Create a local participant for handling communcation # using default settings (UDP communciation over port 7681) -participant = LocalParticipant(port=7681, local_port=7682, ip_address="127.0.0.1") +participant = ParticipantUDP(port=7681, local_port=7682, ip_address="127.0.0.1") # The robot's propulsion is a differential drive bb2b = DifferentialDrive(participant) bb2b.name = "BB2B" diff --git a/LocalParticipant.py b/ParticipantUDP.py similarity index 88% rename from LocalParticipant.py rename to ParticipantUDP.py index a18e113..d0ec54a 100644 --- a/LocalParticipant.py +++ b/ParticipantUDP.py @@ -17,7 +17,7 @@ micropython = 'micropython' in sys.modules if micropython: from MicroPython.uPythonParticipant import Bla -class LocalParticipant(Participant): +class ParticipantUDP(Participant): """! A local participant is the local device which can communicate with other participants. It manages all local things and communcation with other participants. Each application has a local participant which is usually explicit in the code. @@ -46,19 +46,18 @@ class LocalParticipant(Participant): # Isolated participants do not communicate with other participants self.isolated = True - ## The remote site when this participant is connected to a site - self.remote_site = None + ## The other participants communicating with this participant + self.others = [] if self.port != 0: self.isolated = False if ip_address is not None: - self.remote_site = Participant(ip_address, port) + self.others.append(Participant(ip_address, port)) - self.others = [] - self.network_id = 0 + # self.network_id = 0 self.buffer = bytearray(256) - self.thing_msg_processors = {} - self.new_thing_handlers = [] + # self.thing_msg_processors = {} + # self.new_thing_handlers = [] self.publishInterval = 3000 # 3 seconds self.udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) @@ -70,9 +69,9 @@ class LocalParticipant(Participant): self.thread.start() def Isolated(): - if LocalParticipant.isolated_participant == None: - LocalParticipant.isolated_participant = LocalParticipant(0) - return LocalParticipant.isolated_participant + if ParticipantUDP.isolated_participant == None: + ParticipantUDP.isolated_participant = ParticipantUDP(0) + return ParticipantUDP.isolated_participant #region Update @@ -100,10 +99,11 @@ class LocalParticipant(Participant): if self.isolated == False: if self.publishInterval > 0 and currentTimeMs > self.nextPublishMe: msg = ParticipantMsg(self.network_id) - if self.remote_site is None: + if self.others.count == 0: self.Publish(msg) else: - self.Send(self.remote_site, msg) + for other_participant in self.others: + self.Send(other_participant, msg) print(f'Publish ParticipantMsg {self.network_id}') self.nextPublishMe = currentTimeMs + self.publishInterval @@ -203,15 +203,15 @@ class LocalParticipant(Participant): def ProcessThingMsg(self, msg: ThingMsg): print(f'received thing {msg.network_id} {msg.thing_id}') - if msg.thing_type in self.thing_msg_processors: - constructor = self.thing_msg_processors[msg.thing_type] - constructor(msg.network_id, msg.thing_id) + # if msg.thing_type in self.thing_msg_processors: + # constructor = self.thing_msg_processors[msg.thing_type] + # constructor(msg.network_id, msg.thing_id) - # not really 'new' thing, but it is a start - thing = Thing.Get(msg.network_id, msg.thing_id) - if thing is not None: - for handler in self.new_thing_handlers: - handler(thing) + # # not really 'new' thing, but it is a start + # thing = Thing.Get(msg.network_id, msg.thing_id) + # if thing is not None: + # for handler in self.new_thing_handlers: + # handler(thing) def ProcessNameMsg(self, msg: NameMsg): print(f'received name {msg.name}') diff --git a/SiteServer.py b/SiteServer.py index ca5356f..f5eead1 100644 --- a/SiteServer.py +++ b/SiteServer.py @@ -1,4 +1,4 @@ -from LocalParticipant import LocalParticipant +from ParticipantUDP import ParticipantUDP from Messages.ParticipantMsg import ParticipantMsg from Messages.NetworkIdMsg import NetworkIdMsg from Things.TemperatureSensor import TemperatureSensor @@ -7,7 +7,7 @@ from Thing import Thing import socket import threading -class SiteServer(LocalParticipant): +class SiteServer(ParticipantUDP): """! A site server is a participant which provides a shared simulated environment """ diff --git a/Thing.py b/Thing.py index 5fe59fd..c009eed 100644 --- a/Thing.py +++ b/Thing.py @@ -39,8 +39,8 @@ class Thing: owner = parent.owner self.SetParent(parent) elif owner == None: - from LocalParticipant import LocalParticipant - owner = LocalParticipant.Isolated() + from ParticipantUDP import ParticipantUDP + owner = ParticipantUDP.Isolated() self.children = [] diff --git a/__init__.py b/__init__.py index 0354ddf..5952521 100644 --- a/__init__.py +++ b/__init__.py @@ -1,9 +1,9 @@ __all__ = ['Thing', - 'LocalParticipant', + 'ParticipantUDP', 'SiteServer'] from .LinearAlgebra.Direction import Direction -from .LocalParticipant import LocalParticipant +from .ParticipantUDP import ParticipantUDP from .Thing import Thing from .LinearAlgebra.Spherical import Spherical from .LinearAlgebra.SwingTwist import SwingTwist diff --git a/test/BB2B_dummytest.py b/test/BB2B_dummytest.py index 00f7017..f418de9 100644 --- a/test/BB2B_dummytest.py +++ b/test/BB2B_dummytest.py @@ -5,7 +5,7 @@ sys.path.append(str(Path(__file__).resolve().parent.parent)) import time from SiteServer import SiteServer -from LocalParticipant import LocalParticipant +from ParticipantUDP import ParticipantUDP from Thing import * from Things.DifferentialDrive import DifferentialDrive from Things.TouchSensor import TouchSensor @@ -15,7 +15,7 @@ site = SiteServer(port=7691) # Create a local participant for handling communcation # using default settings (UDP communciation over port 7681) -participant = LocalParticipant(port=7691, local_port=7683, ip_address="127.0.0.1") +participant = ParticipantUDP(port=7691, local_port=7683, ip_address="127.0.0.1") # The robot's propulsion is a differential drive bb2b = DifferentialDrive(participant) bb2b.name = "BB2B" diff --git a/test/thing_test.py b/test/thing_test.py index fc0be68..3bf9031 100644 --- a/test/thing_test.py +++ b/test/thing_test.py @@ -8,13 +8,13 @@ sys.path.append(str(Path(__file__).resolve().parent.parent)) import unittest from Thing import Thing -from LocalParticipant import LocalParticipant +from ParticipantUDP import ParticipantUDP from SiteServer import SiteServer class ThingTest(unittest.TestCase): def test_participant(self): - participant: LocalParticipant = LocalParticipant() + participant: ParticipantUDP = ParticipantUDP() milliseconds = time.time() * 1000 start_time = milliseconds @@ -33,7 +33,7 @@ class ThingTest(unittest.TestCase): def test_site_participant(self): site = SiteServer(port=7681) - participant = LocalParticipant(port=7681, ip_address="127.0.0.1", local_port=7682) + participant = ParticipantUDP(port=7681, ip_address="127.0.0.1", local_port=7682) milliseconds = time.time() * 1000 start_time = milliseconds @@ -46,7 +46,7 @@ class ThingTest(unittest.TestCase): def test_thing_msg(self): site = SiteServer() - participant = LocalParticipant(ip_address="127.0.0.1", port=7683) + participant = ParticipantUDP(ip_address="127.0.0.1", port=7683) thing = Thing() thing.name = "First thing" thing.model_url = "https://passer.life/extras/ant.jpg" From 552d6cab9651be0c3608e4b28dd58b28218838f0 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Sun, 6 Apr 2025 12:10:39 +0200 Subject: [PATCH 2/4] Fixes to support LinearAlgebra repo --- Messages/LowLevelMessages.py | 4 ++-- Things/DifferentialDrive.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Messages/LowLevelMessages.py b/Messages/LowLevelMessages.py index 6183e44..c5a178d 100644 --- a/Messages/LowLevelMessages.py +++ b/Messages/LowLevelMessages.py @@ -4,10 +4,10 @@ from LinearAlgebra.Angle import Angle def SendAngle8(buffer, ix_ref, angle): """! Send an 8-bit angle value """ - angle = Angle.Normalize(angle) + # angle = Angle.Normalize(angle) ix = ix_ref[0] - buffer[ix] = int((angle / 360) * 256).to_bytes(1, 'big', signed=True)[0] + buffer[ix] = int((angle.InDegrees() / 360) * 256).to_bytes(1, 'big', signed=True)[0] ix_ref[0] += 1 def SendFloat16(buffer, ix_ref, value): diff --git a/Things/DifferentialDrive.py b/Things/DifferentialDrive.py index 6ed5ff1..097cf47 100644 --- a/Things/DifferentialDrive.py +++ b/Things/DifferentialDrive.py @@ -65,13 +65,14 @@ class DifferentialDrive(Thing): # This assumes no sideward velocity because diff drive does not support it linear_speed = self.linear_velocity.distance # When the direction is backwards... - if self.linear_velocity.direction.horizontal < -90 or self.linear_velocity.direction.horizontal > 90: + horizontalAngle = self.linear_velocity.direction.horizontal.InDegrees() + if horizontalAngle < -90 or horizontalAngle > 90: linear_speed = -linear_speed angular_velocity: Spherical = self.angular_velocity angular_speed: float = angular_velocity.distance * Angle.Deg2Rad # in radians/sec # Determine the rotation direction - if angular_velocity.direction.horizontal < 0: + if angular_velocity.direction.horizontal.InDegrees() < 0: angular_speed = -angular_speed if self.wheel_left is not None and self.wheel_right is not None: From 10c9c68c6c25c0c6347357da3fa98df2b7c5a0fc Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Sun, 6 Apr 2025 12:13:16 +0200 Subject: [PATCH 3/4] Moved SiteServer --- SiteServer.py => Participants/SiteServer.py | 0 README.md | 4 +--- __init__.py | 7 +------ 3 files changed, 2 insertions(+), 9 deletions(-) rename SiteServer.py => Participants/SiteServer.py (100%) diff --git a/SiteServer.py b/Participants/SiteServer.py similarity index 100% rename from SiteServer.py rename to Participants/SiteServer.py diff --git a/README.md b/README.md index 19bec6e..fb83844 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,5 @@ Supporting: # Basic components - - \ref RoboidControl::Thing::Thing "Thing" -- \ref RoboidControl::LocalParticipant::LocalParticipant "LocalParticipant" -- \ref RoboidControl::SiteServer::SiteServer "SiteServer" \ No newline at end of file +- \ref RoboidControl::ParticipantUDP::ParticipantUDP "ParticipantUDP" diff --git a/__init__.py b/__init__.py index 5952521..f92525e 100644 --- a/__init__.py +++ b/__init__.py @@ -1,10 +1,5 @@ __all__ = ['Thing', - 'ParticipantUDP', - 'SiteServer'] + 'ParticipantUDP'] -from .LinearAlgebra.Direction import Direction from .ParticipantUDP import ParticipantUDP from .Thing import Thing -from .LinearAlgebra.Spherical import Spherical -from .LinearAlgebra.SwingTwist import SwingTwist -from .SiteServer import SiteServer \ No newline at end of file From 8024bab5ffdef430263aa5fddcc9a2107bcba911 Mon Sep 17 00:00:00 2001 From: Pascal Serrarens Date: Sun, 6 Apr 2025 12:42:10 +0200 Subject: [PATCH 4/4] Removed the user of network_id --- DoxyGen/DoxyWarnLogfile.txt | 280 +++++++++++++++++++++++------------- Messages/BinaryMsg.py | 24 +--- Messages/InvestigateMsg.py | 1 - Messages/Messages.py | 174 +++++++--------------- Messages/ModelUrlMsg.py | 7 +- Messages/NameMsg.py | 6 +- Messages/NetworkIdMsg.py | 18 +-- Messages/ParticipantMsg.py | 48 +------ Messages/PoseMsg.py | 7 +- Messages/ThingMsg.py | 7 +- Participant.py | 15 +- ParticipantUDP.py | 59 ++------ Participants/SiteServer.py | 27 +--- Thing.py | 17 +-- Things/TemperatureSensor.py | 4 +- test/BB2B_dummytest.py | 2 +- test/thing_test.py | 2 +- 17 files changed, 278 insertions(+), 420 deletions(-) diff --git a/DoxyGen/DoxyWarnLogfile.txt b/DoxyGen/DoxyWarnLogfile.txt index b194046..7d9587b 100644 --- a/DoxyGen/DoxyWarnLogfile.txt +++ b/DoxyGen/DoxyWarnLogfile.txt @@ -1,105 +1,181 @@ warning: source 'images' is not a readable file or directory... skipping. -d:/Python/RoboidControl/Things/DifferentialDrive.py:62: warning: @copybrief or @copydoc target 'Thing::Update' not found -d:/Python/RoboidControl/Things/DifferentialDrive.py:46: warning: Found unknown command '@params' -d:/Python/RoboidControl/Things/DifferentialDrive.py:22: warning: Member SetDriveDimensions(self, wheel_diameter, wheel_separation) (function) of class DifferentialDrive.DifferentialDrive is not documented. -d:/Python/RoboidControl/Things/DifferentialDrive.py:33: warning: Member SetMotors(self, wheel_left, wheel_right) (function) of class DifferentialDrive.DifferentialDrive is not documented. -d:/Python/RoboidControl/Things/DifferentialDrive.py:46: warning: Found unknown command '@params' -d:/Python/RoboidControl/Things/DifferentialDrive.py:62: warning: @copybrief or @copydoc target 'Thing::Update' not found -d:/Python/RoboidControl/Things/DifferentialDrive.py:31: warning: Member wheel_left (variable) of class DifferentialDrive.DifferentialDrive is not documented. -d:/Python/RoboidControl/Things/DifferentialDrive.py:31: warning: Member wheel_right (variable) of class DifferentialDrive.DifferentialDrive is not documented. -d:/Python/RoboidControl/Things/DifferentialDrive.py:46: warning: Found unknown command '@params' -d:/Python/RoboidControl/Things/DifferentialDrive.py:47: warning: Found unknown command '@params' -d:/Python/RoboidControl/Things/DifferentialDrive.py:62: warning: @copybrief or @copydoc target 'Thing::Update' not found -d:/Python/RoboidControl/Things/DifferentialDrive.py:63: warning: @copydetails or @copydoc target 'Thing::Update' not found -d:/Python/RoboidControl/LocalParticipant.py:76: warning: Member GetParticipant(self, ip_address, port) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:86: warning: Member AddParticipant(self, ip_address, port) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:119: warning: Member SendThingInfo(self, owner, thing, bool recursively=False) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:129: warning: Member Send(self, owner, msg) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:138: warning: Member Publish(self, msg) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:151: warning: Member Receiver(self) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:163: warning: Member ReceiveData(self, data, sender) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:183: warning: Member ProcessClientMsg(self, sender, ParticipantMsg msg) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:186: warning: Member ProcessNetworkIdMsg(self, sender, NetworkIdMsg msg) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:196: warning: Member ProcessInvestigateMsg(self, bytearray data) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:199: warning: Member ProcessThingMsg(self, ThingMsg msg) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:211: warning: Member ProcessNameMsg(self, NameMsg msg) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:214: warning: Member ProcessModelUrlMsg(self, ModelUrlMsg msg) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:217: warning: Member ProcessBinary(self, BinaryMsg msg) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:223: warning: Member Register(self, constructor, thing_type) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:226: warning: Member OnNewThing(self, event_handler) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:229: warning: Member OnNewThingType(self, thing_type, event_handler) (function) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:42: warning: Member local_port (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:58: warning: Member thing_msg_processors (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:59: warning: Member new_thing_handlers (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:60: warning: Member publishInterval (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:64: warning: Member udp_socket (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:105: warning: Member nextPublishMe (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:144: warning: Member port (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:29: warning: Member buffer (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:32: warning: Member nextPublishMe (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:33: warning: Member others (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:34: warning: Member thread (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/LocalParticipant.py:35: warning: Member name (variable) of class RoboidControl.LocalParticipant.LocalParticipant is not documented. -d:/Python/RoboidControl/Messages/Messages.py:115: warning: Member __init__(self, network_id, thing) (function) of class RoboidControl.Messages.Messages.PoseMsg is not documented. -d:/Python/RoboidControl/Messages/Messages.py:119: warning: Member Serialize(self, buffer_ref) (function) of class RoboidControl.Messages.Messages.PoseMsg is not documented. -d:/Python/RoboidControl/Messages/Messages.py:116: warning: Member network_id (variable) of class RoboidControl.Messages.Messages.PoseMsg is not documented. -d:/Python/RoboidControl/Messages/Messages.py:117: warning: Member thing (variable) of class RoboidControl.Messages.Messages.PoseMsg is not documented. -d:/Python/RoboidControl/Messages/NetworkIdMsg.py:7: warning: Member id (variable) of class RoboidControl.Messages.NetworkIdMsg.NetworkIdMsg is not documented. -d:/Python/RoboidControl/Messages/NetworkIdMsg.py:8: warning: Member length (variable) of class RoboidControl.Messages.NetworkIdMsg.NetworkIdMsg is not documented. -d:/Python/RoboidControl/Messages/NetworkIdMsg.py:10: warning: Member network_id (variable) of class RoboidControl.Messages.NetworkIdMsg.NetworkIdMsg is not documented. -d:/Python/RoboidControl/Messages/ParticipantMsg.py:53: warning: Member SendTo(participant, network_id) (function) of class RoboidControl.Messages.ParticipantMsg.ParticipantMsg is not documented. -d:/Python/RoboidControl/Messages/ParticipantMsg.py:64: warning: Member Publish(participant, network_id) (function) of class RoboidControl.Messages.ParticipantMsg.ParticipantMsg is not documented. -d:/Python/RoboidControl/Messages/ParticipantMsg.py:41: warning: Member Serialized(buffer_ref, network_id) (function) of class RoboidControl.Messages.ParticipantMsg.ParticipantMsg is not documented. -d:/Python/RoboidControl/Messages/ParticipantMsg.py:21: warning: Member network_id (variable) of class RoboidControl.Messages.ParticipantMsg.ParticipantMsg is not documented. -d:/Python/RoboidControl/SiteServer.py:42: warning: Member AddParticipant(self, ip_address, port) (function) of class RoboidControl.SiteServer.SiteServer is not documented. -d:/Python/RoboidControl/SiteServer.py:49: warning: Member ProcessClientMsg(self, sender, msg) (function) of class RoboidControl.SiteServer.SiteServer is not documented. -d:/Python/RoboidControl/SiteServer.py:56: warning: Member ProcessNetworkId(self, msg) (function) of class RoboidControl.SiteServer.SiteServer is not documented. -d:/Python/RoboidControl/SiteServer.py:60: warning: Member Register(self, ThingClass, thing_type) (function) of class RoboidControl.SiteServer.SiteServer is not documented. -d:/Python/RoboidControl/SiteServer.py:63: warning: Member Process(self, msg) (function) of class RoboidControl.SiteServer.SiteServer is not documented. -d:/Python/RoboidControl/SiteServer.py:69: warning: Member ProcessThingMsg(self, msg) (function) of class RoboidControl.SiteServer.SiteServer is not documented. -d:/Python/RoboidControl/SiteServer.py:20: warning: Member ip_address (variable) of class RoboidControl.SiteServer.SiteServer is not documented. -d:/Python/RoboidControl/SiteServer.py:21: warning: Member port (variable) of class RoboidControl.SiteServer.SiteServer is not documented. -d:/Python/RoboidControl/SiteServer.py:22: warning: Member publishInterval (variable) of class RoboidControl.SiteServer.SiteServer is not documented. -d:/Python/RoboidControl/SiteServer.py:23: warning: Member others (variable) of class RoboidControl.SiteServer.SiteServer is not documented. -d:/Python/RoboidControl/SiteServer.py:24: warning: Member network_id (variable) of class RoboidControl.SiteServer.SiteServer is not documented. -d:/Python/RoboidControl/SiteServer.py:25: warning: Member buffer (variable) of class RoboidControl.SiteServer.SiteServer is not documented. -d:/Python/RoboidControl/SiteServer.py:26: warning: Member thing_msg_constructors (variable) of class RoboidControl.SiteServer.SiteServer is not documented. -d:/Python/RoboidControl/SiteServer.py:29: warning: Member udp_socket (variable) of class RoboidControl.SiteServer.SiteServer is not documented. -d:/Python/RoboidControl/SiteServer.py:34: warning: Member thread (variable) of class RoboidControl.SiteServer.SiteServer is not documented. -d:/Python/RoboidControl/SiteServer.py:14: warning: Member name (variable) of class RoboidControl.SiteServer.SiteServer is not documented. -d:/Python/RoboidControl/SiteServer.py:18: warning: The following parameters of RoboidControl.SiteServer.SiteServer.__init__(self, port=7681, remote=False, udp_socket=None) are not documented: - parameter 'remote' - parameter 'udp_socket' -d:/Python/RoboidControl/Thing.py:92: warning: Member Update(self, currentTime) (function) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:95: warning: Member ProcessBinary(self, data) (function) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:99: warning: Member SetParent(self, parent) (function) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:108: warning: Member AddChild(self, child) (function) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:115: warning: Member RemoveChild(self, child) (function) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:31: warning: Member children (variable) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:61: warning: Member pose_updated (variable) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:68: warning: Member position (variable) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:69: warning: Member position_updated (variable) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:75: warning: Member orientation (variable) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:76: warning: Member orientation_updated (variable) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:82: warning: Member linear_velocity (variable) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:83: warning: Member linear_velocity_updated (variable) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:89: warning: Member angular_velocity (variable) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:90: warning: Member angular_velocity_updated (variable) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:18: warning: Member Position (variable) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:19: warning: Member Orientation (variable) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:20: warning: Member LinearVelocity (variable) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:21: warning: Member AngularVelocity (variable) of class RoboidControl.Thing.Thing is not documented. -d:/Python/RoboidControl/Thing.py:80: warning: argument 'linearVelocity' of command @param is not found in the argument list of Thing::SetLinearVelocity(self, linear_velocity) -d:/Python/RoboidControl/Thing.py:80: warning: The following parameter of RoboidControl.Thing.Thing.SetLinearVelocity(self, linear_velocity) is not documented: +d:/Python/RoboidControl-python/Things/DifferentialDrive.py:62: warning: @copybrief or @copydoc target 'Thing::Update' not found +d:/Python/RoboidControl-python/Things/DifferentialDrive.py:46: warning: Found unknown command '@params' +d:/Python/RoboidControl-python/Things/DifferentialDrive.py:22: warning: Member SetDriveDimensions(self, wheel_diameter, wheel_separation) (function) of class DifferentialDrive.DifferentialDrive is not documented. +d:/Python/RoboidControl-python/Things/DifferentialDrive.py:33: warning: Member SetMotors(self, wheel_left, wheel_right) (function) of class DifferentialDrive.DifferentialDrive is not documented. +d:/Python/RoboidControl-python/Things/DifferentialDrive.py:46: warning: Found unknown command '@params' +d:/Python/RoboidControl-python/Things/DifferentialDrive.py:62: warning: @copybrief or @copydoc target 'Thing::Update' not found +d:/Python/RoboidControl-python/Things/DifferentialDrive.py:31: warning: Member wheel_left (variable) of class DifferentialDrive.DifferentialDrive is not documented. +d:/Python/RoboidControl-python/Things/DifferentialDrive.py:31: warning: Member wheel_right (variable) of class DifferentialDrive.DifferentialDrive is not documented. +d:/Python/RoboidControl-python/Things/DifferentialDrive.py:64: warning: Member angular_velocity_updated (variable) of class DifferentialDrive.DifferentialDrive is not documented. +d:/Python/RoboidControl-python/Things/DifferentialDrive.py:46: warning: Found unknown command '@params' +d:/Python/RoboidControl-python/Things/DifferentialDrive.py:47: warning: Found unknown command '@params' +d:/Python/RoboidControl-python/Things/DifferentialDrive.py:62: warning: @copybrief or @copydoc target 'Thing::Update' not found +d:/Python/RoboidControl-python/Things/DifferentialDrive.py:63: warning: @copydetails or @copydoc target 'Thing::Update' not found +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:47: warning: Member FromVector3(Vector3 v) (function) of class LinearAlgebra.Direction.Direction is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:77: warning: Member isclose(self, other, rel_tol=1e-9, abs_tol=1e-8) (function) of class LinearAlgebra.Direction.Direction is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:105: warning: Member __repr__(self) (function) of class LinearAlgebra.Direction.Direction is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Direction.py:47: warning: Member FromVector3(Vector3 v) (function) of class LinearAlgebra.Direction.Direction is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Direction.py:77: warning: Member isclose(self, other, rel_tol=1e-9, abs_tol=1e-8) (function) of class LinearAlgebra.Direction.Direction is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Direction.py:105: warning: Member __repr__(self) (function) of class LinearAlgebra.Direction.Direction is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:75: warning: Member horizontal (variable) of class LinearAlgebra.Direction.Direction is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:76: warning: Member vertical (variable) of class LinearAlgebra.Direction.Direction is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:108: warning: Member zero (variable) of class LinearAlgebra.Direction.Direction is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:109: warning: Member forward (variable) of class LinearAlgebra.Direction.Direction is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:110: warning: Member backward (variable) of class LinearAlgebra.Direction.Direction is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:111: warning: Member up (variable) of class LinearAlgebra.Direction.Direction is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:112: warning: Member down (variable) of class LinearAlgebra.Direction.Direction is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:113: warning: Member left (variable) of class LinearAlgebra.Direction.Direction is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Direction.py:114: warning: Member right (variable) of class LinearAlgebra.Direction.Direction is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:87: warning: Member isclose(self, other, rel_tol=1e-9, abs_tol=1e-8) (function) of class LinearAlgebra.Spherical.Polar is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:94: warning: Member Magnitude(self) (function) of class LinearAlgebra.Spherical.Polar is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:97: warning: Member Normalized(self) (function) of class LinearAlgebra.Spherical.Polar is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:87: warning: Member isclose(self, other, rel_tol=1e-9, abs_tol=1e-8) (function) of class LinearAlgebra.Spherical.Polar is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:94: warning: Member Magnitude(self) (function) of class LinearAlgebra.Spherical.Polar is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:97: warning: Member Normalized(self) (function) of class LinearAlgebra.Spherical.Polar is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:23: warning: Member direction (variable) of class LinearAlgebra.Spherical.Polar is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:233: warning: Member zero (variable) of class LinearAlgebra.Spherical.Polar is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:28: warning: argument 'horizontal' of command @param is not found in the argument list of Polar::Degrees(float distance, float degrees) +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:28: warning: The following parameter of LinearAlgebra.Spherical.Polar.Degrees(float distance, float degrees) is not documented: + parameter 'degrees' +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:39: warning: argument 'horizontal' of command @param is not found in the argument list of Polar::Radians(float distance, float radians) +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:39: warning: argument 'vertical' of command @param is not found in the argument list of Polar::Radians(float distance, float radians) +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:39: warning: The following parameter of LinearAlgebra.Spherical.Polar.Radians(float distance, float radians) is not documented: + parameter 'radians' +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:78: warning: argument 'v' of command @param is not found in the argument list of Polar::__eq__(self, other) +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:78: warning: The following parameter of LinearAlgebra.Spherical.Polar.__eq__(self, other) is not documented: + parameter 'other' +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:28: warning: argument 'horizontal' of command @param is not found in the argument list of Polar::Degrees(float distance, float degrees) +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:28: warning: The following parameter of LinearAlgebra.Spherical.Polar.Degrees(float distance, float degrees) is not documented: + parameter 'degrees' +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:39: warning: argument 'horizontal' of command @param is not found in the argument list of Polar::Radians(float distance, float radians) +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:39: warning: argument 'vertical' of command @param is not found in the argument list of Polar::Radians(float distance, float radians) +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:39: warning: The following parameter of LinearAlgebra.Spherical.Polar.Radians(float distance, float radians) is not documented: + parameter 'radians' +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:78: warning: argument 'v' of command @param is not found in the argument list of Polar::__eq__(self, other) +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:78: warning: The following parameter of LinearAlgebra.Spherical.Polar.__eq__(self, other) is not documented: + parameter 'other' +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:322: warning: Member isclose(self, other, rel_tol=1e-9, abs_tol=1e-8) (function) of class LinearAlgebra.Spherical.Spherical is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:328: warning: Member Normalized(self) (function) of class LinearAlgebra.Spherical.Spherical is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:440: warning: Member __repr__(self) (function) of class LinearAlgebra.Spherical.Spherical is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:322: warning: Member isclose(self, other, rel_tol=1e-9, abs_tol=1e-8) (function) of class LinearAlgebra.Spherical.Spherical is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:328: warning: Member Normalized(self) (function) of class LinearAlgebra.Spherical.Spherical is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:440: warning: Member __repr__(self) (function) of class LinearAlgebra.Spherical.Spherical is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:252: warning: Member direction (variable) of class LinearAlgebra.Spherical.Spherical is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:443: warning: Member zero (variable) of class LinearAlgebra.Spherical.Spherical is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:313: warning: argument 'v' of command @param is not found in the argument list of Spherical::__eq__(self, other) +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:313: warning: The following parameter of LinearAlgebra.Spherical.Spherical.__eq__(self, other) is not documented: + parameter 'other' +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:388: warning: argument 's1' of command @param is not found in the argument list of Spherical::Distance(v1, v2) +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:388: warning: argument 's2' of command @param is not found in the argument list of Spherical::Distance(v1, v2) +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/Spherical.py:388: warning: The following parameters of LinearAlgebra.Spherical.Spherical.Distance(v1, v2) are not documented: + parameter 'v1' + parameter 'v2' +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:313: warning: argument 'v' of command @param is not found in the argument list of Spherical::__eq__(self, other) +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:313: warning: The following parameter of LinearAlgebra.Spherical.Spherical.__eq__(self, other) is not documented: + parameter 'other' +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:388: warning: argument 's1' of command @param is not found in the argument list of Spherical::Distance(v1, v2) +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:388: warning: argument 's2' of command @param is not found in the argument list of Spherical::Distance(v1, v2) +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/Spherical.py:388: warning: The following parameters of LinearAlgebra.Spherical.Spherical.Distance(v1, v2) are not documented: + parameter 'v1' + parameter 'v2' +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/SwingTwist.py:6: warning: Member __init__(self, Direction swing, Angle twist) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/SwingTwist.py:65: warning: Member FromAngleAxis(Angle angle, Direction axis) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/SwingTwist.py:82: warning: Member isclose(self, other, rel_tol=1e-9, abs_tol=1e-8) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/SwingTwist.py:6: warning: Member __init__(self, Direction swing, Angle twist) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/SwingTwist.py:65: warning: Member FromAngleAxis(Angle angle, Direction axis) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/SwingTwist.py:82: warning: Member isclose(self, other, rel_tol=1e-9, abs_tol=1e-8) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/SwingTwist.py:13: warning: Member Degrees(float horizontal, float vertical, float twist) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/SwingTwist.py:29: warning: Member Radians(float horizontal, float vertical, float twist) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/SwingTwist.py:54: warning: Member FromQuaternion(Quaternion q) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/build/lib/LinearAlgebra/SwingTwist.py:90: warning: Member Angle(r1, r2) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/SwingTwist.py:13: warning: Member Degrees(float horizontal, float vertical, float twist) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/SwingTwist.py:29: warning: Member Radians(float horizontal, float vertical, float twist) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/SwingTwist.py:54: warning: Member FromQuaternion(Quaternion q) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented. +d:/Python/RoboidControl-python/LinearAlgebra/LinearAlgebra/SwingTwist.py:90: warning: Member Angle(r1, r2) (function) of class LinearAlgebra.SwingTwist.SwingTwist is not documented. +d:/Python/RoboidControl-python/Messages/Messages.py:115: warning: Member __init__(self, network_id, thing) (function) of class RoboidControl-python.Messages.Messages.PoseMsg is not documented. +d:/Python/RoboidControl-python/Messages/Messages.py:119: warning: Member Serialize(self, buffer_ref) (function) of class RoboidControl-python.Messages.Messages.PoseMsg is not documented. +d:/Python/RoboidControl-python/Messages/Messages.py:116: warning: Member network_id (variable) of class RoboidControl-python.Messages.Messages.PoseMsg is not documented. +d:/Python/RoboidControl-python/Messages/Messages.py:117: warning: Member thing (variable) of class RoboidControl-python.Messages.Messages.PoseMsg is not documented. +d:/Python/RoboidControl-python/Messages/NetworkIdMsg.py:7: warning: Member id (variable) of class RoboidControl-python.Messages.NetworkIdMsg.NetworkIdMsg is not documented. +d:/Python/RoboidControl-python/Messages/NetworkIdMsg.py:8: warning: Member length (variable) of class RoboidControl-python.Messages.NetworkIdMsg.NetworkIdMsg is not documented. +d:/Python/RoboidControl-python/Messages/NetworkIdMsg.py:10: warning: Member network_id (variable) of class RoboidControl-python.Messages.NetworkIdMsg.NetworkIdMsg is not documented. +d:/Python/RoboidControl-python/Messages/ParticipantMsg.py:53: warning: Member SendTo(participant, network_id) (function) of class RoboidControl-python.Messages.ParticipantMsg.ParticipantMsg is not documented. +d:/Python/RoboidControl-python/Messages/ParticipantMsg.py:64: warning: Member Publish(participant, network_id) (function) of class RoboidControl-python.Messages.ParticipantMsg.ParticipantMsg is not documented. +d:/Python/RoboidControl-python/Messages/ParticipantMsg.py:41: warning: Member Serialized(buffer_ref, network_id) (function) of class RoboidControl-python.Messages.ParticipantMsg.ParticipantMsg is not documented. +d:/Python/RoboidControl-python/Messages/ParticipantMsg.py:21: warning: Member network_id (variable) of class RoboidControl-python.Messages.ParticipantMsg.ParticipantMsg is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:71: warning: Member Isolated() (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:78: warning: Member GetParticipant(self, ip_address, port) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:88: warning: Member AddParticipant(self, ip_address, port) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:123: warning: Member SendThingInfo(self, owner, thing, bool recursively=False) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:135: warning: Member Send(self, owner, msg) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:144: warning: Member Publish(self, msg) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:157: warning: Member Receiver(self) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:169: warning: Member ReceiveData(self, data, sender) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:188: warning: Member ProcessParticipantMsg(self, sender, ParticipantMsg msg) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:191: warning: Member ProcessNetworkIdMsg(self, sender, NetworkIdMsg msg) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:201: warning: Member ProcessInvestigateMsg(self, bytearray data) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:204: warning: Member ProcessThingMsg(self, ThingMsg msg) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:216: warning: Member ProcessNameMsg(self, NameMsg msg) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:219: warning: Member ProcessModelUrlMsg(self, ModelUrlMsg msg) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:222: warning: Member ProcessBinaryMsg(self, BinaryMsg msg) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:228: warning: Member Register(self, constructor, thing_type) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:231: warning: Member OnNewThing(self, event_handler) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:234: warning: Member OnNewThingType(self, thing_type, event_handler) (function) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:43: warning: Member local_port (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:61: warning: Member publishInterval (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:63: warning: Member udp_socket (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:109: warning: Member nextPublishMe (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:150: warning: Member port (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:29: warning: Member buffer (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:32: warning: Member nextPublishMe (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:34: warning: Member thread (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:35: warning: Member name (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/ParticipantUDP.py:36: warning: Member isolated_participant (variable) of class RoboidControl-python.ParticipantUDP.ParticipantUDP is not documented. +d:/Python/RoboidControl-python/Thing.py:106: warning: Member Update(self, currentTime) (function) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:111: warning: Member ProcessBinary(self, data) (function) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:115: warning: Member SetParent(self, parent) (function) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:124: warning: Member AddChild(self, child) (function) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:131: warning: Member RemoveChild(self, child) (function) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:134: warning: Member GenerateBinary(self, buffer, ix_ref) (function) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:45: warning: Member children (variable) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:75: warning: Member pose_updated (variable) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:82: warning: Member position (variable) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:83: warning: Member position_updated (variable) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:89: warning: Member orientation (variable) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:90: warning: Member orientation_updated (variable) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:96: warning: Member linear_velocity (variable) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:97: warning: Member linear_velocity_updated (variable) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:103: warning: Member angular_velocity (variable) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:104: warning: Member angular_velocity_updated (variable) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:28: warning: Member Position (variable) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:29: warning: Member Orientation (variable) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:30: warning: Member LinearVelocity (variable) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:31: warning: Member AngularVelocity (variable) of class RoboidControl-python.Thing.Thing is not documented. +d:/Python/RoboidControl-python/Thing.py:94: warning: argument 'linearVelocity' of command @param is not found in the argument list of Thing::SetLinearVelocity(self, linear_velocity) +d:/Python/RoboidControl-python/Thing.py:94: warning: The following parameter of RoboidControl-python.Thing.Thing.SetLinearVelocity(self, linear_velocity) is not documented: parameter 'linear_velocity' -d:/Python/RoboidControl/Thing.py:87: warning: argument 'angularVelocity' of command @param is not found in the argument list of Thing::SetAngularVelocity(self, angular_velocity) -d:/Python/RoboidControl/Thing.py:87: warning: The following parameter of RoboidControl.Thing.Thing.SetAngularVelocity(self, angular_velocity) is not documented: +d:/Python/RoboidControl-python/Thing.py:101: warning: argument 'angularVelocity' of command @param is not found in the argument list of Thing::SetAngularVelocity(self, angular_velocity) +d:/Python/RoboidControl-python/Thing.py:101: warning: The following parameter of RoboidControl-python.Thing.Thing.SetAngularVelocity(self, angular_velocity) is not documented: parameter 'angular_velocity' -d:/Python/RoboidControl/Thing.py:10: warning: Member Undetermined (variable) of class RoboidControl.Thing.Thing.Type is not documented. -d:/Python/RoboidControl/Thing.py:12: warning: Member Switch (variable) of class RoboidControl.Thing.Thing.Type is not documented. -d:/Python/RoboidControl/Thing.py:13: warning: Member DistanceSensor (variable) of class RoboidControl.Thing.Thing.Type is not documented. -d:/Python/RoboidControl/Thing.py:14: warning: Member DirectionalSensor (variable) of class RoboidControl.Thing.Thing.Type is not documented. -d:/Python/RoboidControl/Thing.py:15: warning: Member TemperatureSensor (variable) of class RoboidControl.Thing.Thing.Type is not documented. -d:/Python/RoboidControl/Thing.py:16: warning: Member Animator (variable) of class RoboidControl.Thing.Thing.Type is not documented. -d:/Python/RoboidControl/LinearAlgebra/SwingTwist.py:6: warning: Member __init__(self, Direction swing, float twist) (function) of class SwingTwist.SwingTwist is not documented. -d:/Python/RoboidControl/LinearAlgebra/SwingTwist.py:18: warning: Member Degrees(float horizontal, float vertical, float twist) (function) of class SwingTwist.SwingTwist is not documented. +d:/Python/RoboidControl-python/Thing.py:11: warning: Member Undetermined (variable) of class RoboidControl-python.Thing.Thing.Type is not documented. +d:/Python/RoboidControl-python/Thing.py:13: warning: Member Switch (variable) of class RoboidControl-python.Thing.Thing.Type is not documented. +d:/Python/RoboidControl-python/Thing.py:14: warning: Member DistanceSensor (variable) of class RoboidControl-python.Thing.Thing.Type is not documented. +d:/Python/RoboidControl-python/Thing.py:15: warning: Member DirectionalSensor (variable) of class RoboidControl-python.Thing.Thing.Type is not documented. +d:/Python/RoboidControl-python/Thing.py:16: warning: Member TemperatureSensor (variable) of class RoboidControl-python.Thing.Thing.Type is not documented. +d:/Python/RoboidControl-python/Thing.py:17: warning: Member TouchSensor (variable) of class RoboidControl-python.Thing.Thing.Type is not documented. +d:/Python/RoboidControl-python/Thing.py:19: warning: Member ControlledMotor (variable) of class RoboidControl-python.Thing.Thing.Type is not documented. +d:/Python/RoboidControl-python/Thing.py:20: warning: Member UncontrolledMotor (variable) of class RoboidControl-python.Thing.Thing.Type is not documented. +d:/Python/RoboidControl-python/Thing.py:21: warning: Member Servo (variable) of class RoboidControl-python.Thing.Thing.Type is not documented. +d:/Python/RoboidControl-python/Thing.py:23: warning: Member Roboid (variable) of class RoboidControl-python.Thing.Thing.Type is not documented. +d:/Python/RoboidControl-python/Thing.py:24: warning: Member Humanoid (variable) of class RoboidControl-python.Thing.Thing.Type is not documented. +d:/Python/RoboidControl-python/Thing.py:25: warning: Member ExternalSensor (variable) of class RoboidControl-python.Thing.Thing.Type is not documented. +d:/Python/RoboidControl-python/Thing.py:26: warning: Member Animator (variable) of class RoboidControl-python.Thing.Thing.Type is not documented. +d:/Python/RoboidControl-python/Participants/SiteServer.py:44: warning: Member ProcessParticipantMsg(self, sender, msg) (function) of class SiteServer.SiteServer is not documented. +d:/Python/RoboidControl-python/Participants/SiteServer.py:51: warning: Member ProcessNetworkId(self, msg) (function) of class SiteServer.SiteServer is not documented. +d:/Python/RoboidControl-python/Participants/SiteServer.py:24: warning: Member isolated (variable) of class SiteServer.SiteServer is not documented. +d:/Python/RoboidControl-python/Participants/SiteServer.py:25: warning: Member remote_site (variable) of class SiteServer.SiteServer is not documented. +d:/Python/RoboidControl-python/Participants/SiteServer.py:32: warning: Member publishInterval (variable) of class SiteServer.SiteServer is not documented. +d:/Python/RoboidControl-python/Participants/SiteServer.py:14: warning: Member name (variable) of class SiteServer.SiteServer is not documented. +d:/Python/RoboidControl-python/README.md:12: warning: unable to resolve reference to 'RoboidControl::Thing::Thing' for \ref command +d:/Python/RoboidControl-python/README.md:13: warning: unable to resolve reference to 'RoboidControl::ParticipantUDP::ParticipantUDP' for \ref command diff --git a/Messages/BinaryMsg.py b/Messages/BinaryMsg.py index d3d5eda..1ef0fcb 100644 --- a/Messages/BinaryMsg.py +++ b/Messages/BinaryMsg.py @@ -6,17 +6,14 @@ class BinaryMsg(): def __init__(self, data, thing = None): if isinstance(data, bytes): - self.network_id = data[1] self.thing_id = data[2] - #self.thing: Thing = Thing.Get(self.network_id, self.thing_id) self.data = data[3:] else: - self.network_id = data self.thing_id = thing.id self.thing = thing def Serialize(self, buffer_ref): - if self.network_id is None or self.thing_id is None: + if self.thing_id is None: return 0 buffer: bytearray = buffer_ref[0] @@ -26,23 +23,6 @@ class BinaryMsg(): return 0 buffer[0] = self.id - buffer[1] = self.network_id + buffer[1] = 0 # network_id buffer[2] = self.thing_id return ix - - - # def SendTo(participant, thing, data: bytearray): - # length = 3 - - # if thing.network_id is None or thing is None or data is None: - # return False - - # participant.buffer[0:length] = [ - # BinaryMsg.id, - # participant.network_id, - # thing.id - # ] - # full_length = length + len(data) - # participant.buffer[length:full_length] = data - # participant.SendBuffer(full_length) - # return True \ No newline at end of file diff --git a/Messages/InvestigateMsg.py b/Messages/InvestigateMsg.py index bd7bfd0..fb75360 100644 --- a/Messages/InvestigateMsg.py +++ b/Messages/InvestigateMsg.py @@ -4,5 +4,4 @@ class InvestigateMsg(): length = 3 def __init__(self, buffer): - self.network_id = buffer[1] self.thing_id = buffer[2] diff --git a/Messages/Messages.py b/Messages/Messages.py index 23be391..852c9e5 100644 --- a/Messages/Messages.py +++ b/Messages/Messages.py @@ -22,143 +22,69 @@ class IMessage: return False return participant.PublishBuffer(bufferSize) -# class ParticipantMsg(IMessage): -# """! A participant messages notifies other participants of its presence. +# class InvestigateMsg(): +# id = 0x81 +# length = 3 -# When received by another participant, it can be followed by a NetworkIdMsg -# to announce that participant to this client such that it can join privately +# def __init__(self, buffer): +# self.thing_id = buffer[2] + +# class PoseMsg(IMessage): +# """! Message to communicate the pose of the thing + +# The pose is in local space relative to the parent. +# If there is not parent (the thing is a root thing), the pose will be in world space. # """ # ## The message ID -# id: int = 0xA0 +# id = 0x10 # ## The length of the message -# length: int = 2 -# ## The network ID known by the participant. -# network_id: int = None +# length = 4 -# def __init__(self, network_id: int): -# """! Create a new message for sending -# @param network_id The network ID known by the participant. Use 0 if it is unknown -# """ -# if isinstance(network_id, int): -# self.network_id = network_id -# elif isinstance(network_id, bytes): -# self.network_id = network_id[1] +# def __init__(self, thing): +# self.thing = thing # def Serialize(self, buffer_ref): -# """! Serialize the message into a byte array. -# @param buffer_ref The buffer to serialize into -# @return The length of the message in the buffer -# """ -# if buffer_ref is None or self.network_id is None: +# if self.thing is None: # return 0 # buffer: bytearray = buffer_ref[0] -# buffer[0:ParticipantMsg.length] = [ -# ParticipantMsg.id, -# self.network_id +# buffer[0:PoseMsg.length] = [ +# PoseMsg.id, +# 0, # Network id +# self.thing.id, +# self.thing.pose_updated # ] -# return ParticipantMsg.length +# ix = [4] +# if self.thing.pose_updated & Thing.Position: +# LowLevelMessages.SendSpherical(buffer, ix, self.thing.position) +# if self.thing.pose_updated & Thing.Orientation: +# LowLevelMessages.SendQuat32(buffer, ix, self.thing.orientation) +# if self.thing.pose_updated & Thing.LinearVelocity: +# LowLevelMessages.SendSpherical(buffer, ix, self.thing.linearVelocity) +# if self.thing.pose_updated & Thing.AngularVelocity: +# LowLevelMessages.SendSpherical(buffer, ix, self.thing.angularVelocity) +# return ix[0] -# ## A network id message invites another participant to a site -# # -# ## This can be sent in response to a ClientMsg -# class NetworkIdMsg(IMessage): -# id = 0xA1 -# length = 2 +# class BinaryMsg(): +# id = 0xB1 -# network_id = None - -# ## Create a network id message -# # -# # @param network_id The network id assigned to the remote participant. -# def __init__(self, network_id): -# self.network_id = None -# if isinstance(network_id, int): -# self.network_id = network_id -# elif isinstance(network_id, bytes): -# self.network_id = network_id[1] +# def __init__(self, buffer): +# self.thing_id = buffer[2] +# self.thing = Thing.Get(self.thing_id) +# self.data = buffer[3:] -# ## Serialize the message into the given buffer -# # -# ## @param buffer_ref A reference to the buffer to use. This should be a list with the buffer as its first and only element -# ## @returns the length of the message -# def Serialize(self, buffer_ref): -# if self.network_id is None: -# return 0 +# def SendTo(participant, thing, data: bytearray): +# length = 3 + +# if thing is None or data is None: +# return False -# buffer: bytearray = buffer_ref[0] -# buffer[0:NetworkIdMsg.length] = [ -# NetworkIdMsg.id, -# self.network_id +# participant.buffer[0:length] = [ +# BinaryMsg.id, +# 0, # network_id, +# thing.id # ] -# return NetworkIdMsg.length - -class InvestigateMsg(): - id = 0x81 - length = 3 - - def __init__(self, buffer): - self.network_id = buffer[1] - self.thing_id = buffer[2] - -class PoseMsg(IMessage): - """! Message to communicate the pose of the thing - - The pose is in local space relative to the parent. - If there is not parent (the thing is a root thing), the pose will be in world space. - """ - ## The message ID - id = 0x10 - ## The length of the message - length = 4 - - def __init__(self, network_id, thing): - self.network_id = network_id - self.thing = thing - - def Serialize(self, buffer_ref): - if (self.network_id is None) or (self.thing is None): - return 0 - - buffer: bytearray = buffer_ref[0] - buffer[0:PoseMsg.length] = [ - PoseMsg.id, - self.network_id, - self.thing.id, - self.thing.pose_updated - ] - ix = [4] - if self.thing.pose_updated & Thing.Position: - LowLevelMessages.SendSpherical(buffer, ix, self.thing.position) - if self.thing.pose_updated & Thing.Orientation: - LowLevelMessages.SendQuat32(buffer, ix, self.thing.orientation) - if self.thing.pose_updated & Thing.LinearVelocity: - LowLevelMessages.SendSpherical(buffer, ix, self.thing.linearVelocity) - if self.thing.pose_updated & Thing.AngularVelocity: - LowLevelMessages.SendSpherical(buffer, ix, self.thing.angularVelocity) - return ix[0] - -class BinaryMsg(): - id = 0xB1 - - def __init__(self, buffer): - self.network_id = buffer[1] - self.thing_id = buffer[2] - self.thing = Thing.Get(self.network_id, self.thing_id) - self.data = buffer[3:] - - def SendTo(participant, thing, data: bytearray): - length = 3 - - if thing.network_id is None or thing is None or data is None: - return False - - participant.buffer[0:length] = [ - BinaryMsg.id, - participant.network_id, - thing.id - ] - full_length = length + len(data) - participant.buffer[length:full_length] = data - participant.SendBuffer(full_length) - return True \ No newline at end of file +# full_length = length + len(data) +# participant.buffer[length:full_length] = data +# participant.SendBuffer(full_length) +# return True \ No newline at end of file diff --git a/Messages/ModelUrlMsg.py b/Messages/ModelUrlMsg.py index 5cc835e..e8cb031 100644 --- a/Messages/ModelUrlMsg.py +++ b/Messages/ModelUrlMsg.py @@ -4,24 +4,21 @@ class ModelUrlMsg(IMessage): id = 0x90 length = 4 - network_id = None thing_id = None url = None def __init__(self, data, thing = None): if isinstance(data, bytes): - self.network_id = data[1] self.thing_id = data[2] # model url length is not needed here self.url = data[ModelUrlMsg.length:].decode("utf-8") else: - self.network_id = data if thing is not None: self.thing_id = thing.id self.url = thing.model_url def Serialize(self, buffer_ref): - if self.network_id is None or self.thing_id is None or self.url is None: + if self.thing_id is None or self.url is None: return 0 buffer: bytearray = buffer_ref[0] @@ -34,7 +31,7 @@ class ModelUrlMsg(IMessage): buffer[0:ModelUrlMsg.length] = [ ModelUrlMsg.id, - self.network_id, + 0, # network_id, self.thing_id, url_length ] diff --git a/Messages/NameMsg.py b/Messages/NameMsg.py index 409f8b4..cc6b9d2 100644 --- a/Messages/NameMsg.py +++ b/Messages/NameMsg.py @@ -9,18 +9,16 @@ class NameMsg(IMessage): def __init__(self, data, thing = None): if isinstance(data, bytes): - self.network_id = data[1] self.thing_id = data[2] # name_length is not needed here self.name = data[NameMsg.length:].decode("utf-8") else: - self.network_id = data if thing is not None: self.thing_id = thing.id self.name = thing.name def Serialize(self, buffer_ref): - if self.network_id is None or self.thing_id is None or self.name is None: + if self.thing_id is None or self.name is None: return 0 buffer: bytearray = buffer_ref[0] @@ -33,7 +31,7 @@ class NameMsg(IMessage): buffer[0:NameMsg.length] = [ NameMsg.id, - self.network_id, + 0, #self.network_id, self.thing_id, name_length ] diff --git a/Messages/NetworkIdMsg.py b/Messages/NetworkIdMsg.py index bb7d7ad..6e30d93 100644 --- a/Messages/NetworkIdMsg.py +++ b/Messages/NetworkIdMsg.py @@ -7,30 +7,20 @@ class NetworkIdMsg(IMessage): id = 0xA1 length = 2 - network_id = None ## Create a network id message - # - # @param network_id The network id assigned to the remote participant. - def __init__(self, network_id): - self.network_id = None - if isinstance(network_id, int): - self.network_id = network_id - elif isinstance(network_id, bytes): - self.network_id = network_id[1] + def __init__(self, data = None): + pass ## Serialize the message into the given buffer # ## @param buffer_ref A reference to the buffer to use. This should be a list with the buffer as its first and only element ## @returns the length of the message - def Serialize(self, buffer_ref): - if self.network_id is None: - return 0 - + def Serialize(self, buffer_ref): buffer: bytearray = buffer_ref[0] buffer[0:NetworkIdMsg.length] = [ NetworkIdMsg.id, - self.network_id + 0 ] return NetworkIdMsg.length diff --git a/Messages/ParticipantMsg.py b/Messages/ParticipantMsg.py index ed496bb..29f4368 100644 --- a/Messages/ParticipantMsg.py +++ b/Messages/ParticipantMsg.py @@ -10,63 +10,23 @@ class ParticipantMsg(IMessage): id: int = 0xA0 ## The length of the message length: int = 2 - ## The network ID known by the participant. - network_id: int = None - def __init__(self, network_id: int): + def __init__(self, data = None): """! Create a new message for sending - @param network_id The network ID known by the participant. Use 0 if it is unknown """ - if isinstance(network_id, int): - self.network_id = network_id - elif isinstance(network_id, bytes): - self.network_id = network_id[1] + pass def Serialize(self, buffer_ref): """! Serialize the message into a byte array. @param buffer_ref The buffer to serialize into @return The length of the message in the buffer """ - if buffer_ref is None or self.network_id is None: + if buffer_ref is None: return 0 buffer: bytearray = buffer_ref[0] buffer[0:ParticipantMsg.length] = [ ParticipantMsg.id, - self.network_id + 0, # network_id ] return ParticipantMsg.length - - @staticmethod - def Serialized(buffer_ref, network_id): - if buffer_ref is None or network_id is None: - return 0 - - buffer: bytearray = buffer_ref[0] - buffer[0:ParticipantMsg.length] = [ - ParticipantMsg.id, - network_id - ] - return ParticipantMsg.length - - # Send the network_id to the participant - def SendTo(participant, network_id): - if participant is None or network_id is None: - return False - - participant.buffer[0:2] = [ - ParticipantMsg.id, - network_id - ] - participant.SendBuffer(ParticipantMsg.length) - - # Publish the network_id - def Publish(participant, network_id): - if participant is None or network_id is None: - return False - - participant.buffer[0:2] = [ - ParticipantMsg.id, - network_id - ] - participant.PublishBuffer(ParticipantMsg.length) \ No newline at end of file diff --git a/Messages/PoseMsg.py b/Messages/PoseMsg.py index 305cf11..86cd4f3 100644 --- a/Messages/PoseMsg.py +++ b/Messages/PoseMsg.py @@ -10,8 +10,7 @@ class PoseMsg(): LinearVelocity = 0x04 AngularVelocity = 0x08 - def __init__(self, network_id, thing, force: bool = False): - self.network_id = network_id + def __init__(self, thing, force: bool = False): self.thing = thing self.pose_type = 0 if thing.position_updated or force: @@ -28,13 +27,13 @@ class PoseMsg(): thing.angular_velocity_updated = False def Serialize(self, buffer_ref): - if (self.network_id is None) or (self.thing is None) or (self.pose_type == 0): + if self.thing is None or self.pose_type == 0: return 0 buffer: bytearray = buffer_ref[0] buffer[0:PoseMsg.length] = [ PoseMsg.id, - self.network_id, + 0, # network_id, self.thing.id, self.pose_type ] diff --git a/Messages/ThingMsg.py b/Messages/ThingMsg.py index 133b115..0222521 100644 --- a/Messages/ThingMsg.py +++ b/Messages/ThingMsg.py @@ -4,19 +4,16 @@ class ThingMsg(IMessage): id = 0x80 length = 5 - network_id = None thing_id = None thing_type = None parent_id = None def __init__(self, data, thing=None): if isinstance(data, bytes): - self.network_id = data[1] self.thing_id = data[2] self.thing_type = data[3] self.parent_id = data[4] else: - self.network_id = data if thing is not None: self.thing_id = thing.id self.thing_type = thing.type @@ -26,13 +23,13 @@ class ThingMsg(IMessage): self.parent_id = 0 def Serialize(self, buffer_ref): - if self.network_id is None or self.thing_id is None: + if self.thing_id is None: return 0 buffer: bytearray = buffer_ref[0] buffer[0:ThingMsg.length] = [ ThingMsg.id, - self.network_id, + 0, # network_id, self.thing_id, self.thing_type, self.parent_id diff --git a/Participant.py b/Participant.py index fe1fb1a..be34f40 100644 --- a/Participant.py +++ b/Participant.py @@ -14,9 +14,6 @@ class Participant: self.ip_address = ip_address ## The port number for UDP communication with the participant. This is 0 for isolated participants. self.port = port - ## The network Id to identify the participant. - ## @note This field is likely to disappear in future versions - self.networkId = 0 ## The things managed by this participant self.things = set() @@ -30,23 +27,19 @@ class Participant: thing.id = len(self.things) + 1 self.things.add(thing) else: - found_thing = self.Get(thing.network_id, thing.id) + found_thing = self.Get(thing.id) if found_thing == None: self.things.add(thing) - def Get(self, network_id, thing_id): + def Get(self, thing_id): """! Find a thing managed by this participant - @param network_id The network ID for the thing @param thing_id The ID of the thing @return The thing if found or nullptr when no thing has been found - @note The use of the network ID is likely to disappear in future versions. """ for thing in self.things: - if thing is not None: - #if thing.network_id == network_id and thing.id == thing_id: - if thing.id == thing_id: - return thing + if thing is not None and thing.id == thing_id: + return thing return None def Remove(self, thing): diff --git a/ParticipantUDP.py b/ParticipantUDP.py index d0ec54a..00bce1f 100644 --- a/ParticipantUDP.py +++ b/ParticipantUDP.py @@ -27,8 +27,6 @@ class ParticipantUDP(Participant): """ buffer = None - ## The network ID of the participant - network_id = None nextPublishMe = 0 others = None thread = None @@ -54,7 +52,6 @@ class ParticipantUDP(Participant): if ip_address is not None: self.others.append(Participant(ip_address, port)) - # self.network_id = 0 self.buffer = bytearray(256) # self.thing_msg_processors = {} # self.new_thing_handlers = [] @@ -88,7 +85,6 @@ class ParticipantUDP(Participant): def AddParticipant(self, ip_address, port): print(f'{self.name} Add participant {ip_address} {port}') remote_participant = Participant(ip_address = ip_address, port = port) - remote_participant.network_id = len(self.others) self.others.append(remote_participant) return remote_participant @@ -98,21 +94,18 @@ class ParticipantUDP(Participant): if self.isolated == False: if self.publishInterval > 0 and currentTimeMs > self.nextPublishMe: - msg = ParticipantMsg(self.network_id) + msg = ParticipantMsg() if self.others.count == 0: self.Publish(msg) else: for other_participant in self.others: self.Send(other_participant, msg) - print(f'Publish ParticipantMsg {self.network_id}') + print(f'Publish ParticipantMsg') self.nextPublishMe = currentTimeMs + self.publishInterval for thing in self.things: thing.Update(currentTimeMs) - # pose_msg = PoseMsg(self.network_id, thing) - # for other in self.others: - # self.Send(other, pose_msg) super().Update(currentTimeMs) @@ -121,11 +114,11 @@ class ParticipantUDP(Participant): #region Send def SendThingInfo(self, owner, thing, recursively: bool = False): - self.Send(owner, ThingMsg(self.network_id, thing)) - self.Send(owner, NameMsg(self.network_id, thing)) - self.Send(owner, ModelUrlMsg(self.network_id, thing)) - self.Send(owner, PoseMsg(self.network_id, thing, True)) - self.Send(owner, BinaryMsg(self.network_id, thing)) + self.Send(owner, ThingMsg(thing)) + self.Send(owner, NameMsg(thing)) + self.Send(owner, ModelUrlMsg(thing)) + self.Send(owner, PoseMsg(thing, True)) + self.Send(owner, BinaryMsg(thing)) if recursively: for child in thing.children: @@ -189,29 +182,17 @@ class ParticipantUDP(Participant): pass def ProcessNetworkIdMsg(self, sender, msg: NetworkIdMsg): - print(f'{self.name} receive network id {self.network_id} -> {msg.network_id}') - if self.network_id != msg.network_id: - self.network_id = msg.network_id - print(f'sending all things {len(self.things)}') - for thing in self.things: - if thing.parent is None: - self.SendThingInfo(sender, thing, recursively=True) - # self.Send(NameMsg(self.network_id, thing)) + print(f'{self.name} receive network id') + print(f'sending all things {len(self.things)}') + for thing in self.things: + if thing.parent is None: + self.SendThingInfo(sender, thing, recursively=True) def ProcessInvestigateMsg(self, data: bytearray): pass def ProcessThingMsg(self, msg: ThingMsg): - print(f'received thing {msg.network_id} {msg.thing_id}') - # if msg.thing_type in self.thing_msg_processors: - # constructor = self.thing_msg_processors[msg.thing_type] - # constructor(msg.network_id, msg.thing_id) - - # # not really 'new' thing, but it is a start - # thing = Thing.Get(msg.network_id, msg.thing_id) - # if thing is not None: - # for handler in self.new_thing_handlers: - # handler(thing) + print(f'received thing {msg.thing_id}') def ProcessNameMsg(self, msg: NameMsg): print(f'received name {msg.name}') @@ -221,20 +202,8 @@ class ParticipantUDP(Participant): def ProcessBinaryMsg(self, msg: BinaryMsg): # print('received binary data') - thing: Thing = self.Get(msg.network_id, msg.thing_id) + thing: Thing = self.Get(msg.thing_id) if thing != None: thing.ProcessBinary(msg.data) - def Register(self, constructor, thing_type): - self.thing_msg_processors[thing_type] = constructor - - def OnNewThing(self, event_handler): - self.new_thing_handlers.append(event_handler) - - def OnNewThingType(self, thing_type, event_handler): - def ConditionalHandler(thing): - if thing.type == thing_type: - event_handler(thing) - self.new_thing_handlers.append(ConditionalHandler) - #endregion \ No newline at end of file diff --git a/Participants/SiteServer.py b/Participants/SiteServer.py index f5eead1..0e09168 100644 --- a/Participants/SiteServer.py +++ b/Participants/SiteServer.py @@ -18,35 +18,12 @@ class SiteServer(ParticipantUDP): @param port The UDP port on which communication is received """ super().__init__(ip_address = "127.0.0.1", port = port) - # self.ip_address = "0.0.0.0" - # self.port = port - # self.local_port = port self.isolated = False # site servers are never isolated - self.remote_site = None # site servers never have remote sites - - # self.others = [] - # self.network_id = 0 - # self.buffer = bytearray(256) - # self.thing_msg_processors = {} - # self.new_thing_handlers = [] self.publishInterval = 0 - # self.udp_socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) - # self.udp_socket.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) - # self.udp_socket.bind(("0.0.0.0", self.local_port)) - - # self.thread = threading.Thread(target = self.Receiver) - # self.thread.daemon = True - # self.thread.start() - - self.Register(TemperatureSensor, Thing.Type.TemperatureSensor) - def ProcessParticipantMsg(self, sender, msg): - if msg.network_id == 0: - print(f'{self.name} received New Client -> {sender.network_id}') - self.Send(sender, NetworkIdMsg(sender.network_id)) - # else: - # print(f'{self.name} Client') + print(f'{self.name} received Participant ') + self.Send(sender, NetworkIdMsg()) def ProcessNetworkId(self, msg): pass \ No newline at end of file diff --git a/Thing.py b/Thing.py index c009eed..802e217 100644 --- a/Thing.py +++ b/Thing.py @@ -30,7 +30,7 @@ class Thing: LinearVelocity = 0x04 AngularVelocity = 0x08 - def __init__(self, owner = None, network_id = 0, thing_id = 0, type = Type.Undetermined, parent = None, name = None): + def __init__(self, owner = None, thing_id = 0, type = Type.Undetermined, parent = None, name = None): """! Create a new thing """ ## The parent thing @@ -46,9 +46,6 @@ class Thing: ## The participant owning this thing self.owner = owner - ## The network ID of this thing - ## @note This field will likely disappear in future versions - self.network_id = network_id ## The ID of the thing self.id = thing_id ## The type of the thing @@ -104,14 +101,10 @@ class Thing: self.angular_velocity_updated = True def Update(self, currentTime): - pose_msg = PoseMsg(self.network_id, self) + pose_msg = PoseMsg(self) for other in self.owner.others: self.owner.Send(other, pose_msg) - def ProcessBinary(self, data): - print('default binary processor') - pass - def SetParent(self, parent): if parent is None: parentThing = self.parent @@ -132,4 +125,8 @@ class Thing: self.children.remove(child) def GenerateBinary(self, buffer, ix_ref): - pass \ No newline at end of file + pass + + def ProcessBinary(self, data): + print('default binary processor') + pass diff --git a/Things/TemperatureSensor.py b/Things/TemperatureSensor.py index 28f7067..5a6f650 100644 --- a/Things/TemperatureSensor.py +++ b/Things/TemperatureSensor.py @@ -2,8 +2,8 @@ from Thing import Thing from Messages import LowLevelMessages class TemperatureSensor(Thing): - def __init__(self, network_id, thing_id): - super().__init__(network_id, thing_id, type = Thing.Type.TemperatureSensor) + def __init__(self, thing_id): + super().__init__(thing_id, type = Thing.Type.TemperatureSensor) self.temp = 0 self._watchers = [] diff --git a/test/BB2B_dummytest.py b/test/BB2B_dummytest.py index f418de9..5b7999b 100644 --- a/test/BB2B_dummytest.py +++ b/test/BB2B_dummytest.py @@ -4,7 +4,7 @@ from pathlib import Path sys.path.append(str(Path(__file__).resolve().parent.parent)) import time -from SiteServer import SiteServer +from Participants.SiteServer import SiteServer from ParticipantUDP import ParticipantUDP from Thing import * from Things.DifferentialDrive import DifferentialDrive diff --git a/test/thing_test.py b/test/thing_test.py index 3bf9031..2350379 100644 --- a/test/thing_test.py +++ b/test/thing_test.py @@ -9,7 +9,7 @@ import unittest from Thing import Thing from ParticipantUDP import ParticipantUDP -from SiteServer import SiteServer +from Participants.SiteServer import SiteServer class ThingTest(unittest.TestCase):