; Auto-generated. Do not edit!


(cl:in-package test_ros-msg)


;//! \htmlinclude TestArrays.msg.html

(cl:defclass <TestArrays> (roslisp-msg-protocol:ros-message)
  ((caller_id
    :reader caller_id
    :initarg :caller_id
    :type cl:string
    :initform "")
   (orig_caller_id
    :reader orig_caller_id
    :initarg :orig_caller_id
    :type cl:string
    :initform "")
   (int32_array
    :reader int32_array
    :initarg :int32_array
    :type (cl:vector cl:integer)
   :initform (cl:make-array 0 :element-type 'cl:integer :initial-element 0))
   (float32_array
    :reader float32_array
    :initarg :float32_array
    :type (cl:vector cl:float)
   :initform (cl:make-array 0 :element-type 'cl:float :initial-element 0.0))
   (time_array
    :reader time_array
    :initarg :time_array
    :type (cl:vector cl:real)
   :initform (cl:make-array 0 :element-type 'cl:real :initial-element 0))
   (test_string_array
    :reader test_string_array
    :initarg :test_string_array
    :type (cl:vector test_ros-msg:TestString)
   :initform (cl:make-array 0 :element-type 'test_ros-msg:TestString :initial-element (cl:make-instance 'test_ros-msg:TestString))))
)

(cl:defclass TestArrays (<TestArrays>)
  ())

(cl:defmethod cl:initialize-instance :after ((m <TestArrays>) cl:&rest args)
  (cl:declare (cl:ignorable args))
  (cl:unless (cl:typep m 'TestArrays)
    (roslisp-msg-protocol:msg-deprecation-warning "using old message class name test_ros-msg:<TestArrays> is deprecated: use test_ros-msg:TestArrays instead.")))

(cl:ensure-generic-function 'caller_id-val :lambda-list '(m))
(cl:defmethod caller_id-val ((m <TestArrays>))
  (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader test_ros-msg:caller_id-val is deprecated.  Use test_ros-msg:caller_id instead.")
  (caller_id m))

(cl:ensure-generic-function 'orig_caller_id-val :lambda-list '(m))
(cl:defmethod orig_caller_id-val ((m <TestArrays>))
  (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader test_ros-msg:orig_caller_id-val is deprecated.  Use test_ros-msg:orig_caller_id instead.")
  (orig_caller_id m))

(cl:ensure-generic-function 'int32_array-val :lambda-list '(m))
(cl:defmethod int32_array-val ((m <TestArrays>))
  (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader test_ros-msg:int32_array-val is deprecated.  Use test_ros-msg:int32_array instead.")
  (int32_array m))

(cl:ensure-generic-function 'float32_array-val :lambda-list '(m))
(cl:defmethod float32_array-val ((m <TestArrays>))
  (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader test_ros-msg:float32_array-val is deprecated.  Use test_ros-msg:float32_array instead.")
  (float32_array m))

(cl:ensure-generic-function 'time_array-val :lambda-list '(m))
(cl:defmethod time_array-val ((m <TestArrays>))
  (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader test_ros-msg:time_array-val is deprecated.  Use test_ros-msg:time_array instead.")
  (time_array m))

(cl:ensure-generic-function 'test_string_array-val :lambda-list '(m))
(cl:defmethod test_string_array-val ((m <TestArrays>))
  (roslisp-msg-protocol:msg-deprecation-warning "Using old-style slot reader test_ros-msg:test_string_array-val is deprecated.  Use test_ros-msg:test_string_array instead.")
  (test_string_array m))
(cl:defmethod roslisp-msg-protocol:serialize ((msg <TestArrays>) ostream)
  "Serializes a message object of type '<TestArrays>"
  (cl:let ((__ros_str_len (cl:length (cl:slot-value msg 'caller_id))))
    (cl:write-byte (cl:ldb (cl:byte 8 0) __ros_str_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 8) __ros_str_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 16) __ros_str_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 24) __ros_str_len) ostream))
  (cl:map cl:nil #'(cl:lambda (c) (cl:write-byte (cl:char-code c) ostream)) (cl:slot-value msg 'caller_id))
  (cl:let ((__ros_str_len (cl:length (cl:slot-value msg 'orig_caller_id))))
    (cl:write-byte (cl:ldb (cl:byte 8 0) __ros_str_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 8) __ros_str_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 16) __ros_str_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 24) __ros_str_len) ostream))
  (cl:map cl:nil #'(cl:lambda (c) (cl:write-byte (cl:char-code c) ostream)) (cl:slot-value msg 'orig_caller_id))
  (cl:let ((__ros_arr_len (cl:length (cl:slot-value msg 'int32_array))))
    (cl:write-byte (cl:ldb (cl:byte 8 0) __ros_arr_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 8) __ros_arr_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 16) __ros_arr_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 24) __ros_arr_len) ostream))
  (cl:map cl:nil #'(cl:lambda (ele) (cl:let* ((signed ele) (unsigned (cl:if (cl:< signed 0) (cl:+ signed 4294967296) signed)))
    (cl:write-byte (cl:ldb (cl:byte 8 0) unsigned) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 8) unsigned) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 16) unsigned) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 24) unsigned) ostream)
    ))
   (cl:slot-value msg 'int32_array))
  (cl:let ((__ros_arr_len (cl:length (cl:slot-value msg 'float32_array))))
    (cl:write-byte (cl:ldb (cl:byte 8 0) __ros_arr_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 8) __ros_arr_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 16) __ros_arr_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 24) __ros_arr_len) ostream))
  (cl:map cl:nil #'(cl:lambda (ele) (cl:let ((bits (roslisp-utils:encode-single-float-bits ele)))
    (cl:write-byte (cl:ldb (cl:byte 8 0) bits) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 8) bits) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 16) bits) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 24) bits) ostream)))
   (cl:slot-value msg 'float32_array))
  (cl:let ((__ros_arr_len (cl:length (cl:slot-value msg 'time_array))))
    (cl:write-byte (cl:ldb (cl:byte 8 0) __ros_arr_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 8) __ros_arr_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 16) __ros_arr_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 24) __ros_arr_len) ostream))
  (cl:map cl:nil #'(cl:lambda (ele) (cl:let ((__sec (cl:floor ele))
        (__nsec (cl:round (cl:* 1e9 (cl:- ele (cl:floor ele))))))
    (cl:write-byte (cl:ldb (cl:byte 8 0) __sec) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 8) __sec) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 16) __sec) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 24) __sec) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 0) __nsec) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 8) __nsec) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 16) __nsec) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 24) __nsec) ostream)))
   (cl:slot-value msg 'time_array))
  (cl:let ((__ros_arr_len (cl:length (cl:slot-value msg 'test_string_array))))
    (cl:write-byte (cl:ldb (cl:byte 8 0) __ros_arr_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 8) __ros_arr_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 16) __ros_arr_len) ostream)
    (cl:write-byte (cl:ldb (cl:byte 8 24) __ros_arr_len) ostream))
  (cl:map cl:nil #'(cl:lambda (ele) (roslisp-msg-protocol:serialize ele ostream))
   (cl:slot-value msg 'test_string_array))
)
(cl:defmethod roslisp-msg-protocol:deserialize ((msg <TestArrays>) istream)
  "Deserializes a message object of type '<TestArrays>"
    (cl:let ((__ros_str_len 0))
      (cl:setf (cl:ldb (cl:byte 8 0) __ros_str_len) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 8) __ros_str_len) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 16) __ros_str_len) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 24) __ros_str_len) (cl:read-byte istream))
      (cl:setf (cl:slot-value msg 'caller_id) (cl:make-string __ros_str_len))
      (cl:dotimes (__ros_str_idx __ros_str_len msg)
        (cl:setf (cl:char (cl:slot-value msg 'caller_id) __ros_str_idx) (cl:code-char (cl:read-byte istream)))))
    (cl:let ((__ros_str_len 0))
      (cl:setf (cl:ldb (cl:byte 8 0) __ros_str_len) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 8) __ros_str_len) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 16) __ros_str_len) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 24) __ros_str_len) (cl:read-byte istream))
      (cl:setf (cl:slot-value msg 'orig_caller_id) (cl:make-string __ros_str_len))
      (cl:dotimes (__ros_str_idx __ros_str_len msg)
        (cl:setf (cl:char (cl:slot-value msg 'orig_caller_id) __ros_str_idx) (cl:code-char (cl:read-byte istream)))))
  (cl:let ((__ros_arr_len 0))
    (cl:setf (cl:ldb (cl:byte 8 0) __ros_arr_len) (cl:read-byte istream))
    (cl:setf (cl:ldb (cl:byte 8 8) __ros_arr_len) (cl:read-byte istream))
    (cl:setf (cl:ldb (cl:byte 8 16) __ros_arr_len) (cl:read-byte istream))
    (cl:setf (cl:ldb (cl:byte 8 24) __ros_arr_len) (cl:read-byte istream))
  (cl:setf (cl:slot-value msg 'int32_array) (cl:make-array __ros_arr_len))
  (cl:let ((vals (cl:slot-value msg 'int32_array)))
    (cl:dotimes (i __ros_arr_len)
    (cl:let ((unsigned 0))
      (cl:setf (cl:ldb (cl:byte 8 0) unsigned) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 8) unsigned) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 16) unsigned) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 24) unsigned) (cl:read-byte istream))
      (cl:setf (cl:aref vals i) (cl:if (cl:< unsigned 2147483648) unsigned (cl:- unsigned 4294967296)))))))
  (cl:let ((__ros_arr_len 0))
    (cl:setf (cl:ldb (cl:byte 8 0) __ros_arr_len) (cl:read-byte istream))
    (cl:setf (cl:ldb (cl:byte 8 8) __ros_arr_len) (cl:read-byte istream))
    (cl:setf (cl:ldb (cl:byte 8 16) __ros_arr_len) (cl:read-byte istream))
    (cl:setf (cl:ldb (cl:byte 8 24) __ros_arr_len) (cl:read-byte istream))
  (cl:setf (cl:slot-value msg 'float32_array) (cl:make-array __ros_arr_len))
  (cl:let ((vals (cl:slot-value msg 'float32_array)))
    (cl:dotimes (i __ros_arr_len)
    (cl:let ((bits 0))
      (cl:setf (cl:ldb (cl:byte 8 0) bits) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 8) bits) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 16) bits) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 24) bits) (cl:read-byte istream))
    (cl:setf (cl:aref vals i) (roslisp-utils:decode-single-float-bits bits))))))
  (cl:let ((__ros_arr_len 0))
    (cl:setf (cl:ldb (cl:byte 8 0) __ros_arr_len) (cl:read-byte istream))
    (cl:setf (cl:ldb (cl:byte 8 8) __ros_arr_len) (cl:read-byte istream))
    (cl:setf (cl:ldb (cl:byte 8 16) __ros_arr_len) (cl:read-byte istream))
    (cl:setf (cl:ldb (cl:byte 8 24) __ros_arr_len) (cl:read-byte istream))
  (cl:setf (cl:slot-value msg 'time_array) (cl:make-array __ros_arr_len))
  (cl:let ((vals (cl:slot-value msg 'time_array)))
    (cl:dotimes (i __ros_arr_len)
    (cl:let ((__sec 0) (__nsec 0))
      (cl:setf (cl:ldb (cl:byte 8 0) __sec) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 8) __sec) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 16) __sec) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 24) __sec) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 0) __nsec) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 8) __nsec) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 16) __nsec) (cl:read-byte istream))
      (cl:setf (cl:ldb (cl:byte 8 24) __nsec) (cl:read-byte istream))
      (cl:setf (cl:aref vals i) (cl:+ (cl:coerce __sec 'cl:double-float) (cl:/ __nsec 1e9)))))))
  (cl:let ((__ros_arr_len 0))
    (cl:setf (cl:ldb (cl:byte 8 0) __ros_arr_len) (cl:read-byte istream))
    (cl:setf (cl:ldb (cl:byte 8 8) __ros_arr_len) (cl:read-byte istream))
    (cl:setf (cl:ldb (cl:byte 8 16) __ros_arr_len) (cl:read-byte istream))
    (cl:setf (cl:ldb (cl:byte 8 24) __ros_arr_len) (cl:read-byte istream))
  (cl:setf (cl:slot-value msg 'test_string_array) (cl:make-array __ros_arr_len))
  (cl:let ((vals (cl:slot-value msg 'test_string_array)))
    (cl:dotimes (i __ros_arr_len)
    (cl:setf (cl:aref vals i) (cl:make-instance 'test_ros-msg:TestString))
  (roslisp-msg-protocol:deserialize (cl:aref vals i) istream))))
  msg
)
(cl:defmethod roslisp-msg-protocol:ros-datatype ((msg (cl:eql '<TestArrays>)))
  "Returns string type for a message object of type '<TestArrays>"
  "test_ros/TestArrays")
(cl:defmethod roslisp-msg-protocol:ros-datatype ((msg (cl:eql 'TestArrays)))
  "Returns string type for a message object of type 'TestArrays"
  "test_ros/TestArrays")
(cl:defmethod roslisp-msg-protocol:md5sum ((type (cl:eql '<TestArrays>)))
  "Returns md5sum for a message object of type '<TestArrays>"
  "4cc9b5e2cebe791aa3e994f5bc159eb6")
(cl:defmethod roslisp-msg-protocol:md5sum ((type (cl:eql 'TestArrays)))
  "Returns md5sum for a message object of type 'TestArrays"
  "4cc9b5e2cebe791aa3e994f5bc159eb6")
(cl:defmethod roslisp-msg-protocol:message-definition ((type (cl:eql '<TestArrays>)))
  "Returns full string definition for message of type '<TestArrays>"
  (cl:format cl:nil "# 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~%~%int32[] int32_array~%float32[] float32_array~%time[] time_array~%TestString[] test_string_array~%# TODO: array of arrays~%~%================================================================================~%MSG: test_ros/TestString~%# Integration test message~%# 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 data~%~%~%"))
(cl:defmethod roslisp-msg-protocol:message-definition ((type (cl:eql 'TestArrays)))
  "Returns full string definition for message of type 'TestArrays"
  (cl:format cl:nil "# 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~%~%int32[] int32_array~%float32[] float32_array~%time[] time_array~%TestString[] test_string_array~%# TODO: array of arrays~%~%================================================================================~%MSG: test_ros/TestString~%# Integration test message~%# 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 data~%~%~%"))
(cl:defmethod roslisp-msg-protocol:serialization-length ((msg <TestArrays>))
  (cl:+ 0
     4 (cl:length (cl:slot-value msg 'caller_id))
     4 (cl:length (cl:slot-value msg 'orig_caller_id))
     4 (cl:reduce #'cl:+ (cl:slot-value msg 'int32_array) :key #'(cl:lambda (ele) (cl:declare (cl:ignorable ele)) (cl:+ 4)))
     4 (cl:reduce #'cl:+ (cl:slot-value msg 'float32_array) :key #'(cl:lambda (ele) (cl:declare (cl:ignorable ele)) (cl:+ 4)))
     4 (cl:reduce #'cl:+ (cl:slot-value msg 'time_array) :key #'(cl:lambda (ele) (cl:declare (cl:ignorable ele)) (cl:+ 8)))
     4 (cl:reduce #'cl:+ (cl:slot-value msg 'test_string_array) :key #'(cl:lambda (ele) (cl:declare (cl:ignorable ele)) (cl:+ (roslisp-msg-protocol:serialization-length ele))))
))
(cl:defmethod roslisp-msg-protocol:ros-message-to-list ((msg <TestArrays>))
  "Converts a ROS message object to a list"
  (cl:list 'TestArrays
    (cl:cons ':caller_id (caller_id msg))
    (cl:cons ':orig_caller_id (orig_caller_id msg))
    (cl:cons ':int32_array (int32_array msg))
    (cl:cons ':float32_array (float32_array msg))
    (cl:cons ':time_array (time_array msg))
    (cl:cons ':test_string_array (test_string_array msg))
))
