; Auto-generated. Do not edit!


(in-package test_roslib-msg)


;//! \htmlinclude SameSubMsg3.msg.html

(defclass <SameSubMsg3> (ros-message)
  ((a
    :reader a-val
    :initarg :a
    :type integer
    :initform 0)
   (b
    :reader b-val
    :initarg :b
    :type float
    :initform 0.0)
   (c
    :reader c-val
    :initarg :c
    :type string
    :initform "")
   (d
    :reader d-val
    :initarg :d
    :type (vector integer)
   :initform (make-array 10 :element-type 'integer :initial-element 0))
   (e
    :reader e-val
    :initarg :e
    :type (vector float)
   :initform (make-array 0 :element-type 'float :initial-element 0.0)))
)
(defmethod serialize ((msg <SameSubMsg3>) ostream)
  "Serializes a message object of type '<SameSubMsg3>"
    (write-byte (ldb (byte 8 0) (slot-value msg 'a)) ostream)
  (write-byte (ldb (byte 8 8) (slot-value msg 'a)) ostream)
  (write-byte (ldb (byte 8 16) (slot-value msg 'a)) ostream)
  (write-byte (ldb (byte 8 24) (slot-value msg 'a)) ostream)
  (let ((bits (roslisp-utils:encode-single-float-bits (slot-value msg 'b))))
    (write-byte (ldb (byte 8 0) bits) ostream)
    (write-byte (ldb (byte 8 8) bits) ostream)
    (write-byte (ldb (byte 8 16) bits) ostream)
    (write-byte (ldb (byte 8 24) bits) ostream))
  (let ((__ros_str_len (length (slot-value msg 'c))))
    (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)) (slot-value msg 'c))
    (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)
  (write-byte (ldb (byte 8 32) ele) ostream)
  (write-byte (ldb (byte 8 40) ele) ostream)
  (write-byte (ldb (byte 8 48) ele) ostream)
  (write-byte (ldb (byte 8 56) ele) ostream))(slot-value msg 'd))
  (let ((__ros_arr_len (length (slot-value msg 'e))))
    (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 ((bits (roslisp-utils:encode-double-float-bits ele)))
    (write-byte (ldb (byte 8 0) bits) ostream)
    (write-byte (ldb (byte 8 8) bits) ostream)
    (write-byte (ldb (byte 8 16) bits) ostream)
    (write-byte (ldb (byte 8 24) bits) ostream)
    (write-byte (ldb (byte 8 32) bits) ostream)
    (write-byte (ldb (byte 8 40) bits) ostream)
    (write-byte (ldb (byte 8 48) bits) ostream)
    (write-byte (ldb (byte 8 56) bits) ostream)))
    (slot-value msg 'e))
)
(defmethod deserialize ((msg <SameSubMsg3>) istream)
  "Deserializes a message object of type '<SameSubMsg3>"
  (setf (ldb (byte 8 0) (slot-value msg 'a)) (read-byte istream))
  (setf (ldb (byte 8 8) (slot-value msg 'a)) (read-byte istream))
  (setf (ldb (byte 8 16) (slot-value msg 'a)) (read-byte istream))
  (setf (ldb (byte 8 24) (slot-value msg 'a)) (read-byte istream))
  (let ((bits 0))
    (setf (ldb (byte 8 0) bits) (read-byte istream))
    (setf (ldb (byte 8 8) bits) (read-byte istream))
    (setf (ldb (byte 8 16) bits) (read-byte istream))
    (setf (ldb (byte 8 24) bits) (read-byte istream))
    (setf (slot-value msg 'b) (roslisp-utils:decode-single-float-bits bits)))
  (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 (slot-value msg 'c) (make-string __ros_str_len))
    (dotimes (__ros_str_idx __ros_str_len msg)
      (setf (char (slot-value msg 'c) __ros_str_idx) (code-char (read-byte istream)))))
  (setf (slot-value msg 'd) (make-array 10))
  (let ((vals (slot-value msg 'd)))
    (dotimes (i 10)
(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))
  (setf (ldb (byte 8 32) (aref vals i)) (read-byte istream))
  (setf (ldb (byte 8 40) (aref vals i)) (read-byte istream))
  (setf (ldb (byte 8 48) (aref vals i)) (read-byte istream))
  (setf (ldb (byte 8 56) (aref vals i)) (read-byte istream))))
  (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 'e) (make-array __ros_arr_len))
    (let ((vals (slot-value msg 'e)))
      (dotimes (i __ros_arr_len)
(let ((bits 0))
    (setf (ldb (byte 8 0) bits) (read-byte istream))
    (setf (ldb (byte 8 8) bits) (read-byte istream))
    (setf (ldb (byte 8 16) bits) (read-byte istream))
    (setf (ldb (byte 8 24) bits) (read-byte istream))
    (setf (ldb (byte 8 32) bits) (read-byte istream))
    (setf (ldb (byte 8 40) bits) (read-byte istream))
    (setf (ldb (byte 8 48) bits) (read-byte istream))
    (setf (ldb (byte 8 56) bits) (read-byte istream))
    (setf (aref vals i) (roslisp-utils:decode-double-float-bits bits))))))
  msg
)
(defmethod ros-datatype ((msg (eql '<SameSubMsg3>)))
  "Returns string type for a message object of type '<SameSubMsg3>"
  "test_roslib/SameSubMsg3")
(defmethod md5sum ((type (eql '<SameSubMsg3>)))
  "Returns md5sum for a message object of type '<SameSubMsg3>"
  "49145a54e4be1a218629e518575a0bf3")
(defmethod message-definition ((type (eql '<SameSubMsg3>)))
  "Returns full string definition for message of type '<SameSubMsg3>"
  (format nil "~%# Lots of comments~%int32 a  #And more comments~%float32 b~%string c~%# And also some white space~%~%~%uint64[10] d~% float64[] e~%~%~%~%"))
(defmethod serialization-length ((msg <SameSubMsg3>))
  (+ 0
     4
     4
     4 (length (slot-value msg 'c))
     0 (reduce #'+ (slot-value msg 'd) :key #'(lambda (ele) (declare (ignorable ele)) (+ 8)))
     4 (reduce #'+ (slot-value msg 'e) :key #'(lambda (ele) (declare (ignorable ele)) (+ 8)))
))
(defmethod ros-message-to-list ((msg <SameSubMsg3>))
  "Converts a ROS message object to a list"
  (list '<SameSubMsg3>
    (cons ':a (a-val msg))
    (cons ':b (b-val msg))
    (cons ':c (c-val msg))
    (cons ':d (d-val msg))
    (cons ':e (e-val msg))
))
