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"); }
/* * (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"); }