/** * Add ports to close on the device * * @param int|array $port * @return $this * * @throws \InvalidArgumentException */ public function close($ports) { $this->close = $this->sanitize($ports); if (!count($this->close)) { throw new \InvalidArgumentException("There must be at least one port to close"); } $this->gpib->addCommand('CLOSE' . implode(',', $this->close)); return $this; }
/** * Generic query for spectrum specific commands * * @param string $command * @param string $value * @param array $options * @return $this */ private function genericCommand($command, $value, array $options) { $options = $this->sanitize($options, null); if ($options['store'] === true) { $this->gpib->addCommand($command . $value); } else { $this->gpib->send($command . $value, $options['address']); } return $this; }