code: func PopDownlinkFrame(p *redis.Pool, token uint32) (lorawan.EUI64, gw.DownlinkFrame, error) {
  	var out gw.DownlinkFrame
  	var devEUI lorawan.EUI64
  
  	c := p.Get()
  	defer c.Close()
  
  	b, err := redis.Bytes(c.Do("LPOP", fmt.Sprintf(downlinkFramesKeyTempl, token)))
  	if err != nil {
  		if err == redis.ErrNil {
  			return lorawan.EUI64{}, gw.DownlinkFrame{}, ErrDoesNotExist
  		}
  		return lorawan.EUI64{}, gw.DownlinkFrame{}, errors.Wrap(err, "lpop error")
  	}
  	err = proto.Unmarshal(b, &out)
  	if err != nil {
  		return lorawan.EUI64{}, gw.DownlinkFrame{}, errors.Wrap(err, "proto unmarshal error")
  	}
  
  	b, err = redis.Bytes(c.Do("GET", fmt.Sprintf(downlinkFramesDevEUIKeyTempl, token)))
  	if err != nil {
  		if err == redis.ErrNil {
  			return lorawan.EUI64{}, gw.DownlinkFrame{}, ErrDoesNotExist
  		}
  		return lorawan.EUI64{}, gw.DownlinkFrame{}, errors.Wrap(err, "get error")
  	}
  
  	copy(devEUI[:], b)
  
  	return devEUI, out, nil
  }
docs: // PopDownlinkFrame returns the first downlink-frame for the given token.