Documentation
¶
Index ¶
- func AmsAddressToString(amsNetId string, adsPort uint16) string
- func AmsNetIdStrToByteArray(s string) ([]byte, error)
- func ByteArrayToAmsNetIdStr(b []byte) string
- func DecodePlcStringBuffer(data []byte) string
- func DecodePlcWstringBuffer(data []byte) string
- func EncodeStringToPlcStringBuffer(str string) []byte
- func EncodeStringToPlcWstringBuffer(str string) []byte
- func TrimPlcString(str string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AmsAddressToString ¶
Converts given AmsAddress struct to string "amsNetId:port"
func AmsNetIdStrToByteArray ¶
AmsNetIDStrToByteArray converts an AmsNetId string to a byte array.
func ByteArrayToAmsNetIdStr ¶
ByteArrayToAmsNetIdStr converts a byte array to an AmsNetId string.
func DecodePlcStringBuffer ¶
Decodes provided []byte to PLC STRING
func DecodePlcWstringBuffer ¶
Decodes provided []byte to PLC WSTRING using ucs2 encoding, also trims zeroes
func EncodeStringToPlcStringBuffer ¶
Encodes provided string to []byte as PLC STRING
func EncodeStringToPlcWstringBuffer ¶
Encodes provided string to []byte as PLC WSTRING using ucs2 encoding
func TrimPlcString ¶
Trims given PLC string until '\\0' is found (removes empty bytes from the end)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.