示例#1
0
 public static SetpointReference Load(IValueStream stream)
 {
     stream.EnterSequence();
     var reference = Value<Option<ObjectPropertyReference>>.Load(stream);
     stream.LeaveSequence();
     return new SetpointReference(reference);
 }
示例#2
0
 public static AuthenticateAck Load(IValueStream stream)
 {
     stream.EnterSequence();
     var modifiedRandomNumber = Value<uint>.Load(stream);
     stream.LeaveSequence();
     return new AuthenticateAck(modifiedRandomNumber);
 }
示例#3
0
 public static VTOpenAck Load(IValueStream stream)
 {
     stream.EnterSequence();
     var remoteVTSessionIdentifier = Value<byte>.Load(stream);
     stream.LeaveSequence();
     return new VTOpenAck(remoteVTSessionIdentifier);
 }
示例#4
0
            public static RangeType Load(IValueStream stream)
            {
                RangeType ret = null;
                Tags      tag = (Tags)stream.EnterChoice();

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

                    break;

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

                    break;

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

                    break;

                default:
                    throw new Exception();
                }
                stream.LeaveChoice();
                return(ret);
            }
            public static TestType Load(IValueStream stream)
            {
                stream.EnterSequence();
                var nullValue     = stream.GetNull();
                var booleanValue  = stream.GetBoolean();
                var optionalValue = Value <Option <byte> > .Loader(stream);

                var         choice      = stream.EnterChoice();
                ITestChoice choiceValue = null;

                switch (choice)
                {
                case 0:
                    choiceValue = FloatChoice.Load(stream);
                    break;

                case 1:
                    choiceValue = DoubleChoice.Load(stream);
                    break;

                case 2:
                    choiceValue = StringChoice.Load(stream);
                    break;
                }
                stream.LeaveChoice();

                var arrayValue = ReadOnlyArray <ushort> .Load(stream);

                return(new TestType(nullValue, booleanValue, optionalValue, choiceValue, arrayValue));
            }
示例#6
0
        public static ConfirmedEventNotificationRequest Load(IValueStream stream)
        {
            stream.EnterSequence();
            var processIdentifier = Value <uint> .Load(stream);

            var initiatingDeviceIdentifier = Value <ObjectId> .Load(stream);

            var eventObjectIdentifier = Value <ObjectId> .Load(stream);

            var timeStamp = Value <TimeStamp> .Load(stream);

            var notificationClass = Value <uint> .Load(stream);

            var priority = Value <byte> .Load(stream);

            var eventType = Value <EventType> .Load(stream);

            var messageText = Value <Option <string> > .Load(stream);

            var notifyType = Value <NotifyType> .Load(stream);

            var ackRequired = Value <Option <bool> > .Load(stream);

            var fromState = Value <Option <EventState> > .Load(stream);

            var toState = Value <EventState> .Load(stream);

            var eventValues = Value <Option <NotificationParameters> > .Load(stream);

            stream.LeaveSequence();
            return(new ConfirmedEventNotificationRequest(processIdentifier, initiatingDeviceIdentifier, eventObjectIdentifier, timeStamp, notificationClass, priority, eventType, messageText, notifyType, ackRequired, fromState, toState, eventValues));
        }
示例#7
0
 public static DailySchedule Load(IValueStream stream)
 {
     stream.EnterSequence();
     var daySchedule = Value<ReadOnlyArray<TimeValue>>.Load(stream);
     stream.LeaveSequence();
     return new DailySchedule(daySchedule);
 }
 public static WritePropertyMultipleRequest Load(IValueStream stream)
 {
     stream.EnterSequence();
     var listOfwriteAccessSpecifications = Value<ReadOnlyArray<WriteAccessSpecification>>.Load(stream);
     stream.LeaveSequence();
     return new WritePropertyMultipleRequest(listOfwriteAccessSpecifications);
 }
示例#9
0
 public static DeleteObjectRequest Load(IValueStream stream)
 {
     stream.EnterSequence();
     var objectIdentifier = Value<ObjectId>.Load(stream);
     stream.LeaveSequence();
     return new DeleteObjectRequest(objectIdentifier);
 }
示例#10
0
        public static CalendarEntry Load(IValueStream stream)
        {
            CalendarEntry ret = null;
            Tags          tag = (Tags)stream.EnterChoice();

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

                break;

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

                break;

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

                break;

            default:
                throw new Exception();
            }
            stream.LeaveChoice();
            return(ret);
        }
 public static TimeSynchronizationRequest Load(IValueStream stream)
 {
     stream.EnterSequence();
     var time = Value<DateAndTime>.Load(stream);
     stream.LeaveSequence();
     return new TimeSynchronizationRequest(time);
 }
 public static bool TryGetValueStream <TValue>(
     this IProgrammingInterface api,
     ValueStreamIdentitfier <TValue> identifier,
     out IValueStream <TValue> invocator)
 {
     return(api.TryGetValueStream(identifier.Identifier, out invocator));
 }
 public static GetEventInformationRequest Load(IValueStream stream)
 {
     stream.EnterSequence();
     var lastReceivedObjectIdentifier = Value<Option<ObjectId>>.Load(stream);
     stream.LeaveSequence();
     return new GetEventInformationRequest(lastReceivedObjectIdentifier);
 }
示例#14
0
 public static VTCloseRequest Load(IValueStream stream)
 {
     stream.EnterSequence();
     var listOfRemoteVTSessionIdentifiers = Value<ReadOnlyArray<byte>>.Load(stream);
     stream.LeaveSequence();
     return new VTCloseRequest(listOfRemoteVTSessionIdentifiers);
 }
示例#15
0
        public static TimeStamp Load(IValueStream stream)
        {
            TimeStamp ret = null;
            Tags      tag = (Tags)stream.EnterChoice();

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

                break;

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

                break;

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

                break;

            default:
                throw new Exception();
            }
            stream.LeaveChoice();
            return(ret);
        }
示例#16
0
 public static ReadPropertyMultipleAck Load(IValueStream stream)
 {
     stream.EnterSequence();
     var listOfReadAccessResults = Value<ReadOnlyArray<ReadAccessResult>>.Load(stream);
     stream.LeaveSequence();
     return new ReadPropertyMultipleAck(listOfReadAccessResults);
 }
示例#17
0
 public static ActionList Load(IValueStream stream)
 {
     stream.EnterSequence();
     var action = Value<ReadOnlyArray<ActionCommand>>.Load(stream);
     stream.LeaveSequence();
     return new ActionList(action);
 }
示例#18
0
        public static TValue ReadCurrentValueFromStream <TValue>(this IValueStream <TValue> stream)
        {
            var listener = new ConstantValueStreamListener <TValue>();

            using var token = stream.AddListener(listener);
            return(listener.Value);
        }
        public static WritePropertyMultipleRequest Load(IValueStream stream)
        {
            stream.EnterSequence();
            var listOfwriteAccessSpecifications = Value <ReadOnlyArray <WriteAccessSpecification> > .Load(stream);

            stream.LeaveSequence();
            return(new WritePropertyMultipleRequest(listOfwriteAccessSpecifications));
        }
示例#20
0
 public static WhoIsRequest Load(IValueStream stream)
 {
     stream.EnterSequence();
     var deviceInstanceRangeLowLimit = Value<Option<uint>>.Load(stream);
     var deviceInstanceRangeHighLimit = Value<Option<uint>>.Load(stream);
     stream.LeaveSequence();
     return new WhoIsRequest(deviceInstanceRangeLowLimit, deviceInstanceRangeHighLimit);
 }
示例#21
0
 public static VTOpenRequest Load(IValueStream stream)
 {
     stream.EnterSequence();
     var vtClass = Value<VTClass>.Load(stream);
     var localVTSessionIdentifier = Value<byte>.Load(stream);
     stream.LeaveSequence();
     return new VTOpenRequest(vtClass, localVTSessionIdentifier);
 }
示例#22
0
 public static ReadAccessSpecification Load(IValueStream stream)
 {
     stream.EnterSequence();
     var objectIdentifier = Value<ObjectId>.Load(stream);
     var listOfPropertyReferences = Value<ReadOnlyArray<PropertyReference>>.Load(stream);
     stream.LeaveSequence();
     return new ReadAccessSpecification(objectIdentifier, listOfPropertyReferences);
 }
示例#23
0
 public static Prescale Load(IValueStream stream)
 {
     stream.EnterSequence();
     var multiplier = Value<uint>.Load(stream);
     var moduloDivide = Value<uint>.Load(stream);
     stream.LeaveSequence();
     return new Prescale(multiplier, moduloDivide);
 }
示例#24
0
 public static ReadAccessResult Load(IValueStream stream)
 {
     stream.EnterSequence();
     var objectIdentifier = Value<ObjectId>.Load(stream);
     var listOfResults = Value<Option<ReadOnlyArray<ListOfResultsType>>>.Load(stream);
     stream.LeaveSequence();
     return new ReadAccessResult(objectIdentifier, listOfResults);
 }
示例#25
0
 public static AtomicReadFileRequest Load(IValueStream stream)
 {
     stream.EnterSequence();
     var fileIdentifier = Value<ObjectId>.Load(stream);
     var accessMethod = Value<AccessMethodType>.Load(stream);
     stream.LeaveSequence();
     return new AtomicReadFileRequest(fileIdentifier, accessMethod);
 }
示例#26
0
        public static AuthenticateAck Load(IValueStream stream)
        {
            stream.EnterSequence();
            var modifiedRandomNumber = Value <uint> .Load(stream);

            stream.LeaveSequence();
            return(new AuthenticateAck(modifiedRandomNumber));
        }
示例#27
0
        public static VTOpenAck Load(IValueStream stream)
        {
            stream.EnterSequence();
            var remoteVTSessionIdentifier = Value <byte> .Load(stream);

            stream.LeaveSequence();
            return(new VTOpenAck(remoteVTSessionIdentifier));
        }
示例#28
0
        public static VTCloseRequest Load(IValueStream stream)
        {
            stream.EnterSequence();
            var listOfRemoteVTSessionIdentifiers = Value <ReadOnlyArray <byte> > .Load(stream);

            stream.LeaveSequence();
            return(new VTCloseRequest(listOfRemoteVTSessionIdentifiers));
        }
示例#29
0
 public static RecipientProcess Load(IValueStream stream)
 {
     stream.EnterSequence();
     var recipient = Value<Recipient>.Load(stream);
     var processIdentifier = Value<uint>.Load(stream);
     stream.LeaveSequence();
     return new RecipientProcess(recipient, processIdentifier);
 }
示例#30
0
 public static DateAndTime Load(IValueStream stream)
 {
     stream.EnterSequence();
     var date = Value<Date>.Load(stream);
     var time = Value<Time>.Load(stream);
     stream.LeaveSequence();
     return new DateAndTime(date, time);
 }
示例#31
0
 public static VTDataAck Load(IValueStream stream)
 {
     stream.EnterSequence();
     var allNewDataAccepted = Value<bool>.Load(stream);
     var acceptedOctetCount = Value<Option<uint>>.Load(stream);
     stream.LeaveSequence();
     return new VTDataAck(allNewDataAccepted, acceptedOctetCount);
 }
        public static GetEventInformationRequest Load(IValueStream stream)
        {
            stream.EnterSequence();
            var lastReceivedObjectIdentifier = Value <Option <ObjectId> > .Load(stream);

            stream.LeaveSequence();
            return(new GetEventInformationRequest(lastReceivedObjectIdentifier));
        }
示例#33
0
        public static DailySchedule Load(IValueStream stream)
        {
            stream.EnterSequence();
            var daySchedule = Value <ReadOnlyArray <TimeValue> > .Load(stream);

            stream.LeaveSequence();
            return(new DailySchedule(daySchedule));
        }
示例#34
0
 public static AddressBinding Load(IValueStream stream)
 {
     stream.EnterSequence();
     var deviceObjectIdentifier = Value<ObjectId>.Load(stream);
     var deviceAddress = Value<NetworkAddress>.Load(stream);
     stream.LeaveSequence();
     return new AddressBinding(deviceObjectIdentifier, deviceAddress);
 }
示例#35
0
        public static ActionList Load(IValueStream stream)
        {
            stream.EnterSequence();
            var action = Value <ReadOnlyArray <ActionCommand> > .Load(stream);

            stream.LeaveSequence();
            return(new ActionList(action));
        }
示例#36
0
 public static SessionKey Load(IValueStream stream)
 {
     stream.EnterSequence();
     var key = Value<byte[]>.Load(stream);
     var peerAddress = Value<NetworkAddress>.Load(stream);
     stream.LeaveSequence();
     return new SessionKey(key, peerAddress);
 }
        public static UTCTimeSynchronizationRequest Load(IValueStream stream)
        {
            stream.EnterSequence();
            var time = Value <DateAndTime> .Load(stream);

            stream.LeaveSequence();
            return(new UTCTimeSynchronizationRequest(time));
        }
示例#38
0
        public static ReadPropertyMultipleAck Load(IValueStream stream)
        {
            stream.EnterSequence();
            var listOfReadAccessResults = Value <ReadOnlyArray <ReadAccessResult> > .Load(stream);

            stream.LeaveSequence();
            return(new ReadPropertyMultipleAck(listOfReadAccessResults));
        }
示例#39
0
 public static CreateObjectRequest Load(IValueStream stream)
 {
     stream.EnterSequence();
     var objectSpecifier = Value<ObjectSpecifierType>.Load(stream);
     var listOfInitialValues = Value<Option<ReadOnlyArray<PropertyValue>>>.Load(stream);
     stream.LeaveSequence();
     return new CreateObjectRequest(objectSpecifier, listOfInitialValues);
 }
示例#40
0
        public static DeleteObjectRequest Load(IValueStream stream)
        {
            stream.EnterSequence();
            var objectIdentifier = Value <ObjectId> .Load(stream);

            stream.LeaveSequence();
            return(new DeleteObjectRequest(objectIdentifier));
        }
示例#41
0
 public static GetEventInformationAck Load(IValueStream stream)
 {
     stream.EnterSequence();
     var listOfEventSummaries = Value<ReadOnlyArray<ListOfEventSummariesType>>.Load(stream);
     var moreEvents = Value<bool>.Load(stream);
     stream.LeaveSequence();
     return new GetEventInformationAck(listOfEventSummaries, moreEvents);
 }
示例#42
0
 public static VTCloseError Load(IValueStream stream)
 {
     stream.EnterSequence();
     var errorType = Value<Error>.Load(stream);
     var listOfVTSessionIdentifiers = Value<Option<ReadOnlyArray<byte>>>.Load(stream);
     stream.LeaveSequence();
     return new VTCloseError(errorType, listOfVTSessionIdentifiers);
 }
示例#43
0
 public static AtomicReadFileAck Load(IValueStream stream)
 {
     stream.EnterSequence();
     var endOfFile = Value<bool>.Load(stream);
     var accessMethod = Value<AccessMethodType>.Load(stream);
     stream.LeaveSequence();
     return new AtomicReadFileAck(endOfFile, accessMethod);
 }
 public static ReadPropertyConditionalRequest Load(IValueStream stream)
 {
     stream.EnterSequence();
     var objectSelectionCriteria = Value<ObjectSelectionCriteriaType>.Load(stream);
     var listOfPropertyReferences = Value<Option<ReadOnlyArray<PropertyReference>>>.Load(stream);
     stream.LeaveSequence();
     return new ReadPropertyConditionalRequest(objectSelectionCriteria, listOfPropertyReferences);
 }
示例#45
0
 public static PropertyReference Load(IValueStream stream)
 {
     stream.EnterSequence();
     var propertyIdentifier = Value<PropertyIdentifier>.Load(stream);
     var propertyArrayIndex = Value<Option<uint>>.Load(stream);
     stream.LeaveSequence();
     return new PropertyReference(propertyIdentifier, propertyArrayIndex);
 }
示例#46
0
 public static NetworkAddress Load(IValueStream stream)
 {
     stream.EnterSequence();
     var networkNumber = Value<ushort>.Load(stream);
     var macAddress = Value<byte[]>.Load(stream);
     stream.LeaveSequence();
     return new NetworkAddress(networkNumber, macAddress);
 }
示例#47
0
        public static SetpointReference Load(IValueStream stream)
        {
            stream.EnterSequence();
            var reference = Value <Option <ObjectPropertyReference> > .Load(stream);

            stream.LeaveSequence();
            return(new SetpointReference(reference));
        }
 public static ReinitializeDeviceRequest Load(IValueStream stream)
 {
     stream.EnterSequence();
     var reinitializedStateOfDevice = Value<ReinitializedStateOfDeviceType>.Load(stream);
     var password = Value<Option<string>>.Load(stream);
     stream.LeaveSequence();
     return new ReinitializeDeviceRequest(reinitializedStateOfDevice, password);
 }
示例#49
0
        public static ExtendedParameter Load(IValueStream stream)
        {
            ExtendedParameter ret = null;
            Tags tag = (Tags)stream.EnterChoice();

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

                break;

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

                break;

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

                break;

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

                break;

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

                break;

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

                break;

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

                break;

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

                break;

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

                break;

            default:
                throw new Exception();
            }
            stream.LeaveChoice();
            return(ret);
        }
示例#50
0
        public static AddressBinding Load(IValueStream stream)
        {
            stream.EnterSequence();
            var deviceObjectIdentifier = Value <ObjectId> .Load(stream);

            var deviceAddress = Value <NetworkAddress> .Load(stream);

            stream.LeaveSequence();
            return(new AddressBinding(deviceObjectIdentifier, deviceAddress));
        }
示例#51
0
        public static VTDataAck Load(IValueStream stream)
        {
            stream.EnterSequence();
            var allNewDataAccepted = Value <bool> .Load(stream);

            var acceptedOctetCount = Value <Option <uint> > .Load(stream);

            stream.LeaveSequence();
            return(new VTDataAck(allNewDataAccepted, acceptedOctetCount));
        }
示例#52
0
            public static new ChangeOfState Load(IValueStream stream)
            {
                stream.EnterSequence();
                var newState = Value <PropertyStates> .Load(stream);

                var statusFlags = Value <StatusFlags> .Load(stream);

                stream.LeaveSequence();
                return(new ChangeOfState(newState, statusFlags));
            }
示例#53
0
        public static WhoIsRequest Load(IValueStream stream)
        {
            stream.EnterSequence();
            var deviceInstanceRangeLowLimit = Value <Option <uint> > .Load(stream);

            var deviceInstanceRangeHighLimit = Value <Option <uint> > .Load(stream);

            stream.LeaveSequence();
            return(new WhoIsRequest(deviceInstanceRangeLowLimit, deviceInstanceRangeHighLimit));
        }
示例#54
0
        public static PropertyReference Load(IValueStream stream)
        {
            stream.EnterSequence();
            var propertyIdentifier = Value <PropertyIdentifier> .Load(stream);

            var propertyArrayIndex = Value <Option <uint> > .Load(stream);

            stream.LeaveSequence();
            return(new PropertyReference(propertyIdentifier, propertyArrayIndex));
        }
示例#55
0
        public static Error Load(IValueStream stream)
        {
            stream.EnterSequence();
            var errorClass = Value <ErrorClassType> .Load(stream);

            var errorCode = Value <ErrorCodeType> .Load(stream);

            stream.LeaveSequence();
            return(new Error(errorClass, errorCode));
        }
示例#56
0
            public static new ChangeOfValue Load(IValueStream stream)
            {
                stream.EnterSequence();
                var newValue = Value <NewValue> .Load(stream);

                var statusFlags = Value <StatusFlags> .Load(stream);

                stream.LeaveSequence();
                return(new ChangeOfValue(newValue, statusFlags));
            }
示例#57
0
            public static new CommandFailure Load(IValueStream stream)
            {
                stream.EnterSequence();
                var timeDelay = Value <uint> .Load(stream);

                var feedbackPropertyReference = Value <DeviceObjectPropertyReference> .Load(stream);

                stream.LeaveSequence();
                return(new CommandFailure(timeDelay, feedbackPropertyReference));
            }
示例#58
0
            public static new BufferReady Load(IValueStream stream)
            {
                stream.EnterSequence();
                var notificationThreshold = Value <uint> .Load(stream);

                var previousNotificationCount = Value <uint> .Load(stream);

                stream.LeaveSequence();
                return(new BufferReady(notificationThreshold, previousNotificationCount));
            }
示例#59
0
        public static VTCloseError Load(IValueStream stream)
        {
            stream.EnterSequence();
            var errorType = Value <Error> .Load(stream);

            var listOfVTSessionIdentifiers = Value <Option <ReadOnlyArray <byte> > > .Load(stream);

            stream.LeaveSequence();
            return(new VTCloseError(errorType, listOfVTSessionIdentifiers));
        }
示例#60
0
            public static new ChangeOfBitstring Load(IValueStream stream)
            {
                stream.EnterSequence();
                var referencedBitstring = Value <BitString56> .Load(stream);

                var statusFlags = Value <StatusFlags> .Load(stream);

                stream.LeaveSequence();
                return(new ChangeOfBitstring(referencedBitstring, statusFlags));
            }