{"id":322,"date":"2015-02-22T18:04:28","date_gmt":"2015-02-22T18:04:28","guid":{"rendered":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=322"},"modified":"2017-11-25T10:38:55","modified_gmt":"2017-11-25T10:38:55","slug":"the-consoles-module","status":"publish","type":"page","link":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=322","title":{"rendered":"The consoles module"},"content":{"rendered":"<p>&nbsp;<\/p>\n<p>The <code>consoles<\/code> module is an obsolete module, meant to give Orchids the possibility to print messages on so-called consoles, namely, on remote machines.<\/p>\n<p>This is an extension module, whose sole purpose is to add new primitives to the Orchids language.<\/p>\n<p>The reasons it is obsolete are:<\/p>\n<ol>\n<li>The\u00a0<code>AddConsole<\/code>\u00a0configuration option forces Orchids to open a connection to some remote machine, and if that machine does not respond (in particular, if you happen to have no network connection) then Orchids will just sit idle for a few minutes, not detecting any event, with no warning\u2014this is\u00a0<i>very<\/i> bad.<\/li>\n<li>Connections to remote machines are not secure: not authenticated, not private, nothing (not even reliable).<\/li>\n<li>The module served no purpose in practice.<\/li>\n<\/ol>\n<h3>Configuration options<\/h3>\n<p><code>&lt;module consoles&gt;<\/code><\/p>\n<ul>\n<li><code>AddConsole<\/code>\u00a0<em>console-name host-name\u00a0<\/em><i>udp-port<\/i>: define a new console, whose name is\u00a0<em>console-name<\/em>. \u00a0This name will have to be passed as first argument to <strong><code>console_msg<\/code><\/strong>\u00a0or to <strong><code>console_evt<\/code><\/strong>. \u00a0Printing a\u00a0<em>string<\/em>\u00a0on this console will send a UDP packet containing just that\u00a0<em>string<\/em> over port\u00a0<em>udp-port<\/em> to machine\u00a0<em>host-name<\/em>.<br \/>\nExamples:<\/li>\n<\/ul>\n<p><code><\/code><\/p>\n<pre>AddConsole alert \"localhost\" 42000\r\nAddConsole warning \"localhost\" 42001\r\nAddConsole info \"localhost\" 42002<\/pre>\n<p><code>&lt;\/module&gt;<\/code><\/p>\n<h3>Primitives<\/h3>\n<ul>\n<li><strong><code>console_msg<\/code><\/strong> : <code>str<\/code>, <code>str<\/code> \u2192 <code>int<\/code><br \/>\nprint a string on the named console<\/p>\n<ul>\n<li>usage: <code>console_msg<\/code>(<em>console-name<\/em>, <em>string<\/em>)<\/li>\n<li>returns: 1 (true) if console was found, 0 (false) otherwise<\/li>\n<\/ul>\n<\/li>\n<li><strong><code>console_evt<\/code><\/strong> : <code>str<\/code>, <code>event<\/code> \u2192 <code>int<\/code><br \/>\nprint an event on the named console<\/p>\n<ul>\n<li>usage: <code>console_evt<\/code>(<em>console-name<\/em>, <em>event<\/em>)<\/li>\n<li>returns: 1 (true) if console was found, 0 (false) otherwise<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; The consoles module is an obsolete module, meant to give Orchids the possibility to print messages on so-called consoles, namely, on remote machines. This is an extension module, whose sole purpose is to add new primitives to the Orchids language. The reasons it is obsolete are: The\u00a0AddConsole\u00a0configuration option forces Orchids to open a connection &hellip; <a href=\"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/?page_id=322\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">The consoles module<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"open","template":"","meta":{"footnotes":""},"class_list":["post-322","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/322","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=322"}],"version-history":[{"count":5,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/322\/revisions"}],"predecessor-version":[{"id":654,"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=\/wp\/v2\/pages\/322\/revisions\/654"}],"wp:attachment":[{"href":"https:\/\/projects.lsv.ens-paris-saclay.fr\/orchidsdoc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=322"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}