Skip to content

ValleyZw/comgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Comgo

Comgo is a GO based tiny project for parsing COMTRADE files.

Description

COMTRADE - Common format for Transient Data Exchange for power systems
COMTRADE files

Each COMTRADE record has a set of up to four files associated with it.

Type Name Description Usage
xxxxxxxx.HDR Header file (Optional) ASCII text file (Desired format) Up to user
xxxxxxxx.CFG Configuration file (Essential) ASCII text file (Specific format) Interprets .DAT file
xxxxxxxx.DAT Data file (Essential) ASCII or binary format (Specific format) Store value for channels
xxxxxxxx.INF Information file (Optional) ASCII or binary format (Desired format) Contains extra information

Useful sites powergridapp, pycomtrade

Usage

a. Download and install it

    $ go get github.com/ValleyZw/comgo

b. Import it in your code

    import "github.com/ValleyZw/comgo"

c. Init private variable

    cfg := comgo.New()

d. Open and read cfg

    file, err := os.Open(cfgFile)
    err := cfg.ReadCFG(file)

e. Open and read dat

    file, err := os.Open(datFile)
    err := cfg.ReadDAT(file)

f. Get value of specific channel

points, err := cfg.GetAnalogChannelData(channelNum)

About

COMTRADE parser

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages