#commandinterface
Explore tagged Tumblr posts
Photo

ONYXWorks® Fire Systems Command Interface - - - - - - - - - - ONYXWorks® dari NOTIFIER adalah generasi berikutnya dalam manajemen keselamatan jiwa untuk kontrol terpusat dan pemantauan sistem alarm kebakaran. Tampilan grafisnya yang intuitif memungkinkan personel untuk dengan cepat menentukan, menyelidiki, dan merespons peristiwa alarm dengan pelatihan minimal. Cukup serbaguna untuk satu situs, multi-situs dan bahkan aplikasi di seluruh dunia, workstation grafis ONYXWorks memungkinkan pengguna akhir untuk mengelola sistem keselamatan hidup NOTIFIER mereka melalui jaringan atau Ethernet berpemilik. Melalui arsitektur gerbang cerdasnya, ONYXWorks dapat dengan mudah memenuhi kebutuhan sistem yang berkembang. ONYXWorks juga merupakan solusi retrofit yang ideal, mendukung integrasi tanpa batas dengan panel kompetitif. Selain itu, solusi ini menyediakan kemampuan pemberitahuan massal melalui paging suara berbasis IP dan integrasi tanda LED. - - - - - - - - - - ℹ️ Informasi lebih lanjut silahkan hubungi : 👉 PT. ADDY GEMILANG PERKASA ☎️ 021-55732165 📲 0878 9090 9765 🌐 addygemilangperkasa.co.id #onyxworks #onyx #notifierbyhoneywell #notifier #notifierindonesia #led #firesystems #firealarmsystem #firealarmnotifier #commandinterface #alarmsystem #addygemilangperkasa #fireprotection #fireprotectionsystems #fireprevention #safetyfirst #safetyfirst #fire #flames #flamedetector #damkarindonesia #alarmkebakaran https://www.instagram.com/p/Ce90cHVPk5n/?igshid=NGJjMDIxMWI=
#onyxworks#onyx#notifierbyhoneywell#notifier#notifierindonesia#led#firesystems#firealarmsystem#firealarmnotifier#commandinterface#alarmsystem#addygemilangperkasa#fireprotection#fireprotectionsystems#fireprevention#safetyfirst#fire#flames#flamedetector#damkarindonesia#alarmkebakaran
0 notes
Text
The Command pattern
In this post we are going to go through the Command pattern.
The Command pattern is a Behavioral pattern that allows us to encapsulate actions in objects. The main idea behind this pattern is to decouple client from receiver. The encapsulated information lets us trigger an event or an action at a later time and includes the method name, the object that owns method and values for the method parameters.
A classic example would be us (i.e. Client) switching on (i.e. Command) the television (i.e. Receiver) using a remote control (Invoker).
The Command pattern can be used when we want to parameterize objects by an action to perform, specify, queue and execute requests at different times or support undo (non exhaustive list).
Let's make an example with a television and a remote control:
First, we create an implementation for the Receiver (television):
class Television { public function turnOn() { echo "TV is on!"; } public function turnOff() { echo "TV is off!"; } }
The we define a Command interface:
interface CommandInterface { public function execute(); public function undo(); public function redo(); }
Now we can write down a set of commands:
class TurnOnCommand implements CommandInterface { protected $television; public function __construct(Television $television) { $this->television = $television; } public function execute() { $this->television->turnOn(); } public function undo() { $this->television->turnOff(); } public function redo() { $this->execute(); } } class TurnOffCommand implements CommandInterface { protected $television; public function __construct(Television $television) { $this->television = $television; } public function execute() { $this->television->turnOff(); } public function undo() { $this->television->turnOn(); } public function redo() { $this->execute(); } }
Finally we can create our Invoker (remote control):
class RemoteControl { public function submit(CommandInterface $command) { $command->execute(); } }
We can use it like so:
$television = new Television(); $turnOn = new TurnOnCommand($television); $turnOff = new TurnOffCommand($television); $remote = new RemoteControl(); $remote->submit($turnOn); $remote->submit($turnOff);
0 notes