Example #1
0
 /**
  * Get cloud info
  * @return string Response to the request
  */
 public function getCloudInfo()
 {
     $iqrf = IQRF::getInstance();
     $param = 'ver=2&uid=' . $iqrf->getConfig()->getUserName() . '&cmd=info';
     return $iqrf->createRequest($param);
 }
Example #2
0
 /**
  * Get gateway info
  * @param string $gwID Gateway ID
  * @return string Response to the request
  */
 public function getInfo($gwID)
 {
     Validators::assert($gwID, 'string', 'gwID');
     $iqrf = IQRF::getInstance();
     $param = 'ver=2&uid=' . $iqrf->getConfig()->getUserName() . '&gid=' . $gwID . '&cmd=info';
     return $iqrf->createRequest($param);
 }
Example #3
0
 /**
  * Get data from time of message and to time of message from the Cloud (incoming from the GW)
  * @param string $gwID Gateway ID
  * @param int $fromTime Time from sending message
  * @param int $toTime Time to sending message
  * @return string Response to the request
  */
 public function getFromTimeToTime($gwID, $fromTime, $toTime)
 {
     Validators::assert($gwID, 'string', 'gwID');
     Validators::assert($fromTime, 'string', 'fromTime');
     Validators::assert($toTime, 'string', 'toTime');
     $iqrf = IQRF::getInstance();
     $param = 'ver=2&uid=' . $iqrf->getConfig()->getUserName() . '&gid=' . $gwID . '&cmd=dnld&from_time=' . date('YmdHis', strtotime($fromTime)) . '&to_time=' . date('YmdHis', strtotime($toTime));
     return $iqrf->createRequest($param);
 }