; Auto-generated. Do not edit!


(in-package test_roscpp_serialization_perf-msg)


;//! \htmlinclude ChannelFloat32.msg.html

(defclass <ChannelFloat32> (ros-message)
  ((name
    :reader name-val
    :initarg :name
    :type string
    :initform "")
   (vals
    :reader vals-val
    :initarg :vals
    :type (vector float)
   :initform (make-array 0 :element-type 'float :initial-element 0.0)))
)
(defmethod serialize ((msg <ChannelFloat32>) ostream)
  "Serializes a message object of type '<ChannelFloat32>"
  (let ((__ros_str_len (length (slot-value msg 'name))))
    (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 'name))
  (let ((__ros_arr_len (length (slot-value msg 'vals))))
    (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-single-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)))
    (slot-value msg 'vals))
)
(defmethod deserialize ((msg <ChannelFloat32>) istream)
  "Deserializes a message object of type '<ChannelFloat32>"
  (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 'name) (make-string __ros_str_len))
    (dotimes (__ros_str_idx __ros_str_len msg)
      (setf (char (slot-value msg 'name) __ros_str_idx) (code-char (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 'vals) (make-array __ros_arr_len))
    (let ((vals (slot-value msg 'vals)))
      (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 (aref vals i) (roslisp-utils:decode-single-float-bits bits))))))
  msg
)
(defmethod ros-datatype ((msg (eql '<ChannelFloat32>)))
  "Returns string type for a message object of type '<ChannelFloat32>"
  "test_roscpp_serialization_perf/ChannelFloat32")
(defmethod md5sum ((type (eql '<ChannelFloat32>)))
  "Returns md5sum for a message object of type '<ChannelFloat32>"
  "61c47e4621e471c885edb248b5dcafd5")
(defmethod message-definition ((type (eql '<ChannelFloat32>)))
  "Returns full string definition for message of type '<ChannelFloat32>"
  (format nil "string name~%float32[] vals~%~%"))
(defmethod serialization-length ((msg <ChannelFloat32>))
  (+ 0
     4 (length (slot-value msg 'name))
     4 (reduce #'+ (slot-value msg 'vals) :key #'(lambda (ele) (declare (ignorable ele)) (+ 4)))
))
(defmethod ros-message-to-list ((msg <ChannelFloat32>))
  "Converts a ROS message object to a list"
  (list '<ChannelFloat32>
    (cons ':name (name-val msg))
    (cons ':vals (vals-val msg))
))
