// Auto-generated. Do not edit!

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

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

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

  static getMessageSize(object) {
    let length = 0;
    length += _getByteLength(object.op_name);
    return length + 4;
  }

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

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

  static messageDefinition() {
    // Returns full string definition for message
    return `
    string op_name
    `;
  }

  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 ColorimetryCommand(null);
    if (msg.op_name !== undefined) {
      resolved.op_name = msg.op_name;
    }
    else {
      resolved.op_name = ''
    }

    return resolved;
    }
};

module.exports = ColorimetryCommand;
