From OpenSCADAWiki
Jump to: navigation, search

Enter a message name below to show all available translations.

Message

Found 2 translations.

NameCurrent message text
 h English (en){{CntHdr|Configuring and using}}
:1. Create an output transport of the type "[[Special:MyLanguage/Modules/Sockets|Sockets]]" or "[[Special:MyLanguage/Modules/SSL|SSL]]" and set its Identifier like to "SMTP", one transport suitable for more receivers. 
:2. Set-up for proper address, for Sockets(25) or SSL(465). The transport timeouts will be adjusted by the function.
:3. Create of needed [[Special:MyLanguage/Modules/UserProtocol|user protocol object]] based on the templates, with Identifier like to "SMTP".
:4. Place some requesting commands directly into allowed or a new internal OpenSCADA procedure like to:
<syntaxhighlight lang="JavaScript" style="margin-left: 30pt">
req = SYS.XMLNode("send");
req.setAttr("ProtIt","SMTP").setAttr("from","noreply@oscada.org").setAttr("to","oscada@oscada.org").setAttr("topic","My topic").setText("My message");
SYS.Transport.Sockets.out_SMTP.messIO(req, "UserProtocol");
rez = req.attr("err").toInt() ? req.attr("err") : "OK";
</syntaxhighlight>
:5. RESULT: In the variable ''rez'' you will get "OK" if no errors occur and the message successfully transmitted to the receiver.
 h Ukrainian (uk){{CntHdr|Конфігурація та використання}}
:1. Створити вихідний транспорт типу "[[Special:MyLanguage/Modules/Sockets|Сокети]]" або "[[Special:MyLanguage/Modules/SSL|SSL]]" та встановити його Ідентифікатор на кшталт "SMTP", один транспорт підходить для багатьох одержувачів.
:2. Встановити властиву адресу, для Сокетів(25) або SSL(465). Таймаути транспорту будуть налаштовані функцією.
:3. Створити потрібний [[Special:MyLanguage/Modules/UserProtocol|об'єкт користувацького протоколу]] заснованого на шаблонах, із Ідентифікатором на кшталт "SMTP".
:4. Розмістити деякі команди запиту безпосередньо у наявній або новій внутрішній процедурі OpenSCADA на кшталт:
<syntaxhighlight lang="JavaScript" style="margin-left: 30pt">
req = SYS.XMLNode("send");
req.setAttr("ProtIt","SMTP").setAttr("from","noreply@oscada.org").setAttr("to","oscada@oscada.org").setAttr("topic","My topic").setText("My message");
SYS.Transport.Sockets.out_SMTP.messIO(req, "UserProtocol");
rez = req.attr("err").toInt() ? req.attr("err") : "OK";
</syntaxhighlight>
:5. РЕЗУЛЬТАТ: У змінній ''rez'' ви отримаєте "OK" якщо не виникло жодної помилки та повідомлення вдало надіслано одержувачу.