Class AtomicType
A LogixType that represents value type object.
public abstract class AtomicType : LogixType, ILogixSerializable
- Inheritance
-
AtomicType
- Implements
- Derived
- Inherited Members
Remarks
Logix atomic types are types that have value (e.g., BOOL, SINT, INT, DINT, REAL, etc.). These type are synonymous with value types in .NET and in fact wrap the .NET value types internally while adding the common LogixType API. Atomic types also add Radix to indicate the format of the current type value.
All derived atomic types will implement value equality and comparison semantics to allow common operations to be performed. They will also implement the IConvertible interface explicitly so to allow conversion between types.
Properties
Class
The class (atomic, predefined, user-defined) that the type belongs to.
public override sealed DataTypeClass Class { get; }
Property Value
- DataTypeClass
A DataTypeClass option representing the class type.
Family
The family (string or none) of the type.
public override sealed DataTypeFamily Family { get; }
Property Value
- DataTypeFamily
A DataTypeFamily option representing the family value.
Members
The collection of LogixMember objects that make up the structure of the type.
public override IEnumerable<LogixMember> Members { get; }
Property Value
- IEnumerable<LogixMember>
A IEnumerable<T> containing LogixMember objects.
Remarks
All logix types, with the exception of a BOOL
and REAL/LREAL
, have what can be considered
members. Every derived type must implement this property for which it returns a collection of members, forming
the type/member hierarchy of the logix type.
Radix
The radix format for the AtomicType.
public abstract Radix Radix { get; }
Property Value
Methods
GetBytes()
Returns the AtomicType value as an array of byte values.
public abstract byte[] GetBytes()
Returns
OnMemberDataChanged(object, EventArgs)
Trigger the DataChanged event when a atomic member data changed event is fired to forward the call up the type/member hierarchy.
protected virtual void OnMemberDataChanged(object sender, EventArgs e)
Parameters
Serialize()
Serialized the atomic type as the DataValue XElement.
public override XElement Serialize()
Returns
ToString()
Return the atomic value formatted using the current Radix format.
public override string ToString()
Returns
ToString(Radix)
Returns the atomic value formatted in the specified Radix format.
public string ToString(Radix radix)
Parameters
radix
RadixThe radix format.