public bool SetSessionId(uint sessionId, bool commit) { bool failed = false; failed |= OmApi.OM_FAILED(OmApi.OmSetSessionId(deviceId, sessionId)); if (commit) { failed |= OmApi.OM_FAILED(OmApi.OmCommit(deviceId)); } //validData = false; if (!failed) { this.sessionId = sessionId; } hasChanged = true; om.OnChanged(new OmDeviceEventArgs(this)); return(!failed); }
public bool SetInterval(DateTime start, DateTime stop) { bool failed = false; failed |= OmApi.OM_FAILED(OmApi.OmSetDelays(deviceId, OmApi.OmDateTimePack(start), OmApi.OmDateTimePack(stop))); if (!failed) { failed |= OmApi.OM_FAILED(OmApi.OmCommit(deviceId)); } //validData = false; if (!failed) { this.startTime = start; this.stopTime = stop; } hasChanged = true; om.OnChanged(new OmDeviceEventArgs(this)); return(!failed); }