Пример #1
0
        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");
        }
Пример #2
0
 /*
  * (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");
 }