; Auto-generated. Do not edit!


(in-package nxt_msgs-msg)


;//! \htmlinclude Accelerometer.msg.html

(defclass <Accelerometer> (ros-message)
  ((header
    :reader header-val
    :initarg :header
    :type roslib-msg:<Header>
    :initform (make-instance 'roslib-msg:<Header>))
   (linear_acceleration
    :reader linear_acceleration-val
    :initarg :linear_acceleration
    :type geometry_msgs-msg:<Vector3>
    :initform (make-instance 'geometry_msgs-msg:<Vector3>))
   (linear_acceleration_covariance
    :reader linear_acceleration_covariance-val
    :initarg :linear_acceleration_covariance
    :type (vector float)
   :initform (make-array 9 :element-type 'float :initial-element 0.0)))
)
(defmethod serialize ((msg <Accelerometer>) ostream)
  "Serializes a message object of type '<Accelerometer>"
  (serialize (slot-value msg 'header) ostream)
  (serialize (slot-value msg 'linear_acceleration) ostream)
    (map nil #'(lambda (ele) (let ((bits (roslisp-utils:encode-double-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)
    (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)))(slot-value msg 'linear_acceleration_covariance))
)
(defmethod deserialize ((msg <Accelerometer>) istream)
  "Deserializes a message object of type '<Accelerometer>"
  (deserialize (slot-value msg 'header) istream)
  (deserialize (slot-value msg 'linear_acceleration) istream)
  (setf (slot-value msg 'linear_acceleration_covariance) (make-array 9))
  (let ((vals (slot-value msg 'linear_acceleration_covariance)))
    (dotimes (i 9)
(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 (aref vals i) (roslisp-utils:decode-double-float-bits bits)))))
  msg
)
(defmethod ros-datatype ((msg (eql '<Accelerometer>)))
  "Returns string type for a message object of type '<Accelerometer>"
  "nxt_msgs/Accelerometer")
(defmethod md5sum ((type (eql '<Accelerometer>)))
  "Returns md5sum for a message object of type '<Accelerometer>"
  "a43c5a788e7ba2f179354a76125182f0")
(defmethod message-definition ((type (eql '<Accelerometer>)))
  "Returns full string definition for message of type '<Accelerometer>"
  (format nil "Header header~%geometry_msgs/Vector3 linear_acceleration~%float64[9] linear_acceleration_covariance~%================================================================================~%MSG: roslib/Header~%# Standard metadata for higher-level stamped data types.~%# This is generally used to communicate timestamped data ~%# in a particular coordinate frame.~%# ~%# sequence ID: consecutively increasing ID ~%uint32 seq~%#Two-integer timestamp that is expressed as:~%# * stamp.secs: seconds (stamp_secs) since epoch~%# * stamp.nsecs: nanoseconds since stamp_secs~%# time-handling sugar is provided by the client library~%time stamp~%#Frame this data is associated with~%# 0: no frame~%# 1: global frame~%string frame_id~%~%================================================================================~%MSG: geometry_msgs/Vector3~%# This represents a vector in free space. ~%~%float64 x~%float64 y~%float64 z~%~%"))
(defmethod serialization-length ((msg <Accelerometer>))
  (+ 0
     (serialization-length (slot-value msg 'header))
     (serialization-length (slot-value msg 'linear_acceleration))
     0 (reduce #'+ (slot-value msg 'linear_acceleration_covariance) :key #'(lambda (ele) (declare (ignorable ele)) (+ 8)))
))
(defmethod ros-message-to-list ((msg <Accelerometer>))
  "Converts a ROS message object to a list"
  (list '<Accelerometer>
    (cons ':header (header-val msg))
    (cons ':linear_acceleration (linear_acceleration-val msg))
    (cons ':linear_acceleration_covariance (linear_acceleration_covariance-val msg))
))
