#ifndef GLOBAL_H_
#define GLOBAL_H_

#define WHERE_LEN 100
#define MAX_NUMBER_OF_SLAVES 1000
#define SLAVENAME "pa3_slave"
#define MSGTAG 0

#define X_RES 1024
#define Y_RES 1024

typedef struct config_s {
  int slaves;
  int spawn_option;
  char *where;
  int where_len;
} Config;

typedef struct complex_s {
  float real;
  float imag;
} Complex;

typedef struct coord_s {
  int x;
  int y;
} Coord;

typedef struct compix_s {
  Complex c;
  Coord p;
} Compix;

typedef struct utilization_s {
  long idle_sec;
  long busy_sec;
  int  pixels;
} Utilization;

typedef enum command_e {
  CmdPixel = 0,
  CmdQuit = 1
} Command;

typedef enum slaveStat_e {
  SSBusy = 0,
  SSIdle = 1,
  SSTerminated = 2
} SlaveStat;

#endif
