; Auto-generated. Do not edit!


(in-package test_rosrecord-msg)


;//! \htmlinclude TestMsg.msg.html

(defclass <TestMsg> (ros-message)
  ((field1
    :reader field1-val
    :initarg :field1
    :type string
    :initform "")
   (field2
    :reader field2-val
    :initarg :field2
    :type integer
    :initform 0)
   (field3
    :reader field3-val
    :initarg :field3
    :type test_rosrecord-msg:<TestSubMsg>
    :initform (make-instance 'test_rosrecord-msg:<TestSubMsg>)))
)
(defmethod serialize ((msg <TestMsg>) ostream)
  "Serializes a message object of type '<TestMsg>"
  (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)
  (serialize (slot-value msg 'field3) ostream)
)
(defmethod deserialize ((msg <TestMsg>) istream)
  "Deserializes a message object of type '<TestMsg>"
  (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))
  (deserialize (slot-value msg 'field3) istream)
  msg
)
(defmethod ros-datatype ((msg (eql '<TestMsg>)))
  "Returns string type for a message object of type '<TestMsg>"
  "test_rosrecord/TestMsg")
(defmethod md5sum ((type (eql '<TestMsg>)))
  "Returns md5sum for a message object of type '<TestMsg>"
  "796739ec6543fa03d2eb39f3aacaa2c0")
(defmethod message-definition ((type (eql '<TestMsg>)))
  "Returns full string definition for message of type '<TestMsg>"
  (format nil "string field1~%int32 field2~%TestSubMsg field3~%================================================================================~%MSG: test_rosrecord/TestSubMsg~%string field1~%int32 field2~%~%~%"))
(defmethod serialization-length ((msg <TestMsg>))
  (+ 0
     4 (length (slot-value msg 'field1))
     4
     (serialization-length (slot-value msg 'field3))
))
(defmethod ros-message-to-list ((msg <TestMsg>))
  "Converts a ROS message object to a list"
  (list '<TestMsg>
    (cons ':field1 (field1-val msg))
    (cons ':field2 (field2-val msg))
    (cons ':field3 (field3-val msg))
))
