FB_GseByteOrderConverterClass

FB_GseByteOrderConverterClass 1:

The natural byte order of the data on a TwinCAT system is referred to as the host byte order. The byte order of the data transmitted over the network is referred to as the network byte order. The network byte order of IEC 61850 data largely corresponds to the big-endian format, while the TwinCAT system uses the byte order of the little-endian format. This function block implements methods that allow the byte order of the IEC 61850 data to be changed (little-endian <-> big-endian).

The HostToNetXxx methods convert (encode) the data values to be sent from host byte order to network byte order. After encoding, the data values are stored in the network transmission buffer of the sender (e.g., SV-Publisher). The transmitter sends the contents of the network transmission buffer.

The receiver (e.g., SV subscriber) receives the data values into the network receive buffer. The NetToHostXxx methods convert (decode) the data values in the network receive buffer from network byte order to host byte order.

Namespace: Tc3_Gse
Library: Tc3_Gse (Tc3_Gse.compiled-library)

Inheritance hierarchy

FB_CltsByteOrderConverterClass -> FB_GseByteOrderConverterClass

FUNCTION_BLOCK FB_GseByteOrderConverterClass EXTENDS FB_CltsByteOrderConverterClass

FB_GseByteOrderConverterClass 2: Methods

Name

Definition location

Description

HostToNetBoolean

Inherited from FB_CltsByteOrderConverterClass

Encodes values of type BOOL (IEC 61850 type BOOLEAN) into the network transmission buffer (8 bits as a byte; all bits set to 0 => FALSE, otherwise TRUE).

HostToNetFloat32

-//-

Encodes REAL-type values (IEC 61850 type FLOAT32) into the network transmission buffer (32 bits as a byte array with 4 elements).

HostToNetInt32

-//-

Encodes values of type DINT (IEC 61850 type INT32) into the network transmission buffer (32 bits as a byte array with 4 elements).

HostToNetXxx

-//-

Additional methods for encoding IEC 61850 base-type values in the network transmission buffers.

HostToNetCheck

Local

Encodes values of type E_AcsiCheck (IEC 61850 type CheckConditions) into the network transmission buffer (32 bits as a byte array with 4 elements).

HostToNetCurrency

-//-

Encodes values of type T_AcsiCurrency (IEC 61850 type Currency, null-terminated ISO 4217 currency code as text) into the network transmission buffer (byte array with 4 elements).

HostToNetDbpos

-//-

Encodes values of type E_AcsiDbpos (IEC 61850 type Dbpos) into the network transmission buffer (32 bits as a byte array with 4 elements).

HostToNetEnum

-//-

Encodes values of type SINT (IEC 61850 enumerated type) into the network transmission buffer (32 bits as a byte array with 4 elements).

HostToNetEnum16

-//-

Encodes values of type INT (IEC 61850 enumerated type) into the network transmission buffer (32 bits as a byte array with 4 elements).

HostToNetEnum32

-//-

Encodes values of type DINT (IEC 61850 enumerated type) into the network transmission buffer (32 bits as a byte array with 4 elements).

HostToNetLogOptFlds

-//-

Encodes values of type ST_AcsiLogOptionalFields (IEC 61850 type LCBLogEntryOptions) into the network transmission buffer (32 bits as a byte array with 4 elements).

HostToNetObjName

-//-

Encodes values of type T_AcsiObjectName (IEC 61850 ObjectName type) into the network transmission buffer (null-terminated ASCII text as a byte array with 20 elements).

HostToNetObjRef

-//-

Encodes values of type T_AcsiObjectReference (IEC 61850 type ObjectReference) into the network transmission buffer (null-terminated ASCII text as a byte array with 20 elements).

HostToNetOctet64

-//-

Encodes values of type T_OCTET64 (IEC 61850 type Octet64) into the network transmission buffer (null-terminated ASCII text as a byte array with 20 elements).

HostToNetOctetString

-//-

Encodes values of type ARRAY[*] OF BYTE (IEC 61850 type Octet[n]) into the network transmission buffer (null-terminated ASCII text as a byte array with 20 elements).

HostToNetOptFlds

-//-

Encodes values of type ST_AcsiOptionalFields (IEC 61850 type RCBReportOptions) into the network transmission buffer (32 bits as a byte array with 4 elements).

HostToNetQuality

-//-

Encodes values of type ST_AcsiQuality (IEC 61850 type Quality) into the network transmission buffer (32 bits as a byte array with 4 elements).

HostToNetReasonCode

-//-

Encodes values of type ST_AcsiReasonCode (IEC 61850 ReasonCode type) into the network transmission buffer (32 bits as a byte array with 4 elements).

HostToNetSvOptFlds

-//-

Encodes values of type ST_AcsiSvOptionalFields (IEC 61850 type SVMessageOptions) into the network transmission buffer (32 bits as a byte array with 4 elements).

HostToNetTcmd

-//-

Encodes values of type E_AcsiTcmd (IEC 61850 type Tcmd) into the network transmission buffer (32 bits as a byte array with 4 elements).

HostToNetTrgOps

-//-

Encodes values of type ST_AcsiTriggerConditions (IEC 61850 type TriggerConditions) into the network transmission buffer (32 bits as a byte array with 4 elements).

HostToNetUnicode255

-//-

Encodes values of type T_AcsiUnicode255 (IEC 61850 type Unicode255) into the network transmission buffer (null-terminated UTF-8-encoded text as a byte array with 20 elements).

HostToNetVisString129

-//-

Encodes values of type T_AcsiVisString129 (IEC 61850 type VisString129) into the network transmission buffer (null-terminated ASCII text as a byte array with 35 elements).

HostToNetVisString255

-//-

Encodes values of type T_AcsiVisString255 (IEC 61850 type VisString255) into the network transmission buffer (null-terminated ASCII text as a byte array with 35 elements).

HostToNetVisString64

-//-

Encodes values of type T_AcsiVisString64 (IEC 61850 type VisString64) into the network transmission buffer (null-terminated ASCII text as a byte array with 35 elements).

 

 

 

NetToHostBoolean

Inherited from FB_CltsByteOrderConverterClass

Decodes BOOL values (IEC 61850 type BOOLEAN) from the network receive buffer (8 bits as a byte; all bits set to 0 => FALSE, otherwise TRUE).

NetToHostFloat32

-//-

Decodes REAL-type values (IEC 61850 type FLOAT32) from the network receive buffer (32 bits as a byte array with 4 elements).

NetToHostInt32

-//-

Decodes values of type DINT (IEC 61850 type INT32) from the network receive buffer (32 bits as a byte array with 4 elements).

NetToHostXxx

-//-

Additional methods for decoding IEC 61850 base-type values from the network receive buffer.

NetToHostCheck

Local

Decodes values of type E_AcsiCheck (IEC 61850 type CheckConditions) from the network receive buffer (32 bits as a byte array with 4 elements).

NetToHostCurrency

-//-

Decodes values of type T_AcsiCurrency (IEC 61850 type Currency, null-terminated ISO 4217 currency code as text) from the network receive buffer (byte array with 4 elements).

NetToHostDbpos

-//-

Decodes values of type E_AcsiDbpos (IEC 61850 type Dbpos) from the network receive buffer (32 bits as a byte array with 4 elements).

NetToHostEnum

-//-

Decodes SINT-type values (IEC 61850 enumerated type) from the network receive buffer (32 bits as a byte array with 4 elements).

NetToHostEnum16

-//-

Decodes INT-type values (IEC 61850 enumerated type) from the network receive buffer (32 bits as a byte array with 4 elements).

NetToHostEnum32

-//-

Decodes values of type DINT (IEC 61850 enumerated type) from the network receive buffer (32 bits as a byte array with 4 elements).

NetToHostLogOptFlds

-//-

Decodes values of type ST_AcsiLogOptionalFields (IEC 61850 type LCBLogEntryOptions) from the network receive buffer (32 bits as a byte array with 4 elements).

NetToHostObjName

-//-

Decodes values of type T_AcsiObjectName (IEC 61850 ObjectName type) from the network receive buffer (null-terminated ASCII text as a byte array with 20 elements).

NetToHostObjRef

-//-

Decodes values of type T_AcsiObjectReference (IEC 61850 type ObjectReference) from the network receive buffer (null-terminated ASCII text as a byte array with 20 elements).

NetToHostOctet64

-//-

Decodes values of type T_OCTET64 (IEC 61850 Octet64 type) from the network receive buffer (null-terminated ASCII text as a byte array with 20 elements).

NetToHostOctetString

-//-

Decodes values of type ARRAY[*] OF BYTE (IEC 61850 type Octet[n]) from the network receive buffer (null-terminated ASCII text as a byte array with 20 elements).

NetToHostOptFlds

-//-

Decodes values of type ST_AcsiOptionalFields (IEC 61850 type RCBReportOptions) from the network receive buffer (32 bits as a byte array with 4 elements).

NetToHostQuality

-//-

Decodes values of type ST_AcsiQuality (IEC 61850 type Quality) from the network receive buffer (32 bits as a byte array with 4 elements).

NetToHostReasonCode

-//-

Decodes values of type ST_AcsiReasonCode (IEC 61850 ReasonCode type) from the network receive buffer (32 bits as a byte array with 4 elements).

NetToHostSvOptFlds

-//-

Decodes values of type ST_AcsiSvOptionalFields (IEC 61850 type SVMessageOptions) from the network receive buffer (32 bits as a byte array with 4 elements).

NetToHostTcmd

-//-

Decodes values of type E_AcsiTcmd (IEC 61850 type Tcmd) from the network receive buffer (32 bits as a byte array with 4 elements).

NetToHostTrgOps

-//-

Decodes values of type ST_AcsiTriggerConditions (IEC 61850 type TriggerConditions) from the network receive buffer (32 bits as a byte array with 4 elements).

NetToHostUnicode255

-//-

Decodes values of type T_AcsiUnicode255 (IEC 61850 type Unicode255) from the network receive buffer (null-terminated UTF-8-encoded text as a byte array with 20 elements).

NetToHostVisString129

-//-

Decodes values of type T_AcsiVisString129 (IEC 61850 type VisString129) from the network receive buffer (null-terminated ASCII text as a byte array with 35 elements).

NetToHostVisString255

-//-

Decodes values of type T_AcsiVisString255 (IEC 61850 type VisString255) from the network receive buffer (null-terminated ASCII text as a byte array with 35 elements).

NetToHostVisString64

-//-

Decodes values of type T_AcsiVisString64 (IEC 61850 type VisString64) from the network receive buffer (null-terminated ASCII text as a byte array with 35 elements).

Example:

See here: SV Publisher/Subscriber according to UCA 61850-9-2 Light Edition.