spynnaker.pyNN.protocols package

Module contents

class spynnaker.pyNN.protocols.MUNICH_MODES(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

Types of modes supported by this protocol.

BALL_BALANCER = 3
FREE = 5
MY_ORO_BOTICS = 4
PUSH_BOT = 1
RESET_TO_DEFAULT = 0
SPOMNIBOT = 2
class spynnaker.pyNN.protocols.MunichIoEthernetProtocol

Bases: object

Implementation of the Munich robot IO protocol, communicating over Ethernet.

static disable_motor()[source]
static disable_retina()[source]
static enable_motor()[source]
static enable_retina()[source]
static laser_active_time(active_time)[source]
static laser_frequency(frequency)[source]
static laser_total_period(total_period)[source]
static led_back_active_time(active_time)[source]
static led_frequency(frequency)[source]
static led_front_active_time(active_time)[source]
static led_total_period(total_period)[source]
static motor_0_leaky_velocity(velocity)[source]
static motor_0_permanent_velocity(velocity)[source]
static motor_1_leaky_velocity(velocity)[source]
static motor_1_permanent_velocity(velocity)[source]
static set_retina_transmission(event_format)[source]
static speaker_active_time(active_time)[source]
static speaker_frequency(frequency)[source]
static speaker_total_period(total_period)[source]
class spynnaker.pyNN.protocols.MunichIoSpiNNakerLinkProtocol(mode, instance_key=None, uart_id=0)

Bases: object

Provides Multicast commands for the Munich SpiNNaker-Link protocol.

Parameters:
  • mode (MUNICH_MODES) – The mode of operation of the protocol

  • instance_key (int or None) – The optional instance key to use

  • uart_id (int) – The ID of the UART when needed

add_payload_logic_to_current_output(payload, time=None)[source]
property add_payload_logic_to_current_output_key
bias_values(bias_id, bias_value, time=None)[source]
property bias_values_key
configure_master_key(new_key, time=None)[source]
property configure_master_key_key
disable_retina(time=None)[source]
property disable_retina_key
property enable_disable_motor_key
generic_motor0_raw_output_leak_to_0(pwm_signal, time=None)[source]
property generic_motor0_raw_output_leak_to_0_key
generic_motor0_raw_output_permanent(pwm_signal, time=None)[source]
property generic_motor0_raw_output_permanent_key
generic_motor1_raw_output_leak_to_0(pwm_signal, time=None)[source]
property generic_motor1_raw_output_leak_to_0_key
generic_motor1_raw_output_permanent(pwm_signal, time=None)[source]
property generic_motor1_raw_output_permanent_key
generic_motor_disable(time=None)[source]
generic_motor_enable(time=None)[source]
generic_motor_total_period(time_in_ms, time=None)[source]
property generic_motor_total_period_key
property instance_key

The key of this instance of the protocol.

Return type:

int

property master_slave_key
master_slave_set_master_clock_active(time=None)[source]
master_slave_set_master_clock_not_started(time=None)[source]
master_slave_set_slave(time=None)[source]
master_slave_use_internal_counter(time=None)[source]
property mode
Return type:

MUNICH_MODES

poll_individual_sensor_continuously(sensor_id, time_in_ms, time=None)[source]
property poll_individual_sensor_continuously_key
poll_sensors_once(sensor_id, time=None)[source]
property poll_sensors_once_key
protocol_instance = 0
push_bot_laser_config_active_time(active_time, time=None)[source]
property push_bot_laser_config_active_time_key
push_bot_laser_config_total_period(total_period, time=None)[source]
property push_bot_laser_config_total_period_key
push_bot_laser_set_frequency(frequency, time=None)[source]
property push_bot_laser_set_frequency_key
push_bot_led_back_active_time(active_time, time=None)[source]
property push_bot_led_back_active_time_key
push_bot_led_front_active_time(active_time, time=None)[source]
property push_bot_led_front_active_time_key
push_bot_led_set_frequency(frequency, time=None)[source]
property push_bot_led_set_frequency_key
push_bot_led_total_period(total_period, time=None)[source]
property push_bot_led_total_period_key
push_bot_motor_0_leaking_towards_zero(velocity, time=None)[source]
property push_bot_motor_0_leaking_towards_zero_key
push_bot_motor_0_permanent(velocity, time=None)[source]
property push_bot_motor_0_permanent_key
push_bot_motor_1_leaking_towards_zero(velocity, time=None)[source]
property push_bot_motor_1_leaking_towards_zero_key
push_bot_motor_1_permanent(velocity, time=None)[source]
property push_bot_motor_1_permanent_key
push_bot_speaker_config_active_time(active_time, time=None)[source]
property push_bot_speaker_config_active_time_key
push_bot_speaker_config_total_period(total_period, time=None)[source]
property push_bot_speaker_config_total_period_key
push_bot_speaker_set_melody(melody, time=None)[source]
property push_bot_speaker_set_melody_key
push_bot_speaker_set_tone(frequency, time=None)[source]
property push_bot_speaker_set_tone_key
pwm_pin_output_timer_a_channel_0_ratio(timer_period, time=None)[source]
property pwm_pin_output_timer_a_channel_0_ratio_key
pwm_pin_output_timer_a_channel_1_ratio(timer_period, time=None)[source]
property pwm_pin_output_timer_a_channel_1_ratio_key
pwm_pin_output_timer_a_duration(timer_period, time=None)[source]
property pwm_pin_output_timer_a_duration_key
pwm_pin_output_timer_b_channel_0_ratio(timer_period, time=None)[source]
property pwm_pin_output_timer_b_channel_0_ratio_key
pwm_pin_output_timer_b_channel_1_ratio(timer_period, time=None)[source]
property pwm_pin_output_timer_b_channel_1_ratio_key
pwm_pin_output_timer_b_duration(timer_period, time=None)[source]
property pwm_pin_output_timer_b_duration_key
pwm_pin_output_timer_c_channel_0_ratio(timer_period, time=None)[source]
property pwm_pin_output_timer_c_channel_0_ratio_key
pwm_pin_output_timer_c_channel_1_ratio(timer_period, time=None)[source]
property pwm_pin_output_timer_c_channel_1_ratio_key
pwm_pin_output_timer_c_duration(timer_period, time=None)[source]
property pwm_pin_output_timer_c_duration_key
query_state_of_io_lines(time=None)[source]
property query_state_of_io_lines_key
remove_payload_logic_to_current_output(payload, time=None)[source]
property remove_payload_logic_to_current_output_key
reset_retina(time=None)[source]
property reset_retina_key
sensor_transmission_key(sensor_id)[source]
static sent_mode_command()[source]

True if the mode command has ever been requested by any instance.

set_mode(time=None)[source]
property set_mode_key
set_output_pattern_for_payload(payload, time=None)[source]
property set_output_pattern_for_payload_key
set_payload_pins_to_high_impedance(payload, time=None)[source]
property set_payload_pins_to_high_impedance_key
set_retina_key(new_key, time=None)[source]
property set_retina_key_key
set_retina_transmission(retina_key=RetinaKey.NATIVE_128_X_128, retina_payload=None, time=None)[source]

Set the retina transmission key.

Parameters:
  • retina_key (RetinaKey) – the new key for the retina

  • retina_payload (RetinaPayload or None) – the new payload for the set retina key command packet

  • time (int or float or None) – when to transmit this packet

Returns:

the command to send

Return type:

MultiCastCommand

property set_retina_transmission_key
turn_off_sensor_reporting(sensor_id, time=None)[source]
property turn_off_sensor_reporting_key
property uart_id
Return type:

int

class spynnaker.pyNN.protocols.RetinaKey(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

DOWNSAMPLE_16_X_16 = 268435456
DOWNSAMPLE_32_X_32 = 201326592
DOWNSAMPLE_64_X_64 = 134217728
FIXED_KEY = 0
NATIVE_128_X_128 = 67108864
property bits_per_coordinate
property n_neurons
property pixels
class spynnaker.pyNN.protocols.RetinaPayload(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: Enum

ABSOLUTE_2_BYTE_TIMESTAMPS = 1073741824
ABSOLUTE_3_BYTE_TIMESTAMPS = 1610612736
ABSOLUTE_4_BYTE_TIMESTAMPS = 2147483648
DELTA_TIMESTAMPS = 536870912
EVENTS_IN_PAYLOAD = 0
NO_PAYLOAD = 0
property n_payload_bytes