This class is used to hold MMS data values of different types.
More...
|
| MmsValue (IntPtr value, bool responsableForDeletion) |
|
This class is used to hold MMS data values of different types.
ulong IEC61850.Common.MmsValue.GetBinaryTimeAsUtcMs |
( |
| ) |
|
Gets the binary time value as UTC time in ms.
Return the value as milliseconds since epoch (1.1.1970 UTC). The value has to be of type MMS_UTC_TIME.
- Returns
- The UTC time in ms.
- Exceptions
-
bool IEC61850.Common.MmsValue.GetBoolean |
( |
| ) |
|
Gets the boolean value
- Returns
- The boolean value
- Exceptions
-
MmsValue IEC61850.Common.MmsValue.GetElement |
( |
int |
index | ) |
|
Get an element of an array or structure
- Returns
- the MmsValue element.
- Parameters
-
index | index of the element starting with 0 |
- Exceptions
-
byte [] IEC61850.Common.MmsValue.getOctetString |
( |
| ) |
|
Gets the octet string as byte array
Instance has to be of type MMS_OCTET_STRING.
- Returns
- Byte array containing the bytes of the octet string.
- Exceptions
-
new MmsType IEC61850.Common.MmsValue.GetType |
( |
| ) |
|
Gets the type of the value
- Returns
- The type.
DateTimeOffset IEC61850.Common.MmsValue.GetUtcTimeAsDateTimeOffset |
( |
| ) |
|
Convert MMS_UTC_TIME to DateTimeOffset instance
Return the value as DateTimeOffset instance. The value has to be of type MMS_UTC_TIME.
- Returns
- the value as DataTimeOffset instance
- Exceptions
-
ulong IEC61850.Common.MmsValue.GetUtcTimeInMs |
( |
| ) |
|
Gets the timestamp value as UTC time in ms.
Return the value as milliseconds since epoch (1.1.1970 UTC). The value has to be of type MMS_UTC_TIME.
- Returns
- The UTC time in ms.
- Exceptions
-
ulong IEC61850.Common.MmsValue.GetUtcTimeInMsWithUs |
( |
out int |
usec | ) |
|
Gets the timestamp value as UTC time in ms and the additional us part.
Return the value as milliseconds since epoch (1.1.1970 UTC) and the additional us part. The value has to be of type MMS_UTC_TIME.
- Parameters
-
usec | returns the usec part of the time value |
- Returns
- The UTC time in ms.
- Exceptions
-
byte IEC61850.Common.MmsValue.GetUtcTimeQuality |
( |
| ) |
|
Gets quality flags of an UTC timestamp.
Meaning of the bits in the timeQuality byte: bit 7 = leapSecondsKnown bit 6 = clockFailure bit 5 = clockNotSynchronized bit 0-4 = subsecond time accuracy (number of significant bits of subsecond time)
- Returns
- The UTC time quality.
int IEC61850.Common.MmsValue.MaxSize |
( |
| ) |
|
Gets the maximum size of an octet string
- Returns
- The maximum size (in bytes) of the octet string
static DateTimeOffset IEC61850.Common.MmsValue.MsTimeToDateTimeOffset |
( |
UInt64 |
msTime | ) |
|
|
static |
Convert a millisecond time (milliseconds since epoch) to DataTimeOffset
- Returns
- The time as DataTimeOffset
- Parameters
-
msTime | the millisecond time |
static MmsValue IEC61850.Common.MmsValue.NewBinaryTime |
( |
bool |
largeFormat | ) |
|
|
static |
Create a new MmsValue instance of type MMS_BINARY_TIME
- Returns
- the new MmsValue instance.
- Parameters
-
largeFormat | If set to true large 6 byte format. |
static MmsValue IEC61850.Common.MmsValue.NewBitString |
( |
int |
bitSize | ) |
|
|
static |
Create a new MmsValue instance of type MMS_BIT_STRING.
- Returns
- the new MmsValue instance
- Parameters
-
bitSize | the size of the bit string in bits. |
static MmsValue IEC61850.Common.MmsValue.NewOctetString |
( |
int |
maxSize, |
|
|
int |
size = 0 |
|
) |
| |
|
static |
Create a new MmsValue instance of type MMS_OCTET_STRING.
- Returns
- the new MmsValue instance
- Parameters
-
maxSize | the maximum size of the octet string in bytes |
size | the current size of the octet string in bytes (defaults to 0) |
void IEC61850.Common.MmsValue.SetBinaryTime |
( |
UInt64 |
timestamp | ) |
|
Sets the binary time.
- Parameters
-
void IEC61850.Common.MmsValue.SetDouble |
( |
double |
value | ) |
|
Sets the float/double value of an MMS_FLOAT instance
- Parameters
-
value | the new value to set |
- Exceptions
-
void IEC61850.Common.MmsValue.SetFloat |
( |
float |
value | ) |
|
Sets the float value of an MMS_FLOAT instance
- Parameters
-
value | the new value to set |
- Exceptions
-
void IEC61850.Common.MmsValue.SetUtcTimeMs |
( |
ulong |
timeval | ) |
|
Sets the timestamp value as UTC time in ms.
Sets the value as milliseconds since epoch (1.1.1970 UTC). The value has to be of type MMS_UTC_TIME.
- Exceptions
-
void IEC61850.Common.MmsValue.SetUtcTimeQuality |
( |
byte |
timeQuality | ) |
|
Sets the quality flags of an UTC timestamp
Meaning of the bits in the timeQuality byte: bit 7 = leapSecondsKnown bit 6 = clockFailure bit 5 = clockNotSynchronized bit 0-4 = subsecond time accuracy (number of significant bits of subsecond time)
- Parameters
-
int IEC61850.Common.MmsValue.Size |
( |
| ) |
|
Gets the size of an array, structure, or bit string
- Returns
- Return the size of an array of structure (number of elements) The value has to be of type MMS_ARRAY, MMS_STRUCTURE, MMS_BIT_STRING ... the number of elements (array/structure elements, octets, bits depending on type)
- Exceptions
-
double IEC61850.Common.MmsValue.ToDouble |
( |
| ) |
|
Gets the double value of an MMS_FLOAT instance
- Returns
- The float value
- Exceptions
-
float IEC61850.Common.MmsValue.ToFloat |
( |
| ) |
|
Gets the float value of an MMS_FLOAT instance
- Returns
- The float value
- Exceptions
-
Int32 IEC61850.Common.MmsValue.ToInt32 |
( |
| ) |
|
Return the value as 32 bit signed integer.
Return the value as 32 bit signed integer (Int32). The value has to be of type MMS_INTEGER.
- Returns
- the value if the object as 32 bit signed integer
- Exceptions
-
Int64 IEC61850.Common.MmsValue.ToInt64 |
( |
| ) |
|
Return the value as 64 bit signed integer.
Return the value as 64 bit signed integer (Int64). The value has to be of type MMS_INTEGER.
- Returns
- the value if the object as 64 bit signed integer
- Exceptions
-
UInt32 IEC61850.Common.MmsValue.ToUint32 |
( |
| ) |
|
Return the value as 32 bit unsigned integer.
Return the value as 32 bit unsigned integer (Int32). The value has to be of type MMS_INTEGER.
- Returns
- the value if the object as 32 bit unsigned integer
- Exceptions
-
UInt32 IEC61850.Common.MmsValue.ToUnixTimestamp |
( |
| ) |
|
Gets the timestamp value as UTC time in s (UNIX time stamp).
Return the value as seconds since epoch (1.1.1970 UTC). The value has to be of type MMS_UTC_TIME.
- Returns
- The UTC time in seconds (UNIX time stamp).
- Exceptions
-
The documentation for this class was generated from the following file:
- IEC61850forCSharp/MmsValue.cs