コード例 #1
0
 /// <summary>
 /// Creates the point metadata <see cref="PointMetadata"/>
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="description">The description.</param>
 /// <param name="etpDataType">Type of the ETP data.</param>
 /// <returns></returns>
 public PointMetadata CreatePointMetadata(string name, string description, EtpDataType etpDataType)
 {
     return(new PointMetadata()
     {
         Name = name,
         Description = description,
         EtpDataType = etpDataType
     });
 }
コード例 #2
0
 /// <summary>
 /// Creates the channel.
 /// </summary>
 /// <param name="log">The log.</param>
 /// <param name="indexList">The index list.</param>
 /// <param name="citationName">Name of the citation.</param>
 /// <param name="mnemonic">The mnemonic.</param>
 /// <param name="uom">The uom.</param>
 /// <param name="channelClass">The channel class.</param>
 /// <param name="etpDataType">Type of the ETP data.</param>
 /// <param name="pointMetadataList">The point metadata list.</param>
 /// <returns></returns>
 public Channel CreateChannel(Log log, List <ChannelIndex> indexList, string citationName, string mnemonic, UnitOfMeasure?uom, string channelClass, EtpDataType etpDataType, List <PointMetadata> pointMetadataList)
 {
     return(new Channel()
     {
         Uuid = Uid(),
         Citation = CreateCitation(citationName),
         Mnemonic = mnemonic,
         Uom = uom,
         ChannelClass = ToPropertyKindReference(channelClass),
         LoggingMethod = log.LoggingMethod,
         LoggingCompanyName = log.LoggingCompanyName ?? "PDS",
         Source = log.LoggingMethod.ToString(),
         DataType = etpDataType,
         GrowingStatus = ChannelStatus.active,
         Index = indexList,
         StartIndex = (log.TimeDepth.EqualsIgnoreCase(ObjectFolders.Depth) ?
                       (AbstractIndexValue) new DepthIndexValue() : (new TimeIndexValue())),
         EndIndex = (log.TimeDepth.EqualsIgnoreCase(ObjectFolders.Depth) ?
                     (AbstractIndexValue) new DepthIndexValue() : (new TimeIndexValue())),
         TimeDepth = log.TimeDepth,
         PointMetadata = pointMetadataList,
         SchemaVersion = DataSchemaVersion
     });
 }