/** * Visual test: * - PUMP led should be on * - PUMP led should be off * - PUMP led should be on */ public function testRelaisPump() { echo 'Pump - 9 - OFF' . PHP_EOL; $this->manager->publish(new PumpStateMessage(Pump::STATE_OFF), Log::TOPIC_PUMP_CURR_STATE); $this->manager->publish(new PumpStateMessage(Pump::STATE_ON), Log::TOPIC_PUMP_CURR_STATE); echo 'Pump - 9 - ON' . PHP_EOL; sleep(5); $this->manager->publish(new PumpStateMessage(Pump::STATE_OFF), Log::TOPIC_PUMP_CURR_STATE); echo 'Pump - 9 - OFF' . PHP_EOL; }
public function testDashboard() { $this->manager->publish(new TemperatureMessage(1), Log::TOPIC_HLT_CURR_TEMP); $this->manager->publish(new TemperatureMessage(2), Log::TOPIC_MLT_CURR_TEMP); $this->manager->publish(new TemperatureMessage(3), Log::TOPIC_BLT_CURR_TEMP); $this->brewControlManager->setMashTemperature(4); $this->manager->publish(new PumpModeMessage(Pump::MODE_AUTOMATIC), Log::TOPIC_PUMP_CURR_MODE); usleep(500000); $this->manager->publish(new PumpModeMessage(Pump::MODE_MANUAL), Log::TOPIC_PUMP_CURR_MODE); usleep(500000); $this->manager->publish(new PumpStateMessage(Pump::STATE_ON), Log::TOPIC_PUMP_CURR_STATE); usleep(500000); $this->manager->publish(new PumpStateMessage(Pump::STATE_OFF), Log::TOPIC_PUMP_CURR_STATE); usleep(500000); $this->manager->publish(new PumpModeMessage(Pump::MODE_AUTOMATIC), Log::TOPIC_PUMP_CURR_MODE); usleep(500000); $this->manager->publish(new PumpModeMessage(Pump::MODE_MANUAL), Log::TOPIC_PUMP_CURR_MODE); }
/** * @param $title * @param $text * @return bool */ public function dialog($title, $text, $identifier = null) { return $this->amqpManager->publish(new DialogMessage($title, $text, $identifier), self::ROUTE_BROADCAST_DIALOG); }
/** * @param string $value * @return bool */ public function setPumpState($value) { return $this->amqpManager->publish(new PumpStateMessage($value), self::ROUTE_PUMP_SET_STATE); }
public function testPublish() { $this->assertTrue($this->manager->publish(new AMQPMessage(60), Log::TOPIC_MASHER_SET_TEMP)); }