// Auto-generated. Do not edit!

// (in-package kern_pcb_balance_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 KernCommand {
  constructor(initObj={}) {
    if (initObj === null) {
      // initObj === null is a special case for deserialization where we don't initialize fields
      this.kern_command = null;
    }
    else {
      if (initObj.hasOwnProperty('kern_command')) {
        this.kern_command = initObj.kern_command
      }
      else {
        this.kern_command = 0;
      }
    }
  }

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

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

  static getMessageSize(object) {
    return 4;
  }

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

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

  static messageDefinition() {
    // Returns full string definition for message
    return `
    # Available commands to use the Fisher Scientific PPS4102 Top Pan balance 
    int32 ZERO = 0
    
    int32 kern_command 
    
    `;
  }

  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 KernCommand(null);
    if (msg.kern_command !== undefined) {
      resolved.kern_command = msg.kern_command;
    }
    else {
      resolved.kern_command = 0
    }

    return resolved;
    }
};

// Constants for message
KernCommand.Constants = {
  ZERO: 0,
}

module.exports = KernCommand;
