text: // Auto-generated. Do not edit!
  
  // (in-package geographic_msgs.msg)
  
  
  "use strict";
  
  const _serializer = _ros_msg_utils.Serialize;
  const _arraySerializer = _serializer.Array;
  const _deserializer = _ros_msg_utils.Deserialize;
  const _arrayDeserializer = _deserializer.Array;
  const _finder = _ros_msg_utils.Find;
  const _getByteLength = _ros_msg_utils.getByteLength;
  let BoundingBox = require('./BoundingBox.js');
  let WayPoint = require('./WayPoint.js');
  let RouteSegment = require('./RouteSegment.js');
  let KeyValue = require('./KeyValue.js');
  let std_msgs = _finder('std_msgs');
  let uuid_msgs = _finder('uuid_msgs');
  
  //-----------------------------------------------------------
  
  class RouteNetwork {
    constructor(initObj={}) {
      if (initObj === null) {
        // initObj === null is a special case for deserialization where we don't initialize fields
        this.header = null;
        this.id = null;
        this.bounds = null;
        this.points = null;
        this.segments = null;
        this.props = null;
      }
      else {
        if (initObj.hasOwnProperty('header')) {
          this.header = initObj.header
        }
        else {
          this.header = new std_msgs.msg.Header();
        }
        if (initObj.hasOwnProperty('id')) {
          this.id = initObj.id
        }
        else {
          this.id = new uuid_msgs.msg.UniqueID();
        }
        if (initObj.hasOwnProperty('bounds')) {
          this.bounds = initObj.bounds
        }
        else {
          this.bounds = new BoundingBox();
        }
        if (initObj.hasOwnProperty('points')) {
          this.points = initObj.points
        }
        else {
          this.points = [];
        }
        if (initObj.hasOwnProperty('segments')) {
          this.segments = initObj.segments
        }
        else {
          this.segments = [];
        }
        if (initObj.hasOwnProperty('props')) {
          this.props = initObj.props
        }
        else {
          this.props = [];
        }
      }
    }
  
    static serialize(obj, buffer, bufferOffset) {
      // Serializes a message object of type RouteNetwork
      // Serialize message field [header]
      bufferOffset = std_msgs.msg.Header.serialize(obj.header, buffer, bufferOffset);
      // Serialize message field [id]
      bufferOffset = uuid_msgs.msg.UniqueID.serialize(obj.id, buffer, bufferOffset);
      // Serialize message field [bounds]
      bufferOffset = BoundingBox.serialize(obj.bounds, buffer, bufferOffset);
      // Serialize message field [points]
      // Serialize the length for message field [points]
      bufferOffset = _serializer.uint32(obj.points.length, buffer, bufferOffset);
      obj.points.forEach((val) => {
        bufferOffset = WayPoint.serialize(val, buffer, bufferOffset);
      });
      // Serialize message field [segments]
      // Serialize the length for message field [segments]
      bufferOffset = _serializer.uint32(obj.segments.length, buffer, bufferOffset);
      obj.segments.forEach((val) => {
        bufferOffset = RouteSegment.serialize(val, buffer, bufferOffset);
      });
      // Serialize message field [props]
      // Serialize the length for message field [props]
      bufferOffset = _serializer.uint32(obj.props.length, buffer, bufferOffset);
      obj.props.forEach((val) => {
        bufferOffset = KeyValue.serialize(val, buffer, bufferOffset);
      });
      return bufferOffset;
    }
  
    static deserialize(buffer, bufferOffset=[0]) {
      //deserializes a message object of type RouteNetwork
      let len;
      let data = new RouteNetwork(null);
      // Deserialize message field [header]
      data.header = std_msgs.msg.Header.deserialize(buffer, bufferOffset);
      // Deserialize message field [id]
      data.id = uuid_msgs.msg.UniqueID.deserialize(buffer, bufferOffset);
      // Deserialize message field [bounds]
      data.bounds = BoundingBox.deserialize(buffer, bufferOffset);
      // Deserialize message field [points]
      // Deserialize array length for message field [points]
      len = _deserializer.uint32(buffer, bufferOffset);
      data.points = new Array(len);
      for (let i = 0; i < len; ++i) {
        data.points[i] = WayPoint.deserialize(buffer, bufferOffset)
      }
      // Deserialize message field [segments]
      // Deserialize array length for message field [segments]
      len = _deserializer.uint32(buffer, bufferOffset);
      data.segments = new Array(len);
      for (let i = 0; i < len; ++i) {
        data.segments[i] = RouteSegment.deserialize(buffer, bufferOffset)
      }
      // Deserialize message field [props]
      // Deserialize array length for message field [props]
      len = _deserializer.uint32(buffer, bufferOffset);
      data.props = new Array(len);
      for (let i = 0; i < len; ++i) {
        data.props[i] = KeyValue.deserialize(buffer, bufferOffset)
      }
      return data;
    }
  
    static getMessageSize(object) {
      let length = 0;
      length += std_msgs.msg.Header.getMessageSize(object.header);
      object.points.forEach((val) => {
        length += WayPoint.getMessageSize(val);
      });
      object.segments.forEach((val) => {
        length += RouteSegment.getMessageSize(val);
      });
      object.props.forEach((val) => {
        length += KeyValue.getMessageSize(val);
      });
      return length + 76;
    }
  
    static datatype() {
      // Returns string type for a message object
      return 'geographic_msgs/RouteNetwork';
    }
  
    static md5sum() {
      //Returns md5sum for a message object
      return 'fd717c0a34a7c954deed32c6847f30a8';
    }
  
    static messageDefinition() {
      // Returns full string definition for message
      return `
      # Geographic map route network.
      #
      # A directed graph of WayPoint nodes and RouteSegment edges.  This
      # information is extracted from the more-detailed contents of a
      # GeographicMap.  A RouteNetwork contains only the way points and
      # route segments of interest for path planning.
      
      Header          header
      
      uuid_msgs/UniqueID id    # This route network identifier
      BoundingBox     bounds   # 2D bounding box for network
      
      WayPoint[]      points   # Way points in this network
      RouteSegment[]  segments # Directed edges of this network
      
      KeyValue[]      props    # Network key/value properties
      
      ================================================================================
      MSG: std_msgs/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.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')
      # * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')
      # 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: uuid_msgs/UniqueID
      # A universally unique identifier (UUID).
      #
      #  http://en.wikipedia.org/wiki/Universally_unique_identifier
      #  http://tools.ietf.org/html/rfc4122.html
      
      uint8[16] uuid
      
      ================================================================================
      MSG: geographic_msgs/BoundingBox
      # Geographic map bounding box. 
      #
      # The two GeoPoints denote diagonally opposite corners of the box.
      #
      # If min_pt.latitude is NaN, the bounding box is "global", matching
      # any valid latitude, longitude and altitude.
      #
      # If min_pt.altitude is NaN, the bounding box is two-dimensional and
      # matches any altitude within the specified latitude and longitude
      # range.
      
      GeoPoint min_pt         # lowest and most Southwestern corner
      GeoPoint max_pt         # highest and most Northeastern corner
      
      ================================================================================
      MSG: geographic_msgs/GeoPoint
      # Geographic point, using the WGS 84 reference ellipsoid.
      
      # Latitude [degrees]. Positive is north of equator; negative is south
      # (-90 <= latitude <= +90).
      float64 latitude
      
      # Longitude [degrees]. Positive is east of prime meridian; negative is
      # west (-180 <= longitude <= +180). At the poles, latitude is -90 or
      # +90, and longitude is irrelevant, but must be in range.
      float64 longitude
      
      # Altitude [m]. Positive is above the WGS 84 ellipsoid (NaN if unspecified).
      float64 altitude
      
      ================================================================================
      MSG: geographic_msgs/WayPoint
      # Way-point element for a geographic map.
      
      uuid_msgs/UniqueID id   # Unique way-point identifier
      GeoPoint   position     # Position relative to WGS 84 ellipsoid
      KeyValue[] props        # Key/value properties for this point
      
      ================================================================================
      MSG: geographic_msgs/KeyValue
      # Geographic map tag (key, value) pair
      #
      # This is equivalent to diagnostic_msgs/KeyValue, repeated here to
      # avoid introducing a trivial stack dependency.
      
      string key                     # tag label
      string value                   # corresponding value
      
      ================================================================================
      MSG: geographic_msgs/RouteSegment
      # Route network segment.
      #
      # This is one directed edge of a RouteNetwork graph. It represents a
      # known path from one way point to another.  If the path is two-way,
      # there will be another RouteSegment with "start" and "end" reversed.
      
      uuid_msgs/UniqueID id           # Unique identifier for this segment
      
      uuid_msgs/UniqueID start        # beginning way point of segment
      uuid_msgs/UniqueID end          # ending way point of segment
      
      KeyValue[] props                # segment properties
      
      `;
    }
  
    static Resolve(msg) {
      // deep-construct a valid message object instance of whatever was passed in
      if (typeof msg !== 'object' || msg === null) {
        msg = {};
      }
      const resolved = new RouteNetwork(null);
      if (msg.header !== undefined) {
        resolved.header = std_msgs.msg.Header.Resolve(msg.header)
      }
      else {
        resolved.header = new std_msgs.msg.Header()
      }
  
      if (msg.id !== undefined) {
        resolved.id = uuid_msgs.msg.UniqueID.Resolve(msg.id)
      }
      else {
        resolved.id = new uuid_msgs.msg.UniqueID()
      }
  
      if (msg.bounds !== undefined) {
        resolved.bounds = BoundingBox.Resolve(msg.bounds)
      }
      else {
        resolved.bounds = new BoundingBox()
      }
  
      if (msg.points !== undefined) {
        resolved.points = new Array(msg.points.length);
        for (let i = 0; i < resolved.points.length; ++i) {
          resolved.points[i] = WayPoint.Resolve(msg.points[i]);
        }
      }
      else {
        resolved.points = []
      }
  
      if (msg.segments !== undefined) {
        resolved.segments = new Array(msg.segments.length);
        for (let i = 0; i < resolved.segments.length; ++i) {
          resolved.segments[i] = RouteSegment.Resolve(msg.segments[i]);
        }
      }
      else {
        resolved.segments = []
      }
  
      if (msg.props !== undefined) {
        resolved.props = new Array(msg.props.length);
        for (let i = 0; i < resolved.props.length; ++i) {
          resolved.props[i] = KeyValue.Resolve(msg.props[i]);
        }
      }
      else {
        resolved.props = []
      }
  
      return resolved;
      }
  };
  
  module.exports = RouteNetwork;
  