code: func (n *NetworkServerAPI) GetDevice(ctx context.Context, req *ns.GetDeviceRequest) (*ns.GetDeviceResponse, error) {
  	var devEUI lorawan.EUI64
  	copy(devEUI[:], req.DevEui)
  
  	d, err := storage.GetDevice(storage.DB(), devEUI)
  	if err != nil {
  		return nil, errToRPCError(err)
  	}
  
  	resp := ns.GetDeviceResponse{
  		Device: &ns.Device{
  			DevEui:            d.DevEUI[:],
  			SkipFCntCheck:     d.SkipFCntCheck,
  			DeviceProfileId:   d.DeviceProfileID[:],
  			ServiceProfileId:  d.ServiceProfileID[:],
  			RoutingProfileId:  d.RoutingProfileID[:],
  			ReferenceAltitude: d.ReferenceAltitude,
  		},
  	}
  
  	resp.CreatedAt, err = ptypes.TimestampProto(d.CreatedAt)
  	if err != nil {
  		return nil, errToRPCError(err)
  	}
  
  	resp.UpdatedAt, err = ptypes.TimestampProto(d.UpdatedAt)
  	if err != nil {
  		return nil, errToRPCError(err)
  	}
  
  	return &resp, nil
  }
docs: // GetDevice returns the device matching the given DevEUI.