public void ObserveObjects(Guid clientID, Guid objectDefinitionID) { IPCRequest request = new IPCRequest(); request.Method = "ObserveObjects"; request.AddToPayload(clientID); request.AddToPayload(objectDefinitionID); SendRequest(request); }
public void CancelObserveObjects(Guid clientID, Guid objectDefinitionID, bool useReset) { IPCRequest request = new IPCRequest(); request.Method = "CancelObserveObjects"; request.AddToPayload(clientID); request.AddToPayload(objectDefinitionID); request.AddToPayload(useReset); SendRequest(request); }
public void ObserveObjectProperty(Guid clientID, Guid objectDefinitionID, string instanceID, Guid propertyMetadataID) { IPCRequest request = new IPCRequest(); request.Method = "ObserveObjectProperty"; request.AddToPayload(clientID); request.AddToPayload(objectDefinitionID); request.AddToPayload(instanceID); request.AddToPayload(propertyMetadataID); SendRequest(request); }
public void SaveObjectProperty(Guid clientID, Guid objectDefinitionID, string instanceID, Property property, Model.TObjectState state) { IPCRequest request = new IPCRequest(); request.Method = "SaveObjectProperty"; request.AddToPayload(clientID); request.AddToPayload(objectDefinitionID); request.AddToPayload(instanceID); property.Serialise(request.Payload); request.AddToPayload((int)state); SendRequest(request); }
public Imagination.Model.Object GetObject(Guid clientID, Guid objectDefinitionID, string instanceID) { Imagination.Model.Object result = null; IPCRequest request = new IPCRequest(); request.Method = "GetObject"; request.AddToPayload(clientID); request.AddToPayload(objectDefinitionID); request.AddToPayload(instanceID); SendRequest(request); if (_ResponseBytes.Length > 0) { result = Imagination.Model.Object.Deserialise(new MemoryStream(_ResponseBytes)); } return(result); }
public void SetDataFormat(TDataFormat dataFormat) { IPCRequest request = new IPCRequest(); request.Method = "SetDataFormat"; request.AddToPayload((int)dataFormat); SendRequest(request); }
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); }
public Property GetObjectProperty(Guid clientID, Guid objectDefinitionID, string instanceID, Guid propertyMetadataID) { Property result = null; IPCRequest request = new IPCRequest(); request.Method = "GetObjectProperty"; request.AddToPayload(clientID); request.AddToPayload(objectDefinitionID); request.AddToPayload(instanceID); request.AddToPayload(propertyMetadataID); SendRequest(request); if (_ResponseBytes.Length > 0) { result = Property.Deserialise(new MemoryStream(_ResponseBytes)); } return(result); }
public bool ExecuteResource(Guid clientID, Guid objectDefinitionID, string instanceID, Guid propertyMetadataID) { bool result = false; IPCRequest request = new IPCRequest(); request.Method = "ExecuteResource"; request.AddToPayload(clientID); request.AddToPayload(objectDefinitionID); request.AddToPayload(instanceID); request.AddToPayload(propertyMetadataID); SendRequest(request); if (_ResponseBytes.Length > 0) { result = _ResponseBytes[0] != 0x00; } return(result); }
public void DeleteClient(Guid clientID) { IPCRequest request = new IPCRequest(); request.Method = "DeleteClient"; request.AddToPayload(clientID); SendRequest(request); }
public bool SetNotificationParameters(Guid clientID, Guid objectDefinitionID, string instanceID, Guid propertyMetadataID, NotificationParameters notificationParameters) { bool result = false; IPCRequest request = new IPCRequest(); request.Method = "SetNotificationParameters"; request.AddToPayload(clientID); request.AddToPayload(objectDefinitionID); request.AddToPayload(instanceID); request.AddToPayload(propertyMetadataID); notificationParameters.Serialise(request.Payload); SendRequest(request); if (_ResponseBytes.Length > 0) { result = _ResponseBytes[0] != 0x00; } return(result); }
public List <Imagination.Model.Object> GetObjects(Guid clientID, Guid objectDefinitionID) { List <Imagination.Model.Object> result = new List <Imagination.Model.Object>(); IPCRequest request = new IPCRequest(); request.Method = "GetObjects"; request.AddToPayload(clientID); request.AddToPayload(objectDefinitionID); SendRequest(request); if (_ResponseBytes.Length > 0) { MemoryStream stream = new MemoryStream(_ResponseBytes); while (stream.Position < stream.Length) { result.Add(Imagination.Model.Object.Deserialise(stream)); } } return(result); }
public DeviceConnectedStatus GetDeviceConnectedStatus(Guid clientID) { DeviceConnectedStatus result = null; IPCRequest request = new IPCRequest(); request.Method = "GetDeviceConnectedStatus"; request.AddToPayload(clientID); SendRequest(request); if (_ResponseBytes.Length > 0) { result = DeviceConnectedStatus.Deserialise(new MemoryStream(_ResponseBytes)); } return(result); }