public static NotificationParameters NewChangeOfState(PropertyStates newState, StatusFlags statusFlags)
 {
     return new ChangeOfState(newState, statusFlags);
 }
 public ChangeOfState(PropertyStates newState, StatusFlags statusFlags)
 {
     this.NewState = newState;
     this.StatusFlags = statusFlags;
 }
Example #3
0
 public static void Save(IValueSink sink, PropertyStates value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.BooleanValue:
             Value<BooleanValueWrapper>.Save(sink, (BooleanValueWrapper)value);
             break;
         case Tags.BinaryValue:
             Value<BinaryValueWrapper>.Save(sink, (BinaryValueWrapper)value);
             break;
         case Tags.EventType:
             Value<EventTypeWrapper>.Save(sink, (EventTypeWrapper)value);
             break;
         case Tags.Polarity:
             Value<PolarityWrapper>.Save(sink, (PolarityWrapper)value);
             break;
         case Tags.ProgramChange:
             Value<ProgramChangeWrapper>.Save(sink, (ProgramChangeWrapper)value);
             break;
         case Tags.ProgramState:
             Value<ProgramStateWrapper>.Save(sink, (ProgramStateWrapper)value);
             break;
         case Tags.ReasonForHalt:
             Value<ReasonForHaltWrapper>.Save(sink, (ReasonForHaltWrapper)value);
             break;
         case Tags.Reliability:
             Value<ReliabilityWrapper>.Save(sink, (ReliabilityWrapper)value);
             break;
         case Tags.State:
             Value<StateWrapper>.Save(sink, (StateWrapper)value);
             break;
         case Tags.SystemStatus:
             Value<SystemStatusWrapper>.Save(sink, (SystemStatusWrapper)value);
             break;
         case Tags.Units:
             Value<UnitsWrapper>.Save(sink, (UnitsWrapper)value);
             break;
         case Tags.UnsignedValue:
             Value<UnsignedValueWrapper>.Save(sink, (UnsignedValueWrapper)value);
             break;
         case Tags.LifeSafetyMode:
             Value<LifeSafetyModeWrapper>.Save(sink, (LifeSafetyModeWrapper)value);
             break;
         case Tags.LifeSafetyState:
             Value<LifeSafetyStateWrapper>.Save(sink, (LifeSafetyStateWrapper)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
Example #4
0
 public ChangeOfState(PropertyStates newState, StatusFlags statusFlags)
 {
     this.NewState    = newState;
     this.StatusFlags = statusFlags;
 }
Example #5
0
 public static NotificationParameters NewChangeOfState(PropertyStates newState, StatusFlags statusFlags)
 {
     return(new ChangeOfState(newState, statusFlags));
 }
Example #6
0
        public static void Save(IValueSink sink, PropertyStates value)
        {
            sink.EnterChoice((byte)value.Tag);
            switch (value.Tag)
            {
            case Tags.BooleanValue:
                Value <BooleanValueWrapper> .Save(sink, (BooleanValueWrapper)value);

                break;

            case Tags.BinaryValue:
                Value <BinaryValueWrapper> .Save(sink, (BinaryValueWrapper)value);

                break;

            case Tags.EventType:
                Value <EventTypeWrapper> .Save(sink, (EventTypeWrapper)value);

                break;

            case Tags.Polarity:
                Value <PolarityWrapper> .Save(sink, (PolarityWrapper)value);

                break;

            case Tags.ProgramChange:
                Value <ProgramChangeWrapper> .Save(sink, (ProgramChangeWrapper)value);

                break;

            case Tags.ProgramState:
                Value <ProgramStateWrapper> .Save(sink, (ProgramStateWrapper)value);

                break;

            case Tags.ReasonForHalt:
                Value <ReasonForHaltWrapper> .Save(sink, (ReasonForHaltWrapper)value);

                break;

            case Tags.Reliability:
                Value <ReliabilityWrapper> .Save(sink, (ReliabilityWrapper)value);

                break;

            case Tags.State:
                Value <StateWrapper> .Save(sink, (StateWrapper)value);

                break;

            case Tags.SystemStatus:
                Value <SystemStatusWrapper> .Save(sink, (SystemStatusWrapper)value);

                break;

            case Tags.Units:
                Value <UnitsWrapper> .Save(sink, (UnitsWrapper)value);

                break;

            case Tags.UnsignedValue:
                Value <UnsignedValueWrapper> .Save(sink, (UnsignedValueWrapper)value);

                break;

            case Tags.LifeSafetyMode:
                Value <LifeSafetyModeWrapper> .Save(sink, (LifeSafetyModeWrapper)value);

                break;

            case Tags.LifeSafetyState:
                Value <LifeSafetyStateWrapper> .Save(sink, (LifeSafetyStateWrapper)value);

                break;

            default:
                throw new Exception();
            }
            sink.LeaveChoice();
        }
Example #7
0
        public static PropertyStates Load(IValueStream stream)
        {
            PropertyStates ret = null;
            Tags           tag = (Tags)stream.EnterChoice();

            switch (tag)
            {
            case Tags.BooleanValue:
                ret = Value <BooleanValueWrapper> .Load(stream);

                break;

            case Tags.BinaryValue:
                ret = Value <BinaryValueWrapper> .Load(stream);

                break;

            case Tags.EventType:
                ret = Value <EventTypeWrapper> .Load(stream);

                break;

            case Tags.Polarity:
                ret = Value <PolarityWrapper> .Load(stream);

                break;

            case Tags.ProgramChange:
                ret = Value <ProgramChangeWrapper> .Load(stream);

                break;

            case Tags.ProgramState:
                ret = Value <ProgramStateWrapper> .Load(stream);

                break;

            case Tags.ReasonForHalt:
                ret = Value <ReasonForHaltWrapper> .Load(stream);

                break;

            case Tags.Reliability:
                ret = Value <ReliabilityWrapper> .Load(stream);

                break;

            case Tags.State:
                ret = Value <StateWrapper> .Load(stream);

                break;

            case Tags.SystemStatus:
                ret = Value <SystemStatusWrapper> .Load(stream);

                break;

            case Tags.Units:
                ret = Value <UnitsWrapper> .Load(stream);

                break;

            case Tags.UnsignedValue:
                ret = Value <UnsignedValueWrapper> .Load(stream);

                break;

            case Tags.LifeSafetyMode:
                ret = Value <LifeSafetyModeWrapper> .Load(stream);

                break;

            case Tags.LifeSafetyState:
                ret = Value <LifeSafetyStateWrapper> .Load(stream);

                break;

            default:
                throw new Exception();
            }
            stream.LeaveChoice();
            return(ret);
        }