Hierarchy

Constructors

Properties

address: undefined | string
connected: boolean = true
dataBuffer: undefined | Buffer
emitter: EventEmitter
headingRadians: number = 0
id: undefined | string
position: Position = ZERO_POSITION
robotId: string
messages: {
    message: SimulatorUpdateMessage;
    ts: Date;
}[] = []

Methods

  • Parameters

    • mac: string

    Returns {
        macAddress: string;
        type: "CLIENT_HELLO";
    } | {
        config: [string, string][];
        protocol: number;
        type: "SERVER_HELLO";
    } | {
        type: "PING_SEND";
    } | {
        type: "PING_RESPONSE";
    } | {
        type: "QUERY_VAR";
        var_id: number;
        var_type: "float" | "int32" | "uint32";
    } | {
        type: "QUERY_RESPONSE";
        var_id: number;
        var_val: number;
    } | Object | {
        deltaHeadingRadians: number;
        type: "TURN_BY_ANGLE";
    } | {
        tileDistance: number;
        type: "DRIVE_TILES";
    } | {
        type: "ACTION_SUCCESS";
    } | {
        reason: string;
        type: "ACTION_FAIL";
    } | {
        left: number;
        right: number;
        type: "DRIVE_TANK";
    } | {
        type: "ESTOP";
    }

  • Parameters

    • packet: {
          macAddress: string;
          type: "CLIENT_HELLO";
      } | {
          config: [string, string][];
          protocol: number;
          type: "SERVER_HELLO";
      } | {
          type: "PING_SEND";
      } | {
          type: "PING_RESPONSE";
      } | {
          type: "QUERY_VAR";
          var_id: number;
          var_type: "float" | "int32" | "uint32";
      } | {
          type: "QUERY_RESPONSE";
          var_id: number;
          var_val: number;
      } | Object | {
          deltaHeadingRadians: number;
          type: "TURN_BY_ANGLE";
      } | {
          tileDistance: number;
          type: "DRIVE_TILES";
      } | {
          type: "ACTION_SUCCESS";
      } | {
          reason: string;
          type: "ACTION_FAIL";
      } | {
          left: number;
          right: number;
          type: "DRIVE_TANK";
      } | {
          type: "ESTOP";
      }

    Returns void

Generated using TypeDoc