Documentation ¶
Index ¶
- func ByteToDataType(datatype SDODataType, data []byte) (string, bool)
- func DataTypeToByte(datatype SDODataType, data string) ([]byte, bool)
- func GetAbortCodeBytes(frame canopen.Frame) []uint8
- func GetIntBytes(inputData string, bitSize int) ([]byte, error)
- func GetUIntBytes(inputData string, bitSize int) ([]byte, error)
- func HasBit(n uint8, pos uint) bool
- func IsReversed(datatype SDODataType) bool
- func Pad(b []byte, minLength int) []byte
- func ParseDate(data []byte, date time.Time) (string, bool)
- func ParseDateString(data string, offset time.Time) ([]byte, error)
- func ParseInt(b []byte) (int64, error)
- func ParseUInt(b []byte) uint64
- func ServerResponseByte(scs ServerCommandSpecifier, toggleBit bool) byte
- func SetBit(n uint8, pos uint) uint8
- func SplitN(b []byte, n int) [][]byte
- type ClientCommandSpecifier
- type SDODataType
- type ServerCommandSpecifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ByteToDataType ¶ added in v0.6.0
func ByteToDataType(datatype SDODataType, data []byte) (string, bool)
func DataTypeToByte ¶ added in v0.6.0
func DataTypeToByte(datatype SDODataType, data string) ([]byte, bool)
func GetAbortCodeBytes ¶ added in v0.6.0
func GetUIntBytes ¶ added in v0.6.0
func IsReversed ¶ added in v0.6.0
func IsReversed(datatype SDODataType) bool
IsReversed if the bytes are send in the reverse order (little endian)
func ParseDateString ¶ added in v0.6.0
func ServerResponseByte ¶ added in v0.6.0
func ServerResponseByte(scs ServerCommandSpecifier, toggleBit bool) byte
Types ¶
type ClientCommandSpecifier ¶ added in v0.6.0
type ClientCommandSpecifier byte
const ( InitiateDownloadRequest ClientCommandSpecifier = 1 DownloadSegmentRequest ClientCommandSpecifier = 0 ClientBlockDownload ClientCommandSpecifier = 6 InitiateUploadRequest ClientCommandSpecifier = 2 UploadSegmentRequest ClientCommandSpecifier = 3 )
func ProcessRequestByte ¶ added in v0.6.0
func ProcessRequestByte(clientData byte) (ClientCommandSpecifier, bool, bool, byte)
type SDODataType ¶ added in v0.6.0
type SDODataType byte
const ( DATA_TYPE_BOOLEAN SDODataType = 0x01 DATA_TYPE_INTEGER_8 SDODataType = 0x02 DATA_TYPE_INTEGER_16 SDODataType = 0x03 DATA_TYPE_INTEGER_32 SDODataType = 0x04 DATA_TYPE_UNSIGNED_8 SDODataType = 0x05 DATA_TYPE_UNSIGNED_16 SDODataType = 0x06 DATA_TYPE_UNSIGNED_32 SDODataType = 0x07 DATA_TYPE_REAL_32 SDODataType = 0x08 DATA_TYPE_VISIBLE_STRING SDODataType = 0x09 DATA_TYPE_OCTET_STRING SDODataType = 0x0A DATA_TYPE_UNICODE_STRING SDODataType = 0x0B DATA_TYPE_TIME_OF_DAY SDODataType = 0x0C DATA_TYPE_TIME_DIFFERENCE SDODataType = 0x0D DATA_TYPE_DOMAIN SDODataType = 0x0F DATA_TYPE_INTEGER_24 SDODataType = 0x10 DATA_TYPE_REAL_64 SDODataType = 0x11 DATA_TYPE_INTEGER_40 SDODataType = 0x12 DATA_TYPE_INTEGER_48 SDODataType = 0x13 DATA_TYPE_INTEGER_56 SDODataType = 0x14 DATA_TYPE_INTEGER_64 SDODataType = 0x15 DATA_TYPE_UNSIGNED_24 SDODataType = 0x16 DATA_TYPE_UNSIGNED_40 SDODataType = 0x18 DATA_TYPE_UNSIGNED_48 SDODataType = 0x19 DATA_TYPE_UNSIGNED_56 SDODataType = 0x1A DATA_TYPE_UNSIGNED_64 SDODataType = 0x1B DATA_TYPE_PDO_COMMUNICATION_PARAMETER SDODataType = 0x20 DATA_TYPE_PDO_MAPPING SDODataType = 0x21 DATA_TYPE_SDO_PARAMETER SDODataType = 0x22 DATA_TYPE_IDENTITY SDODataType = 0x23 )
SDOOBJECT_TYPE_BOOLEAN
type ServerCommandSpecifier ¶ added in v0.6.0
type ServerCommandSpecifier byte
const ( InitiateDownloadResponse ServerCommandSpecifier = 3 DownloadSegmentResponse ServerCommandSpecifier = 1 ServerBlockDownload ServerCommandSpecifier = 5 InitiateUploadResponse ServerCommandSpecifier = 2 UploadSegmentResponse ServerCommandSpecifier = 0 AbortTransfer ServerCommandSpecifier = 4 )
Click to show internal directories.
Click to hide internal directories.