libiec61850  1.6.0
Data Structures | Functions
Definitions and functions related to IEC 61850 Timestamp (UTC Time) data type

Data Structures

union  Timestamp
 

Functions

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...
 

Detailed Description

Function Documentation

◆ LibIEC61850_getVersionString()

LIB61850_API char* LibIEC61850_getVersionString ( void  )

Get the version of the library as string.

Returns
the version of the library (e.g. "1.2.2")

◆ Timestamp_clearFlags()

LIB61850_API void Timestamp_clearFlags ( Timestamp self)

◆ Timestamp_create()

LIB61850_API Timestamp* Timestamp_create ( void  )

◆ Timestamp_createFromByteArray()

LIB61850_API Timestamp* Timestamp_createFromByteArray ( const uint8_t *  byteArray)

◆ Timestamp_destroy()

LIB61850_API void Timestamp_destroy ( Timestamp self)

◆ Timestamp_fromMmsValue()

LIB61850_API Timestamp* Timestamp_fromMmsValue ( Timestamp self,
MmsValue mmsValue 
)

Get the Timestamp value from an MmsValue instance of type MMS_UTC_TIME.

Parameters
selfthe Timestamp instance or NULL to create a new instance
mmsValuethe mmsValue instance of type MMS_UTC_TIME
Returns
the updated Timestamp value or NULL in case of an error

◆ Timestamp_getFractionOfSecond()

LIB61850_API float Timestamp_getFractionOfSecond ( Timestamp self)

◆ Timestamp_getFractionOfSecondPart()

LIB61850_API uint32_t Timestamp_getFractionOfSecondPart ( Timestamp self)

◆ Timestamp_getSubsecondPrecision()

LIB61850_API int Timestamp_getSubsecondPrecision ( Timestamp self)

◆ Timestamp_getTimeInMs()

LIB61850_API msSinceEpoch Timestamp_getTimeInMs ( Timestamp self)

◆ Timestamp_getTimeInNs()

LIB61850_API nsSinceEpoch Timestamp_getTimeInNs ( Timestamp self)

◆ Timestamp_getTimeInSeconds()

LIB61850_API uint32_t Timestamp_getTimeInSeconds ( Timestamp self)

◆ Timestamp_hasClockFailure()

LIB61850_API bool Timestamp_hasClockFailure ( Timestamp self)

◆ Timestamp_isClockNotSynchronized()

LIB61850_API bool Timestamp_isClockNotSynchronized ( Timestamp self)

◆ Timestamp_isLeapSecondKnown()

LIB61850_API bool Timestamp_isLeapSecondKnown ( Timestamp self)

◆ Timestamp_setByMmsUtcTime()

LIB61850_API void Timestamp_setByMmsUtcTime ( Timestamp self,
const MmsValue mmsValue 
)

◆ Timestamp_setClockFailure()

LIB61850_API void Timestamp_setClockFailure ( Timestamp self,
bool  value 
)

◆ Timestamp_setClockNotSynchronized()

LIB61850_API void Timestamp_setClockNotSynchronized ( Timestamp self,
bool  value 
)

◆ Timestamp_setFractionOfSecondPart()

LIB61850_API void Timestamp_setFractionOfSecondPart ( Timestamp self,
uint32_t  fractionOfSecond 
)

◆ Timestamp_setLeapSecondKnown()

LIB61850_API void Timestamp_setLeapSecondKnown ( Timestamp self,
bool  value 
)

◆ Timestamp_setSubsecondPrecision()

LIB61850_API void Timestamp_setSubsecondPrecision ( Timestamp self,
int  subsecondPrecision 
)

Set the subsecond precision value of the time stamp.

Parameters
subsecondPrecisionthe number of significant bits of the fractionOfSecond part of the time stamp

◆ Timestamp_setTimeInMilliseconds()

LIB61850_API void Timestamp_setTimeInMilliseconds ( Timestamp self,
msSinceEpoch  msTime 
)

Set the time in milliseconds.

NOTE: the subSecondPrecision is not touched

Parameters
selfthe Timestamp instance
msTimethe milliseconds since unix epoch

◆ Timestamp_setTimeInNanoseconds()

LIB61850_API void Timestamp_setTimeInNanoseconds ( Timestamp self,
nsSinceEpoch  nsTime 
)

Set the time in nanoseconds.

NOTE: the subSecondPrecision is not touched

Parameters
selfthe Timestamp instance
msTimethe nanoseconds since unix epoch

◆ Timestamp_setTimeInSeconds()

LIB61850_API void Timestamp_setTimeInSeconds ( Timestamp self,
uint32_t  secondsSinceEpoch 
)

Set the time in seconds.

NOTE: the fractionOfSecond part is set to zero NOTE: the subSecondPrecision is not touched

Parameters
selfthe Timestamp instance
secondsSinceEpochthe seconds since unix epoch (unix timestamp)

◆ Timestamp_toMmsValue()

LIB61850_API MmsValue* Timestamp_toMmsValue ( Timestamp self,
MmsValue mmsValue 
)

Set an MmsValue instance of type UTCTime to the timestamp value.

Parameters
selfthe Timestamp instance
mmsValuethe mmsValue instance, if NULL a new instance will be created