; Auto-generated. Do not edit!


(in-package test_rosrecord-msg)


;//! \htmlinclude TestSubMsg.msg.html

(defclass <TestSubMsg> (ros-message)
  ((field1
    :reader field1-val
    :initarg :field1
    :type string
    :initform "")
   (field2
    :reader field2-val
    :initarg :field2
    :type integer
    :initform 0))
)
(defmethod serialize ((msg <TestSubMsg>) ostream)
  "Serializes a message object of type '<TestSubMsg>"
  (let ((__ros_str_len (length (slot-value msg 'field1))))
    (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 'field1))
    (write-byte (ldb (byte 8 0) (slot-value msg 'field2)) ostream)
  (write-byte (ldb (byte 8 8) (slot-value msg 'field2)) ostream)
  (write-byte (ldb (byte 8 16) (slot-value msg 'field2)) ostream)
  (write-byte (ldb (byte 8 24) (slot-value msg 'field2)) ostream)
)
(defmethod deserialize ((msg <TestSubMsg>) istream)
  "Deserializes a message object of type '<TestSubMsg>"
  (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 'field1) (make-string __ros_str_len))
    (dotimes (__ros_str_idx __ros_str_len msg)
      (setf (char (slot-value msg 'field1) __ros_str_idx) (code-char (read-byte istream)))))
  (setf (ldb (byte 8 0) (slot-value msg 'field2)) (read-byte istream))
  (setf (ldb (byte 8 8) (slot-value msg 'field2)) (read-byte istream))
  (setf (ldb (byte 8 16) (slot-value msg 'field2)) (read-byte istream))
  (setf (ldb (byte 8 24) (slot-value msg 'field2)) (read-byte istream))
  msg
)
(defmethod ros-datatype ((msg (eql '<TestSubMsg>)))
  "Returns string type for a message object of type '<TestSubMsg>"
  "test_rosrecord/TestSubMsg")
(defmethod md5sum ((type (eql '<TestSubMsg>)))
  "Returns md5sum for a message object of type '<TestSubMsg>"
  "cb68fa50979d62961325d38238e6074d")
(defmethod message-definition ((type (eql '<TestSubMsg>)))
  "Returns full string definition for message of type '<TestSubMsg>"
  (format nil "string field1~%int32 field2~%~%~%"))
(defmethod serialization-length ((msg <TestSubMsg>))
  (+ 0
     4 (length (slot-value msg 'field1))
     4
))
(defmethod ros-message-to-list ((msg <TestSubMsg>))
  "Converts a ROS message object to a list"
  (list '<TestSubMsg>
    (cons ':field1 (field1-val msg))
    (cons ':field2 (field2-val msg))
))
