get(self::CACHE_KEY . $box_no . ':' . $cmd); if ($data != null) { $result = $data; break; } //补发 if (in_array($i, [10, 20])) { Gateway::sendToUid($box_no, $responseBody); } } return $result; } /** * 获取设备状态 * @param $box_no * @return int * Author: Mead */ public static function getBoxStatus($box_no) { $body = [ '5a' ]; return self::send(self::STATUS_CMD, $box_no, $body, true); } /** * 获取定位 * @param $box_no * @return int * Author: Mead */ public static function getLocation($box_no) { $body = [ 'a6' ]; return self::send(self::LOCATION_CMD, $box_no, $body, true); } }