; Auto-generated. Do not edit!


(in-package test_roscpp_serialization-msg)


;//! \htmlinclude VariableLengthStringArray.msg.html

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