# Path: imusim/platforms/base.py
# class Component(object):
#     """
#     Base class for simulated hardware components.
#     """
# 
#     __metaclass__ = ABCMeta
# 
#     def __init__(self, platform):
#         """
#         Initialise simulated component.
# 
#         @param platform: The L{Platform} this component will be attached to.
#         """
#         self.platform = platform
# 
#     def _simulationChange(self):
#         """
#         Called when the platform is assigned a new simulation.
#         """
#         pass
# 
#     def _trajectoryChange(self):
#         """
#         Called when the platform is assigned a new trajectory.
#         """
#         pass


from abc import ABCMeta, abstractmethod, abstractproperty
from imusim.platforms.base import Component

class RadioPacket(dict):
    """
    Class to represent a radio packet.

    Payload fields should be added as dictionary items.

    Metadata relevant to radio simulation should be added as attributes.
    """

    __metaclass__ = ABCMeta

    def __init__(self, *args, **kwargs):
        dict.__init__(self, *args, **kwargs)
        """
        Construct a radio packet.
        """
        pass

    @abstractproperty
    def bytes(self):
        pass

class Radio(Component):
    """
    Base class for radios.
    """
    __metaclass__ = ABCMeta

    def __init__(self, platform):

# Path: imusim/platforms/base.py
# class Component(object):
#     """
#     Base class for simulated hardware components.
#     """
# 
#     __metaclass__ = ABCMeta
# 
#     def __init__(self, platform):
#         """
#         Initialise simulated component.
# 
#         @param platform: The L{Platform} this component will be attached to.
#         """
#         self.platform = platform
# 
#     def _simulationChange(self):
#         """
#         Called when the platform is assigned a new simulation.
#         """
#         pass
# 
#     def _trajectoryChange(self):
#         """
#         Called when the platform is assigned a new trajectory.
#         """
#         pass


# Path: imusim/platforms/radios.py
from abc import ABCMeta, abstractmethod, abstractproperty
from imusim.platforms.base import Component


class RadioPacket(dict):
    """
    Class to represent a radio packet.

    Payload fields should be added as dictionary items.

    Metadata relevant to radio simulation should be added as attributes.
    """

    __metaclass__ = ABCMeta

    def __init__(self, *args, **kwargs):
        dict.__init__(self, *args, **kwargs)
        """
        Construct a radio packet.
        """
        pass

    @abstractproperty
    def bytes(self):
        pass

class Radio(Component):
    """
    Base class for radios.
    """
    __metaclass__ = ABCMeta

    def __init__(self, platform):

        Component.__init__(self, platform)