izzy-devices documentation — izzy_devices documentation

# izzy-devices documentation

The IZZY (Intelligent Scenery Simulation Platform) project software is built around two software objects: a client and a server. An implementation of IZZY is a `client`; the offstage control and programming interface `server` has been affectionately dubbed “Mother” (a not-so-subtle nod to Alien). A `client` stores information about an IZZY device, including physical dimensions, network information installed sensor packages, and position and movement information. A `server` stores network information and a collection of `client` instances–one instance for each physical IZZY device on the network.

Note

When instantiated in software on an IZZY device, a `server` instance should not be used to hold a list of `client` devices as remote devices should not communicate to each other. A `server` instance on an IZZY device should only be used to store network information about the Mother device.

The `izzy-devices` package provides the `Client` and `Server` classes as well as enumerations for statuses for

## Client

class client.Client

  A class to store status information about IZZY devices.

  name (str)

    A user-friendly name for the device.

  uuid (UUID)

    A 64-bit unique UUID generated at device startup.

  ip_address (str)

    A string representation of the IP address of the unit.

  status (IZZYStatus)

    Current status of the device.

  last_contact (datetime)

    Holds the time of the last contact with Mother server.

  wheel_radius (float)

    The radius of a drive wheel, in mm.

  system_radius (float)

    The distance from the center of the unit to the outer edge of a drive wheel, in mm.

  line_sensor_y_offset (int)

    The distance from the center of the unit to the middle of the line sensor array, in mm.

  encoder_resolution (int)

    The number of encoder counts for one revolution of the motor drive shaft.

  motor_ratio (int)

    The gearbox reduction ratio.

  position (‘x’=int, ‘y’=int, ‘z’=int)

    A dictionary holding the current relative x,y,z position of the unit.

  heading (int)

    The relative current heading of the unit in degrees.

  speed (int)

    The current speed of the unit.

  drive_resolution (int)

    The resolution of the motor wheels, in encoder ticks per centimeter of straight-line travel.

  turn_resolution (int)

    The resolution of the motor wheels, in encoder ticks per degree of turn.

  Constructor has no parameters. Defines the drive and turn units based on default values for the Mini-IZZY test/development platform.

  set_last_contact()

    When called, sets the value of last_contact to the current time.S

## Server

class server.Server(uuid)

  A class to store status information about Mother server devices.

  status (IZZYStatus)

    Current status of the device.

  uuid (UUID)

    A 64-bit unique UUID generated at device startup.

  ip_address (str)

    A string representation of the IP address of the unit.

  clients (list[Client])

    Holds a list of the client devices found on the network.

  Ccnstructor requires a UUID parameter.

  Parameters:

    (UUID) (uuid) – A 64-bit UUID.

## Client Statuses

enum client_status.IZZYStatus(value)

  Valid values are as follows:

  AVAILABLE = <IZZYStatus.AVAILABLE: 1>
  MOVING = <IZZYStatus.MOVING: 2>
  FOLLOWING = <IZZYStatus.FOLLOWING: 3>
  ESTOP = <IZZYStatus.ESTOP: 4>
  BROKEN = <IZZYStatus.BROKEN: 5>
  UNVERIFIED = <IZZYStatus.UNVERIFIED: 6>

## Server Statuses

enum server_status.MotherStatus(value)

  Valid values are as follows:

  CONNECTED = <MotherStatus.CONNECTED: 1>
  MISSING = <MotherStatus.MISSING: 2>
  UNVERIFIED = <MotherStatus.UNVERIFIED: 3>