/// <summary> /// Determine if this mapping has been defined. /// </summary> /// <param name="type">Set to type to check</param> /// <returns>True is defined (non-empty)</returns> public bool isDefined(Constants.MapTypes type) { switch (type) { case Constants.MapTypes.ON: { if (OutputBytesStringOn == null) { return false; } if (OutputBytesStringOn.Equals("")) { return false; } } break; case Constants.MapTypes.OFF: { if (OutputBytesStringOff == null) { return false; } if (OutputBytesStringOff.Equals("")) { return false; } } break; case Constants.MapTypes.CC: { if (OutputBytesStringCC == null) { return false; } if (OutputBytesStringCC.Equals("")) { return false; } } break; default: return false; } return true; }
public void Triggered(Constants.MapTypes type) { switch (type) { case Constants.MapTypes.ON: TriggerPulseOn = 1.0; TriggerPulseOff = 0.0; break; case Constants.MapTypes.OFF: TriggerPulseOff = 1.0; TriggerPulseOn = 0.0; break; case Constants.MapTypes.CC: TriggerPulseCC = 1.0; break; } return; }