/** * Method: FeedbackEvent * Access: public * Description: Receive Feedback signals from S+ and propogate them to UpdateShadeFB event subscribers */ public void FeedbackEvent(ushort _action, ushort _state) { ShadeCommand _act = (ShadeCommand)_action; // Store Fb in class switch (_act) { case ShadeCommand.Up_Fb: this.Up_Fb = _state == 1 ? true : false; break; case ShadeCommand.Down_Fb: this.Down_Fb = _state == 1 ? true : false; break; case ShadeCommand.Stop_Fb: this.Stop_Fb = _state == 1 ? true : false; break; case ShadeCommand.Moving_Fb: this.Moving_Fb = _state == 1 ? true : false; break; } // Broadcast to Event subscribers if (this.UpdateShadeFb != null) { UpdateShadeFb(this.id, _act, _state); } }
/** * Method: SendShadeCommand * Access: public * Description: Receive Commands from Interfaces and pass to S+ via TriggerShadeCommand delegate */ public void SendShadeCommand(ShadeCommand _cmd, ushort _state) { if (TriggerShadeCommand != null) { TriggerShadeCommand((ushort)_cmd, _state); } }