|
@@ -198,13 +198,14 @@ class FindBoxCoreSystem
|
|
|
*
|
|
*
|
|
|
* @param string $labelId
|
|
* @param string $labelId
|
|
|
* @param string $barcode
|
|
* @param string $barcode
|
|
|
|
|
+ * @param int $groupId (default 1)
|
|
|
* @return array
|
|
* @return array
|
|
|
*/
|
|
*/
|
|
|
- public function Bind(string $labelId, string $barcode): array
|
|
|
|
|
|
|
+ public function Bind(string $labelId, string $barcode, int $groupId = 1): array
|
|
|
{
|
|
{
|
|
|
$URI = "/1.0.0/index.php/smartesl.bind/1.1.0/";
|
|
$URI = "/1.0.0/index.php/smartesl.bind/1.1.0/";
|
|
|
|
|
|
|
|
- return $this->CallAPI($URI, "[\"{$labelId}\",\"{$barcode}\"]");
|
|
|
|
|
|
|
+ return $this->CallAPI($URI, "[\"{$labelId}\",\"{$barcode}\",$groupId]");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -216,7 +217,7 @@ class FindBoxCoreSystem
|
|
|
public function UnBind(string $labelId): array
|
|
public function UnBind(string $labelId): array
|
|
|
{
|
|
{
|
|
|
// Retrieve barcode associated to the label
|
|
// Retrieve barcode associated to the label
|
|
|
- $labelDetails = $this->CallAPI("/1.0.0/index.php/smartesl.getstatus/3.1.0/", "[[\"{$labelId}\"]]");
|
|
|
|
|
|
|
+ $labelDetails = $this->CallAPI("/1.0.0/index.php/smartesl.getstatus/4.0.0/", "[[\"{$labelId}\"]]");
|
|
|
// If RSSI exist, label it is binded to system
|
|
// If RSSI exist, label it is binded to system
|
|
|
if (isset($labelDetails['value']['value'][$labelId]['rssi'])) {
|
|
if (isset($labelDetails['value']['value'][$labelId]['rssi'])) {
|
|
|
$barcode = $labelDetails['value']['value'][$labelId]['data']['barcode'];
|
|
$barcode = $labelDetails['value']['value'][$labelId]['data']['barcode'];
|