public void registerDevice(Lib.SiteWhere.SiteWhere.Types.RegisterDevice register, String originator) { string json = @"{ 'hardwareId': '" + register.HardwareId + @"', 'type': 'RegisterDevice', 'request': { 'hardwareId': '" + register.HardwareId + @"', 'specificationToken': '" + register.SpecificationToken + @"', 'siteToken':'" + register.SiteToken + @"' } } "; sendMessage(json.Replace("'", "\""), "registration"); }
/* * (non-Javadoc) * * @see * com.sitewhere.agent.ISiteWhereEventDispatcher#registerDevice(com.sitewhere. * device.communication.protobuf.proto.Sitewhere.SiteWhere.RegisterDevice, * java.lang.String) */ public void registerDevice(Lib.SiteWhere.SiteWhere.Types.RegisterDevice register, String originator) { sendMessage(Lib.SiteWhere.SiteWhere.Types.Command.SendRegistration, register, originator, "registration"); }