Esempio n. 1
0
 public void Execute(Client client, Imagination.Model.Object lwm2mObject, List<Model.Property> properties)
 {
     foreach (Model.Property item in properties)
     {
         DataAccessFactory.Servers.Execute(client, lwm2mObject.ObjectDefinitionID, lwm2mObject.InstanceID, item);
     }
 }
Esempio n. 2
0
 public void SaveObject(Client client, Imagination.Model.Object lwm2mObject, Model.TObjectState state)
 {
     DataAccessFactory.Servers.SaveObject(client, lwm2mObject, state);
 }
Esempio n. 3
0
 public void SaveObject(Client client, Imagination.Model.Object lwm2mObject, Model.TObjectState state)
 {
     Service.ILWM2MServerService service = GetService(client.Server);
     lock (service)
     {
         string instanceID = service.SaveObject(client.ClientID, lwm2mObject, state);
         if (!string.IsNullOrEmpty(instanceID))
         {
             lwm2mObject.InstanceID = instanceID;
         }
     }
 }
Esempio n. 4
0
 public string SaveObject(Guid clientID, Imagination.Model.Object item, Model.TObjectState state)
 {
     string result = null;
     IPCRequest request = new IPCRequest();
     request.Method = "SaveObject";
     request.AddToPayload(clientID);
     item.Serialise(request.Payload);
     request.AddToPayload((int)state);
     SendRequest(request);
     if (_ResponseBytes.Length > 0)
     {
         CheckError();
         result = Encoding.UTF8.GetString(_ResponseBytes, 4, _ResponseBytes.Length - 4);
     }
     return result;
 }