Ejemplo n.º 1
0
        public void sendLocation(Lib.SiteWhere.Model.Types.DeviceLocation location, String originator)
        {
            var json = @" {
                    'hardwareId': '" + location.HardwareId + @"',
                    'type':'DeviceLocation',
                    'request': {
                        'latitude': '" + location.Latitude.ToString() + @"',
                        'longitude': '" + location.Longitude.ToString() + @"',
                        'elevation': '" + location.Elevation.ToString() + @"',
                        'updateState': true
                    }
                }";

            sendMessage(json.Replace("'", "\""), "location");
        }
Ejemplo n.º 2
0
 /*
  * (non-Javadoc)
  *
  * @see
  * com.sitewhere.agent.ISiteWhereEventDispatcher#sendLocation(com.sitewhere.device
  * .communication.protobuf.proto.Sitewhere.Model.DeviceLocation, java.lang.String)
  */
 public void sendLocation(Lib.SiteWhere.Model.Types.DeviceLocation location, String originator)
 {
     sendMessage(Lib.SiteWhere.SiteWhere.Types.Command.SendDeviceLocation, location, originator, "location");
 }