Skip to content

Commit

Permalink
add level_config cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
zoic21 authored Mar 18, 2024
1 parent 0921e75 commit 747aed3
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions core/class/z2m.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1039,6 +1039,26 @@ public function createCmd($_infos, $_type = null,$_father_property = null) {
}
}
break;
case 'level_config':
$cmd = $this->getCmd('info', 'level_config');
if (!is_object($cmd)) {
$cmd = new z2mCmd();
$cmd->setName('level_config');
if (isset($_infos['endpoint'])) {
$cmd->setConfiguration('endpoint', $_infos['endpoint']);
$cmd->setName('level_config ' . $_infos['endpoint']);
}
$cmd->setLogicalId('level_config');
}
$cmd->setType('info');
$cmd->setSubType('string');
$cmd->setEqLogic_id($this->getId());
try {
$cmd->save();
} catch (\Throwable $th) {
log::add('z2m', 'debug', '[createCmd] Can not create cmd ' . json_encode(utils::o2a($cmd)) . ' => ' . $th->getMessage());
}
break;
}
}
}
Expand Down

0 comments on commit 747aed3

Please sign in to comment.