Class ChipBean

java.lang.Object
uk.ac.manchester.spinnaker.machine.bean.ChipBean

public class ChipBean extends Object
Descriptor used for converting JSON into a Chip.
Author:
Christian-B
  • Field Details

    • location

      @Valid public final @Valid ChipLocation location
      The location of this Chip.
    • details

      @Valid public final @Valid ChipDetails details
      The details for this Chip.
  • Constructor Details

    • ChipBean

      public ChipBean(int x, int y, ChipDetails details, ChipResources resources)
      Make an instance.
      Parameters:
      x - X coordinate of the Chip
      y - Y coordinate of the Chip.
      details - The details of what makes this chip special.
      resources - Any resources specifically declared for this Chip. May be null.
  • Method Details

    • getLocation

      public ChipLocation getLocation()
      Returns:
      Location of the chip.
    • getResources

      public ChipResources getResources()
      Returns:
      the resources
    • getDetails

      public ChipDetails getDetails()
      Returns:
      the resources
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • addDefaults

      public void addDefaults(MachineBean bean)
      Adds the suitable default ChipResources. Based on if the Chip is an Ethernet one or not this will add the suitable resources. Any values specifically set for a Chip have preference over the default values.
      Parameters:
      bean - Main bean to copy defaults from.