|
WriterCreateSchema Method (IEnumerableChannelMetadata, String, String, Ticks, Int32, Int32, FileType, Double, Double, Double, Boolean)
|
Creates a new COMTRADE configuration
Schema.
Namespace:
GSF.COMTRADE
Assembly:
GSF.COMTRADE (in GSF.COMTRADE.dll) Version: 2.3.434-beta
Syntax public static Schema CreateSchema(
IEnumerable<ChannelMetadata> metadata,
string stationName,
string deviceID,
Ticks dataStartTime,
int sampleCount,
int version = 1999,
FileType fileType = FileType.Binary,
double timeFactor = 1,
double samplingRate = 30,
double nominalFrequency = 60,
bool includeFracSecDefinition = true
)
Public Shared Function CreateSchema (
metadata As IEnumerable(Of ChannelMetadata),
stationName As String,
deviceID As String,
dataStartTime As Ticks,
sampleCount As Integer,
Optional version As Integer = 1999,
Optional fileType As FileType = FileType.Binary,
Optional timeFactor As Double = 1,
Optional samplingRate As Double = 30,
Optional nominalFrequency As Double = 60,
Optional includeFracSecDefinition As Boolean = true
) As Schema
public:
static Schema^ CreateSchema(
IEnumerable<ChannelMetadata>^ metadata,
String^ stationName,
String^ deviceID,
Ticks dataStartTime,
int sampleCount,
int version = 1999,
FileType fileType = FileType::Binary,
double timeFactor = 1,
double samplingRate = 30,
double nominalFrequency = 60,
bool includeFracSecDefinition = true
)
static member CreateSchema :
metadata : IEnumerable<ChannelMetadata> *
stationName : string *
deviceID : string *
dataStartTime : Ticks *
sampleCount : int *
?version : int *
?fileType : FileType *
?timeFactor : float *
?samplingRate : float *
?nominalFrequency : float *
?includeFracSecDefinition : bool
(* Defaults:
let _version = defaultArg version 1999
let _fileType = defaultArg fileType FileType.Binary
let _timeFactor = defaultArg timeFactor 1
let _samplingRate = defaultArg samplingRate 30
let _nominalFrequency = defaultArg nominalFrequency 60
let _includeFracSecDefinition = defaultArg includeFracSecDefinition true
*)
-> Schema
GSF.COMTRADE.Writer.CreateSchema = function(metadata, stationName, deviceID, dataStartTime, sampleCount, version, fileType, timeFactor, samplingRate, nominalFrequency, includeFracSecDefinition);
Request Example
View SourceParameters
- metadata
- Type: System.Collections.GenericIEnumerableChannelMetadata
Schema ChannelMetadata records. - stationName
- Type: SystemString
Station name for the schema. - deviceID
- Type: SystemString
Device ID for the schema. - dataStartTime
- Type: GSFTicks
Data start time. - sampleCount
- Type: SystemInt32
Total data samples (i.e., total number of rows). - version (Optional)
- Type: SystemInt32
Target schema version - defaults to 1999. - fileType (Optional)
- Type: GSF.COMTRADEFileType
Determines the data file type for the schema. - timeFactor (Optional)
- Type: SystemDouble
Time factor to use in schema - defaults to 1000. - samplingRate (Optional)
- Type: SystemDouble
Desired sampling rate - defaults to 33.3333Hz. - nominalFrequency (Optional)
- Type: SystemDouble
Nominal frequency - defaults to 60Hz. - includeFracSecDefinition (Optional)
- Type: SystemBoolean
Determines if the FRACSEC word digital definitions should be included - defaults to true.
Return Value
Type:
SchemaNew COMTRADE configuration
Schema.
Remarks
This function is primarily intended to create a configuration based on synchrophasor data
(see Annex H: Schema for Phasor Data 2150 Using the COMTRADE File Standard in IEEE C37.111-2010),
it may be necessary to manually create a schema object for other COMTRADE needs. You can call
the FileImage property to return a string that can be written to a file
that will be the contents of the configuration file.
Linear scaling factors for analog channels, i.e., adders and multipliers, will be set to reasonable
values based on the channel type. These should be adjusted as needed based on actual channel value
ranges. Note that for Float32 the multiplier will be 1.0 and the adder
will be 0.0 for all analog values.
See Also