; Auto-generated. Do not edit!


(in-package test_ros-msg)


;//! \htmlinclude TestPrimitives.msg.html

(defclass <TestPrimitives> (ros-message)
  ((caller_id
    :reader caller_id-val
    :initarg :caller_id
    :type string
    :initform "")
   (orig_caller_id
    :reader orig_caller_id-val
    :initarg :orig_caller_id
    :type string
    :initform "")
   (str
    :reader str-val
    :initarg :str
    :type string
    :initform "")
   (b
    :reader b-val
    :initarg :b
    :type integer
    :initform 0)
   (int16
    :reader int16-val
    :initarg :int16
    :type fixnum
    :initform 0)
   (int32
    :reader int32-val
    :initarg :int32
    :type integer
    :initform 0)
   (int64
    :reader int64-val
    :initarg :int64
    :type integer
    :initform 0)
   (c
    :reader c-val
    :initarg :c
    :type integer
    :initform 0)
   (uint16
    :reader uint16-val
    :initarg :uint16
    :type fixnum
    :initform 0)
   (uint32
    :reader uint32-val
    :initarg :uint32
    :type integer
    :initform 0)
   (uint64
    :reader uint64-val
    :initarg :uint64
    :type integer
    :initform 0)
   (float32
    :reader float32-val
    :initarg :float32
    :type float
    :initform 0.0)
   (float64
    :reader float64-val
    :initarg :float64
    :type float
    :initform 0.0)
   (t
    :reader t-val
    :initarg :t
    :type real
    :initform 0)
   (d
    :reader d-val
    :initarg :d
    :type real
    :initform 0))
)
(defmethod serialize ((msg <TestPrimitives>) ostream)
  "Serializes a message object of type '<TestPrimitives>"
  (let ((__ros_str_len (length (slot-value msg 'caller_id))))
    (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 'caller_id))
  (let ((__ros_str_len (length (slot-value msg 'orig_caller_id))))
    (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 'orig_caller_id))
  (let ((__ros_str_len (length (slot-value msg 'str))))
    (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 'str))
    (write-byte (ldb (byte 8 0) (slot-value msg 'b)) ostream)
    (write-byte (ldb (byte 8 0) (slot-value msg 'int16)) ostream)
  (write-byte (ldb (byte 8 8) (slot-value msg 'int16)) ostream)
    (write-byte (ldb (byte 8 0) (slot-value msg 'int32)) ostream)
  (write-byte (ldb (byte 8 8) (slot-value msg 'int32)) ostream)
  (write-byte (ldb (byte 8 16) (slot-value msg 'int32)) ostream)
  (write-byte (ldb (byte 8 24) (slot-value msg 'int32)) ostream)
    (write-byte (ldb (byte 8 0) (slot-value msg 'int64)) ostream)
  (write-byte (ldb (byte 8 8) (slot-value msg 'int64)) ostream)
  (write-byte (ldb (byte 8 16) (slot-value msg 'int64)) ostream)
  (write-byte (ldb (byte 8 24) (slot-value msg 'int64)) ostream)
  (write-byte (ldb (byte 8 32) (slot-value msg 'int64)) ostream)
  (write-byte (ldb (byte 8 40) (slot-value msg 'int64)) ostream)
  (write-byte (ldb (byte 8 48) (slot-value msg 'int64)) ostream)
  (write-byte (ldb (byte 8 56) (slot-value msg 'int64)) ostream)
    (write-byte (ldb (byte 8 0) (slot-value msg 'c)) ostream)
    (write-byte (ldb (byte 8 0) (slot-value msg 'uint16)) ostream)
  (write-byte (ldb (byte 8 8) (slot-value msg 'uint16)) ostream)
    (write-byte (ldb (byte 8 0) (slot-value msg 'uint32)) ostream)
  (write-byte (ldb (byte 8 8) (slot-value msg 'uint32)) ostream)
  (write-byte (ldb (byte 8 16) (slot-value msg 'uint32)) ostream)
  (write-byte (ldb (byte 8 24) (slot-value msg 'uint32)) ostream)
    (write-byte (ldb (byte 8 0) (slot-value msg 'uint64)) ostream)
  (write-byte (ldb (byte 8 8) (slot-value msg 'uint64)) ostream)
  (write-byte (ldb (byte 8 16) (slot-value msg 'uint64)) ostream)
  (write-byte (ldb (byte 8 24) (slot-value msg 'uint64)) ostream)
  (write-byte (ldb (byte 8 32) (slot-value msg 'uint64)) ostream)
  (write-byte (ldb (byte 8 40) (slot-value msg 'uint64)) ostream)
  (write-byte (ldb (byte 8 48) (slot-value msg 'uint64)) ostream)
  (write-byte (ldb (byte 8 56) (slot-value msg 'uint64)) ostream)
  (let ((bits (roslisp-utils:encode-single-float-bits (slot-value msg 'float32))))
    (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 ((bits (roslisp-utils:encode-double-float-bits (slot-value msg 'float64))))
    (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))
  (let ((__sec (floor (slot-value msg 't)))
        (__nsec (round (* 1e9 (- (slot-value msg 't) (floor (slot-value msg 't)))))))
    (write-byte (ldb (byte 8 0) __sec) ostream)
    (write-byte (ldb (byte 8 8) __sec) ostream)
    (write-byte (ldb (byte 8 16) __sec) ostream)
    (write-byte (ldb (byte 8 24) __sec) ostream)
    (write-byte (ldb (byte 8 0) __nsec) ostream)
    (write-byte (ldb (byte 8 8) __nsec) ostream)
    (write-byte (ldb (byte 8 16) __nsec) ostream)
    (write-byte (ldb (byte 8 24) __nsec) ostream))
  (let ((__sec (floor (slot-value msg 'd)))
        (__nsec (round (* 1e9 (- (slot-value msg 'd) (floor (slot-value msg 'd)))))))
    (write-byte (ldb (byte 8 0) __sec) ostream)
    (write-byte (ldb (byte 8 8) __sec) ostream)
    (write-byte (ldb (byte 8 16) __sec) ostream)
    (write-byte (ldb (byte 8 24) __sec) ostream)
    (write-byte (ldb (byte 8 0) __nsec) ostream)
    (write-byte (ldb (byte 8 8) __nsec) ostream)
    (write-byte (ldb (byte 8 16) __nsec) ostream)
    (write-byte (ldb (byte 8 24) __nsec) ostream))
)
(defmethod deserialize ((msg <TestPrimitives>) istream)
  "Deserializes a message object of type '<TestPrimitives>"
  (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 'caller_id) (make-string __ros_str_len))
    (dotimes (__ros_str_idx __ros_str_len msg)
      (setf (char (slot-value msg 'caller_id) __ros_str_idx) (code-char (read-byte istream)))))
  (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 'orig_caller_id) (make-string __ros_str_len))
    (dotimes (__ros_str_idx __ros_str_len msg)
      (setf (char (slot-value msg 'orig_caller_id) __ros_str_idx) (code-char (read-byte istream)))))
  (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 'str) (make-string __ros_str_len))
    (dotimes (__ros_str_idx __ros_str_len msg)
      (setf (char (slot-value msg 'str) __ros_str_idx) (code-char (read-byte istream)))))
  (setf (ldb (byte 8 0) (slot-value msg 'b)) (read-byte istream))
  (setf (ldb (byte 8 0) (slot-value msg 'int16)) (read-byte istream))
  (setf (ldb (byte 8 8) (slot-value msg 'int16)) (read-byte istream))
  (setf (ldb (byte 8 0) (slot-value msg 'int32)) (read-byte istream))
  (setf (ldb (byte 8 8) (slot-value msg 'int32)) (read-byte istream))
  (setf (ldb (byte 8 16) (slot-value msg 'int32)) (read-byte istream))
  (setf (ldb (byte 8 24) (slot-value msg 'int32)) (read-byte istream))
  (setf (ldb (byte 8 0) (slot-value msg 'int64)) (read-byte istream))
  (setf (ldb (byte 8 8) (slot-value msg 'int64)) (read-byte istream))
  (setf (ldb (byte 8 16) (slot-value msg 'int64)) (read-byte istream))
  (setf (ldb (byte 8 24) (slot-value msg 'int64)) (read-byte istream))
  (setf (ldb (byte 8 32) (slot-value msg 'int64)) (read-byte istream))
  (setf (ldb (byte 8 40) (slot-value msg 'int64)) (read-byte istream))
  (setf (ldb (byte 8 48) (slot-value msg 'int64)) (read-byte istream))
  (setf (ldb (byte 8 56) (slot-value msg 'int64)) (read-byte istream))
  (setf (ldb (byte 8 0) (slot-value msg 'c)) (read-byte istream))
  (setf (ldb (byte 8 0) (slot-value msg 'uint16)) (read-byte istream))
  (setf (ldb (byte 8 8) (slot-value msg 'uint16)) (read-byte istream))
  (setf (ldb (byte 8 0) (slot-value msg 'uint32)) (read-byte istream))
  (setf (ldb (byte 8 8) (slot-value msg 'uint32)) (read-byte istream))
  (setf (ldb (byte 8 16) (slot-value msg 'uint32)) (read-byte istream))
  (setf (ldb (byte 8 24) (slot-value msg 'uint32)) (read-byte istream))
  (setf (ldb (byte 8 0) (slot-value msg 'uint64)) (read-byte istream))
  (setf (ldb (byte 8 8) (slot-value msg 'uint64)) (read-byte istream))
  (setf (ldb (byte 8 16) (slot-value msg 'uint64)) (read-byte istream))
  (setf (ldb (byte 8 24) (slot-value msg 'uint64)) (read-byte istream))
  (setf (ldb (byte 8 32) (slot-value msg 'uint64)) (read-byte istream))
  (setf (ldb (byte 8 40) (slot-value msg 'uint64)) (read-byte istream))
  (setf (ldb (byte 8 48) (slot-value msg 'uint64)) (read-byte istream))
  (setf (ldb (byte 8 56) (slot-value msg 'uint64)) (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 'float32) (roslisp-utils:decode-single-float-bits bits)))
  (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 (slot-value msg 'float64) (roslisp-utils:decode-double-float-bits bits)))
  (let ((__sec 0) (__nsec 0))
    (setf (ldb (byte 8 0) __sec) (read-byte istream))
    (setf (ldb (byte 8 8) __sec) (read-byte istream))
    (setf (ldb (byte 8 16) __sec) (read-byte istream))
    (setf (ldb (byte 8 24) __sec) (read-byte istream))
    (setf (ldb (byte 8 0) __nsec) (read-byte istream))
    (setf (ldb (byte 8 8) __nsec) (read-byte istream))
    (setf (ldb (byte 8 16) __nsec) (read-byte istream))
    (setf (ldb (byte 8 24) __nsec) (read-byte istream))
    (setf (slot-value msg 't) (+ (coerce __sec 'double-float) (/ __nsec 1e9))))
  (let ((__sec 0) (__nsec 0))
    (setf (ldb (byte 8 0) __sec) (read-byte istream))
    (setf (ldb (byte 8 8) __sec) (read-byte istream))
    (setf (ldb (byte 8 16) __sec) (read-byte istream))
    (setf (ldb (byte 8 24) __sec) (read-byte istream))
    (setf (ldb (byte 8 0) __nsec) (read-byte istream))
    (setf (ldb (byte 8 8) __nsec) (read-byte istream))
    (setf (ldb (byte 8 16) __nsec) (read-byte istream))
    (setf (ldb (byte 8 24) __nsec) (read-byte istream))
    (setf (slot-value msg 'd) (+ (coerce __sec 'double-float) (/ __nsec 1e9))))
  msg
)
(defmethod ros-datatype ((msg (eql '<TestPrimitives>)))
  "Returns string type for a message object of type '<TestPrimitives>"
  "test_ros/TestPrimitives")
(defmethod md5sum ((type (eql '<TestPrimitives>)))
  "Returns md5sum for a message object of type '<TestPrimitives>"
  "3e70f428a22c0d26ca67f87802c8e00f")
(defmethod message-definition ((type (eql '<TestPrimitives>)))
  "Returns full string definition for message of type '<TestPrimitives>"
  (format nil "# Integration test message of all primitive types~%~%# caller_id of most recent node to send this message~%string caller_id~%# caller_id of the original node to send this message~%string orig_caller_id~%~%string str~%byte b~%int16 int16~%int32 int32~%int64 int64~%char c~%uint16 uint16~%uint32 uint32~%uint64 uint64~%float32 float32~%float64 float64~%time t~%duration d~%~%~%~%"))
(defmethod serialization-length ((msg <TestPrimitives>))
  (+ 0
     4 (length (slot-value msg 'caller_id))
     4 (length (slot-value msg 'orig_caller_id))
     4 (length (slot-value msg 'str))
     1
     2
     4
     8
     1
     2
     4
     8
     4
     8
     8
     8
))
(defmethod ros-message-to-list ((msg <TestPrimitives>))
  "Converts a ROS message object to a list"
  (list '<TestPrimitives>
    (cons ':caller_id (caller_id-val msg))
    (cons ':orig_caller_id (orig_caller_id-val msg))
    (cons ':str (str-val msg))
    (cons ':b (b-val msg))
    (cons ':int16 (int16-val msg))
    (cons ':int32 (int32-val msg))
    (cons ':int64 (int64-val msg))
    (cons ':c (c-val msg))
    (cons ':uint16 (uint16-val msg))
    (cons ':uint32 (uint32-val msg))
    (cons ':uint64 (uint64-val msg))
    (cons ':float32 (float32-val msg))
    (cons ':float64 (float64-val msg))
    (cons ':t (t-val msg))
    (cons ':d (d-val msg))
))
