#############################################################
#Copyright 1998-2003, Systems Integration Specialists Company, Inc.
#               All Rights Reserved
#############################################################
# 08/23/04  JRB  Fix BOOLEAN definition.
# 05/13/04  JRB  Fix INT16U definition.
# 10/08/03  RKR  Added types from chapter 8
                 61850-8-1_CDV_R1-06_To-IEC-CO_2002-11-22.doc
# 03/13/03  JRB  Reverse last chg. Use new types in "rpt.odf" instead.
# 12/16/02  JRB  Chg types needed for Rpts to ":TK". Add "VBSTR5", "OSTR8".

# IEC-61850-8-1: section 8.1.1 Basic data attribute types

":T","BOOLEAN"		"Bool",		"0 or 1"
":T","INT8"		"Byte",		"-128 to 127"
":T","INT16"		"Short",	"-32,768 to 32,767"
":T","INT32"		"Long",		"-2,147,483,648 to 2,147,483,647"
":T","INT128"		"Long",		"-2**127 to (2**127)-1 Good luck"
":T","INT8U"		"Ubyte",   	"0 to 255"
":T","INT16U"		"Ushort",   	"0 to 65,535"
":T","INT32U"		"Ulong",   	"0 to 4,294,967,295"
":T","FLOAT32"		"Float",   	"Range of values IEEE 754 single"
":T","FLOAT64"		"Double",   	"Range of values IEEE 754 double"
":T","ENUMERATED8",     "Byte",         "signed enumeration8-bits"
":T","ENUMERATED16",    "Short",        "signed enumeration16-bits"
":T","OCTET_STRING8",   "OVstring8",    "Maximum 8 Octets"
":T","OCTET_STRING64",  "OVstring64",   "Maximum 64 Octets"
":T","VISIBLE_STRING255","Vstring255",	"Maximum 255 characters"
":T","VISIBLE_STRING64","Vstring64", 	"Maximum 64 characters"
":T","VISIBLE_STRING97","Vstring97", 	"Maximum 97 characters"
":T","UTC_TM",		"Utctime",     	"Used by TimeStamp"
":T","CODED_ENUM2", 	"Bstring2",    	"2 bits - 4 values"
":T","UNICODE_STRING255","UTF8Vstring255","Maximum 255 Unicode"

":T", "TimeStamp"	"<UTC_TM>",  	"UTC Time"
":T", "EntryTime"	"Btime6",  	" 8.1 Section 8.1.3.7"
":T", "Quality"		"BVstring13",	"Quality"


#general types for clause 4.2.1 of GOMSFE
":T","IDENT",       "Vstring65",    ""
":T","BOOL",        "Bool",         "generalboolean"
":T","B2",          "Bstring2",     "GeneralDoubleBit"
":T","D",           "VString32",    "generaldescriptioncomponent"
":T","DB",          "UShort",       "Deadband"
":T","F",           "Float",        "Generalizedfloatingpoint"
":T","FF",          "Float",        "FrozenFloatingPointvalue"
":T","HL",          "Short",        "HighLimit"
":T","HHL",         "Short",        "HighHighLimit"
":T","LL",          "Short",        "lowlimit"
":T","LLL",         "Short",        "lowlowlimit"
":T","I",           "Short",        "Generalizedicomponenttype"
":T","FI",          "Short",        "frozenicomponenttype"
":T","O",           "Float",        "Offset"
":T","Q",           "Bvstring16",   "Generalizedqualitybitstringtype"
":T","R",           "ULong",        "runningcount"
":T","FR",          "ULong",        "frozenrunningcount"
":T","S",           "Float",        "scale"
":T","T",           "Btime6",       "GeneralizedTimeStamp"
":T","FT",          "Btime6",       "frozentimestamp"
":T","PP",          "Bool",         "PseudoPoint"
":T","U",           "Short",        "Enumeratevalue"
":T","VSTR8",       "Vstring8",     "VisibleString8-variablelength"
":T","VSTR16",      "Vstring16",    "VisibleString16-variablelength"
":T","VSTR32",      "Vstring32",    "VisbleString32-variablelength"
":T","VSTR64",      "Vstring64",    "VisibleString64-variablelength"
":T","VSTR65",      "Vstring65",    "VisibleString65-variablelength"
":T","VSTR128",     "Vstring128",   "VisibleString128-variablelength"

#From Clause 4.2.2 of GOMSFE

":T","BSTR1",       "Bstring1",     "Twobitbistring"
":T","BSTR2",       "Bstring2",     "Twobitbistring"
":T","BSTR8",       "Bstring8",     "Bitstring-8"
":T","BSTR16",      "Bstring16",    "Bitstring-16"
":T","BSTR32",      "Bstring32",    "Bitstring-32"
":T","VBSTR8",      "Bvstring8",    "VariablelengthBitstring-8"
":T","VBSTR16",     "Bvstring16",   "VariablelengthBitstring-16"
":T","VBSTR32",     "Bvstring32",   "VariablelengthBitstring-32"
#INT8U, INT16U, & INT32U already defined in IEC-61850 section above
":T","INT8S",       "Byte",         "SignedInteger-8"
":T","INT16S",      "Short",        "SignedInteger-16"
":T","INT32S",      "Long",         "SignedInteger-32"
":T","FLT32",       "Float",        "32bitfloatingpoint"
":T","FLT64",       "Double",       "64bitfloatingpoint"
":T","BTIME4",      "Btime4",       "Binarytimeofday"
":T","BTIME6",      "Btime6",       "Binarytimeofdaytomsec"
":T","ENUM8",       "Byte",         "signed enumeration8-bits"
":T","ENUM16",      "Short",        "signed enumeration16-bits"

#missing from GOMSFE
":T","MAG",         "<INT32S>",     "Magnitude"
":T","ANG",         "<INT32S>",     "Angle"


":T","ACCRPTENA",   "<BOOL>",       "AccumulatorReportEnable"
":T","ACCRS",       "<BOOL>",       "AccumulatorReset"
":T","ACCSET",      "<VSTR16>",     "AccumulatorSetting"
":T","ACTTAGARR",   "<BSTR8>",      "Accumulatortagarray"
":T","ANCESTRY",    "<VSTR32>",     "Ancestry"
":T","ANFMT",       "Vstring6",     "AnalogFormat"
":T","BUFTIM",      "<INT32U>",     "Buffertime"
":T","CID",         "<INT32S>",     "CanonicalID"
":T","CKTID",       "<VSTR32>",     "CircuitID"
":T","CKTPHS",      "<ENUM8>",      "CircuitPhases"
":T","CLASS",       "<VSTR32>",     "Classidentifier"
":T","COMMADR",     "<VSTR16>",     "Communicationaddress"
":T","COMMREV",     "<VSTR8>",      "Communicationrevision"
":T","CONTCURRTG",  "<VSTR16>",     "Continuouscurrentrating"
":T","COUNT",       "<INT16U>",     "count"
":T","CRIRPT",      "<BOOL>",       "criticalreport"
":T","DATSETNAM",   "<VSTR16>",     "Datasetname"
":T","DESTAE",      "<VSTR32>",     "destinationAEname"
":T","DEVFCT",      "<INT16U>",     "devicefunction"
":T","DEVMDLS",     "<VSTR128>",    "devicemodelname"
":T","DOW",         "<ENUM8>",      "Dayoftheweek"
":T","DOWSCHED",    "[6:<BTIME4>]", "Dayoftheweekschedule"
":T","ENABLE",      "<BOOL>",       "enable"
":T","ENCOPT",      "<BSTR8>",      "encodingoptions"
":T","ENROLL",      "<VSTR32>",     "enrollname"
":T","EORBDESC",    "<VSTR64>",     ""
":T","EVACON",      "<VSTR32>",     "evaluationconditionname"
":T","EVACNS",      "<VSTR32>",     "evaluationconditionname"
":T","EVACRI",      "<VSTR32>",     "evaluationcriterianame"
":T","EVAFCT",      "<VSTR32>",     "evaluationfunctionname"
":T","EVAPAR",      "<VSTR32>",     "evaluationparametersname"
":T","EVTENA",      "<BOOL>",       "eventenable"
":T","FLTCURDUR",   "<INT16U>",     "Faultcurrentduration"
":T","FLTCURRTG",   "<INT16S>",     "Placeholder"
":T","FRZENA",      "<BOOL>",       "freezeenable"
":T","FRZPD",       "<INT32U>",     "freezeperiod"
":T","FWDPWRHA",    "[31:<FLT32>]", "ForwardPowerharmonics"
":T","HWREV",       "<VSTR8>",      "HardwareRevision"
":T","HZRTG",       "<VSTR32>",     "Hertzrating"
":T","INDAT",       "<IDENT>",      "InputDataName"
":T","INTGPD",      "<INT32U>",     "IntegrityPeriod"
":T","LINLENM",     "<INT16U>",     "Linelengthinmeters"
":T","LOC",         "<VSTR128>",    "Location"
":T","LOGENA",      "<BOOL>",       "Logenable"
":T","LOGENR",      "<VSTR32>",     "Logenroll"
":T","LOGNAM",      "<VSTR32>",     "Logname"
":T","LOGSIZE",     "<INT16U>",     "Logsize"
":T","LOGWRP",      "<BOOL>",       "LogWrapped"
":T","MAC",         "<INT8U>",      "MediumAccessControl"
":T","MDL",         "<VSTR32>",     "Modelname"
":T","MED",         "<ENUM8>",      "mediatype"
":T","MXREF",       "<ENUM8>",      "Measurementreference"
":T","MXTYP",       "<ENUM8>",      "MeasurementType"
":T","NAME",        "<VSTR32>",     "ownername"
":T","NEWTIM",      "<BTIME6>",     "newesttime"
":T","NUMBITS",     "<INT16U>",     "numberofbits"
":T","NUMPLS",      "<INT16U>",     "numberofpulses"
":T","NUMSMP",      "<INT16U>",     "numberofsamples"
":T","NUMUNIT",     "<VSTR32>",     "numberofunits"
":T","OFFDUR",      "<INT32U>",     "Offduration"
":T","OLDTIM",      "<BTIME6>",     "Oldesttime"
":T","ONDUR",       "<INT32U>",     "Onduration"
":T","OPERDEV",     "<B2>",         "Operatedevice"
":T","OPTFLDS",     "<VBSTR8>",     "Optionalfields"
":T","OUTDAT",      "<IDENT>",      "outputdatasetname"
":T","OVRST",       "<BOOL>",       "Overflowstatus"
":T","OWN",         "<VSTR32>",     "Owner"
":T","PRO",         "<ENUM8>",      "enumeratedprotocolid"
":T","PWRHA",       "[31:<FLT32>]", "powerharmonics"
":T","QURPTENA",    "<BOOL>",       "qualityreportenable"
":T","RBEPD",       "<INT32U>",     "reportperiod"
":T","RPTENA",      "<BOOL>",       "Reportenable"
":T","RPTID",       "<VSTR32>",     "ReportID"
":T","RVSPWRHA",    "[31:<FLT32>]", "reversepowerharmonics"
":T","SBOENA",      "<BOOL>",       "SBOenable"
":T","SETTIMOUT",   "<INT8U>",      "SBOSelectTimeout"
":T","SEQNUM",      "<INT32U>",     "Sequencenumber"
":T","SERNUM",      "<VSTR32>",     "Serialnumber"
":T","SFTREV",      "<VSTR8>",      "SoftwareRevisionNumber"
":T","SMPRATE",     "<INT16U>",     "samplerate"
":T","TAGD",        "<VSTR128>",    "tagdescription"
":T","TAGID",       "<INT8U>",      "tagID"
":T","TAGOWN",      "<VSTR32>",     "tagowner"
":T","TAGTYP",      "<BSTR8>",      "tagtypepermitted"
":T","TEMPRAT",     "<VSTR16>",     "temperaturerating"
":T","TEMPRTG",     "<VSTR16>",     "temperaturerating"
":T","TIMOFFRZ",    "<BTIME6>",     "timeoffreeze"
":T","TIMRPTENA",   "<BOOL>",       "Timestampreportenable"
":T","TRGOPS",      "<BSTR8>",      "Triggeroptions"
":T","TRGS",        "<INT16U>",     "numberoftriggers"
":T","UNITVARRTG",  "<VSTR32>",     "Unitvarrating"
":T","UNKPWRHA",    "[31:<FLT32>]", "Unkownharmonicdirection"
":T","USEST",       "<BOOL>",       "utilizationstatus"
":T","VARRTG",      "<VSTR16>",     "Varsrating"
":T","VARTG",       "<VSTR16>",     "VARsrating"
":T","VND",         "<VSTR32>",     "VendorID"
":T","VRTG",        "<VSTR16>",     "voltagerating"
":T","WRNLEV",      "<INT16U>",     "logwarninglevel"
":T","WRNST",       "<BOOL>",       "warningstatus"

":T","PHSTAR",      "<ENUM8>",      "PhaseTarget"
":T","SBO",         "<VSTR65>",     ""

#Additional types added from other sections
#to support GOOSE and PACT
":T","STNUM",       "<INT32U>",     ""
":T","HOLDTIM",     "<INT32U>",     ""
":T","BACKTIM",     "<INT32U>",     ""
":T","PHSID",       "<INT16U>",     ""
":T","DNA",         "Bstring64",    ""
":T","USERST",      "BVstring128",  ""

