MCPcopy Create free account
hub / github.com/facebook/time / ProbeMsgType

Function ProbeMsgType

ptp/protocol/types.go:80–85  ·  view source on GitHub ↗

ProbeMsgType reads first 8 bits of data and tries to decode it to SdoIDAndMsgType, then return MessageType

(data []byte)

Source from the content-addressed store, hash-verified

78
79// ProbeMsgType reads first 8 bits of data and tries to decode it to SdoIDAndMsgType, then return MessageType
80func ProbeMsgType(data []byte) (msg MessageType, err error) {
81 if len(data) < 1 {
82 return 0, fmt.Errorf("not enough data to probe MsgType")
83 }
84 return SdoIDAndMsgType(data[0]).MsgType(), nil
85}
86
87// TLVType is type for TLV types
88type TLVType uint16

Callers 1

TestProbeMsgTypeFunction · 0.85

Calls 2

SdoIDAndMsgTypeTypeAlias · 0.85
MsgTypeMethod · 0.45

Tested by 1

TestProbeMsgTypeFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…