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]

Bases: spynnaker.pyNN.external_devices_models.abstract_multicast_controllable_device.AbstractMulticastControllableDevice

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_send_type

The type of data to be sent.

Return type:SendType
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

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

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

spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_ethernet_speaker_device module

spynnaker.pyNN.external_devices_models.push_bot.push_bot_ethernet.push_bot_retina_connection module

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
translate_control_packet(multicast_packet)[source]

Translate a multicast packet received over Ethernet and send appropriate messages to the external device

Parameters:multicast_packet (spinnman.messages.eieio.data_messages.AbstractEIEIODataElement) – A received multicast packet

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

close()[source]

See spinnman.connections.Connection.close()

get_receive_method()[source]

Get the method that receives for this connection

is_connected()[source]

See spinnman.connections.Connection.is_connected()

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
send(data)[source]

Send data down this connection

Parameters:data (bytestring) – The data to be sent
Raises:SpinnmanIOException – If there is an error sending the data
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