; Auto-generated. Do not edit!


(in-package test_roscpp_serialization-msg)


;//! \htmlinclude VariableLength.msg.html

(defclass <VariableLength> (ros-message)
  ((a
    :reader a-val
    :initarg :a
    :type (vector integer)
   :initform (make-array 0 :element-type 'integer :initial-element 0)))
)
(defmethod serialize ((msg <VariableLength>) ostream)
  "Serializes a message object of type '<VariableLength>"
  (let ((__ros_arr_len (length (slot-value msg 'a))))
    (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)   (write-byte (ldb (byte 8 0) ele) ostream)
  (write-byte (ldb (byte 8 8) ele) ostream)
  (write-byte (ldb (byte 8 16) ele) ostream)
  (write-byte (ldb (byte 8 24) ele) ostream))
    (slot-value msg 'a))
)
(defmethod deserialize ((msg <VariableLength>) istream)
  "Deserializes a message object of type '<VariableLength>"
  (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 'a) (make-array __ros_arr_len))
    (let ((vals (slot-value msg 'a)))
      (dotimes (i __ros_arr_len)
(setf (ldb (byte 8 0) (aref vals i)) (read-byte istream))
  (setf (ldb (byte 8 8) (aref vals i)) (read-byte istream))
  (setf (ldb (byte 8 16) (aref vals i)) (read-byte istream))
  (setf (ldb (byte 8 24) (aref vals i)) (read-byte istream)))))
  msg
)
(defmethod ros-datatype ((msg (eql '<VariableLength>)))
  "Returns string type for a message object of type '<VariableLength>"
  "test_roscpp_serialization/VariableLength")
(defmethod md5sum ((type (eql '<VariableLength>)))
  "Returns md5sum for a message object of type '<VariableLength>"
  "d9a532f93b9aeffe09e3bc21ff3de0f0")
(defmethod message-definition ((type (eql '<VariableLength>)))
  "Returns full string definition for message of type '<VariableLength>"
  (format nil "uint32[] a~%~%~%"))
(defmethod serialization-length ((msg <VariableLength>))
  (+ 0
     4 (reduce #'+ (slot-value msg 'a) :key #'(lambda (ele) (declare (ignorable ele)) (+ 4)))
))
(defmethod ros-message-to-list ((msg <VariableLength>))
  "Converts a ROS message object to a list"
  (list '<VariableLength>
    (cons ':a (a-val msg))
))
