Beispiel #1
0
        public static void Save(IValueSink sink, NotificationParameters value)
        {
            sink.EnterChoice((byte)value.Tag);
            switch (value.Tag)
            {
            case Tags.ChangeOfBitstring:
                Value <ChangeOfBitstring> .Save(sink, (ChangeOfBitstring)value);

                break;

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

                break;

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

                break;

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

                break;

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

                break;

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

                break;

            case Tags.ComplexEventType:
                Value <ComplexEventTypeWrapper> .Save(sink, (ComplexEventTypeWrapper)value);

                break;

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

                break;

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

                break;

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

                break;

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

                break;

            default:
                throw new Exception();
            }
            sink.LeaveChoice();
        }
 public static void Save(IValueSink sink, NotificationParameters value)
 {
     sink.EnterChoice((byte)value.Tag);
     switch(value.Tag)
     {
         case Tags.ChangeOfBitstring:
             Value<ChangeOfBitstring>.Save(sink, (ChangeOfBitstring)value);
             break;
         case Tags.ChangeOfState:
             Value<ChangeOfState>.Save(sink, (ChangeOfState)value);
             break;
         case Tags.ChangeOfValue:
             Value<ChangeOfValue>.Save(sink, (ChangeOfValue)value);
             break;
         case Tags.CommandFailure:
             Value<CommandFailure>.Save(sink, (CommandFailure)value);
             break;
         case Tags.FloatingLimit:
             Value<FloatingLimit>.Save(sink, (FloatingLimit)value);
             break;
         case Tags.OutOfRange:
             Value<OutOfRange>.Save(sink, (OutOfRange)value);
             break;
         case Tags.ComplexEventType:
             Value<ComplexEventTypeWrapper>.Save(sink, (ComplexEventTypeWrapper)value);
             break;
         case Tags.ChangeOfLifeSafety:
             Value<ChangeOfLifeSafety>.Save(sink, (ChangeOfLifeSafety)value);
             break;
         case Tags.Extended:
             Value<Extended>.Save(sink, (Extended)value);
             break;
         case Tags.BufferReady:
             Value<BufferReady>.Save(sink, (BufferReady)value);
             break;
         case Tags.UnsignedRange:
             Value<UnsignedRange>.Save(sink, (UnsignedRange)value);
             break;
         default:
             throw new Exception();
     }
     sink.LeaveChoice();
 }
Beispiel #3
0
        public static NotificationParameters Load(IValueStream stream)
        {
            NotificationParameters ret = null;
            Tags tag = (Tags)stream.EnterChoice();

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

                break;

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

                break;

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

                break;

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

                break;

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

                break;

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

                break;

            case Tags.ComplexEventType:
                ret = Value <ComplexEventTypeWrapper> .Load(stream);

                break;

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

                break;

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

                break;

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

                break;

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

                break;

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