spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet package¶
Submodules¶
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_device module¶
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_device.
PushBotEthernetDevice
(protocol, device, uses_payload, time_between_send)[source]¶ -
An arbitrary PushBot device
Parameters: - protocol – The protocol instance to get commands from
- device – The Enum instance of the device to control
- uses_payload – True if the device uses a payload for control
-
device_control_key
¶ The key that must be sent to the device to control it
Return type: int
-
device_control_max_value
¶ The maximum value to send to the device
Return type: float
-
device_control_min_value
¶ The minimum value to send to the device
Return type: float
-
device_control_partition_id
¶ A partition ID to give to an outgoing edge partition that will control this device
Return type: str
-
device_control_timesteps_between_sending
¶ The number of timesteps between sending commands to the device. This defines the “sampling interval” for the device.
Return type: int
-
device_control_uses_payload
¶ True if the control of the device accepts an arbitrary valued payload, the value of which will change the devices behaviour
Return type: bool
-
protocol
¶ The protocol instance, for use in the subclass
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_laser_device module¶
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_laser_device.
PushBotEthernetLaserDevice
(laser, protocol, start_active_time=None, start_total_period=None, start_frequency=None, timesteps_between_send=None)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_device.PushBotEthernetDevice
,spinn_front_end_common.abstract_models.abstract_send_me_multicast_commands_vertex.AbstractSendMeMulticastCommandsVertex
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
The Laser of a PushBot
Parameters: - laser – The PushBotLaser value to control
- protocol – The protocol instance to get commands from
- start_active_time – The “active time” value to send at the start
- start_total_period – The “total period” value to send at the start
- start_frequency – The “frequency” to send at the start
- timesteps_between_send – The number of timesteps between sending commands to the device, or None to use the default
-
pause_stop_commands
¶ The commands needed when pausing or stopping simulation
Return type: iterable(MultiCastCommand)
-
set_command_protocol
(command_protocol)[source]¶ Set the protocol use to send setup and shutdown commands, separately from the protocol used to control the device
-
start_resume_commands
¶ The commands needed when starting or resuming simulation
Return type: iterable(MultiCastCommand)
-
timed_commands
¶ The commands to be sent at given times in the simulation
Return type: iterable(MultiCastCommand)
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_led_device module¶
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_led_device.
PushBotEthernetLEDDevice
(led, protocol, start_active_time_front=None, start_active_time_back=None, start_total_period=None, start_frequency=None, timesteps_between_send=None)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_device.PushBotEthernetDevice
,spinn_front_end_common.abstract_models.abstract_send_me_multicast_commands_vertex.AbstractSendMeMulticastCommandsVertex
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
The LED of a PushBot
Parameters: - led – The PushBotLED parameter to control
- protocol – The protocol instance to get commands from
- start_active_time_front – The “active time” to set for the front LED at the start
- start_active_time_back – The “active time” to set for the back LED at the start
- start_total_period – The “total period” to set at the start
- start_frequency – The “frequency” to set at the start
- timesteps_between_send – The number of timesteps between sending commands to the device, or None to use the default
-
pause_stop_commands
¶ The commands needed when pausing or stopping simulation
Return type: iterable(MultiCastCommand)
-
set_command_protocol
(command_protocol)[source]¶ Set the protocol use to send setup and shutdown commands, separately from the protocol used to control the device
-
start_resume_commands
¶ The commands needed when starting or resuming simulation
Return type: iterable(MultiCastCommand)
-
timed_commands
¶ The commands to be sent at given times in the simulation
Return type: iterable(MultiCastCommand)
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_motor_device module¶
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_motor_device.
PushBotEthernetMotorDevice
(motor, protocol, timesteps_between_send=None)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_device.PushBotEthernetDevice
,spinn_front_end_common.abstract_models.abstract_send_me_multicast_commands_vertex.AbstractSendMeMulticastCommandsVertex
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
The motor of a PushBot
Parameters: - motor – a PushBotMotor value to indicate the motor to control
- protocol – The protocol used to control the device
- timesteps_between_send – The number of timesteps between sending commands to the device, or None to use the default
-
pause_stop_commands
¶ The commands needed when pausing or stopping simulation
Return type: iterable(MultiCastCommand)
-
set_command_protocol
(command_protocol)[source]¶ Set the protocol use to send setup and shutdown commands, separately from the protocol used to control the device
-
start_resume_commands
¶ The commands needed when starting or resuming simulation
Return type: iterable(MultiCastCommand)
-
timed_commands
¶ The commands to be sent at given times in the simulation
Return type: iterable(MultiCastCommand)
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_retina_device module¶
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_retina_device.
PushBotEthernetRetinaDevice
(protocol, resolution, pushbot_ip_address, pushbot_port=56000, injector_port=None, local_host=None, local_port=None, retina_injector_label='PushBotRetinaInjector')[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.abstract_push_bot_retina_device.AbstractPushBotRetinaDevice
,spynnaker.pyNN.external_devices_models.abstract_ethernet_sensor.AbstractEthernetSensor
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_speaker_device module¶
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_speaker_device.
PushBotEthernetSpeakerDevice
(speaker, protocol, start_active_time=0, start_total_period=0, start_frequency=0, start_melody=None, timesteps_between_send=None)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_device.PushBotEthernetDevice
,spinn_front_end_common.abstract_models.abstract_send_me_multicast_commands_vertex.AbstractSendMeMulticastCommandsVertex
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
The Speaker of a PushBot
Parameters: - speaker – The PushBotSpeaker value to control
- protocol – The protocol instance to get commands from
- start_active_time – The “active time” to set at the start
- start_total_period – The “total period” to set at the start
- start_frequency – The “frequency” to set at the start
- start_melody – The “melody” to set at the start
- timesteps_between_send – The number of timesteps between sending commands to the device, or None to use the default
-
pause_stop_commands
¶ The commands needed when pausing or stopping simulation
Return type: iterable(MultiCastCommand)
-
set_command_protocol
(command_protocol)[source]¶ Set the protocol use to send setup and shutdown commands, separately from the protocol used to control the device
-
start_resume_commands
¶ The commands needed when starting or resuming simulation
Return type: iterable(MultiCastCommand)
-
timed_commands
¶ The commands to be sent at given times in the simulation
Return type: iterable(MultiCastCommand)
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_retina_connection module¶
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_retina_connection.
PushBotRetinaConnection
(retina_injector_label, pushbot_wifi_connection, resolution=<PushBotRetinaResolution.NATIVE_128_X_128: <RetinaKey.NATIVE_128_X_128: 67108864>>, local_host=None, local_port=None)[source]¶ Bases:
spynnaker.pyNN.connections.spynnaker_live_spikes_connection.SpynnakerLiveSpikesConnection
A connection that sends spikes from the PushBot retina to a spike injector in SpiNNaker. Note that this assumes a packet format of 16-bits per retina event.
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_translator module¶
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_translator.
PushBotTranslator
(protocol, pushbot_wifi_connection)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.abstract_ethernet_translator.AbstractEthernetTranslator
Translates packets between PushBot Multicast packets and PushBot Wi-Fi Commands
Parameters: - protocol – The instance of the PushBot protocol to get keys from
- pushbot_wifi_connection – A Wi-Fi connection to the PushBot
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_wifi_connection module¶
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_wifi_connection.
PushBotWIFIConnection
(remote_host, remote_port=56000)[source]¶ Bases:
spinnman.connections.abstract_classes.connection.Connection
,spinnman.connections.abstract_classes.listenable.Listenable
A connection to a PushBot via Wi-Fi.
Parameters: - remote_host (str) – The IP address of the PushBot
- remote_port (int) – The port number of the PushBot (default 56000)
Raises: spinnman.exceptions.SpinnmanIOException – If there is an error setting up the communication channel
-
RECV_SIZE
= 1024¶
-
is_ready_to_receive
(timeout=0)[source]¶ Determines if there is an SCP packet to be read without blocking
Parameters: timeout (int) – The time to wait before returning if the connection is not ready Returns: True if there is an SCP packet to be read Return type: bool
-
local_ip_address
¶ The local IP address to which the connection is bound.
Returns: The local IP address as a dotted string, e.g. 0.0.0.0 Return type: str Raises: None – No known exceptions are thrown
-
local_port
¶ The local port to which the connection is bound.
Returns: The local port number Return type: int Raises: None – No known exceptions are thrown
-
receive
(timeout=None)[source]¶ Receive data from the connection
Parameters: timeout (float or None) – The timeout, or None to wait forever
Returns: The data received
Return type: bytestring
Raises: - SpinnmanTimeoutException – If a timeout occurs before any data is received
- SpinnmanIOException – If an error occurs receiving the data
-
remote_ip_address
¶ The remote IP address to which the connection is connected.
Returns: The remote IP address as a dotted string, or None if not connected remotely Return type: str
-
remote_port
¶ The remote port to which the connection is connected.
Returns: The remote port, or None if not connected remotely Return type: int
-
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_wifi_connection.
get_pushbot_wifi_connection
(remote_host, remote_port=56000)[source]¶ Get an existing connection to a PushBot, or make a new one.
Parameters: - remote_host (str) – The IP address of the PushBot
- remote_port (int) – The port number of the PushBot (default 56000)
Module contents¶
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.
PushBotEthernetDevice
(protocol, device, uses_payload, time_between_send)[source]¶ -
An arbitrary PushBot device
Parameters: - protocol – The protocol instance to get commands from
- device – The Enum instance of the device to control
- uses_payload – True if the device uses a payload for control
-
device_control_key
¶ The key that must be sent to the device to control it
Return type: int
-
device_control_max_value
¶ The maximum value to send to the device
Return type: float
-
device_control_min_value
¶ The minimum value to send to the device
Return type: float
-
device_control_partition_id
¶ A partition ID to give to an outgoing edge partition that will control this device
Return type: str
-
device_control_timesteps_between_sending
¶ The number of timesteps between sending commands to the device. This defines the “sampling interval” for the device.
Return type: int
-
device_control_uses_payload
¶ True if the control of the device accepts an arbitrary valued payload, the value of which will change the devices behaviour
Return type: bool
-
protocol
¶ The protocol instance, for use in the subclass
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.
PushBotEthernetLaserDevice
(laser, protocol, start_active_time=None, start_total_period=None, start_frequency=None, timesteps_between_send=None)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_device.PushBotEthernetDevice
,spinn_front_end_common.abstract_models.abstract_send_me_multicast_commands_vertex.AbstractSendMeMulticastCommandsVertex
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
The Laser of a PushBot
Parameters: - laser – The PushBotLaser value to control
- protocol – The protocol instance to get commands from
- start_active_time – The “active time” value to send at the start
- start_total_period – The “total period” value to send at the start
- start_frequency – The “frequency” to send at the start
- timesteps_between_send – The number of timesteps between sending commands to the device, or None to use the default
-
pause_stop_commands
¶ The commands needed when pausing or stopping simulation
Return type: iterable(MultiCastCommand)
-
set_command_protocol
(command_protocol)[source]¶ Set the protocol use to send setup and shutdown commands, separately from the protocol used to control the device
-
start_resume_commands
¶ The commands needed when starting or resuming simulation
Return type: iterable(MultiCastCommand)
-
timed_commands
¶ The commands to be sent at given times in the simulation
Return type: iterable(MultiCastCommand)
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.
PushBotEthernetLEDDevice
(led, protocol, start_active_time_front=None, start_active_time_back=None, start_total_period=None, start_frequency=None, timesteps_between_send=None)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_device.PushBotEthernetDevice
,spinn_front_end_common.abstract_models.abstract_send_me_multicast_commands_vertex.AbstractSendMeMulticastCommandsVertex
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
The LED of a PushBot
Parameters: - led – The PushBotLED parameter to control
- protocol – The protocol instance to get commands from
- start_active_time_front – The “active time” to set for the front LED at the start
- start_active_time_back – The “active time” to set for the back LED at the start
- start_total_period – The “total period” to set at the start
- start_frequency – The “frequency” to set at the start
- timesteps_between_send – The number of timesteps between sending commands to the device, or None to use the default
-
pause_stop_commands
¶ The commands needed when pausing or stopping simulation
Return type: iterable(MultiCastCommand)
-
set_command_protocol
(command_protocol)[source]¶ Set the protocol use to send setup and shutdown commands, separately from the protocol used to control the device
-
start_resume_commands
¶ The commands needed when starting or resuming simulation
Return type: iterable(MultiCastCommand)
-
timed_commands
¶ The commands to be sent at given times in the simulation
Return type: iterable(MultiCastCommand)
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.
PushBotEthernetMotorDevice
(motor, protocol, timesteps_between_send=None)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_device.PushBotEthernetDevice
,spinn_front_end_common.abstract_models.abstract_send_me_multicast_commands_vertex.AbstractSendMeMulticastCommandsVertex
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
The motor of a PushBot
Parameters: - motor – a PushBotMotor value to indicate the motor to control
- protocol – The protocol used to control the device
- timesteps_between_send – The number of timesteps between sending commands to the device, or None to use the default
-
pause_stop_commands
¶ The commands needed when pausing or stopping simulation
Return type: iterable(MultiCastCommand)
-
set_command_protocol
(command_protocol)[source]¶ Set the protocol use to send setup and shutdown commands, separately from the protocol used to control the device
-
start_resume_commands
¶ The commands needed when starting or resuming simulation
Return type: iterable(MultiCastCommand)
-
timed_commands
¶ The commands to be sent at given times in the simulation
Return type: iterable(MultiCastCommand)
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.
PushBotEthernetRetinaDevice
(protocol, resolution, pushbot_ip_address, pushbot_port=56000, injector_port=None, local_host=None, local_port=None, retina_injector_label='PushBotRetinaInjector')[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.abstract_push_bot_retina_device.AbstractPushBotRetinaDevice
,spynnaker.pyNN.external_devices_models.abstract_ethernet_sensor.AbstractEthernetSensor
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.
PushBotEthernetSpeakerDevice
(speaker, protocol, start_active_time=0, start_total_period=0, start_frequency=0, start_melody=None, timesteps_between_send=None)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_device.PushBotEthernetDevice
,spinn_front_end_common.abstract_models.abstract_send_me_multicast_commands_vertex.AbstractSendMeMulticastCommandsVertex
,spinn_front_end_common.abstract_models.impl.provides_key_to_atom_mapping_impl.ProvidesKeyToAtomMappingImpl
The Speaker of a PushBot
Parameters: - speaker – The PushBotSpeaker value to control
- protocol – The protocol instance to get commands from
- start_active_time – The “active time” to set at the start
- start_total_period – The “total period” to set at the start
- start_frequency – The “frequency” to set at the start
- start_melody – The “melody” to set at the start
- timesteps_between_send – The number of timesteps between sending commands to the device, or None to use the default
-
pause_stop_commands
¶ The commands needed when pausing or stopping simulation
Return type: iterable(MultiCastCommand)
-
set_command_protocol
(command_protocol)[source]¶ Set the protocol use to send setup and shutdown commands, separately from the protocol used to control the device
-
start_resume_commands
¶ The commands needed when starting or resuming simulation
Return type: iterable(MultiCastCommand)
-
timed_commands
¶ The commands to be sent at given times in the simulation
Return type: iterable(MultiCastCommand)
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.
PushBotRetinaConnection
(retina_injector_label, pushbot_wifi_connection, resolution=<PushBotRetinaResolution.NATIVE_128_X_128: <RetinaKey.NATIVE_128_X_128: 67108864>>, local_host=None, local_port=None)[source]¶ Bases:
spynnaker.pyNN.connections.spynnaker_live_spikes_connection.SpynnakerLiveSpikesConnection
A connection that sends spikes from the PushBot retina to a spike injector in SpiNNaker. Note that this assumes a packet format of 16-bits per retina event.
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.
PushBotTranslator
(protocol, pushbot_wifi_connection)[source]¶ Bases:
spynnaker.pyNN.external_devices_models.abstract_ethernet_translator.AbstractEthernetTranslator
Translates packets between PushBot Multicast packets and PushBot Wi-Fi Commands
Parameters: - protocol – The instance of the PushBot protocol to get keys from
- pushbot_wifi_connection – A Wi-Fi connection to the PushBot
-
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.
get_pushbot_wifi_connection
(remote_host, remote_port=56000)[source]¶ Get an existing connection to a PushBot, or make a new one.
Parameters: - remote_host (str) – The IP address of the PushBot
- remote_port (int) – The port number of the PushBot (default 56000)
-
class
spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.
PushBotWIFIConnection
(remote_host, remote_port=56000)[source]¶ Bases:
spinnman.connections.abstract_classes.connection.Connection
,spinnman.connections.abstract_classes.listenable.Listenable
A connection to a PushBot via Wi-Fi.
Parameters: - remote_host (str) – The IP address of the PushBot
- remote_port (int) – The port number of the PushBot (default 56000)
Raises: spinnman.exceptions.SpinnmanIOException – If there is an error setting up the communication channel
-
RECV_SIZE
= 1024¶
-
is_ready_to_receive
(timeout=0)[source]¶ Determines if there is an SCP packet to be read without blocking
Parameters: timeout (int) – The time to wait before returning if the connection is not ready Returns: True if there is an SCP packet to be read Return type: bool
-
local_ip_address
¶ The local IP address to which the connection is bound.
Returns: The local IP address as a dotted string, e.g. 0.0.0.0 Return type: str Raises: None – No known exceptions are thrown
-
local_port
¶ The local port to which the connection is bound.
Returns: The local port number Return type: int Raises: None – No known exceptions are thrown
-
receive
(timeout=None)[source]¶ Receive data from the connection
Parameters: timeout (float or None) – The timeout, or None to wait forever
Returns: The data received
Return type: bytestring
Raises: - SpinnmanTimeoutException – If a timeout occurs before any data is received
- SpinnmanIOException – If an error occurs receiving the data
-
remote_ip_address
¶ The remote IP address to which the connection is connected.
Returns: The remote IP address as a dotted string, or None if not connected remotely Return type: str
-
remote_port
¶ The remote port to which the connection is connected.
Returns: The remote port, or None if not connected remotely Return type: int