Files
pepperplus-ri/src/robot_interface/endpoints/receiver_base.py
2026-01-29 15:57:22 +01:00

29 lines
895 B
Python

# -*- coding: utf-8 -*-
"""
This program has been developed by students from the bachelor Computer Science at Utrecht
University within the Software Project course.
© Copyright Utrecht University (Department of Information and Computing Sciences)
"""
from abc import ABCMeta, abstractmethod
from robot_interface.endpoints.socket_base import SocketBase
class ReceiverBase(SocketBase, object):
"""Base class for receivers associated with a ZeroMQ socket."""
__metaclass__ = ABCMeta
@abstractmethod
def handle_message(self, message):
"""
Handle a message with the receiver.
:param message: The message to handle, must contain properties "endpoint" and "data".
:type message: dict
:return: A response message or None if this type of receiver doesn't publish.
:rtype: dict | None
"""
raise NotImplementedError()