Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/brutella/can
/ functions
Functions
52 in github.com/brutella/can
⨍
Functions
52
◇
Types & classes
16
↓ 7 callers
Function
NewBus
NewBus returns a new CAN bus.
bus.go:33
↓ 7 callers
Method
Subscribe
Subscribe adds a handler to the bus.
bus.go:58
↓ 6 callers
Method
read
(v interface{})
frame.go:58
↓ 6 callers
Method
write
(v interface{})
frame.go:69
↓ 5 callers
Function
NewEchoReadWriteCloser
NewEchoReadWriteCloser returns a ReadWriteCloser which echoes received bytes.
test_readwritecloser.go:15
↓ 5 callers
Function
newTestHandler
()
bus_test.go:22
↓ 3 callers
Method
publish
(frame Frame)
bus.go:113
↓ 2 callers
Method
Close
()
readwritecloser.go:72
↓ 2 callers
Method
Handle
(frame Frame)
handler.go:5
↓ 2 callers
Function
Marshal
Marshal returns the byte encoding of frm.
frame.go:23
↓ 2 callers
Method
Read
(b []byte)
readwritecloser.go:64
↓ 2 callers
Function
Unmarshal
Unmarshal parses the bytes b and stores the result in the value pointed to by frm.
frame.go:39
↓ 2 callers
Method
Unsubscribe
Unsubscribe removes a handler.
bus.go:69
↓ 2 callers
Function
Wait
Wait returns a channel, which receives a frame or an error, if the frame with the expected id didn't arrive on time.
wait.go:23
↓ 2 callers
Method
Write
(b []byte)
readwritecloser.go:68
↓ 2 callers
Method
WriteFrame
(Frame)
readwritecloser.go:18
↓ 2 callers
Method
contains
(handler Handler)
bus.go:85
↓ 2 callers
Method
publishNextFrame
()
bus.go:95
↓ 1 callers
Method
ConnectAndPublish
ConnectAndPublish starts handling CAN frames to publish them to handlers.
bus.go:41
↓ 1 callers
Method
Disconnect
Disconnect stops handling CAN frames.
bus.go:53
↓ 1 callers
Function
NewHandler
NewHandler returns a new handler which calls fn when a frame is received.
handler.go:16
↓ 1 callers
Function
NewReadWriteCloser
NewReadWriteCloser returns a ReadWriteCloser for an `io.ReadWriteCloser`.
readwritecloser.go:35
↓ 1 callers
Function
NewReadWriteCloserForInterface
(i *net.Interface)
readwritecloser_windows.go:8
↓ 1 callers
Function
NewReadWriteCloserForInterface
(i *net.Interface)
readwritecloser_linux.go:11
↓ 1 callers
Method
ReadFrame
(*Frame)
readwritecloser.go:11
↓ 1 callers
Method
SubscribeFunc
SubscribeFunc adds a function as handler.
bus.go:63
↓ 1 callers
Function
newFilter
(id uint32, handler Handler)
filter.go:8
↓ 1 callers
Function
printableString
printableString creates a string from s and replaces non-printable bytes (i.e. 0-32, 127) with '.' – similar how candump from can-utils does it.
cmd/candump.go:75
↓ 1 callers
Function
trimSuffix
trim returns a subslice of s by slicing off all trailing b bytes.
cmd/candump.go:63
Method
Close
()
test_readwritecloser.go:39
Method
Handle
(frame Frame)
filter.go:15
Method
Handle
(frame Frame)
handler.go:20
Method
Handle
(frame Frame)
bus_test.go:26
Method
Handle
(frame Frame)
wait.go:48
Function
NewBusForInterfaceWithName
NewBusForInterfaceWithName returns a bus from the network interface with name ifaceName.
bus.go:18
Function
NewReadWriteCloserForInterface
(i *net.Interface)
readwritecloser_darwin.go:8
Function
NewSockaddr
NewSockaddr returns a socket address based on the protocol and interface index. TODO(brutella) This method has no implementation.
socket_darwin.go:7
Function
NewSockaddr
(proto uint16, Ifindex int)
socket_linux.go:7
Function
NewSockaddr
NewSockaddr returns a socket address based on the protocol and interface index. TODO(brutella) This method has no implementation.
socket_windows.go:7
Method
Publish
Publish publishes a frame on the bus. Frames publishes with the Publish methods are not received by handlers.
bus.go:81
Method
Read
(b []byte)
test_readwritecloser.go:19
Method
ReadFrame
(frame *Frame)
readwritecloser.go:39
Function
TestFrame
(t *testing.T)
frame_test.go:9
Function
TestPublish
(t *testing.T)
bus_test.go:30
Function
TestSubscribe
(t *testing.T)
bus_test.go:48
Function
TestTimeoutErr
(t *testing.T)
wait_test.go:27
Function
TestUnsubscribe
(t *testing.T)
bus_test.go:61
Function
TestWait
(t *testing.T)
wait_test.go:8
Method
Write
(b []byte)
test_readwritecloser.go:35
Method
WriteFrame
(frame Frame)
readwritecloser.go:52
Function
logCANFrame
logCANFrame logs a frame with the same format as candump from can-utils.
cmd/candump.go:56
Function
main
()
cmd/candump.go:18