; Auto-generated. Do not edit!


(in-package std_msgs-msg)


;//! \htmlinclude MultiArrayLayout.msg.html

(defclass <MultiArrayLayout> (ros-message)
  ((dim
    :reader dim-val
    :initarg :dim
    :type (vector <MultiArrayDimension>)
   :initform (make-array 0 :element-type '<MultiArrayDimension> :initial-element (make-instance '<MultiArrayDimension>)))
   (data_offset
    :reader data_offset-val
    :initarg :data_offset
    :type integer
    :initform 0))
)
(defmethod serialize ((msg <MultiArrayLayout>) ostream)
  "Serializes a message object of type '<MultiArrayLayout>"
  (let ((__ros_arr_len (length (slot-value msg 'dim))))
    (write-byte (ldb (byte 8 0) __ros_arr_len) ostream)
    (write-byte (ldb (byte 8 8) __ros_arr_len) ostream)
    (write-byte (ldb (byte 8 16) __ros_arr_len) ostream)
    (write-byte (ldb (byte 8 24) __ros_arr_len) ostream))
  (map nil #'(lambda (ele) (serialize ele ostream))
    (slot-value msg 'dim))
    (write-byte (ldb (byte 8 0) (slot-value msg 'data_offset)) ostream)
  (write-byte (ldb (byte 8 8) (slot-value msg 'data_offset)) ostream)
  (write-byte (ldb (byte 8 16) (slot-value msg 'data_offset)) ostream)
  (write-byte (ldb (byte 8 24) (slot-value msg 'data_offset)) ostream)
)
(defmethod deserialize ((msg <MultiArrayLayout>) istream)
  "Deserializes a message object of type '<MultiArrayLayout>"
  (let ((__ros_arr_len 0))
    (setf (ldb (byte 8 0) __ros_arr_len) (read-byte istream))
    (setf (ldb (byte 8 8) __ros_arr_len) (read-byte istream))
    (setf (ldb (byte 8 16) __ros_arr_len) (read-byte istream))
    (setf (ldb (byte 8 24) __ros_arr_len) (read-byte istream))
    (setf (slot-value msg 'dim) (make-array __ros_arr_len))
    (let ((vals (slot-value msg 'dim)))
      (dotimes (i __ros_arr_len)
        (setf (aref vals i) (make-instance '<MultiArrayDimension>))
(deserialize (aref vals i) istream))))
  (setf (ldb (byte 8 0) (slot-value msg 'data_offset)) (read-byte istream))
  (setf (ldb (byte 8 8) (slot-value msg 'data_offset)) (read-byte istream))
  (setf (ldb (byte 8 16) (slot-value msg 'data_offset)) (read-byte istream))
  (setf (ldb (byte 8 24) (slot-value msg 'data_offset)) (read-byte istream))
  msg
)
(defmethod ros-datatype ((msg (eql '<MultiArrayLayout>)))
  "Returns string type for a message object of type '<MultiArrayLayout>"
  "std_msgs/MultiArrayLayout")
(defmethod md5sum ((type (eql '<MultiArrayLayout>)))
  "Returns md5sum for a message object of type '<MultiArrayLayout>"
  "0fed2a11c13e11c5571b4e2a995a91a3")
(defmethod message-definition ((type (eql '<MultiArrayLayout>)))
  "Returns full string definition for message of type '<MultiArrayLayout>"
  (format nil "# The multiarray declares a generic multi-dimensional array of a~%# particular data type.  Dimensions are ordered from outer most~%# to inner most.~%~%MultiArrayDimension[] dim # Array of dimension properties~%uint32 data_offset        # padding bytes at front of data~%~%# Accessors should ALWAYS be written in terms of dimension stride~%# and specified outer-most dimension first.~%# ~%# multiarray(i,j,k) = data[data_offset + dim_stride[1]*i + dim_stride[2]*j + k]~%#~%# A standard, 3-channel 640x480 image with interleaved color channels~%# would be specified as:~%#~%# dim[0].label  = \"height\"~%# dim[0].size   = 480~%# dim[0].stride = 3*640*480 = 921600  (note dim[0] stride is just size of image)~%# dim[1].label  = \"width\"~%# dim[1].size   = 640~%# dim[1].stride = 3*640 = 1920~%# dim[2].label  = \"channel\"~%# dim[2].size   = 3~%# dim[2].stride = 3~%#~%# multiarray(i,j,k) refers to the ith row, jth column, and kth channel.~%================================================================================~%MSG: std_msgs/MultiArrayDimension~%string label   # label of given dimension~%uint32 size    # size of given dimension (in type units)~%uint32 stride  # stride of given dimension~%~%"))
(defmethod serialization-length ((msg <MultiArrayLayout>))
  (+ 0
     4 (reduce #'+ (slot-value msg 'dim) :key #'(lambda (ele) (declare (ignorable ele)) (+ (serialization-length ele))))
     4
))
(defmethod ros-message-to-list ((msg <MultiArrayLayout>))
  "Converts a ROS message object to a list"
  (list '<MultiArrayLayout>
    (cons ':dim (dim-val msg))
    (cons ':data_offset (data_offset-val msg))
))
