private void SendSubscribe(string publishToken, TesiraAttributeCode attributeCode) { var message = Tesira.FormatBaseMessage(InstanceTag, TesiraCommand.Subscribe, attributeCode) + " \"" + publishToken + "\" " + 200; Device.Send(message); }
protected void Unsubscribe(string publishToken) { if (Subscriptions.ContainsKey(publishToken)) { if (Device.DeviceCommunicating) { var message = Tesira.FormatBaseMessage(InstanceTag, TesiraCommand.Unsubscribe, Subscriptions[publishToken]) + " \"" + publishToken + "\""; Device.Send(message); } Subscriptions.Remove(publishToken); } }