March 2018
Beginner to intermediate
410 pages
10h 40m
English
We are now ready to perform the control action. First, we need to get the full JID of the actuator. This is done by checking the last presence sent by the actuator. This is stored in the corresponding roster item. Note that we can only perform the control action if the actuator is online:
if (!string.IsNullOrEmpty(this.actuatorJid) &&
(!this.output.HasValue || this.output.Value != Output))
{
RosterItem Actuator = this.xmppClient[this.actuatorJid];
if (Actuator != null &&
Actuator.HasLastPresence &&
Actuator.LastPresence.IsOnline)
{
Performing a control operation on an actuator is done by calling the Set() method on the ControlClient object instance. As when subscribing to events, we must differentiate between an ...
Read now
Unlock full access