// Auto-generated. Do not edit!

// (in-package ika_plate_rct_digital_msgs.msg)


"use strict";

const _serializer = _ros_msg_utils.Serialize;
const _arraySerializer = _serializer.Array;
const _deserializer = _ros_msg_utils.Deserialize;
const _arrayDeserializer = _deserializer.Array;
const _finder = _ros_msg_utils.Find;
const _getByteLength = _ros_msg_utils.getByteLength;

//-----------------------------------------------------------

class IKACommand {
  constructor(initObj={}) {
    if (initObj === null) {
      // initObj === null is a special case for deserialization where we don't initialize fields
      this.ika_command = null;
      this.ika_param = null;
    }
    else {
      if (initObj.hasOwnProperty('ika_command')) {
        this.ika_command = initObj.ika_command
      }
      else {
        this.ika_command = 0;
      }
      if (initObj.hasOwnProperty('ika_param')) {
        this.ika_param = initObj.ika_param
      }
      else {
        this.ika_param = 0;
      }
    }
  }

  static serialize(obj, buffer, bufferOffset) {
    // Serializes a message object of type IKACommand
    // Serialize message field [ika_command]
    bufferOffset = _serializer.int32(obj.ika_command, buffer, bufferOffset);
    // Serialize message field [ika_param]
    bufferOffset = _serializer.int32(obj.ika_param, buffer, bufferOffset);
    return bufferOffset;
  }

  static deserialize(buffer, bufferOffset=[0]) {
    //deserializes a message object of type IKACommand
    let len;
    let data = new IKACommand(null);
    // Deserialize message field [ika_command]
    data.ika_command = _deserializer.int32(buffer, bufferOffset);
    // Deserialize message field [ika_param]
    data.ika_param = _deserializer.int32(buffer, bufferOffset);
    return data;
  }

  static getMessageSize(object) {
    return 8;
  }

  static datatype() {
    // Returns string type for a message object
    return 'ika_plate_rct_digital_msgs/IKACommand';
  }

  static md5sum() {
    //Returns md5sum for a message object
    return 'ec118b63f829809c8ad64cad8c151220';
  }

  static messageDefinition() {
    // Returns full string definition for message
    return `
    # Available commands to use the Fisher Scientific PPS4102 Top Pan balance 
    int32 HEATON = 0
    int32 HEATOFF = 1
    int32 STIRON = 2
    int32 STIROFF = 3
    int32 SETSTIR = 4
    int32 SETHEAT = 5
    int32 STIRAT = 6
    int32 HEATAT = 7
    int32 ALLOFF = 8
    
    int32 ika_command
    int32 ika_param
    
    `;
  }

  static Resolve(msg) {
    // deep-construct a valid message object instance of whatever was passed in
    if (typeof msg !== 'object' || msg === null) {
      msg = {};
    }
    const resolved = new IKACommand(null);
    if (msg.ika_command !== undefined) {
      resolved.ika_command = msg.ika_command;
    }
    else {
      resolved.ika_command = 0
    }

    if (msg.ika_param !== undefined) {
      resolved.ika_param = msg.ika_param;
    }
    else {
      resolved.ika_param = 0
    }

    return resolved;
    }
};

// Constants for message
IKACommand.Constants = {
  HEATON: 0,
  HEATOFF: 1,
  STIRON: 2,
  STIROFF: 3,
  SETSTIR: 4,
  SETHEAT: 5,
  STIRAT: 6,
  HEATAT: 7,
  ALLOFF: 8,
}

module.exports = IKACommand;
