コード例 #1
0
        static T1ProtocolParameterAdapter()
        {
            IPropertyAdapterFactory <T1ProtocolParameterAdapter> PropertyFactory = ObservableObject.GetPropertyAdapterFactory <T1ProtocolParameterAdapter>();

            T1ProtocolParameterAdapter.informationFieldSizeAdapter = PropertyFactory.Create(
                nameof(T1ProtocolParameterAdapter.InformationFieldSize),
                instance => instance.protocolParameters.IfscValue,
                (instance, value) => instance.protocolParameters.Ifsc = value
                );
            T1ProtocolParameterAdapter.informationFieldSizeIsDefaultAdapter = PropertyFactory.Create(
                nameof(T1ProtocolParameterAdapter.InformationFieldSizeIsDefault),
                instance => instance.protocolParameters.Ifsc.HasValue == false
                );
            T1ProtocolParameterAdapter.characterWaitingTimeAdapter = PropertyFactory.Create(
                nameof(T1ProtocolParameterAdapter.CharacterWaitingTime),
                instance => instance.protocolParameters.CwiValue
                );
            T1ProtocolParameterAdapter.blockWaitingTimeAdapter = PropertyFactory.Create(
                nameof(T1ProtocolParameterAdapter.BlockWaitingTime),
                instance => instance.protocolParameters.BwiValue
                );
            T1ProtocolParameterAdapter.blockAndCharacterWaitingTimeIsDefaultAdapter = PropertyFactory.Create(
                nameof(T1ProtocolParameterAdapter.BlockAndCharacterWaitingTimeIsDefault),
                instance => instance.protocolParameters.Bwi.HasValue == false && instance.protocolParameters.Cwi.HasValue == false
                );
            T1ProtocolParameterAdapter.redundancyCodeAdapter = PropertyFactory.Create(
                nameof(T1ProtocolParameterAdapter.RedundancyCode),
                instance => EnumerationAdapter <RedundancyCodeType> .GetInstanceFor(instance.protocolParameters.RedundancyCodeValue),
                (instance, value) => instance.protocolParameters.RedundancyCode = value
                );
            T1ProtocolParameterAdapter.redundancyCodeIsDefaultAdapter = PropertyFactory.Create(
                nameof(T1ProtocolParameterAdapter.RedundancyCodeIsDefault),
                instance => instance.protocolParameters.RedundancyCode.HasValue == false
                );
        }
コード例 #2
0
        static DataObjectCardServiceDataAdapter()
        {
            ObservableObject.IPropertyAdapterFactory <DataObjectCardServiceDataAdapter> PropertyFactory = ObservableObject.GetPropertyAdapterFactory <DataObjectCardServiceDataAdapter>();

            DataObjectCardServiceDataAdapter.dataObjectsAvailableInAtrFileAdapter = PropertyFactory.Create(
                nameof(DataObjectCardServiceDataAdapter.DataObjectsAvailableInAtrFile),
                instance => instance.value.DataObjectsAvailableInAtrFile,
                (instance, value) => instance.value.DataObjectsAvailableInAtrFile = value
                );

            DataObjectCardServiceDataAdapter.dataObjectsAvailableInDirFileAdapter = PropertyFactory.Create(
                nameof(DataObjectCardServiceDataAdapter.DataObjectsAvailableInDirFile),
                instance => instance.value.DataObjectsAvailableInDirFile,
                (instance, value) => instance.value.DataObjectsAvailableInDirFile = value
                );

            DataObjectCardServiceDataAdapter.supportsApplicationSelectionByFullDfNameAdapter = PropertyFactory.Create(
                nameof(DataObjectCardServiceDataAdapter.SupportsApplicationSelectionByFullDfName),
                instance => instance.value.SupportsApplicationSelectionByFullDfName,
                (instance, value) => instance.value.SupportsApplicationSelectionByFullDfName = value
                );

            DataObjectCardServiceDataAdapter.supportsApplicationSelectionByPartialDfNameAdapter = PropertyFactory.Create(
                nameof(DataObjectCardServiceDataAdapter.SupportsApplicationSelectionByPartialDfName),
                instance => instance.value.SupportsApplicationSelectionByPartialDfName,
                (instance, value) => instance.value.SupportsApplicationSelectionByPartialDfName = value
                );

            DataObjectCardServiceDataAdapter.fileIoServicesMethodAdapter = PropertyFactory.Create(
                nameof(DataObjectCardServiceDataAdapter.FileIoServicesMethod),
                instance => EnumerationAdapter <FileIoServices> .GetInstanceFor(instance.value.FileIoServicesMethod),
                (instance, value) => instance.value.FileIoServicesMethod = value
                );
        }
コード例 #3
0
        static UnknownProtocolParameterAdapter()
        {
            IPropertyAdapterFactory <UnknownProtocolParameterAdapter> PropertyFactory = ObservableObject.GetPropertyAdapterFactory <UnknownProtocolParameterAdapter>();

            UnknownProtocolParameterAdapter.protocolTypeAdapter = PropertyFactory.Create(
                nameof(UnknownProtocolParameterAdapter.ProtocolType),
                instance => EnumerationAdapter <ProtocolType> .GetInstanceFor(instance.protocolParameters.ProtocolType)
                );
        }
コード例 #4
0
        static DataObjectStatusIndicatorAdapter()
        {
            ObservableObject.IPropertyAdapterFactory <DataObjectStatusIndicatorAdapter> PropertyFactory = ObservableObject.GetPropertyAdapterFactory <DataObjectStatusIndicatorAdapter>();

            DataObjectStatusIndicatorAdapter.includedInTlvAdapter = PropertyFactory.Create(
                nameof(DataObjectStatusIndicatorAdapter.IncludedInTlv),
                instance => instance.value.IncludedInTlv
                );

            DataObjectStatusIndicatorAdapter.lifeCycleAdapter = PropertyFactory.Create(
                nameof(DataObjectStatusIndicatorAdapter.LifeCycle),
                instance => instance.value.LifeCycle != null ? instance.value.LifeCycle.Value.ToString("X2") : null,
                (instance, value) => Helper.SetAsHexByteValue(value, _ => instance.value.LifeCycle = _)
                );

            DataObjectStatusIndicatorAdapter.isLifeCycleDefinedAdapter = PropertyFactory.Create(
                nameof(DataObjectStatusIndicatorAdapter.IsLifeCycleDefined),
                instance => instance.value.LifeCycle != null
                );

            DataObjectStatusIndicatorAdapter.canUndefineLifeCycleAdapter = PropertyFactory.Create(
                nameof(DataObjectStatusIndicatorAdapter.CanUndefineLifeCycle),
                instance => instance.value.CanUndefineLifeCycle
                );
            DataObjectStatusIndicatorAdapter.lifeCycleInformationAdapter = PropertyFactory.Create(
                nameof(DataObjectStatusIndicatorAdapter.LifeCycleInformation),
                instance => EnumerationAdapter <KnownLifeCycle> .GetInstanceFor(instance.value.LifeCycleInformation),
                (instance, value) => instance.value.LifeCycleInformation = value
                );

            DataObjectStatusIndicatorAdapter.statusWordIndicationAdapter = PropertyFactory.Create(
                nameof(DataObjectStatusIndicatorAdapter.StatusWordIndication),
                instance => EnumerationAdapter <StatusWordIndication> .GetInstanceFor(instance.value.StatusWordIndication),
                (instance, value) => instance.value.StatusWordIndication = value
                );

            DataObjectStatusIndicatorAdapter.statusWordAdapter = PropertyFactory.Create(
                nameof(DataObjectStatusIndicatorAdapter.StatusWord),
                instance => instance.value.StatusWord != null ? instance.value.StatusWord.Value.ToString("X4") : null,
                (instance, value) => Helper.SetAsHexUShortValue(value, _ => instance.value.StatusWord = _)
                );

            DataObjectStatusIndicatorAdapter.statusWordCodingAdapter = PropertyFactory.Create(
                nameof(DataObjectStatusIndicatorAdapter.StatusWordCoding),
                instance => EnumerationAdapter <StatusWordCoding> .GetInstanceFor(instance.value.IncludedInTlv?Classes.ATR.StatusWordCoding.WithinTlvData : Classes.ATR.StatusWordCoding.FollowingTlvData)
                );

            DataObjectStatusIndicatorAdapter.isStatusWordDefinedAdapter = PropertyFactory.Create(
                nameof(DataObjectStatusIndicatorAdapter.IsStatusWordDefined),
                instance => instance.value.StatusWordIndication != null
                );

            DataObjectStatusIndicatorAdapter.canUndefineStatusWordAdapter = PropertyFactory.Create(
                nameof(DataObjectStatusIndicatorAdapter.CanUndefineStatusWord),
                instance => instance.value.CanUndefineStatusWordIndication
                );
        }
コード例 #5
0
        static AtrInterfaceByteGroupTokenAdapter()
        {
            ObservableObject.IPropertyAdapterFactory <AtrInterfaceByteGroupTokenAdapter> PropertyFactory = ObservableObject.GetPropertyAdapterFactory <AtrInterfaceByteGroupTokenAdapter>();
            AtrInterfaceByteGroupTokenAdapter.groupNumberAdatper = PropertyFactory.Create(
                nameof(AtrInterfaceByteGroupTokenAdapter.GroupNumber),
                instance => instance.atrInterfaceByteGroupToken.Number
                );
            AtrInterfaceByteGroupTokenAdapter.typeAdatper = PropertyFactory.Create(
                nameof(AtrInterfaceByteGroupTokenAdapter.Type),
                instance => EnumerationAdapter <InterfaceByteGroupType> .GetInstanceFor(instance.atrInterfaceByteGroupToken.Type)
                );
            AtrInterfaceByteGroupTokenAdapter.taAdapter = PropertyFactory.Create(
                nameof(AtrInterfaceByteGroupTokenAdapter.Ta),
                instance => instance.atrInterfaceByteGroupToken.Ta.HasValue ? instance.atrInterfaceByteGroupToken.Ta.Value.ToHexString() : null,
                (instance, value) => instance.atrInterfaceByteGroupToken.Ta = !string.IsNullOrEmpty(value)?byte.Parse(value.Substring(0, Math.Min(value.Length, 2)), NumberStyles.HexNumber):(byte?)null
                );
            AtrInterfaceByteGroupTokenAdapter.tbAdapter = PropertyFactory.Create(
                nameof(AtrInterfaceByteGroupTokenAdapter.Tb),
                instance => instance.atrInterfaceByteGroupToken.Tb.HasValue ? instance.atrInterfaceByteGroupToken.Tb.Value.ToHexString() : null,
                (instance, value) => instance.atrInterfaceByteGroupToken.Tb = !string.IsNullOrEmpty(value) ? byte.Parse(value.Substring(0, Math.Min(value.Length, 2)), NumberStyles.HexNumber) : (byte?)null
                );
            AtrInterfaceByteGroupTokenAdapter.tcAdapter = PropertyFactory.Create(
                nameof(AtrInterfaceByteGroupTokenAdapter.Tc),
                instance => instance.atrInterfaceByteGroupToken.Tc.HasValue ? instance.atrInterfaceByteGroupToken.Tc.Value.ToHexString() : null,
                (instance, value) => instance.atrInterfaceByteGroupToken.Tc = !string.IsNullOrEmpty(value) ? byte.Parse(value.Substring(0, Math.Min(value.Length, 2)), NumberStyles.HexNumber) : (byte?)null
                );
            AtrInterfaceByteGroupTokenAdapter.nextGroupTypeAdapter = PropertyFactory.Create(
                nameof(AtrInterfaceByteGroupTokenAdapter.NextGroupType),
                instance => EnumerationAdapter <InterfaceByteGroupType> .GetInstanceFor(instance.atrInterfaceByteGroupToken.NextInterfaceBytesIndicator != null?instance.atrInterfaceByteGroupToken.NextInterfaceBytesIndicator.GroupType:(InterfaceByteGroupType?)null)
                );
            AtrInterfaceByteGroupTokenAdapter.nextBytesTypeAdapter = PropertyFactory.Create(
                nameof(AtrInterfaceByteGroupTokenAdapter.NextBytes),
                instance => instance.atrInterfaceByteGroupToken.NextInterfaceBytesIndicator != null?AtrTokenAdapterBase.ToString(instance.atrInterfaceByteGroupToken.NextInterfaceBytesIndicator.TaExists, instance.atrInterfaceByteGroupToken.NextInterfaceBytesIndicator.TbExists, instance.atrInterfaceByteGroupToken.NextInterfaceBytesIndicator.TcExists, instance.atrInterfaceByteGroupToken.NextInterfaceBytesIndicator.TdExists):"not set"
                );

            AtrInterfaceByteGroupTokenAdapter.possibleTypesToChangeToAdapter = PropertyFactory.Create(
                nameof(AtrInterfaceByteGroupTokenAdapter.PossibleTypesToChangeTo),
                instance => ((InterfaceByteGroupType[])Enum.GetValues(typeof(InterfaceByteGroupType)))
                .Where(_ => _ != InterfaceByteGroupType.Global)                                                                                                                                                         //gloabl cannot be set; the first group automatically is global
                .Where(_ => instance.atrInterfaceByteGroupToken.NextGroup != null)                                                                                                                                      //nothing cannot be set if no next group
                .Where(_ => _ != instance.atrInterfaceByteGroupToken.NextInterfaceBytesIndicator.GroupType)                                                                                                             //we can skip what is already set
                .OrderBy(_ => (int)_)                                                                                                                                                                                   //Sort by id
                .SkipWhile(value => value < instance.atrInterfaceByteGroupToken.Type)                                                                                                                                   //Next Group cannot be less than this group. Same is OK
                .TakeWhile(value => instance.atrInterfaceByteGroupToken.NextGroup.NextInterfaceBytesIndicator == null || value <= instance.atrInterfaceByteGroupToken.NextGroup.NextInterfaceBytesIndicator.GroupType), //next group cannot be higher than next to next group. Same is OK
                (instance, item) => EnumerationAdapter <InterfaceByteGroupType> .GetInstanceFor(item)
                );
            AtrInterfaceByteGroupTokenAdapter.possibleTypesToAddNextGroupAdapter = PropertyFactory.Create(
                nameof(AtrInterfaceByteGroupTokenAdapter.PossibleTypesToAddNextGroup),
                instance => ((InterfaceByteGroupType[])Enum.GetValues(typeof(InterfaceByteGroupType)))
                .Where(_ => _ != InterfaceByteGroupType.Global)                                                                                                                                     //gloabl cannot be set; the first group automatically is global
                .OrderBy(_ => (int)_)                                                                                                                                                               //Sort by id
                .SkipWhile(value => value < instance.atrInterfaceByteGroupToken.Type)                                                                                                               //Next Group cannot be less than this group. Same is OK
                .TakeWhile(value => instance.atrInterfaceByteGroupToken.NextInterfaceBytesIndicator == null || value <= instance.atrInterfaceByteGroupToken.NextInterfaceBytesIndicator.GroupType), //next group cannot be higher than next to next group. Same is OK
                (instance, item) => EnumerationAdapter <InterfaceByteGroupType> .GetInstanceFor(item)
                );
        }
コード例 #6
0
        static SpuTypeEtsiCodingAdapter()
        {
            IPropertyAdapterFactory <SpuTypeEtsiCodingAdapter> PropertyFactory = ObservableObject.GetPropertyAdapterFactory <SpuTypeEtsiCodingAdapter>();

            SpuTypeEtsiCodingAdapter.lowImpedanceOnIoLineAvailableAdapter = PropertyFactory.Create(
                nameof(SpuTypeEtsiCodingAdapter.LowImpedanceOnIoLineAvailable),
                instance => instance.etsiCoding.LowImpedanceOnIoLineAvailable
                );

            SpuTypeEtsiCodingAdapter.interChipUsbSupportedAdapter = PropertyFactory.Create(
                nameof(SpuTypeEtsiCodingAdapter.InterChipUsbSupported),
                instance => instance.etsiCoding.InterChipUsbSupported
                );

            SpuTypeEtsiCodingAdapter.clfInterfaceSupportedAdapter = PropertyFactory.Create(
                nameof(SpuTypeEtsiCodingAdapter.ClfInterfaceSupported),
                instance => instance.etsiCoding.ClfInterfaceSupported
                );

            SpuTypeEtsiCodingAdapter.secureChannelSupportAdapter = PropertyFactory.Create(
                nameof(SpuTypeEtsiCodingAdapter.SecureChannelSupport),
                instance => EnumerationAdapter <EtsiSpuSecureChannelSupport> .GetInstanceFor(instance.etsiCoding.SecureChannelSupport)
                );
        }
コード例 #7
0
 private void SetHistoricalCharacterType(EnumerationAdapter <HistoricalCharacterTypes> type)
 {
     this.interpretedAtr.SetHistoricalCharacterType(type.Value);
 }
コード例 #8
0
 static DataObjectCardCapabilitiesAdapter()
 {
     ObservableObject.IPropertyAdapterFactory <DataObjectCardCapabilitiesAdapter> PropertyFactory = ObservableObject.GetPropertyAdapterFactory <DataObjectCardCapabilitiesAdapter>();
     DataObjectCardCapabilitiesAdapter.maximumNumberOfLogicalChannelsAdapter = PropertyFactory.Create(
         nameof(DataObjectCardCapabilitiesAdapter.MaximumNumberOfLogicalChannels),
         instance => instance.value.MaximumNumberOfLogicalChannels
         );
     DataObjectCardCapabilitiesAdapter.logicalChannelAssignmentAdapter = PropertyFactory.Create(
         nameof(DataObjectCardCapabilitiesAdapter.LogicalChannelAssignment),
         instance => EnumerationAdapter <LogicalChannelAssignment> .GetInstanceFor(instance.value.LogicalChannelAssignment)
         );
     DataObjectCardCapabilitiesAdapter.supportsExtendedLcAndLeAdapter = PropertyFactory.Create(
         nameof(DataObjectCardCapabilitiesAdapter.SupportsExtendedLcAndLe),
         instance => instance.value.SupportsExtendedLcAndLe
         );
     DataObjectCardCapabilitiesAdapter.dataUnitSizeAdapter = PropertyFactory.Create(
         nameof(DataObjectCardCapabilitiesAdapter.DataUnitSize),
         instance => instance.value.DataUnitSize
         );
     DataObjectCardCapabilitiesAdapter.writeFunctionsBehaviourAdapter = PropertyFactory.Create(
         nameof(DataObjectCardCapabilitiesAdapter.WriteFunctionsBehaviour),
         instance => EnumerationAdapter <WriteFunctionsBehaviour> .GetInstanceFor(instance.value.WriteFunctionsBehaviour)
         );
     DataObjectCardCapabilitiesAdapter.supportsRecordIdAdapter = PropertyFactory.Create(
         nameof(DataObjectCardCapabilitiesAdapter.SupportsRecordId),
         instance => instance.value.SupportsRecordId,
         (instance, value) => instance.value.SupportsRecordId = value
         );
     DataObjectCardCapabilitiesAdapter.supportsRecordNumberAdapter = PropertyFactory.Create(
         nameof(DataObjectCardCapabilitiesAdapter.SupportsRecordNumber),
         instance => instance.value.SupportsRecordNumber,
         (instance, value) => instance.value.SupportsRecordNumber = value
         );
     DataObjectCardCapabilitiesAdapter.supportsShortFileIdAdapter = PropertyFactory.Create(
         nameof(DataObjectCardCapabilitiesAdapter.SupportsShortFileId),
         instance => instance.value.SupportsShortFileId,
         (instance, value) => instance.value.SupportsShortFileId = value
         );
     DataObjectCardCapabilitiesAdapter.supportsImplicitDfSelectionAdapter = PropertyFactory.Create(
         nameof(DataObjectCardCapabilitiesAdapter.SupportsImplicitDfSelection),
         instance => instance.value.SupportsImplicitDfSelection,
         (instance, value) => instance.value.SupportsImplicitDfSelection = value
         );
     DataObjectCardCapabilitiesAdapter.supportsDfSelectionByFileIdAdapter = PropertyFactory.Create(
         nameof(DataObjectCardCapabilitiesAdapter.SupportsDfSelectionByFileId),
         instance => instance.value.SupportsDfSelectionByFileId,
         (instance, value) => instance.value.SupportsDfSelectionByFileId = value
         );
     DataObjectCardCapabilitiesAdapter.supportsDfSelectionByPathAdapter = PropertyFactory.Create(
         nameof(DataObjectCardCapabilitiesAdapter.SupportsDfSelectionByPath),
         instance => instance.value.SupportsDfSelectionByPath,
         (instance, value) => instance.value.SupportsDfSelectionByPath = value
         );
     DataObjectCardCapabilitiesAdapter.supportsDfSelectionByPartialNameAdapter = PropertyFactory.Create(
         nameof(DataObjectCardCapabilitiesAdapter.SupportsDfSelectionByPartialName),
         instance => instance.value.SupportsDfSelectionByPartialName,
         (instance, value) => instance.value.SupportsDfSelectionByPartialName = value
         );
     DataObjectCardCapabilitiesAdapter.supportsDfSelectionByFullNameAdapter = PropertyFactory.Create(
         nameof(DataObjectCardCapabilitiesAdapter.SupportsDfSelectionByFullName),
         instance => instance.value.SupportsDfSelectionByFullName,
         (instance, value) => instance.value.SupportsDfSelectionByFullName = value
         );
     DataObjectCardCapabilitiesAdapter.isExtendedLengthAndLogicalChannelsIndicatedAdapter = PropertyFactory.Create(
         nameof(DataObjectCardCapabilitiesAdapter.IsExtendedLengthAndLogicalChannelsIndicated),
         instance => instance.value.SupportsExtendedLcAndLe != null
         );
     DataObjectCardCapabilitiesAdapter.isWriteFunctionsBehaviourAndDataUnitSizeIndicatedAdapter = PropertyFactory.Create(
         nameof(DataObjectCardCapabilitiesAdapter.IsWriteFunctionsBehaviourAndDataUnitSizeIndicated),
         instance => instance.value.WriteFunctionsBehaviour != null
         );
 }
コード例 #9
0
        static GlobalInterfaceBytesAdapter()
        {
            IPropertyAdapterFactory <GlobalInterfaceBytesAdapter> PropertyFactory = ObservableObject.GetPropertyAdapterFactory <GlobalInterfaceBytesAdapter>();

            GlobalInterfaceBytesAdapter.protocolParameterBytes = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.ProtocolParameterBytes),
                instance => instance.globalInterfaceBytes.ParameterBytes,
                (instance, parameterByte) => ProtocolParameterByteAdapterBase.GetObject(parameterByte)
                );

            GlobalInterfaceBytesAdapter.diAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.Di),
                instance => EnumerationAdapter <Di> .GetInstanceFor(instance.globalInterfaceBytes.DiValue),
                (instance, value) => instance.globalInterfaceBytes.SetDiFiFmax(value, instance.globalInterfaceBytes.FiFmaxValue)
                );
            GlobalInterfaceBytesAdapter.fiFmaxAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.FiFmax),
                instance => EnumerationAdapter <FiFmax> .GetInstanceFor(instance.globalInterfaceBytes.FiFmaxValue),
                (instance, value) => instance.globalInterfaceBytes.SetDiFiFmax(instance.globalInterfaceBytes.DiValue, value)
                );
            GlobalInterfaceBytesAdapter.etuAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.Etu),
                instance => GlobalInterfaceBytesAdapter.CalculateEtu(instance.globalInterfaceBytes.FiFmaxValue, instance.globalInterfaceBytes.DiValue)
                );
            GlobalInterfaceBytesAdapter.diFiIsDefaultAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.DiFiIsDefault),
                instance => instance.globalInterfaceBytes.Di.HasValue == false && instance.globalInterfaceBytes.FiFmax.HasValue == false
                );
            GlobalInterfaceBytesAdapter.extraGuardTimeAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.ExtraGuardTime),
                instance => instance.globalInterfaceBytes.ExtraGuardTimeValue,
                (instance, value) => instance.globalInterfaceBytes.ExtraGuardTime = value
                );
            GlobalInterfaceBytesAdapter.extraGuardTimeIsDefaultAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.ExtraGuardTimeIsDefault),
                instance => instance.globalInterfaceBytes.ExtraGuardTime.HasValue == false
                );

            GlobalInterfaceBytesAdapter.specificModeSupportedAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.SpecificModeSupported),
                instance => instance.globalInterfaceBytes.CanChangeNegotiableSpecificMode.HasValue ||
                instance.globalInterfaceBytes.SpecificModeImplicitFiDi.HasValue ||
                instance.globalInterfaceBytes.SpecificModeProtocol.HasValue
                );
            GlobalInterfaceBytesAdapter.canChangeNegotiableSpecificModeAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.CanChangeNegotiableSpecificMode),
                instance => instance.globalInterfaceBytes.CanChangeNegotiableSpecificMode.HasValue
                          ? instance.globalInterfaceBytes.CanChangeNegotiableSpecificMode.Value
                          : false
                );
            GlobalInterfaceBytesAdapter.specificModeImplicitFiDiAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.SpecificModeImplicitFiDi),
                instance => instance.globalInterfaceBytes.SpecificModeImplicitFiDi.HasValue
                          ? instance.globalInterfaceBytes.SpecificModeImplicitFiDi.Value
                          : false
                );
            GlobalInterfaceBytesAdapter.specificModeProtocolAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.SpecificModeProtocol),
                instance => instance.globalInterfaceBytes.SpecificModeProtocol.HasValue
                          ? EnumerationAdapter <ProtocolType> .GetInstanceFor(instance.globalInterfaceBytes.SpecificModeProtocol.Value)
                          : null
                );
            GlobalInterfaceBytesAdapter.clockStopSupportAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.ClockStopSupport),
                instance => EnumerationAdapter <ClockStopSupport> .GetInstanceFor(instance.globalInterfaceBytes.ClockStopSupportValue)
                );
            GlobalInterfaceBytesAdapter.clockStopSupportAndOperatingConditionsIsDefaultAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.ClockStopSupportAndOperatingConditionsIsDefault),
                instance => instance.globalInterfaceBytes.ClockStopSupport.HasValue == false || instance.globalInterfaceBytes.OperatingConditions.HasValue == false
                );
            GlobalInterfaceBytesAdapter.operatingConditionsAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.OperatingConditions),
                instance => EnumerationAdapter <OperatingConditions> .GetInstanceFor(instance.globalInterfaceBytes.OperatingConditionsValue)
                );
            GlobalInterfaceBytesAdapter.spuUseAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.SpuUse),
                instance => EnumerationAdapter <SpuUse> .GetInstanceFor(instance.globalInterfaceBytes.SpuUseValue)
                );
            GlobalInterfaceBytesAdapter.spuUseIsDefaultAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.SpuUseIsDefault),
                instance => instance.globalInterfaceBytes.SpuUse.HasValue == false
                );
            GlobalInterfaceBytesAdapter.spuUseIsNotUsedAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.SpuUseIsNotUsed),
                instance => instance.globalInterfaceBytes.SpuUse == Classes.ATR.SpuUse.NotUsed
                );
            GlobalInterfaceBytesAdapter.spuUseIsStandardAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.SpuUseIsStandard),
                instance => instance.globalInterfaceBytes.SpuUse == Classes.ATR.SpuUse.Standard
                );
            GlobalInterfaceBytesAdapter.spuUseIsProprietaryAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.SpuUseIsProprietary),
                instance => instance.globalInterfaceBytes.SpuUse == Classes.ATR.SpuUse.Proprietary
                );
            GlobalInterfaceBytesAdapter.spuIsInUseAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.SpuIsInUse),
                instance => instance.globalInterfaceBytes.SpuUseValue != Classes.ATR.SpuUse.NotUsed
                );
            GlobalInterfaceBytesAdapter.spuTypeAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.SpuType),
                instance => instance.globalInterfaceBytes.SpuType != null ? instance.globalInterfaceBytes.SpuType.Value.ToHexString() : null
                );
            GlobalInterfaceBytesAdapter.spuTypeEtsiCodingAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.SpuTypeEtsiCoding),
                instance => instance.globalInterfaceBytes.SpuType != null && instance.globalInterfaceBytes.SpuType.EtsiCoding != null ? new SpuTypeEtsiCodingAdapter(instance.globalInterfaceBytes, instance.globalInterfaceBytes.SpuType.EtsiCoding) : null
                );

            GlobalInterfaceBytesAdapter.isVppConnectedAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.IsVppConnected),
                instance => instance.globalInterfaceBytes.IsVppConnected
                );
            GlobalInterfaceBytesAdapter.isVppConnectedisDefaultAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.IsVppConnectedIsDefault),
                instance => instance.globalInterfaceBytes.IsVppConnected.HasValue == false
                );
            GlobalInterfaceBytesAdapter.vppProgrammingVoltageAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.VppProgrammingVoltage),
                instance => instance.globalInterfaceBytes.VppProgrammingVoltage != null?instance.globalInterfaceBytes.VppProgrammingVoltage.Value.ToString("F1"):null
                );
            GlobalInterfaceBytesAdapter.vppProgrammingCurrentAdapter = PropertyFactory.Create(
                nameof(GlobalInterfaceBytesAdapter.VppProgrammingCurrent),
                instance => EnumerationAdapter <VppProgrammingCurrent> .GetInstanceFor(instance.globalInterfaceBytes.VppProgrammingCurrent)
                );
        }
コード例 #10
0
 private void IndicateProtocol(EnumerationAdapter <ProtocolType> type)
 {
     this.atr.IndicateProtocol(type.Value);
 }
コード例 #11
0
 private void SetNextGroupType(EnumerationAdapter <InterfaceByteGroupType> type)
 {
     this.atrInterfaceByteGroupToken.NextInterfaceBytesIndicator.GroupType = type;
 }
コード例 #12
0
 private void AddNextGroupType(EnumerationAdapter <InterfaceByteGroupType> type)
 {
     this.atrInterfaceByteGroupToken.AddGroup(type);
 }