; Auto-generated. Do not edit!


(in-package test_roscpp-msg)


;//! \htmlinclude TestArray.msg.html

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