libiec61850  1.6.0
Data Structures | Macros | Typedefs | Enumerations | Functions
iec61850_common.h File Reference
#include "libiec61850_common_api.h"
#include "logging_api.h"
#include "linked_list.h"

Go to the source code of this file.

Data Structures

struct  PhyComAddress
 
union  Timestamp
 

Macros

#define IEC_61850_EDITION_1   0
 
#define IEC_61850_EDITION_2   1
 
#define IEC_61850_EDITION_2_1   2
 
#define TRG_OPT_DATA_CHANGED   1
 
#define TRG_OPT_QUALITY_CHANGED   2
 
#define TRG_OPT_DATA_UPDATE   4
 
#define TRG_OPT_INTEGRITY   8
 
#define TRG_OPT_GI   16
 
#define TRG_OPT_TRANSIENT   128
 
#define RPT_OPT_SEQ_NUM   1
 
#define RPT_OPT_TIME_STAMP   2
 
#define RPT_OPT_REASON_FOR_INCLUSION   4
 
#define RPT_OPT_DATA_SET   8
 
#define RPT_OPT_DATA_REFERENCE   16
 
#define RPT_OPT_BUFFER_OVERFLOW   32
 
#define RPT_OPT_ENTRY_ID   64
 
#define RPT_OPT_CONF_REV   128
 
#define CONTROL_ORCAT_NOT_SUPPORTED   0
 
#define CONTROL_ORCAT_BAY_CONTROL   1
 
#define CONTROL_ORCAT_STATION_CONTROL   2
 
#define CONTROL_ORCAT_REMOTE_CONTROL   3
 
#define CONTROL_ORCAT_AUTOMATIC_BAY   4
 
#define CONTROL_ORCAT_AUTOMATIC_STATION   5
 
#define CONTROL_ORCAT_AUTOMATIC_REMOTE   6
 
#define CONTROL_ORCAT_MAINTENANCE   7
 
#define CONTROL_ORCAT_PROCESS   8
 
#define QUALITY_VALIDITY_GOOD   0
 
#define QUALITY_VALIDITY_INVALID   2
 
#define QUALITY_VALIDITY_RESERVED   1
 
#define QUALITY_VALIDITY_QUESTIONABLE   3
 
#define QUALITY_DETAIL_OVERFLOW   4
 
#define QUALITY_DETAIL_OUT_OF_RANGE   8
 
#define QUALITY_DETAIL_BAD_REFERENCE   16
 
#define QUALITY_DETAIL_OSCILLATORY   32
 
#define QUALITY_DETAIL_FAILURE   64
 
#define QUALITY_DETAIL_OLD_DATA   128
 
#define QUALITY_DETAIL_INCONSISTENT   256
 
#define QUALITY_DETAIL_INACCURATE   512
 
#define QUALITY_SOURCE_SUBSTITUTED   1024
 
#define QUALITY_TEST   2048
 
#define QUALITY_OPERATOR_BLOCKED   4096
 
#define QUALITY_DERIVED   8192
 

Typedefs

typedef uint16_t Quality
 
typedef uint16_t Validity
 

Enumerations

enum  ACSIClass {
  ACSI_CLASS_DATA_OBJECT , ACSI_CLASS_DATA_SET , ACSI_CLASS_BRCB , ACSI_CLASS_URCB ,
  ACSI_CLASS_LCB , ACSI_CLASS_LOG , ACSI_CLASS_SGCB , ACSI_CLASS_GoCB ,
  ACSI_CLASS_GsCB , ACSI_CLASS_MSVCB , ACSI_CLASS_USVCB
}
 
enum  ControlModel {
  CONTROL_MODEL_STATUS_ONLY = 0 , CONTROL_MODEL_DIRECT_NORMAL = 1 , CONTROL_MODEL_SBO_NORMAL = 2 , CONTROL_MODEL_DIRECT_ENHANCED = 3 ,
  CONTROL_MODEL_SBO_ENHANCED = 4
}
 Control model (represented by "ctlModel" attribute) More...
 
enum  ControlAddCause {
  ADD_CAUSE_UNKNOWN = 0 , ADD_CAUSE_NOT_SUPPORTED = 1 , ADD_CAUSE_BLOCKED_BY_SWITCHING_HIERARCHY = 2 , ADD_CAUSE_SELECT_FAILED = 3 ,
  ADD_CAUSE_INVALID_POSITION = 4 , ADD_CAUSE_POSITION_REACHED = 5 , ADD_CAUSE_PARAMETER_CHANGE_IN_EXECUTION = 6 , ADD_CAUSE_STEP_LIMIT = 7 ,
  ADD_CAUSE_BLOCKED_BY_MODE = 8 , ADD_CAUSE_BLOCKED_BY_PROCESS = 9 , ADD_CAUSE_BLOCKED_BY_INTERLOCKING = 10 , ADD_CAUSE_BLOCKED_BY_SYNCHROCHECK = 11 ,
  ADD_CAUSE_COMMAND_ALREADY_IN_EXECUTION = 12 , ADD_CAUSE_BLOCKED_BY_HEALTH = 13 , ADD_CAUSE_1_OF_N_CONTROL = 14 , ADD_CAUSE_ABORTION_BY_CANCEL = 15 ,
  ADD_CAUSE_TIME_LIMIT_OVER = 16 , ADD_CAUSE_ABORTION_BY_TRIP = 17 , ADD_CAUSE_OBJECT_NOT_SELECTED = 18 , ADD_CAUSE_OBJECT_ALREADY_SELECTED = 19 ,
  ADD_CAUSE_NO_ACCESS_AUTHORITY = 20 , ADD_CAUSE_ENDED_WITH_OVERSHOOT = 21 , ADD_CAUSE_ABORTION_DUE_TO_DEVIATION = 22 , ADD_CAUSE_ABORTION_BY_COMMUNICATION_LOSS = 23 ,
  ADD_CAUSE_ABORTION_BY_COMMAND = 24 , ADD_CAUSE_NONE = 25 , ADD_CAUSE_INCONSISTENT_PARAMETERS = 26 , ADD_CAUSE_LOCKED_BY_OTHER_CLIENT = 27
}
 
enum  ControlLastApplError { CONTROL_ERROR_NO_ERROR = 0 , CONTROL_ERROR_UNKNOWN = 1 , CONTROL_ERROR_TIMEOUT_TEST = 2 , CONTROL_ERROR_OPERATOR_TEST = 3 }
 
enum  FunctionalConstraint {
  IEC61850_FC_ST = 0 , IEC61850_FC_MX = 1 , IEC61850_FC_SP = 2 , IEC61850_FC_SV = 3 ,
  IEC61850_FC_CF = 4 , IEC61850_FC_DC = 5 , IEC61850_FC_SG = 6 , IEC61850_FC_SE = 7 ,
  IEC61850_FC_SR = 8 , IEC61850_FC_OR = 9 , IEC61850_FC_BL = 10 , IEC61850_FC_EX = 11 ,
  IEC61850_FC_CO = 12 , IEC61850_FC_US = 13 , IEC61850_FC_MS = 14 , IEC61850_FC_RP = 15 ,
  IEC61850_FC_BR = 16 , IEC61850_FC_LG = 17 , IEC61850_FC_GO = 18 , IEC61850_FC_ALL = 99 ,
  IEC61850_FC_NONE = -1
}
 
enum  Dbpos { DBPOS_INTERMEDIATE_STATE = 0 , DBPOS_OFF = 1 , DBPOS_ON = 2 , DBPOS_BAD_STATE = 3 }
 

Functions

LIB61850_API char * FunctionalConstraint_toString (FunctionalConstraint fc)
 convert a function constraint to a static string More...
 
LIB61850_API FunctionalConstraint FunctionalConstraint_fromString (const char *fcString)
 parse a string treated as a functional constraint representation More...
 
LIB61850_API Validity Quality_getValidity (Quality *self)
 
LIB61850_API void Quality_setValidity (Quality *self, Validity validity)
 
LIB61850_API void Quality_setFlag (Quality *self, int flag)
 
LIB61850_API void Quality_unsetFlag (Quality *self, int flag)
 
LIB61850_API bool Quality_isFlagSet (Quality *self, int flag)
 
LIB61850_API Quality Quality_fromMmsValue (const MmsValue *mmsValue)
 
LIB61850_API MmsValueQuality_toMmsValue (Quality *self, MmsValue *mmsValue)
 
LIB61850_API Dbpos Dbpos_fromMmsValue (const MmsValue *mmsValue)
 convert MMS bit string to Dbpos enumeration type More...
 
LIB61850_API MmsValueDbpos_toMmsValue (MmsValue *mmsValue, Dbpos dbpos)
 conver Dbpos to MMS bit string More...
 
LIB61850_API TimestampTimestamp_create (void)
 
LIB61850_API TimestampTimestamp_createFromByteArray (const uint8_t *byteArray)
 
LIB61850_API void Timestamp_destroy (Timestamp *self)
 
LIB61850_API void Timestamp_clearFlags (Timestamp *self)
 
LIB61850_API uint32_t Timestamp_getTimeInSeconds (Timestamp *self)
 
LIB61850_API msSinceEpoch Timestamp_getTimeInMs (Timestamp *self)
 
LIB61850_API nsSinceEpoch Timestamp_getTimeInNs (Timestamp *self)
 
LIB61850_API bool Timestamp_isLeapSecondKnown (Timestamp *self)
 
LIB61850_API void Timestamp_setLeapSecondKnown (Timestamp *self, bool value)
 
LIB61850_API bool Timestamp_hasClockFailure (Timestamp *self)
 
LIB61850_API void Timestamp_setClockFailure (Timestamp *self, bool value)
 
LIB61850_API bool Timestamp_isClockNotSynchronized (Timestamp *self)
 
LIB61850_API void Timestamp_setClockNotSynchronized (Timestamp *self, bool value)
 
LIB61850_API int Timestamp_getSubsecondPrecision (Timestamp *self)
 
LIB61850_API void Timestamp_setFractionOfSecondPart (Timestamp *self, uint32_t fractionOfSecond)
 
LIB61850_API uint32_t Timestamp_getFractionOfSecondPart (Timestamp *self)
 
LIB61850_API float Timestamp_getFractionOfSecond (Timestamp *self)
 
LIB61850_API void Timestamp_setSubsecondPrecision (Timestamp *self, int subsecondPrecision)
 Set the subsecond precision value of the time stamp. More...
 
LIB61850_API void Timestamp_setTimeInSeconds (Timestamp *self, uint32_t secondsSinceEpoch)
 Set the time in seconds. More...
 
LIB61850_API void Timestamp_setTimeInMilliseconds (Timestamp *self, msSinceEpoch msTime)
 Set the time in milliseconds. More...
 
LIB61850_API void Timestamp_setTimeInNanoseconds (Timestamp *self, nsSinceEpoch nsTime)
 Set the time in nanoseconds. More...
 
LIB61850_API void Timestamp_setByMmsUtcTime (Timestamp *self, const MmsValue *mmsValue)
 
LIB61850_API MmsValueTimestamp_toMmsValue (Timestamp *self, MmsValue *mmsValue)
 Set an MmsValue instance of type UTCTime to the timestamp value. More...
 
LIB61850_API TimestampTimestamp_fromMmsValue (Timestamp *self, MmsValue *mmsValue)
 Get the Timestamp value from an MmsValue instance of type MMS_UTC_TIME. More...
 
LIB61850_API char * LibIEC61850_getVersionString (void)
 Get the version of the library as string. More...