Beispiel #1
0
 public v12.Datatypes.ChannelData.ChannelMetadataRecord ChannelMetadataRecord12(long channelId) => new v12.Datatypes.ChannelData.ChannelMetadataRecord
 {
     Id              = channelId,
     ChannelName     = Mnemonic,
     Uri             = Uri(EtpVersion.v12),
     DataKind        = v12.Datatypes.ChannelData.ChannelDataKind.typeDouble,
     Status          = IsActive ? v12.Datatypes.Object.ActiveStatusKind.Active : v12.Datatypes.Object.ActiveStatusKind.Inactive,
     Uom             = Uom,
     ChannelClassUri = ChannelPropertyKind?.Uri(EtpVersion.v12),
     Indexes         = new List <v12.Datatypes.ChannelData.IndexMetadataRecord>
     {
         IndexMetadataRecord12,
     },
     AxisVectorLengths = new List <int>(),
     AttributeMetadata = new List <v12.Datatypes.AttributeMetadataRecord>(),
     Source            = string.Empty,
     CustomData        = new Dictionary <string, v12.Datatypes.DataValue>(),
 };
Beispiel #2
0
        public override string Xml(EtpVersion version, string indentation = "", bool embedded = false) =>
        $@"{indentation}<Channel{Namespaces(embedded)} schemaVersion=""2.0"" uuid=""{Uuid}""{DefaultNamespace(embedded)}>
{indentation}  <Citation xmlns=""http://www.energistics.org/energyml/data/commonv2"">
{indentation}    <Title>{Title}</Title>
{indentation}    <Originator>ETP DevKit</Originator>
{indentation}    <Creation>{Creation.ToUniversalTime():O}</Creation>
{indentation}    <Format>Energistics:ETP DevKit {typeof(IEtpSession).Assembly.GetName().Version}</Format>
{indentation}    <LastUpdate>{LastUpdate.ToUniversalTime():O}</LastUpdate>
{indentation}  </Citation>
{indentation}  <Mnemonic>{Mnemonic}</Mnemonic>
{indentation}  <DataType>{DataType}</DataType>
{indentation}  <Uom>{Uom}</Uom>
{indentation}  <GrowingStatus>{(IsActive ? "active" : "inactive")}</GrowingStatus>
{indentation}  <Wellbore>
{indentation}    <ContentType xmlns=""http://www.energistics.org/energyml/data/commonv2"">{Wellbore.ContentType}</ContentType>
{indentation}    <Title xmlns=""http://www.energistics.org/energyml/data/commonv2"">{Wellbore.Title}</Title>
{indentation}    <Uuid xmlns=""http://www.energistics.org/energyml/data/commonv2"">{Wellbore.Uuid}</Uuid>
{indentation}    <Uri xmlns=""http://www.energistics.org/energyml/data/commonv2"">{Wellbore.Uri(version)}</Uri>
{indentation}  </Wellbore>
{indentation}  <TimeDepth>{(IsTime ? "time" : "depth")}</TimeDepth>
{indentation}  <ChannelClass>
{indentation}    <ContentType xmlns=""http://www.energistics.org/energyml/data/commonv2"">{ChannelPropertyKind.ContentType}</ContentType>
{indentation}    <Title xmlns=""http://www.energistics.org/energyml/data/commonv2"">{ChannelPropertyKind.Title}</Title>
{indentation}    <Uuid xmlns=""http://www.energistics.org/energyml/data/commonv2"">{ChannelPropertyKind.Uuid}</Uuid>
{indentation}    <Uri xmlns=""http://www.energistics.org/energyml/data/commonv2"">{ChannelPropertyKind.Uri(version)}</Uri>
{indentation}  </ChannelClass>
{indentation}  <StartIndex xsi:type=""{(IsTime ? "TimeIndexValue" : "DepthIndexValue")}"">
{indentation}    <{(IsTime ? "Time" : "Depth")}>{(IsTime ? TimeStartIndex?.ToString("O", CultureInfo.InvariantCulture) : DepthStartIndex?.ToString(CultureInfo.InvariantCulture))}</{(IsTime ? "Time" : "Depth")}>
{indentation}  </StartIndex>
{indentation}  <EndIndex xsi:type=""{(IsTime ? "TimeIndexValue" : "DepthIndexValue")}"">
{indentation}    <{(IsTime ? "Time" : "Depth")}>{(IsTime ? TimeEndIndex?.ToString("O", CultureInfo.InvariantCulture) : DepthEndIndex?.ToString(CultureInfo.InvariantCulture))}</{(IsTime ? "Time" : "Depth")}>
{indentation}  </EndIndex>
{indentation}  <LoggingCompanyName>Energistics</LoggingCompanyName>
{indentation}  <LoggingCompanyCode>1000</LoggingCompanyCode>
{indentation}  <Index>
{indentation}    <IndexType>{(IsTime ? "date time" : "measured depth")}</IndexType>
{indentation}    <Uom>{IndexUom}</Uom>
{indentation}    <Direction>increasing</Direction>
{indentation}    <Mnemonic>{IndexMnemonic}</Mnemonic>
{indentation}  </Index>
{indentation}</Channel>";