MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / decodeFrame

Function decodeFrame

cmd/ttn-lw-cli/commands/lorawan.go:220–233  ·  view source on GitHub ↗
(msg *ttnpb.Message, config lorawanConfig)

Source from the content-addressed store, hash-verified

218}
219
220func decodeFrame(msg *ttnpb.Message, config lorawanConfig) (*lorawanDecodedFrame, error) {
221 switch msg.MHdr.MType {
222 case ttnpb.MType_JOIN_REQUEST:
223 return decodeJoinRequest(msg, config)
224 case ttnpb.MType_CONFIRMED_UP, ttnpb.MType_UNCONFIRMED_UP:
225 return decodeUplink(msg, config)
226 case ttnpb.MType_JOIN_ACCEPT:
227 return decodeJoinAccept(msg, config)
228 case ttnpb.MType_CONFIRMED_DOWN, ttnpb.MType_UNCONFIRMED_DOWN:
229 return decodeDownlink(msg, config)
230 }
231
232 return nil, fmt.Errorf("not implemented")
233}
234
235var (
236 lorawanCmd = &cobra.Command{

Callers 1

lorawan.goFile · 0.85

Calls 5

decodeJoinRequestFunction · 0.85
decodeUplinkFunction · 0.85
decodeJoinAcceptFunction · 0.85
decodeDownlinkFunction · 0.85
ErrorfMethod · 0.65

Tested by

no test coverage detected