WriterCreateSchema Method

Creates a new COMTRADE configuration Schema.

Definition

Namespace: Gemstone.COMTRADE
Assembly: Gemstone.COMTRADE (in Gemstone.COMTRADE.dll) Version: 1.0.128 -- Release Build+c1068d6f7b1cbea5c860803b7fe23d1a1d3918a0
public static Schema CreateSchema(
	IEnumerable<ChannelMetadata> metadata,
	string stationName,
	string deviceID,
	Ticks dataStartTime,
	long sampleCount,
	int version = 1999,
	FileType fileType = FileType.Binary,
	double timeFactor = 1,
	double samplingRate = 30,
	double nominalFrequency = 60,
	bool includeFracSecDefinition = true
)

Parameters

metadata  IEnumerableChannelMetadata
Schema ChannelMetadata records.
stationName  String
Station name for the schema.
deviceID  String
Device ID for the schema.
dataStartTime  Ticks
Data start time.
sampleCount  Int64
Total data samples (i.e., total number of rows).
version  Int32  (Optional)
Target schema version - defaults to 1999.
fileType  FileType  (Optional)
Determines the data file type for the schema.
timeFactor  Double  (Optional)
Time factor to use in schema - defaults to 1000.
samplingRate  Double  (Optional)
Desired sampling rate - defaults to 33.3333Hz.
nominalFrequency  Double  (Optional)
Nominal frequency - defaults to 60Hz.
includeFracSecDefinition  Boolean  (Optional)
Determines if the FRACSEC word digital definitions should be included - defaults to true.

Return Value

Schema
New 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