chore: add extra function description
This commit is contained in:
@@ -23,6 +23,9 @@ class RICommandAgent(Agent):
|
||||
|
||||
class SendCommandsBehaviour(CyclicBehaviour):
|
||||
async def run(self):
|
||||
"""
|
||||
Run the command publishing loop indefinetely.
|
||||
"""
|
||||
assert self.agent is not None
|
||||
# Get a message internally (with topic command)
|
||||
topic, body = await self.agent.subsocket.recv_multipart()
|
||||
@@ -39,6 +42,9 @@ class RICommandAgent(Agent):
|
||||
logger.error("Error processing message: %s", e)
|
||||
|
||||
async def setup(self):
|
||||
"""
|
||||
Setup the command agent
|
||||
"""
|
||||
logger.info("Setting up %s", self.jid)
|
||||
|
||||
# To the robot
|
||||
|
||||
@@ -24,6 +24,9 @@ class RICommunicationAgent(Agent):
|
||||
|
||||
class ListenBehaviour(CyclicBehaviour):
|
||||
async def run(self):
|
||||
"""
|
||||
Run the listening (ping) loop indefinetely.
|
||||
"""
|
||||
assert self.agent is not None
|
||||
|
||||
# We need to listen and sent pings.
|
||||
@@ -56,6 +59,9 @@ class RICommunicationAgent(Agent):
|
||||
|
||||
|
||||
async def setup(self, max_retries: int = 5):
|
||||
"""
|
||||
Try to setup the communication agent, we have 5 retries in case we dont have a response yet.
|
||||
"""
|
||||
logger.info("Setting up %s", self.jid)
|
||||
retries = 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user