CYBOL API Specification Version 0.24.0

activate/disable

Description

Disables the communication channel, so that no more requests/events can be detected.

Examples

<node name="disable_server_socket" channel="inline" format="activate/disable" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="port" channel="inline" format="number/integer" model="1971"/> </node> <node name="disable_display_server" channel="inline" format="activate/disable" model=""> <node name="channel" channel="inline" format="meta/channel" model="display"/> </node>

Properties

NameRequiredFormatDescription
channeltruetext/cybol-path | meta/channelThe communication channel.
portfalsetext/cybol-path | number/integerThe service identification, for example http socket port 80. If null, the default is zero, for example with channel display.

activate/enable

Description

Enables the communication channel, so that requests/events can be detected. Calling the operation "feel/sense" afterwards is not necessary for channel "display" on a linux operating system with x window system, since "activate/enable" catches the events of all client windows. On a windows operating system, however, one separate event thread is run per window, so that calling "feel/sense" after this "activate/enable" is necessary. Calling this operation "activate/enable" is not necessary for channels "terminal" or "serial", since clients get opened manually using "dispatch/open" and events can be detected right afterwards using the operation "feel/sense". The requesting client gets appended to an internal accept buffer list. It can be accessed in operation "dispatch/open" using the property "identification". However, this works only, if the "server" flag is set to true, so that the client is read from the accept buffer list.

Examples

<node name="enable_server_socket" channel="inline" format="activate/enable" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="handler" channel="inline" format="text/cybol-path" model=".logic.handle.enable"/> </node> <!-- Complete socket example with operations: enable, open, sense, identify, close. --> <!-- File "startup.cybol". --> <node name="enable_requests" channel="inline" format="activate/enable" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="handler" channel="inline" format="text/cybol-path" model=".logic.handle.enable"/> </node> <!-- File "enable.cybol". This is the enable handler file belonging to the above call of ".logic.handle.enable". --> <node name="open_client" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <!-- Open client device in SERVER mode. It was already pre-configured inside by the accepting server socket. --> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="identification" channel="inline" format="text/cybol-path" model=".var.client_socket"/> </node> <node name="sense_client_data" channel="inline" format="feel/sense" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="sender" channel="inline" format="text/cybol-path" model=".var.client_socket"/> <node name="language" channel="inline" format="meta/language" model="message/http-request"/> <!-- This is the callback function executed when the client sends data. --> <node name="handler" channel="inline" format="text/cybol-path" model=".logic.handle.sense"/> <!-- This is the callback function executed when the client does not respond and is to be closed. --> <node name="closer" channel="inline" format="text/cybol-path" model=".logic.handle.close"/> </node> <!-- File "sense.cybol" with processing instruction is left out here. --> <!-- File "close.cybol". This is the close handler file belonging to the above call of ".logic.handle.close". --> <!-- Get client belonging to the handler that was placed into the interrupt pipe. --> <node name="get_client_id" channel="inline" format="communicate/identify" model=""> <node name="identification" channel="inline" format="text/cybol-path" model=".var.client_socket"/> </node> <node name="handle_close" channel="inline" format="dispatch/close" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="identification" channel="inline" format="text/cybol-path" model=".var.client_socket"/> </node> <!-- Fill internal input buffer of the corresponding windows with received events. --> <node name="enable_display_server" channel="inline" format="activate/enable" model=""> <node name="channel" channel="inline" format="meta/channel" model="display"/> </node> <node name="enable_display_server_and_add_general_handler" channel="inline" format="activate/enable" model=""> <node name="channel" channel="inline" format="meta/channel" model="display"/> <!-- For standard window event processing, use operation "feel/sense" which allows to hand over a SPECIFIC handler for each window. However, it is possible to assign another callback function here, which is OPTIONAL and would be executed upon arrival of EACH event, independently of any window. --> <node name="handler" channel="inline" format="text/cybol-path" model=".handle_each_event"/> </node> <!-- Complete display example with operations: enable, sense, identify, receive. The "maintain/startup" and "dispatch/open" operations are assumed to have been called before. --> <node name="enable_server" channel="inline" format="activate/enable" model=""> <node name="channel" channel="inline" format="meta/channel" model="display"/> </node> <node name="sense_client_window_events" channel="inline" format="feel/sense" model=""> <node name="channel" channel="inline" format="meta/channel" model="display"/> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="sender" channel="inline" format="text/cybol-path" model=".gui.window_id"/> <node name="handler" channel="inline" format="text/cybol-path" model=".logic.handle"/> </node> <!-- File "handle.cybol". This is the event handler file belonging to the above call of ".logic.handle". --> <!-- Get window client belonging to the handler that was placed into the interrupt pipe. --> <node name="get_window_id" channel="inline" format="communicate/identify" model=""> <node name="identification" channel="inline" format="text/cybol-path" model=".gui.window_id"/> </node> <!-- The element hierarchy of the window given as "medium" gets searched through to identify a suitable action. --> <node name="receive_next_event" channel="inline" format="communicate/receive" model=""> <node name="channel" channel="inline" format="meta/channel" model="display"/> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="sender" channel="inline" format="text/cybol-path" model=".gui.window_id"/> <node name="language" channel="inline" format="meta/language" model="message/gui-request"> <node name="medium" channel="inline" format="text/cybol-path" model=".gui.window"/> </node> <node name="format" channel="inline" format="meta/format" model="text/plain"/> <node name="message" channel="inline" format="text/cybol-path" model=".gui.action"/> <!-- Read indirectly from internal buffer into which data have been written by activate/enable. --> <node name="asynchronicity" channel="inline" format="logicvalue/boolean" model="true"/> </node>

Properties

NameRequiredFormatDescription
channeltruetext/cybol-path | meta/channelThe communication channel.
portfalsetext/cybol-path | number/integerThe service identification, for example http socket port 80. If null, the default is zero, for example with channel display.
handlerfalsetext/cybol-pathThe callback cybol model to be executed upon arrival of a request/event.

calculate/absolute

Description

Determines the absolute value of a number.

Examples

<node name="absolute" channel="inline" format="calculate/absolute" model=""> <node name="result" channel="inline" format="text/cybol-path" model=".result"/> <node name="operand" channel="inline" format="number/integer" model="-2,+4"/> </node>

Properties

NameRequiredFormatDescription
resulttruetext/cybol-pathThe absolute value of the given number.
operandtruetext/cybol-path | number/anyThe source number.

calculate/add

Description

Adds the operand to the result. Caution! Do not use this operation for characters (strings)! They may be concatenated by using the "modify/append" operation.

Examples

<node name="add_integer" channel="inline" format="calculate/add" model=""> <node name="result" channel="inline" format="text/cybol-path" model=".result"/> <node name="operand" channel="inline" format="number/integer" model="2"/> </node> <node name="add_arrays_with_equal_size" channel="inline" format="calculate/add" model=""> <node name="result" channel="inline" format="text/cybol-path" model=".result"/> <node name="operand" channel="inline" format="number/integer" model="1,2,3"/> </node> <node name="add_summand_to_sum" channel="inline" format="calculate/add" model=""> <node name="result" channel="inline" format="text/cybol-path" model=".sum"/> <node name="operand" channel="inline" format="text/cybol-path" model=".summand"/> </node>

Properties

NameRequiredFormatDescription
resulttruetext/cybol-pathThe sum resulting from the addition. It initially represents the first summand.
operandtruetext/cybol-path | number/anyThe second summand.
countfalsetext/cybol-path | number/integerThe number of elements to be calculated. This is relevant only for arrays with more than one element. If null, the default is the operand count.
result_indexfalsetext/cybol-path | number/integerThe result index from which to start calculating. If null, the default is zero.
operand_indexfalsetext/cybol-path | number/integerThe operand index from which to start calculating. If null, the default is zero.

communicate/identify

Description

Identifies the device or client that has placed a request (handler) into the interrupt pipe.

Examples

<!-- Get gui client window belonging to the handler that was placed into the interrupt pipe. --> <node name="get_window_id" channel="inline" format="communicate/identify" model=""> <node name="identification" channel="inline" format="text/cybol-path" model=".gui.window_id"/> </node> <!-- Get client socket belonging to the handler that was placed into the interrupt pipe. --> <node name="get_client_socket_id" channel="inline" format="communicate/identify" model=""> <node name="identification" channel="inline" format="text/cybol-path" model=".client_socket"/> </node>

Properties

NameRequiredFormatDescription
identificationtruetext/cybol-pathThe device or client identification, for example a file descriptor.

communicate/receive

Description

Receives a message via the communication channel. Caution! Some file formats (like the German xDT format for medical data exchange) contain both, the model and the properties, in one file. To cover these cases, the model and properties are received together, in just one operation.

Examples

<!-- Initialise an application tree from file at startup. --> <node name="open_file" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="identification" channel="inline" format="text/cybol-path" model=".id"/> <node name="device" channel="inline" format="text/plain" model="counter/simple/app.cybol"/> </node> <node name="initialise_app" channel="inline" format="communicate/receive" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="sender" channel="inline" format="text/cybol-path" model=".id"/> <node name="encoding" channel="inline" format="meta/encoding" model="utf-8"/> <node name="language" channel="inline" format="meta/language" model="text/cybol"/> <node name="format" channel="inline" format="meta/format" model="element/part"/> <node name="message" channel="inline" format="text/cybol-path" model="."/> </node> <node name="close_file" channel="inline" format="dispatch/close" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="identification" channel="inline" format="text/cybol-path" model=".id"/> </node> <!-- Read extensible markup language (xml) data from file. --> <node name="open_file" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="identification" channel="inline" format="text/cybol-path" model=".id"/> <node name="device" channel="inline" format="text/plain" model="serialisation/xml/test/reference.xml"/> </node> <node name="deserialise_data" channel="inline" format="communicate/receive" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="sender" channel="inline" format="text/cybol-path" model=".id"/> <node name="encoding" channel="inline" format="meta/encoding" model="utf-8"/> <node name="language" channel="inline" format="meta/language" model="application/xml"> <node name="normalisation" channel="inline" format="logicvalue/boolean" model="false"/> </node> <node name="format" channel="inline" format="meta/format" model="element/part"/> <node name="message" channel="inline" format="text/cybol-path" model=".data"/> </node> <node name="close_file" channel="inline" format="dispatch/close" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="identification" channel="inline" format="text/cybol-path" model=".id"/> </node> <!-- Read javascript object notation (json) data from file. --> <node name="open_file" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="identification" channel="inline" format="text/cybol-path" model=".id"/> <node name="device" channel="inline" format="text/plain" model="serialisation/json/test/scenario/default.json"/> </node> <node name="deserialise_data" channel="inline" format="communicate/receive" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="sender" channel="inline" format="text/cybol-path" model=".id"/> <node name="encoding" channel="inline" format="meta/encoding" model="utf-8"/> <node name="language" channel="inline" format="meta/language" model="application/json"/> <node name="format" channel="inline" format="meta/format" model="element/part"/> <node name="message" channel="inline" format="text/cybol-path" model=".data"/> </node> <node name="close_file" channel="inline" format="dispatch/close" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="identification" channel="inline" format="text/cybol-path" model=".id"/> </node> <!-- Read character (comma) separated values (csv) from file. --> <node name="open_file" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="identification" channel="inline" format="text/cybol-path" model=".id"/> <node name="device" channel="inline" format="text/cybol-path" model="#filename"/> </node> <node name="receive_file" channel="inline" format="communicate/receive" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="sender" channel="inline" format="text/cybol-path" model=".id"/> <node name="encoding" channel="inline" format="meta/encoding" model="utf-8"/> <node name="language" channel="inline" format="meta/language" model="text/csv"> <node name="delimiter" channel="inline" format="text/cybol-path" model="#delimiter"/> <node name="quotation" channel="inline" format="text/cybol-path" model="#quotation"/> <node name="header" channel="inline" format="text/cybol-path" model="#header"/> </node> <!-- CAUTION! A possibly existing header will be written into the destination message PROPERTIES. There is NO need to specify the cybol property "header" as sub node of "message" here, since it is generated under that name automatically by the deserialiser inside. CAUTION! The message has to be part of the HEAP memory, since it would not be extensible if lying on the stack. --> <node name="message" channel="inline" format="text/cybol-path" model="{#table}"/> </node> <node name="close_file" channel="inline" format="dispatch/close" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="identification" channel="inline" format="text/cybol-path" model=".id"/> </node> <!-- Read user input command on terminal. --> <node name="receive_command" channel="inline" format="communicate/receive" model=""> <node name="channel" channel="inline" format="meta/channel" model="terminal"/> <node name="sender" channel="inline" format="text/cybol-path" model=".var.stdin"/> <node name="language" channel="inline" format="meta/language" model="message/tui"/> <node name="message" channel="inline" format="text/cybol-path" model="#command"/> <!-- Read data from buffer in which they got stored by the sensing thread started through feel/sense before. --> <node name="asynchronicity" channel="inline" format="logicvalue/boolean" model="true"/> </node> <!-- Receive a gui window event on display. --> <node name="receive_event" channel="inline" format="communicate/receive" model=""> <node name="channel" channel="inline" format="meta/channel" model="display"/> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="sender" channel="inline" format="text/cybol-path" model=".gui.window_id"/> <node name="language" channel="inline" format="meta/language" model="message/gui-request"> <node name="medium" channel="inline" format="text/cybol-path" model=".gui.window"/> </node> <node name="format" channel="inline" format="meta/format" model="text/plain"/> <node name="message" channel="inline" format="text/cybol-path" model=".gui.action"/> <!-- Read indirectly from internal buffer into which data have been written by activate/enable before. --> <node name="asynchronicity" channel="inline" format="logicvalue/boolean" model="true"/> </node> <!-- Receive a binary file whose path has been given for example via internet url. --> <node name="open_file" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="identification" channel="inline" format="text/cybol-path" model=".id"/> <node name="device" channel="inline" format="text/cybol-path" model=".var.path"/> </node> <node name="receive_file" channel="inline" format="communicate/receive" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="sender" channel="inline" format="text/cybol-path" model=".id"/> <node name="language" channel="inline" format="meta/language" model="message/binary"/> <node name="message" channel="inline" format="text/cybol-path" model=".var.file"/> </node> <node name="close_file" channel="inline" format="dispatch/close" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="identification" channel="inline" format="text/cybol-path" model=".id"/> </node> <!-- Receive client http request on the server side via network socket. --> <node name="receive_request" channel="inline" format="communicate/receive" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="sender" channel="inline" format="text/cybol-path" model=".var.client_socket"/> <node name="language" channel="inline" format="meta/language" model="message/http-request"/> <node name="format" channel="inline" format="meta/format" model="element/part"/> <node name="message" channel="inline" format="text/cybol-path" model=".var.request"/> <!-- Read indirectly from internal buffer into which data have been written by the sensing thread. --> <node name="asynchronicity" channel="inline" format="logicvalue/boolean" model="true"/> </node> <!-- Receive client binary request on the server side via network socket. --> <node name="receive_request" channel="inline" format="communicate/receive" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="sender" channel="inline" format="text/cybol-path" model=".client_socket"/> <node name="language" channel="inline" format="meta/language" model="message/binary-crlf"/> <node name="message" channel="inline" format="text/cybol-path" model=".request"/> <!-- Read indirectly from internal buffer into which data have been written by the sensing thread. --> <node name="asynchronicity" channel="inline" format="logicvalue/boolean" model="true"/> </node> <!-- Receive server response on the client side via network socket. --> <node name="receive_response" channel="inline" format="communicate/receive" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="sender" channel="inline" format="text/cybol-path" model=".server_socket"/> <node name="language" channel="inline" format="meta/language" model="message/binary-crlf"/> <node name="message" channel="inline" format="text/cybol-path" model=".response"/> </node>

Properties

NameRequiredFormatDescription
channeltruetext/cybol-path | meta/channelThe communication channel.
serverfalsetext/cybol-path | logicvalue/booleanThe flag indicating server mode. It means server-side client stub and not standalone client. If null, the default is false (client mode).
portfalsetext/cybol-path | number/integerThe service identification. It is relevant only in server mode.
sendertruetext/cybol-pathThe device identification, for example a file descriptor. Handing it over as hard-coded integer value does not make sense, since the operating system or server assigns it. Therefore, state a cybol-path.
encodingfalsetext/cybol-path | meta/encodingThe encoding, for example utf-8 or utf-32 or ascii.
languagefalsetext/cybol-path | meta/languageThe language used for deserialisation. It is also defining which prefix or suffix indicates the message length, for example binary-crlf, http-request, xdt.
formatfalsetext/cybol-path | meta/formatThe format (type) of the message data.
messagetruetext/cybol-pathThe knowledge tree node storing the received data.
asynchronicityfalsetext/cybol-path | logicvalue/booleanThe flag indicating asynchronous reading from buffer in which data got stored by a sensing thread before. If null, the default is false (synchronous read).

Constraints (language_constraints)

NameRequiredFormatDescription
decimal_separatorfalsetext/plainThe symbol (or character sequence) used to separate the integer part from the fractional part of a floating point (decimal) number.
thousands_separatorfalsetext/plainThe symbol (or character sequence) used for digit grouping.
delimiterfalsetext/plainThe separator between the single fields (values). It may consist of many characters, but also be a simple comma, for example. Used with joined strings or character (comma) separated values (csv).
quotationfalsetext/plainThe marker sequence used at the beginning and end of string fields (values). It may consist of many characters. Quotation is necessary if the delimiter character is part of the value. If the quotation is to be part of the value, then it has to be escaped by writing it twice (doubled). Used with joined strings or character (comma) separated values (csv).
headerfalselogicvalue/booleanThe flag indicating whether or not the source data contain a header, so that the deserialiser can treat the first line differently. Used with character (comma) separated values (csv). Caution! It should not be mixed up with the headermodel property in represent/serialise or communicate/send.
normalisationfalselogicvalue/booleanThe flag indicating whether or not whitespaces and line breaks are merged into just one space. Used with xml or html, for example. If null, then the default is true (normalisation enabled).
maximumfalsenumber/integerThe maximum number of bytes to be transmitted. Used with serial (port) interface.
minimumfalsenumber/integerThe minimum number of bytes to be transmitted. Used with serial (port) interface.
mediumfalsetext/cybol-pathThe window to which the mouse button or keyboard key refers. It is needed to search through the hierarchy of gui elements via mouse coordinates, for a suitable action. Used with graphical user interface (gui).

communicate/send

Description

Sends a message via the communication channel.

Examples

<!-- Place a signal (event) into the cyboi system signal memory (event queue). --> <node name="send_exit_signal" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="signal"/> <node name="message" channel="inline" format="live/exit" model=""/> </node> <!-- Send a signal that was read from a cybol file before. --> <node name="send_signal_taken_from_file" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="signal"/> <node name="message" channel="file" format="element/part" model="exit/file/exit.cybol"/> </node> <!-- Send plain text to terminal. --> <node name="say_hello" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="terminal"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".var.stdout"/> <node name="language" channel="inline" format="meta/language" model="message/tui"/> <node name="format" channel="inline" format="meta/format" model="text/plain"/> <node name="message" channel="inline" format="text/plain" model="Hello World!"/> </node> <!-- Print an http request's uri query action on terminal. --> <node name="print_query" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="terminal"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".stdout"/> <node name="language" channel="inline" format="meta/language" model="message/tui"/> <node name="format" channel="inline" format="meta/format" model="text/plain"/> <node name="message" channel="inline" format="text/cybol-path" model=".var.request:uri:query.action"/> </node> <!-- Print http request as pure ascii data on terminal. --> <node name="print_request" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="terminal"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".stdout"/> <node name="language" channel="inline" format="meta/language" model="message/tui"/> <node name="format" channel="inline" format="meta/format" model="text/ascii"/> <node name="message" channel="inline" format="text/cybol-path" model=".request"/> </node> <!-- Send boolean value (flag) to terminal. --> <node name="log_flag" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="terminal"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".stdout"/> <node name="language" channel="inline" format="meta/language" model="message/tui"/> <node name="format" channel="inline" format="meta/format" model="logicvalue/boolean"/> <node name="message" channel="inline" format="text/cybol-path" model=".result_flag"/> </node> <!-- Send integer number to terminal. --> <node name="print_number" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="terminal"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".stdout"/> <node name="language" channel="inline" format="meta/language" model="message/tui"/> <node name="format" channel="inline" format="meta/format" model="number/integer"/> <node name="message" channel="inline" format="text/cybol-path" model=".index"/> </node> <!-- Send decimal fraction number to terminal. --> <node name="print_adc_value" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="terminal"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".stdout"/> <node name="language" channel="inline" format="meta/language" model="message/tui"/> <node name="format" channel="inline" format="meta/format" model="number/fraction-decimal"/> <node name="message" channel="inline" format="text/cybol-path" model=".settings.adc"/> </node> <!-- Send main menu as text user interface (tui) to terminal. --> <node name="send_menu" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="terminal"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".stdout"/> <node name="language" channel="inline" format="meta/language" model="message/tui"> <node name="clear" channel="inline" format="logicvalue/boolean" model="true"/> <node name="positioning" channel="inline" format="logicvalue/boolean" model="true"/> </node> <node name="format" channel="inline" format="meta/format" model="element/part"/> <node name="message" channel="inline" format="text/cybol-path" model=".tui.main"/> </node> <node name="set_cursor" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="terminal"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".stdout"/> <node name="language" channel="inline" format="meta/language" model="message/tui"> <!-- The clear flag is false by default and therefore does not have to be added here. --> <node name="positioning" channel="inline" format="logicvalue/boolean" model="true"/> </node> <!-- Use text/plain instead of element/part, since the cursor has just the position property but an empty model. --> <node name="format" channel="inline" format="meta/format" model="text/plain"/> <node name="message" channel="inline" format="text/cybol-path" model=".tui.cursor"/> </node> <!-- Draw graphical user interface (gui) window on display. --> <node name="refresh_display" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="display"/> <!-- This flag is IMPORTANT for finding the correct client entry in the server list. --> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".gui.window_id"/> <node name="language" channel="inline" format="meta/language" model="message/gui-response"/> <node name="format" channel="inline" format="meta/format" model="element/part"/> <node name="message" channel="inline" format="text/cybol-path" model=".gui.window"/> </node> <!-- Write runtime knowledge tree into file, which is useful for testing. --> <node name="open_file" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="identification" channel="inline" format="text/cybol-path" model=".id"/> <node name="device" channel="inline" format="text/plain" model="counter/simple/test_counter_simple.txt"/> <node name="mode" channel="inline" format="text/plain" model="write"/> </node> <node name="send_knowledge_tree_root" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".id"/> <node name="encoding" channel="inline" format="meta/encoding" model="utf-8"/> <node name="language" channel="inline" format="meta/language" model="text/model-diagram"/> <node name="format" channel="inline" format="meta/format" model="element/part"/> <node name="message" channel="inline" format="text/cybol-path" model="."/> </node> <node name="close_file" channel="inline" format="dispatch/close" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="identification" channel="inline" format="text/cybol-path" model=".id"/> </node> <!-- Write binary data into a file. --> <node name="test_file_content" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".id"/> <node name="language" channel="inline" format="meta/language" model="message/binary"/> <node name="message" channel="inline" format="text/cybol-path" model=".var.file"/> </node> <!-- Serialise web user interface (wui) and store it as html file. --> <node name="generate_html" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".id"/> <node name="encoding" channel="inline" format="meta/encoding" model="utf-8"/> <node name="language" channel="inline" format="meta/language" model="text/html"> <node name="indentation" channel="inline" format="logicvalue/boolean" model="true"/> </node> <node name="format" channel="inline" format="meta/format" model="element/part"/> <node name="message" channel="inline" format="text/cybol-path" model=".wui.index"/> </node> <!-- Serialise a webpage into html within the knowledge tree and afterwards save it as file. --> <node name="serialise_webpage" channel="inline" format="represent/serialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".var.webpage"/> <node name="source" channel="inline" format="text/cybol-path" model=".wui.index"/> <node name="format" channel="inline" format="meta/format" model="element/part"/> <node name="language" channel="inline" format="meta/language" model="text/html"/> </node> <node name="write_serialised_webpage_into_file" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".id"/> <node name="encoding" channel="inline" format="meta/encoding" model="utf-8"/> <node name="language" channel="inline" format="meta/language" model="text/cybol"/> <node name="format" channel="inline" format="meta/format" model="text/plain"/> <node name="message" channel="inline" format="text/cybol-path" model=".var.webpage"/> </node> <!-- Assemble http response with webpage plus metadata and store it as file. --> <node name="test_http_response" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".id"/> <node name="language" channel="inline" format="meta/language" model="message/http-response"/> <node name="format" channel="inline" format="meta/format" model="text/plain"/> <node name="message" channel="inline" format="text/cybol-path" model=".var.webpage"> <node name="Server" channel="inline" format="text/plain" model="CYBOI/0.22.0 (Linux) CYBOL/2.0.0"/> <node name="Connection" channel="inline" format="text/plain" model="close"/> <node name="Content-Type" channel="inline" format="text/plain" model="text/html"/> </node> </node> <!-- Send ascii text "Hello World!" as binary data via socket. --> <node name="send_hello" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".client_socket"/> <node name="language" channel="inline" format="meta/language" model="message/binary-crlf"/> <node name="message" channel="inline" format="text/ascii" model="Hello World!"/> </node> <!-- Send text data as http response via socket. --> <node name="send_file" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".var.client_socket"/> <node name="language" channel="inline" format="meta/language" model="message/http-response"/> <node name="format" channel="inline" format="meta/format" model="text/plain"/> <node name="message" channel="inline" format="text/cybol-path" model=".var.file"/> </node> <!-- Send empty text http-response to indicate end of communication. --> <node name="send_empty_message" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".var.client_socket"/> <node name="language" channel="inline" format="meta/language" model="message/http-response"/> <node name="format" channel="inline" format="meta/format" model="text/plain"/> <node name="message" channel="inline" format="text/plain" model=""/> </node> <!-- Send html encapsulated as http-response. --> <node name="send" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".var.client_socket"/> <node name="language" channel="inline" format="meta/language" model="message/http-response"/> <node name="format" channel="inline" format="meta/format" model="text/plain"/> <!-- For the http response, the following headers are recommended: - Date - Server - Content-Length - Content-Type CAUTION! An "encoding" is NOT given when using the language "message/http-response", since it would cause the WHOLE http message to get encoded. But the http header should be ASCII (single-byte characters) only. Likewise, binary attachments such as images should NOT get encoded. CAUTION! It does NOT work adding the constraint "encoding" right here. It does properly appear in the knowledge tree, but is NOT recognised in the operation "send". The reason is that the format "text/cybol-path" points to another part ".webpage" whose properties are used INSTEAD of those constraints that might be specified here. In order to verify this, one might use the format "text/plain" testwise, with which the constraints are recognised properly. Therefore, the necessary "encoding" is added at the part ".webpage" DIRECTLY. --> <node name="message" channel="inline" format="text/cybol-path" model=".var.webpage"> <node name="Connection" channel="inline" format="text/plain" model="keep-alive"/> <!-- <node name="Content-Type" channel="inline" format="text/plain" model="text/html; charset=utf-8"/> --> <!-- The client has 300 s == 5 min to make any additional requests before the connection is closed. The client can send up to 1000 more requests. --> <node name="Keep-Alive" channel="inline" format="text/plain" model="timeout=300, max=1000"/> </node> </node> <!-- Send request on client side to server via socket. --> <node name="send_request" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".server_socket"/> <node name="language" channel="inline" format="meta/language" model="message/binary-crlf"/> <node name="message" channel="inline" format="text/ascii" model="say-hello"/> </node>

Properties

NameRequiredFormatDescription
channeltruetext/cybol-path | meta/channelThe communication channel.
serverfalsetext/cybol-path | logicvalue/booleanThe flag indicating server mode. It means server-side client stub and not standalone client. If null, the default is false (client mode).
portfalsetext/cybol-path | number/integerThe service identification. It is relevant only in server mode.
receivertruetext/cybol-pathThe device identification, for example a file descriptor. Handing it over as hard-coded integer value does not make sense, since the operating system or server assigns it. Therefore, state a cybol-path.
encodingfalsetext/cybol-path | meta/encodingThe encoding, for example utf-8 or utf-32 or ascii.
languagefalsetext/cybol-path | meta/languageThe language used for serialisation, for example model-diagram, html, binary-crlf, http-response, xdt.
formatfalsetext/cybol-path | meta/formatThe format (type) of the message data.
messagetruetext/cybol-path | text/ascii | anyThe data to be sent.
asynchronicityfalsetext/cybol-path | logicvalue/booleanThe flag indicating asynchronous writing within a thread. If null, the default is false (synchronous write).
handlerfalsetext/cybol-pathThe callback cybol operation being executed when the thread finished writing data.

Constraints (language_constraints)

NameRequiredFormatDescription
signfalselogicvalue/booleanThe flag indicating whether or not a plus sign is to be displayed for positive numbers. Negative numbers have a minus sign in any case. If null, the default is false (no plus sign for positive numbers).
basefalsenumber/integerThe number base for example 2 for binary (dual), 8 for octal, 10 for decimal, 16 for hexadecimal. If null, the default is 10 (decimal number base).
classicoctalfalselogicvalue/booleanThe flag indicating whether or not the octal number base prefix is to be displayed as 0 as in classic c/c++ or using modern style 0o as in perl and python. If null, the default is false (modern style with prefix 0o).
groupingfalsetext/plainThe symbol or character sequence used for digit grouping in thousands. If null, the default is not to use any thousands separator at all.
separatorfalsetext/plainThe symbol or character sequence used to separate the integer part from the fractional part of a floating point decimal number. If null, the default is to use the full stop (dot).
decimalsfalsenumber/integerThe number of post-point decimal places (decimals). If null, the default is 4.
scientificfalselogicvalue/booleanThe flag indicating whether or not the decimal fraction gets displayed with mantissa and exponent. If null, the default is false (standard representation without exponent).
polarfalselogicvalue/booleanThe flag indicating whether or not to write the complex number using polar coordinates. If null, the default is false (using the cartesian form).
newlinefalselogicvalue/booleanThe flag indicating whether or not a line break is added at the end of the printed characters. If null, the default is true (line gets broken). Used with text (pseudo) terminal.
clearfalselogicvalue/booleanThe flag indicating whether or not the terminal screen is cleared before printing characters on it. If null, the default is false (no clearing). Used with text (pseudo) terminal.
positioningfalselogicvalue/booleanThe flag indicating whether or not the cursor position may get changed. If null, the default is false (no repositioning). Used with text (pseudo) terminal.
indentationfalselogicvalue/booleanThe flag indicating whether or not the serialised data get beautified (pretty-formatted) by indenting the single lines depending on the hierarchy level. Used with xml or html, for example.
delimiterfalsetext/plainThe separator between the single fields (values). It may consist of many characters, but also be a simple comma, for example. Used with joined strings or character (comma) separated values (csv).
quotationfalsetext/plainThe marker sequence used at the beginning and end of string fields (values). It may consist of many characters. Quotation is necessary if the delimiter character is part of the value. If the quotation is to be part of the value, then it has to be escaped by writing it twice (doubled). Used with joined strings or character (comma) separated values (csv).
normalisationfalselogicvalue/booleanThe flag indicating whether or not whitespaces and line breaks are merged into just one space. Used with xml or html, for example. If null, then the default is true (normalisation enabled).
widthfalsenumber/integerThe number of characters (or digits) belonging to a value. Free places get filled up with the character given in the fill property. This was defined in the original specification of character (comma) separated values (csv), in order to have fields (values) with equal width. Used with joined strings or csv.
fillfalsetext/plainThe characters (or digit) to be used to fill free places in a value whose width is greater.
headermodelfalsetext/cybol-pathThe header data to be written as first line, yet before the actual content. Used with character (comma) separated values (csv). Caution! It should not be mixed up with the header property flag in represent/deserialise or communicate/receive.

convert/decode

Description

Decodes the source into the destination, according to the encoding. Caution! The decoded data are appended to the destination. Already existing content is not overwritten. Therefore, the destination possibly has to get emptied before since otherwise, the new data will get appended to the already existing old data.

Examples

<node name="decode_request" channel="inline" format="convert/decode" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".action"/> <node name="source" channel="inline" format="text/cybol-path" model=".request"/> <node name="encoding" channel="inline" format="meta/encoding" model="utf-8"/> </node> <node name="decode" channel="inline" format="convert/decode" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/cybol-path" model=".text"/> <node name="encoding" channel="inline" format="meta/encoding" model="utf-8"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination wide character array consisting of elements of type
sourcetruetext/cybol-pathThe source byte array consisting of elements of type
encodingtruetext/cybol-path | meta/encodingThe message encoding.

convert/encode

Description

Encodes the source into the destination, according to the encoding. Caution! The encoded data are appended to the destination. Already existing content is not overwritten. Therefore, the destination possibly has to get emptied before since otherwise, the new data will get appended to the already existing old data.

Examples

<node name="decode" channel="inline" format="convert/encode" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".data"/> <node name="source" channel="inline" format="text/cybol-path" model=".webpage"/> <node name="encoding" channel="inline" format="meta/encoding" model="utf-8"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination byte array consisting of elements of type
sourcetruetext/cybol-pathThe source wide character array consisting of elements of type
encodingtruetext/cybol-path | meta/encodingThe message encoding.

dispatch/close

Description

Closes down a client resource that has been used for connecting to a device or service on the given channel.

Examples

<node name="close_file" channel="inline" format="dispatch/close" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="identification" channel="inline" format="text/cybol-path" model=".id"/> </node> <node name="close_stdout" channel="inline" format="dispatch/close" model=""> <node name="channel" channel="inline" format="meta/channel" model="terminal"/> <node name="identification" channel="inline" format="text/cybol-path" model=".app.stdout"/> </node> <node name="handle_close" channel="inline" format="dispatch/close" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="identification" channel="inline" format="text/cybol-path" model=".client_socket"/> </node>

Properties

NameRequiredFormatDescription
channeltruetext/cybol-path | meta/channelThe communication channel.
serverfalsetext/cybol-path | logicvalue/booleanThe flag indicating server mode. It is used for example for a window or client socket stub. If null, the default is false (standalone client mode).
portfalsetext/cybol-path | number/integerThe service identification. It is relevant only in server mode. If null, the default is zero.
identificationtruetext/cybol-pathThe file descriptor or client socket number or window id returned from cyboi when opening the resource.

dispatch/open

Description

Opens up a client resource for connecting to a device or service on the given channel.

Examples

<node name="open_file_in_read_mode" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="identification" channel="inline" format="text/cybol-path" model=".id"/> <node name="device" channel="inline" format="text/plain" model="app/config.cybol"/> </node> <node name="open_file_in_write_mode" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="identification" channel="inline" format="text/cybol-path" model=".id"/> <node name="device" channel="inline" format="text/plain" model="knowledge_tree_test.txt"/> <node name="mode" channel="inline" format="text/plain" model="write"/> </node> <node name="open_stdout" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="terminal"/> <node name="device" channel="inline" format="text/plain" model="standard-output"/> <node name="identification" channel="inline" format="text/cybol-path" model=".stdout"/> </node> <node name="open_stdin" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="terminal"/> <node name="device" channel="inline" format="text/plain" model="standard-input"/> <node name="identification" channel="inline" format="text/cybol-path" model=".var.stdin"/> </node> <node name="open_serial_port" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="serial"/> <node name="filename" channel="inline" format="text/plain" model="/dev/ttyACM0"/> <node name="baudrate" channel="inline" format="number/integer" model="115200"/> <node name="identification" channel="inline" format="text/cybol-path" model=".dev.serial_0"/> </node> <node name="open_fifo_named_pipe" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="fifo"/> <node name="identification" channel="inline" format="text/cybol-path" model=".id"/> <node name="device" channel="inline" format="text/plain" model="app/special_file"/> <node name="mode" channel="inline" format="text/plain" model="write"/> </node> <node name="open_serverside_client_socket_accepted_by_server_before" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <!-- Open client device in server mode. It was already pre-configured inside by the accepting server socket. --> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="identification" channel="inline" format="text/cybol-path" model=".client_socket_on_server"/> </node> <node name="open_client_socket_connecting_to_a_server" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <!-- Open client device in client mode. It still has to be configured inside. --> <node name="server" channel="inline" format="logicvalue/boolean" model="false"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="namespace" channel="inline" format="text/plain" model="ipv4"/> <node name="style" channel="inline" format="text/plain" model="stream"/> <node name="protocol" channel="inline" format="text/plain" model="tcp"/> <node name="device" channel="inline" format="text/plain" model="127.0.0.1"/> <node name="identification" channel="inline" format="text/cybol-path" model=".standalone_client_socket"/> </node> <!-- In win32, each window catches its own events and is managed independently. Therefore, the "server" property does not have to be given here. TODO: This is yet to be implemented and tested in cyboi! --> <node name="open_client" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="display"/> <node name="identification" channel="inline" format="text/cybol-path" model=".gui.window_id"/> </node> <!-- In the x window system (xcb api), a display server process manages the events of all windows centrally. Therefore, the "server" property has to be given here, in order for the window to get managed by the display server. --> <node name="open_window" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="display"/> <!-- Open client window in server mode, so that it gets stored in the display server. --> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="identification" channel="inline" format="text/cybol-path" model=".gui.window_id"/> </node>

Properties

NameRequiredFormatDescription
channeltruetext/cybol-path | meta/channelThe communication channel.
serverfalsetext/cybol-path | logicvalue/booleanThe flag indicating server mode. It is used for example for a window or client socket stub. If null, the default is false (standalone client mode).
portfalsetext/cybol-path | number/integerThe service identification. It is relevant only in server mode. If null, the default is zero.
namespacefalsetext/cybol-path | text/plainThe address family. It is relevant only with channel socket. Example values: ipv4 or ipv6.
stylefalsetext/cybol-path | text/plainThe communication style. It is relevant only with channel socket. Example values: stream or datagram.
protocolfalsetext/cybol-path | text/plainThe protocol. It is relevant only with channel socket. Example values: tcp or udp.
modefalsetext/cybol-path | text/plainThe file open mode. Either read or write. If null, the default is read.
devicefalsetext/cybol-path | text/plainThe filename for channel file or serial or terminal or fifo. Example values: /path/to/file.txt or /dev/ttyS0 or standard-output or standard-input or standard-error-output. The filename for channel socket with namespace local (unix domain socket). Example values: localbuffer.socket. The host address for channel socket with namespace ipv4 or ipv6. Example values: localhost or 127.0.0.1. It is null (not given) for channel display, since a client window does not need it.
identificationtruetext/cybol-pathThe file descriptor or client socket number or window id returned from cyboi when opening the resource.

feel/sense

Description

Starts sensing data input within a thread on the sender/client with the given identification. It fills the internal input buffer with those data that were received as input. Calling this operation is not necessary for channel "display" on a linux operating system with x window system, since "activate/enable" catches the events of all client windows. On a windows operating system, however, one separate event thread is run per window, so that calling "feel/sense" is necessary.

Examples

<!-- Open terminal and sense input on it. --> <node name="open_terminal_stdin" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="terminal"/> <!-- The text "standard-input" is a pre-defined constant and is used instead of a filename here. --> <node name="device" channel="inline" format="text/plain" model="standard-input"/> <node name="identification" channel="inline" format="text/cybol-path" model=".var.stdin"/> </node> <node name="sense_terminal_input" channel="inline" format="feel/sense" model=""> <node name="channel" channel="inline" format="meta/channel" model="terminal"/> <node name="sender" channel="inline" format="text/cybol-path" model=".var.stdin"/> <node name="language" channel="inline" format="meta/language" model="message/tui"/> <node name="handler" channel="inline" format="text/cybol-path" model=".logic.handle"/> </node> <node name="sense_data_on_serial_interface" channel="inline" format="feel/sense" model=""> <node name="channel" channel="inline" format="meta/channel" model="serial"/> <node name="sender" channel="inline" format="text/cybol-path" model=".serial_id"/> <node name="language" channel="inline" format="meta/language" model="message/binary-crlf"/> <node name="handler" channel="inline" format="text/cybol-path" model=".logic.handle"/> </node> <node name="sense_client_data_in_binary_format" channel="inline" format="feel/sense" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="sender" channel="inline" format="text/cybol-path" model=".client_socket"/> <node name="language" channel="inline" format="meta/language" model="message/binary-crlf"/> <node name="handler" channel="inline" format="text/cybol-path" model=".logic.handle_sense"/> <node name="closer" channel="inline" format="text/cybol-path" model=".logic.handle_close"/> </node> <node name="sense_client_data_as_http_request" channel="inline" format="feel/sense" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="sender" channel="inline" format="text/cybol-path" model=".var.client_socket"/> <node name="language" channel="inline" format="meta/language" model="message/http-request"/> <node name="handler" channel="inline" format="text/cybol-path" model=".logic.handle.sense"/> <node name="closer" channel="inline" format="text/cybol-path" model=".logic.handle.close"/> </node> <!-- This operation "feel/sense" for channel "display" does NOT run in a separate thread. It is just used to hand over a specific event handler for each window. --> <node name="assign_handler_for_client_window_events" channel="inline" format="feel/sense" model=""> <node name="channel" channel="inline" format="meta/channel" model="display"/> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="sender" channel="inline" format="text/cybol-path" model=".gui.window_id"/> <node name="handler" channel="inline" format="text/cybol-path" model=".logic.handle"/> </node>

Properties

NameRequiredFormatDescription
channeltruetext/cybol-path | meta/channelThe communication channel.
serverfalsetext/cybol-path | logicvalue/booleanThe flag indicating server mode. It means server-side client stub and not standalone client. If null, the default is false (client mode).
portfalsetext/cybol-path | number/integerThe service identification. It is relevant only in server mode.
sendertruetext/cybol-pathThe device identification, for example a file descriptor. Handing it over as hard-coded integer value does not make sense, since the operating system or server assigns it. Therefore, state a cybol-path.
languagefalsetext/cybol-path | meta/languageThe language used for deserialisation. It is also defining which prefix or suffix indicates the message length, for example binary-crlf, http-request, xdt.
handlertruetext/cybol-pathThe callback cybol model to be executed when data were detected on the sender, in order to read them from the internal input buffer.
closerfalsetext/cybol-pathThe callback cybol model to be executed when the client does not respond and is to be closed.

feel/suspend

Description

Pauses data input sensing thread for the sender/client with the given identification.

Examples

<node name="suspend_sensing_thread" channel="inline" format="feel/suspend" model=""> <node name="channel" channel="inline" format="meta/channel" model="display"/> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="sender" channel="inline" format="text/cybol-path" model=".gui.window_id"/> </node>

Properties

NameRequiredFormatDescription
channeltruetext/cybol-path | meta/channelThe communication channel.
serverfalsetext/cybol-path | logicvalue/booleanThe flag indicating server mode. It means server-side client stub and not standalone client. If null, the default is false (client mode).
portfalsetext/cybol-path | number/integerThe service identification. It is relevant only in server mode.
sendertruetext/cybol-pathThe device identification, for example a file descriptor. Handing it over as hard-coded integer value does not make sense, since the operating system or server assigns it. Therefore, state a cybol-path.

flow/branch

Description

Branches the programme flow, depending on the criterion flag.

Examples

<!-- Read models from file. --> <node name="branch_voltage" channel="inline" format="flow/branch" model=""> <node name="criterion" channel="inline" format="text/cybol-path" model=".settings.voltage_criterion"/> <node name="true" channel="file" format="element/part" model="indoor_climate/add_voltage.cybol"/> <node name="false" channel="file" format="element/part" model="indoor_climate/report_voltage_failure.cybol"/> </node> <!-- Branch with one model. --> <node name="if-then" channel="inline" format="flow/branch" model=""> <node name="criterion" channel="inline" format="text/cybol-path" model=".app.var.flag_loose"/> <node name="true" channel="inline" format="text/cybol-path" model=".app.print_win"/> </node> <!-- Branch with two models. --> <node name="if-then-else" channel="inline" format="flow/branch" model=""> <node name="criterion" channel="inline" format="text/cybol-path" model=".domain.flag"/> <node name="true" channel="inline" format="text/cybol-path" model=".domain.true_model"/> <node name="false" channel="inline" format="text/cybol-path" model=".domain.false_model"/> </node> <!-- Verify existence of given url path. --> <node name="evaluate_query" channel="inline" format="flow/branch" model=""> <node name="criterion" channel="inline" format="text/cybol-path" model=".var.query_exists"/> <node name="true" channel="inline" format="text/cybol-path" model=".logic.evaluate_query"/> <!-- CAUTION! Sending a response is important, even if the query was empty or not understood, since some browsers request a "/favicon.ico" or other things and if no response was sent, the browser would wait forever and block requests from other clients. --> <node name="false" channel="inline" format="text/cybol-path" model=".logic.send.empty_message"/> </node> <!-- Fill cell with default value if database value is empty. --> <node name="translate_cell" channel="inline" format="flow/branch" model=""> <node name="criterion" channel="inline" format="text/cybol-path" model="#empty"/> <node name="true" channel="inline" format="text/cybol-path" model=".logic.translate.db_to_wui.cell_default"/> <node name="false" channel="inline" format="text/cybol-path" model=".logic.translate.db_to_wui.cell"/> </node>

Properties

NameRequiredFormatDescription
criteriontruetext/cybol-path | logicvalue/booleanThe flag defining which of the two models to execute.
truefalsetext/cybol-path | element/partThe logic knowledge model to be executed if the criterion is true.
falsefalsetext/cybol-path | element/partThe logic knowledge model to be executed if the criterion is false.

flow/loop

Description

Loops the programme flow endlessly, until the break flag is set.

Examples

<!-- Read model from heap (knowledge tree). --> <node name="print_numbers" channel="inline" format="flow/loop" model=""> <node name="break" channel="inline" format="text/cybol-path" model=".break"/> <node name="model" channel="inline" format="text/cybol-path" model=".model"/> </node> <!-- Read model from stack. --> <node name="loop_rows" channel="inline" format="flow/loop" model=""> <node name="break" channel="inline" format="text/cybol-path" model="#row_break"/> <node name="model" channel="inline" format="text/cybol-path" model="#row_model"/> </node> <!-- Read model from file. --> <node name="collect_voltages" channel="inline" format="flow/loop" model=""> <node name="break" channel="inline" format="text/cybol-path" model=".settings.adc_break"/> <node name="model" channel="file" format="element/part" model="adc/collect_voltages.cybol"/> </node> <!-- Translate data records of the german medical standard xdt. --> <node name="loop_records" channel="inline" format="flow/loop" model=""> <node name="break" channel="inline" format="path/knowledge" model=".temporary.xdt.record.break"/> <node name="model" channel="inline" format="path/knowledge" model=".logic.translate.record"/> </node> <!-- Generate several webpages. --> <node name="loop_page" channel="inline" format="flow/loop" model=""> <node name="break" channel="inline" format="text/cybol-path" model="#page_break"/> <node name="model" channel="inline" format="text/cybol-path" model=".logic.generate.page"/> </node> <!-- Call randomiser as model. --> <node name="generate_mines_in_game_minesweeper" channel="inline" format="flow/loop" model=""> <node name="break" channel="inline" format="text/cybol-path" model=".app.break"/> <node name="model" channel="inline" format="text/cybol-path" model=".app.logic.randomiser"/> </node>

Properties

NameRequiredFormatDescription
breaktruetext/cybol-path | logicvalue/booleanThe break flag that causes the loop to be left.
modeltruetext/cybol-path | element/partThe logic knowledge model to be executed repeatedly by the loop.

flow/sequence

Description

Executes the given programme flow as sequence. This encapsulating operation "flow/sequence" is provided here to have all three constructs of structural programming implemented together, which are "sequence", "loop" and "branch". However, in principle, logic models may be executed standalone directly or with encapsulating operation "flow/sequence". Both kinds of execution are possible.

Examples

<node name="start_player_input" channel="inline" format="flow/sequence" model=""> <node name="model" channel="inline" format="text/cybol-path" model=".app.setrandom"/> </node> <node name="send_index" channel="inline" format="flow/sequence" model=""> <node name="model" channel="inline" format="text/cybol-path" model=".logic.send.index"/> </node> <node name="execute_action" channel="inline" format="flow/sequence" model=""> <node name="model" channel="inline" format="text/cybol-path" model="{.path}"/> </node> <node name="translate_uri_to_wui" channel="inline" format="flow/sequence" model=""> <node name="model" channel="inline" format="text/cybol-path" model=".logic.translate.uri_to_wui.column"/> </node> <!-- Direct execution of logic model without encapsulating operation "flow/sequence". --> <node name="navigate_to_week" channel="inline" format="text/cybol-path" model=".logic.navigate.week"/>

Properties

NameRequiredFormatDescription
modeltruetext/cybol-path | element/partThe logic knowledge model to be executed as sequence.

live/exit

Description

Exits the cyboi system and closes the running application. Internally, an exit flag gets set so that the event loop gets left. Interrupt threads get exited, too. All objects in memory get deallocated. The cyboi interpreter finally exits.

Examples

<node name="exit_application" channel="inline" format="live/exit" model=""/>

maintain/shutdown

Description

Shuts down the service running on the channel.

Examples

<node name="shutdown_connexion_to_x_window_system_server" channel="inline" format="maintain/shutdown" model=""> <node name="channel" channel="inline" format="meta/channel" model="display"/> </node>

Properties

NameRequiredFormatDescription
channeltruetext/cybol-path | meta/channelThe communication channel.
portfalsetext/cybol-path | number/integerThe service identification.

maintain/startup

Description

Starts up a service on the channel.

Examples

<node name="startup_local_unix_domain_socket_with_filename" channel="inline" format="maintain/startup" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="namespace" channel="inline" format="text/plain" model="local"/> <node name="style" channel="inline" format="text/plain" model="datagram"/> <node name="protocol" channel="inline" format="text/plain" model="udp"/> <node name="device" channel="inline" format="text/plain" model="cyboi.socket"/> <node name="connexions" channel="inline" format="number/integer" model="1"/> <node name="timeout" channel="inline" format="number/integer" model="5"/> </node> <node name="startup_ipv4_stream_socket" channel="inline" format="maintain/startup" model=""> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="port" channel="inline" format="number/integer" model="1971"/> <node name="namespace" channel="inline" format="text/plain" model="ipv4"/> <node name="style" channel="inline" format="text/plain" model="stream"/> <node name="protocol" channel="inline" format="text/plain" model="tcp"/> <node name="device" channel="inline" format="text/plain" model="127.0.0.1"/> <node name="connexions" channel="inline" format="number/integer" model="10"/> <node name="timeout" channel="inline" format="number/integer" model="5"/> </node> <!-- Startup display service and open a window afterwards. --> <node name="connect_to_x_window_system_server" channel="inline" format="maintain/startup" model=""> <node name="channel" channel="inline" format="meta/channel" model="display"/> </node> <node name="open_window" channel="inline" format="dispatch/open" model=""> <node name="channel" channel="inline" format="meta/channel" model="display"/> <!-- Open client window in SERVER mode, so that it gets stored in the display server. --> <node name="server" channel="inline" format="logicvalue/boolean" model="true"/> <node name="identification" channel="inline" format="text/cybol-path" model=".gui.window_id"/> </node>

Properties

NameRequiredFormatDescription
channeltruetext/cybol-path | meta/channelThe communication channel.
portfalsetext/cybol-path | number/integerThe service identification.
namespacefalsetext/cybol-path | text/plainThe address family, for example local, ipv4, ipv6.
stylefalsetext/cybol-path | text/plainThe communication style, for example stream, datagram, raw.
protocolfalsetext/cybol-path | text/plainThe protocol, for example tcp, udp, rdp.
devicefalsetext/cybol-path | text/plainThe filename for channel socket with namespace local (unix domain socket). Example values: localbuffer.socket. The host address for channel socket with namespace ipv4 or ipv6. Example values: localhost or 127.0.0.1. It is null (not given) for channel display, since a client window does not need it.
connexionsfalsetext/cybol-path | number/integerThe maximum number of possible pending client requests, for example 10.
timeoutfalsetext/cybol-path | number/integerThe timeout in seconds set for each new client, for example 300.

memorise/create

Description

Allocates an empty part in heap memory, consisting of name and type only. Each knowledge tree node has a double hierarchy with the main model branch representing the whole-part-structure and a second branch representing additional (mostly flat) properties. The "properties" property flag determines where to add the new part to. If the "whole" property is not given (null) and the "properties" flag set to true, then the new part gets added to the knowledge memory root node's properties branch.

Examples

<node name="create_fileid" channel="inline" format="memorise/create" model=""> <node name="name" channel="inline" format="text/plain" model="id"/> <node name="format" channel="inline" format="meta/format" model="number/integer"/> </node> <node name="create_summand" channel="inline" format="memorise/create" model=""> <node name="name" channel="inline" format="text/plain" model="summand"/> <node name="format" channel="inline" format="meta/format" model="number/integer"/> <node name="whole" channel="inline" format="text/cybol-path" model=".addition_application"/> </node> <node name="create_wui_song" channel="inline" format="memorise/create" model=""> <node name="name" channel="inline" format="text/cybol-path" model="#song_name"/> <node name="format" channel="inline" format="meta/format" model="element/part"/> <node name="whole" channel="inline" format="text/cybol-path" model=".wui.round.(#round_name).content"/> </node> <node name="create_sub_node_in_root_property_properties" channel="inline" format="memorise/create" model=""> <node name="name" channel="inline" format="text/plain" model="number"/> <node name="format" channel="inline" format="meta/format" model="number/integer"/> <node name="whole" channel="inline" format="text/cybol-path" model=":some_root_property"/> <node name="properties" channel="inline" format="logicvalue/boolean" model="true"/> </node>

Properties

NameRequiredFormatDescription
nametruetext/cybol-path | text/plainThe name of the part to be created.
formattruetext/cybol-path | meta/formatThe format of the part to be created. The internal data type gets determined from it.
wholefalsetext/cybol-pathThe destination parent node to which to add the new part to. If null, the default is the knowledge memory root node.
propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties branch as destination. If null, the default is false (model branch).

memorise/destroy

Description

Deallocates the given part in heap memory. Caution! Do not destroy the whole knowledge tree when shutting down a system since otherwise, the shutdown operation models of the corresponding cybol application being executed get destroyed as well, so that the exit operation cannot be executed anymore. The rubbish (garbage) collector cares about destruction evaluating references. The exit operation is the last one to be called. It cleans up all memory internally.

Examples

<node name="destroy_part" channel="inline" format="memorise/destroy" model=""> <node name="part" channel="inline" format="text/cybol-path" model=".some.part"/> </node>

Properties

NameRequiredFormatDescription
parttruetext/cybol-pathThe part to be destroyed.

modify/append

Description

Appends the source data to the destination.

Examples

<node name="append_action" channel="inline" format="modify/append" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".path"/> <node name="source" channel="inline" format="text/cybol-path" model=".action"/> </node> <node name="append_page_file_suffix" channel="inline" format="modify/append" model=""> <node name="destination" channel="inline" format="text/cybol-path" model="#page_file"/> <node name="source" channel="inline" format="text/plain" model=".html"/> </node> <node name="overwrite_link_reference_with_project_name" channel="inline" format="modify/append" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".wui.(#category_name).body.toc.(#project_name):href"/> <node name="source" channel="inline" format="text/cybol-path" model="#project_name"/> </node> <node name="append_path" channel="inline" format="modify/append" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".var.path"/> <node name="source" channel="inline" format="text/cybol-path" model=".var.request:uri:path"/> </node> <node name="append_scheme_suffix" channel="inline" format="modify/append" model=""> <node name="destination" channel="inline" format="text/cybol-path" model="#href"/> <node name="source" channel="inline" format="text/cybol-path" model=".domain.uri.scheme_suffix"/> </node> <node name="assemble_next_element_name" channel="inline" format="modify/append" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".tui.main.menu:focus"/> <node name="source" channel="inline" format="text/cybol-path" model=".var.navigation"/> </node> <node name="assemble_current_element_background" channel="inline" format="modify/append" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".var.character"/> <node name="source" channel="inline" format="text/plain" model=":background"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination part.
sourcetruetext/cybol-pathThe source part.
movefalsetext/cybol-path | logicvalue/booleanThe flag indicating whether or not to remove source elements after having been copied. If null, the default is false (deep copying). When deep copying elements (false), their whole sub tree gets cloned. With shallow copying (true), the element content does not get duplicated and only the memory pointers to the elements get copied and afterwards removed from the source container.
countfalsetext/cybol-path | number/integerThe number of elements to be copied. If null, the default is the source part model count.
source_indexfalsetext/cybol-path | number/integerThe source index from which to start copying elements from. If null, the default is zero.
destination_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as destination. If null, the default is false (model).
source_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as source. If null, the default is false (model).

modify/empty

Description

Removes all data (elements) from the destination (container).

Examples

<node name="reset_response_model" channel="inline" format="modify/empty" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".response"/> </node> <node name="empty_dbfile_model" channel="inline" format="modify/empty" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".var.dbfile"/> <node name="destination_properties" channel="inline" format="logicvalue/boolean" model="false"/> </node> <node name="reset_action_properties" channel="inline" format="modify/empty" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".gui.action"/> <node name="destination_properties" channel="inline" format="logicvalue/boolean" model="true"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination part.
destination_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as destination. If null, the default is false (model).

modify/fill

Description

Fills the destination (container) with repeated source data (element). Caution! Even though the operations "modify/fill" and "modify/repeat" both copy a source element multiple times, there are differences between them. "modify/fill": - works with any element type - does not change the size of the destination container - overwrites existing elements until container is filled - can copy only one element (source count of one) "modify/repeat": - works only with text (character string) - adjusts the size of the destination container (grows or shrinks) - overwrites existing elements and may exceed the current destination container - can copy an element sequence (source count greater or equal to one)

Examples

<node name="reinitialise_integer_array" channel="inline" format="modify/fill" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".var.array"/> <node name="source" channel="inline" format="number/integer" model="-1"/> </node> <node name="overwrite_string_content" channel="inline" format="modify/fill" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".some_text"/> <node name="source" channel="inline" format="text/cybol-path" model="#init_sign"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination part.
sourcetruetext/cybol-pathThe source part.
source_indexfalsetext/cybol-path | number/integerThe source index from which to start copying elements from. If null, the default is zero.
destination_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as destination. If null, the default is false (model).
source_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as source. If null, the default is false (model).

modify/insert

Description

Inserts the source data into the destination part at the destination index. Existing data behind the destination index (insertion position) get moved towards the end.

Examples

<node name="insert_word_into_string" channel="inline" format="modify/insert" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".some_text"/> <node name="source" channel="inline" format="text/cybol-path" model="#current_word"/> <node name="destination_index" channel="inline" format="text/cybol-path" model=".text_position"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination part.
sourcetruetext/cybol-pathThe source part.
movefalsetext/cybol-path | logicvalue/booleanThe flag indicating whether or not to remove source elements after having been copied. If null, the default is false (deep copying). When deep copying elements (false), their whole sub tree gets cloned. With shallow copying (true), the element content does not get duplicated and only the memory pointers to the elements get copied and afterwards removed from the source container.
countfalsetext/cybol-path | number/integerThe number of elements to be copied. If null, the default is the source part model count.
destination_indexfalsetext/cybol-path | number/integerThe destination index from which to start copying elements to. If null, the default is zero.
source_indexfalsetext/cybol-path | number/integerThe source index from which to start copying elements from. If null, the default is zero.
destination_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as destination. If null, the default is false (model).
source_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as source. If null, the default is false (model).

modify/lower

Description

Converts the source string into lower case letters stored in the destination. The source and destination are permitted to point to the same part since the source gets buffered internally during processing. Caution! This operation is applicable to text only (string of characters). Caution! The destination length may differ from the source length since not all characters can be converted 1:1. The German "small letter sharp s" for example gets converted into the two capital letters "SS". Further reading: https://www.unicode.org/reports/tr21/tr21-5.html

Examples

<node name="convert_plain_text" channel="inline" format="modify/lower" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/plain" model="Mein kleiner grüner Kaktus"/> </node> <node name="convert_text_variable" channel="inline" format="modify/upper" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/cybol-path" model=".text"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination part.
sourcetruetext/cybol-pathThe source part.
destination_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as destination. If null, the default is false (model).
source_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as source. If null, the default is false (model).

modify/normalise

Description

Removes leading and trailing whitespaces and additionally replaces all internal sequences of whitespace with just one. This is useful when parsing xml or html of a webpage, for example. Other than "modify/strip" this operation does also replace internal sequences of whitespace. The source and destination are permitted to point to the same part since the source gets buffered internally during processing. Caution! This operation is applicable to text only (character string). The considered whitespace characters are taken from the JSON specification: https://www.json.org/ They are: - empty: "" - space: 0020 - line feed: 000A - carriage return: 000D - character tabulation: 0009 The first (empty) can obviously not be considered and is just ignored.

Examples

<node name="normalise_plain_text" channel="inline" format="modify/normalise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/plain" model=" Some text with leading and trailing and intermediary spaces "/> </node> <node name="normalise_text_variable" channel="inline" format="modify/normalise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/cybol-path" model=".text"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination part.
sourcetruetext/cybol-pathThe source part.
destination_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as destination. If null, the default is false (model).
source_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as source. If null, the default is false (model).

modify/overwrite

Description

Overwrites the destination data with the source.

Examples

<node name="reset_query_exists_flag" channel="inline" format="modify/overwrite" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".query_exists"/> <node name="source" channel="inline" format="logicvalue/boolean" model="false"/> </node> <node name="overwrite_content" channel="inline" format="modify/overwrite" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".wui.index.body.content"/> <node name="source" channel="inline" format="text/plain" model="Hello, World!"/> </node> <node name="assign_row" channel="inline" format="modify/overwrite" model=""> <node name="destination" channel="inline" format="text/cybol-path" model="#row"/> <node name="source" channel="inline" format="text/plain" model="#row_heading"/> </node> <node name="initialise_count" channel="inline" format="modify/overwrite" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".counter.count"/> <node name="source" channel="file" format="number/integer" model="counter/storage/count.txt"/> </node> <node name="overwrite_path" channel="inline" format="modify/overwrite" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".var.path"/> <node name="source" channel="inline" format="text/cybol-path" model=".tui.(.tui.active):actions"/> </node> <node name="assemble_current_element_background" channel="inline" format="modify/overwrite" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".var.character"/> <node name="source" channel="inline" format="text/cybol-path" model=".tui.main.menu:focus"/> </node> <node name="focus_background" channel="inline" format="modify/overwrite" model=""> <node name="destination" channel="inline" format="text/cybol-path" model="{.var.character}"/> <node name="source" channel="inline" format="text/cybol-path" model=".settings.selection.background"/> </node> <node name="overwrite_data" channel="inline" format="modify/overwrite" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".wui.index.body.choices.table.(#name).data"/> <node name="source" channel="inline" format="text/cybol-path" model=".domain.choices.(#name)"/> </node> <node name="overwrite_calendar_week" channel="inline" format="modify/overwrite" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".wui.index.body.navigation.table.row.week"/> <node name="source" channel="inline" format="text/cybol-path" model=".domain.calendar.(.var.year_string).(.var.week_string)"/> </node> <node name="overwrite_href" channel="inline" format="modify/overwrite" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".wui.index.body.lecturers.table.(#name).(#day).link:href"/> <node name="source" channel="inline" format="text/cybol-path" model="#href"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination part.
sourcetruetext/cybol-pathThe source part.
movefalsetext/cybol-path | logicvalue/booleanThe flag indicating whether or not to remove source elements after having been copied. If null, the default is false (deep copying). When deep copying elements (false), their whole sub tree gets cloned. With shallow copying (true), the element content does not get duplicated and only the memory pointers to the elements get copied and afterwards removed from the source container.
countfalsetext/cybol-path | number/integerThe number of elements to be copied. If null, the default is the source part model count.
destination_indexfalsetext/cybol-path | number/integerThe destination index from which to start copying elements to. If null, the default is zero.
source_indexfalsetext/cybol-path | number/integerThe source index from which to start copying elements from. If null, the default is zero.
adjustfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether or not the destination count shall be adjusted (true) to destination_index plus count. If null, the default is true (destination count will be adjusted). If false, the destination count remains as is and only gets extended, if the number of elements exceeds the destination count, in order to avoid memory errors caused by crossing array boundaries. Not adjusting the destination count makes sense for instance when overwriting only a few words in the middle of some text, in order to leave the trailing text untouched and the text length altogether as is.
destination_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as destination. If null, the default is false (model).
source_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as source. If null, the default is false (model).

modify/remove

Description

Removes count elements from the destination part.

Examples

<node name="remove" channel="inline" format="modify/remove" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".summand"/> <node name="count" channel="inline" format="number/integer" model="1"/> <node name="destination_properties" channel="inline" format="logicvalue/boolean" model="false"/> </node> <node name="remove_node" channel="inline" format="modify/remove" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".db.remain"/> <node name="destination_index" channel="inline" format="text/cybol-path" model="#remain_index"/> <node name="count" channel="inline" format="number/integer" model="1"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination part.
counttruetext/cybol-path | number/integerThe number of elements to be removed. If null, the default is zero.
destination_indexfalsetext/cybol-path | number/integerThe destination index from which to start removing elements. If null, the default is zero.
adjustfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether or not the destination count shall be adjusted (true) to destination_index plus count. If null, the default is true (destination count will be adjusted). If false, the destination count remains as is and only gets extended, if the number of elements exceeds the destination count, in order to avoid memory errors caused by crossing array boundaries. Not adjusting the destination count makes sense for instance when overwriting only a few words in the middle of some text, in order to leave the trailing text untouched and the text length altogether as is.
destination_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as destination. If null, the default is false (model).

modify/repeat

Description

Writes the source repeatedly into the destination. The "number" property determines the number of times the source gets repeated. Caution! The "number" property must not be named or mixed up with "count", since the latter is used as container count and gets initialised with the source count. Caution! This operation is applicable to text only (character string). Caution! Even though the operations "modify/fill" and "modify/repeat" both copy a source element multiple times, there are differences between them. "modify/fill": - works with any element type - does not change the size of the destination container - overwrites existing elements until container is filled - can copy only one element (source count of one) "modify/repeat": - works only with text (character string) - adjusts the size of the destination container (grows or shrinks) - overwrites existing elements and may exceed the current destination container - can copy an element sequence (source count greater or equal to one)

Examples

<node name="initialise_with_plain_text" channel="inline" format="modify/repeat" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".string"/> <node name="source" channel="inline" format="text/plain" model="-"/> <node name="repetition" channel="inline" format="number/integer" model="8"/> </node> <node name="initialise_with_text_variable" channel="inline" format="modify/repeat" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".string"/> <node name="source" channel="inline" format="text/cybol-path" model=".text"/> <node name="repetition" channel="inline" format="number/integer" model="2"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination part.
sourcetruetext/cybol-pathThe source part.
repetitiontruetext/cybol-path | number/integerThe number of times the source gets repeated. If null, the default is zero.
destination_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as destination. If null, the default is false (model).
source_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as source. If null, the default is false (model).

modify/replace

Description

Replaces the searchterm character sequence within the destination by the source sequence as replacement. Caution! This operation is applicable to text only (character string).

Examples

<node name="replace_letters" channel="inline" format="modify/replace" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".text"/> <node name="source" channel="inline" format="text/plain" model="alphabet"/> <node name="searchterm" channel="inline" format="text/plain" model="abc"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination part.
sourcetruetext/cybol-path | text/plainThe source part. It is used as replacement sequence.
searchtermtruetext/cybol-path | text/plainThe character sequence to be searched and replaced.
destination_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as destination. If null, the default is false (model).
source_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as source. If null, the default is false (model).

modify/reverse

Description

Reverses the order of elements in the destination part. Caution! This operation is applicable to text only (character string).

Examples

<node name="reverse_text" channel="inline" format="modify/reverse" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".text"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination part.
destination_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as destination. If null, the default is false (model).

modify/strip

Description

Removes leading and trailing whitespaces. Some programming languages and frameworks use the synonym name "trim" instead of "strip". Other than "modify/normalise" this operation does not replace internal sequences of whitespace. The source and destination are permitted to point to the same part since the source gets buffered internally during processing. Caution! This operation is applicable to text only (character string). The considered whitespace characters are taken from the JSON specification: https://www.json.org/ They are: - empty: "" - space: 0020 - line feed: 000A - carriage return: 000D - character tabulation: 0009 The first (empty) can obviously not be considered and is just ignored.

Examples

<node name="strip_plain_text" channel="inline" format="modify/strip" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/plain" model=" Some text with leading and trailing spaces "/> </node> <node name="strip_text_variable" channel="inline" format="modify/strip" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/cybol-path" model=".text"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination part.
sourcetruetext/cybol-pathThe source part.
destination_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as destination. If null, the default is false (model).
source_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as source. If null, the default is false (model).

modify/strip-leading

Description

Removes leading whitespaces. Some programming languages and frameworks use the synonym name "trim" instead of "strip". Other than "modify/strip" this operation does not replace trailing whitespaces. The source and destination are permitted to point to the same part since the source gets buffered internally during processing. Caution! This operation is applicable to text only (character string). The considered whitespace characters are taken from the JSON specification: https://www.json.org/ They are: - empty: "" - space: 0020 - line feed: 000A - carriage return: 000D - character tabulation: 0009 The first (empty) can obviously not be considered and is just ignored.

Examples

<node name="strip_plain_text" channel="inline" format="modify/strip-leading" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/plain" model=" Some text with leading spaces"/> </node> <node name="strip_text_variable" channel="inline" format="modify/strip-leading" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/cybol-path" model=".text"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination part.
sourcetruetext/cybol-pathThe source part.
destination_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as destination. If null, the default is false (model).
source_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as source. If null, the default is false (model).

modify/strip-trailing

Description

Removes trailing whitespaces. Some programming languages and frameworks use the synonym name "trim" instead of "strip". Other than "modify/strip" this operation does not replace leading whitespaces. The source and destination are permitted to point to the same part since the source gets buffered internally during processing. Caution! This operation is applicable to text only (character string). The considered whitespace characters are taken from the JSON specification: https://www.json.org/ They are: - empty: "" - space: 0020 - line feed: 000A - carriage return: 000D - character tabulation: 0009 The first (empty) can obviously not be considered and is just ignored.

Examples

<node name="strip_plain_text" channel="inline" format="modify/strip-trailing" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/plain" model="Some text with leading and trailing spaces "/> </node> <node name="strip_text_variable" channel="inline" format="modify/strip-trailing" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/cybol-path" model=".text"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination part.
sourcetruetext/cybol-pathThe source part.
destination_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as destination. If null, the default is false (model).
source_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as source. If null, the default is false (model).

modify/upper

Description

Converts the source string into upper case letters stored in the destination. The source and destination are permitted to point to the same part since the source gets buffered internally during processing. Caution! This operation is applicable to text only (string of characters). Caution! The destination length may differ from the source length since not all characters can be converted 1:1. The German "small letter sharp s" for example gets converted into the two capital letters "SS". Further reading: https://www.unicode.org/reports/tr21/tr21-5.html

Examples

<node name="convert_plain_text" channel="inline" format="modify/upper" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/plain" model="Mein kleiner grüner Kaktus"/> </node> <node name="convert_text_variable" channel="inline" format="modify/upper" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/cybol-path" model=".text"/> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe destination part.
sourcetruetext/cybol-pathThe source part.
destination_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as destination. If null, the default is false (model).
source_propertiesfalsetext/cybol-path | logicvalue/booleanThe flag indicating whether to use the model or properties container as source. If null, the default is false (model).

represent/deserialise

Description

Deserialises the source into the destination, according to the given format. Caution! The deserialised data are appended to the destination. Already existing content is not overwritten. Therefore, the destination possibly has to get emptied before since otherwise, the new data will get appended to the already existing old data. This operation may be used to split a source string into parts which are stored as child nodes of the destination part.

Examples

<node name="deserialise_operand" channel="inline" format="represent/deserialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".summand"/> <node name="source" channel="inline" format="text/cybol-path" model=".text"/> <node name="language" channel="inline" format="meta/language" model="text/cybol"/> <node name="format" channel="inline" format="meta/format" model="number/integer"/> </node> <node name="deserialise_number" channel="inline" format="represent/deserialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/plain" model="2.4e-2"/> <node name="language" channel="inline" format="meta/language" model="text/cybol"/> <node name="format" channel="inline" format="meta/format" model="number/float"/> </node> <node name="deserialise_comma_separated_data" channel="inline" format="represent/deserialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/cybol-path" model=".string"/> <node name="language" channel="inline" format="meta/language" model="text/joined-string"> <node name="delimiter" channel="inline" format="text/plain" model=","/> </node> </node> <node name="deserialise_string_taken_from_file" channel="inline" format="represent/deserialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="file" format="text/plain" model="path/string.txt"/> <node name="language" channel="inline" format="meta/language" model="text/joined-string"> <node name="delimiter" channel="inline" format="text/plain" model=","/> </node> </node> <node name="deserialise_inline_data" channel="inline" format="represent/deserialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/plain" model="1;2;3;word;01/07/2022;text"/> <node name="language" channel="inline" format="meta/language" model="text/joined-string"> <node name="delimiter" channel="inline" format="text/plain" model=";"/> </node> </node> <node name="deserialise_quoted_data_doubled_as_escape" channel="inline" format="represent/deserialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/plain" model="&#x22;begin&#x22;,01/07/2022,&#x22;some &#x22;&#x22;quoted&#x22;&#x22; text&#x22;"/> <node name="language" channel="inline" format="meta/language" model="text/joined-string"> <node name="delimiter" channel="inline" format="text/plain" model=","/> <node name="quotation" channel="inline" format="text/plain" model="&#x22;"/> </node> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe node into which the deserialised data are written. Its format (type) depends on the given source data.
sourcetruetext/cybol-path | text/plainThe data to be deserialised.
languagetruemeta/languageThe language used for deserialisation.
formatfalsemeta/formatThe format (type) of the source node.

Constraints (language_constraints)

NameRequiredFormatDescription
decimal_separatorfalsetext/plainThe symbol (or character sequence) used to separate the integer part from the fractional part of a floating point (decimal) number.
thousands_separatorfalsetext/plainThe symbol (or character sequence) used for digit grouping.
delimiterfalsetext/plainThe separator between the single fields (values). It may consist of many characters, but also be a simple comma, for example. Used with joined strings or character (comma) separated values (csv).
quotationfalsetext/plainThe marker sequence used at the beginning and end of string fields (values). It may consist of many characters. Quotation is necessary if the delimiter character is part of the value. If the quotation is to be part of the value, then it has to be escaped by writing it twice (doubled). Used with joined strings or character (comma) separated values (csv).
headerfalselogicvalue/booleanThe flag indicating whether or not the source data contain a header, so that the deserialiser can treat the first line differently. Used with character (comma) separated values (csv). Caution! It should not be mixed up with the headermodel property in represent/serialise.
normalisationfalselogicvalue/booleanThe flag indicating whether or not whitespaces and line breaks are merged into just one space. Used with xml or html, for example. If null, then the default is true (normalisation enabled).
maximumfalsenumber/integerThe maximum number of bytes to be transmitted. Used with serial (port) interface.
minimumfalsenumber/integerThe minimum number of bytes to be transmitted. Used with serial (port) interface.
mediumfalsetext/cybol-pathThe window to which the mouse button or keyboard key refers. It is needed to search through the hierarchy of gui elements via mouse coordinates, for a suitable action. Used with graphical user interface (gui).

represent/serialise

Description

Serialises the source into the destination, according to the given format. Caution! The serialised data are appended to the destination. Already existing content is not overwritten. Therefore, the destination possibly has to get emptied before since otherwise, the new data will get appended to the already existing old data. This operation may be used to concatenate the strings given as child nodes of the source part into the destination part and provide an optional cybol property "separator" to be used as such between the concatenated strings.

Examples

<node name="serialise_number" channel="inline" format="represent/serialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="number/integer" model="24"/> <node name="language" channel="inline" format="meta/language" model="text/cybol"/> <node name="format" channel="inline" format="meta/format" model="number/integer"/> </node> <node name="serialise_week_given_as_path" channel="inline" format="represent/serialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".week_as_string"/> <node name="source" channel="inline" format="text/cybol-path" model=".week"/> <node name="language" channel="inline" format="meta/language" model="text/cybol"/> <node name="format" channel="inline" format="meta/format" model="number/integer"/> </node> <node name="serialise_webpage" channel="inline" format="represent/serialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".webpage"/> <node name="source" channel="inline" format="text/cybol-path" model=".wui.index"/> <node name="language" channel="inline" format="meta/language" model="text/html"> <node name="indentation" channel="inline" format="logicvalue/boolean" model="true"/> </node> <node name="format" channel="inline" format="meta/format" model="element/part"/> </node> <node name="serialise_comma_separated_data" channel="inline" format="represent/serialise" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".result"/> <node name="source" channel="inline" format="text/cybol-path" model=".string_node_list"/> <node name="language" channel="inline" format="meta/language" model="text/joined-string"> <node name="delimiter" channel="inline" format="text/plain" model=","/> <node name="quotation" channel="inline" format="text/plain" model="&#x22;"/> </node> </node>

Properties

NameRequiredFormatDescription
destinationtruetext/cybol-pathThe node into which the serialised data are written. Its format (type) depends on the given source data.
sourcetruetext/cybol-path | text/plain | number/anyThe data to be serialised.
languagetruemeta/languageThe language used for serialisation.
formatfalsemeta/formatThe format (type) of the source node.

Constraints (language_constraints)

NameRequiredFormatDescription
signfalselogicvalue/booleanThe flag indicating whether or not a plus sign is to be displayed for positive numbers. Negative numbers have a minus sign in any case. If null, the default is false (no plus sign for positive numbers).
basefalsenumber/integerThe number base for example 2 for binary (dual), 8 for octal, 10 for decimal, 16 for hexadecimal. If null, the default is 10 (decimal number base).
classicoctalfalselogicvalue/booleanThe flag indicating whether or not the octal number base prefix is to be displayed as 0 as in classic c/c++ or using modern style 0o as in perl and python. If null, the default is false (modern style with prefix 0o).
groupingfalsetext/plainThe symbol or character sequence used for digit grouping in thousands. If null, the default is not to use any thousands separator at all.
separatorfalsetext/plainThe symbol or character sequence used to separate the integer part from the fractional part of a floating point decimal number. If null, the default is to use the full stop (dot).
decimalsfalsenumber/integerThe number of post-point decimal places (decimals). If null, the default is 4.
scientificfalselogicvalue/booleanThe flag indicating whether or not the decimal fraction gets displayed with mantissa and exponent. If null, the default is false (standard representation without exponent).
polarfalselogicvalue/booleanThe flag indicating whether or not to write the complex number using polar coordinates. If null, the default is false (using the cartesian form).
newlinefalselogicvalue/booleanThe flag indicating whether or not a line break is added at the end of the printed characters. If null, the default is true (line gets broken). Used with text (pseudo) terminal.
clearfalselogicvalue/booleanThe flag indicating whether or not the terminal screen is cleared before printing characters on it. If null, the default is false (no clearing). Used with text (pseudo) terminal.
positioningfalselogicvalue/booleanThe flag indicating whether or not the cursor position may get changed. If null, the default is false (no repositioning). Used with text (pseudo) terminal.
indentationfalselogicvalue/booleanThe flag indicating whether or not the serialised data get beautified (pretty-formatted) by indenting the single lines depending on the hierarchy level. Used with xml or html, for example.
delimiterfalsetext/plainThe separator between the single fields (values). It may consist of many characters, but also be a simple comma, for example. Used with joined strings or character (comma) separated values (csv).
quotationfalsetext/plainThe marker sequence used at the beginning and end of string fields (values). It may consist of many characters. Quotation is necessary if the delimiter character is part of the value. If the quotation is to be part of the value, then it has to be escaped by writing it twice (doubled). Used with joined strings or character (comma) separated values (csv).
normalisationfalselogicvalue/booleanThe flag indicating whether or not whitespaces and line breaks are merged into just one space. Used with xml or html, for example. If null, then the default is true (normalisation enabled).
widthfalsenumber/integerThe number of characters (or digits) belonging to a value. Free places get filled up with the character given in the fill property. This was defined in the original specification of character (comma) separated values (csv), in order to have fields (values) with equal width. Used with joined strings or csv.
fillfalsetext/plainThe characters (or digit) to be used to fill free places in a value whose width is greater.
headermodelfalsetext/cybol-pathThe header data to be written as first line, yet before the actual content. Used with character (comma) separated values (csv). Caution! It should not be mixed up with the header property flag in represent/deserialise or communicate/receive.

stream/read

Description

Reads data from a device. Reading indirectly from device into the internal buffer does not make sense for channel "file". Therefore, do not set the "asynchronicity" flag in this case.

Examples

<node name="read_from_file" channel="inline" format="stream/read" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="sender" channel="inline" format="text/cybol-path" model=".id"/> <node name="message" channel="inline" format="text/cybol-path" model=".data"/> </node>

Properties

NameRequiredFormatDescription
channeltruetext/cybol-path | meta/channelThe communication channel.
serverfalsetext/cybol-path | logicvalue/booleanThe flag indicating server mode. It means server-side client stub and not standalone client. If null, the default is false (client mode).
portfalsetext/cybol-path | number/integerThe service identification. It is relevant only in server mode.
sendertruetext/cybol-pathThe device identification, for example a file descriptor. Handing it over as hard-coded integer value does not make sense, since the operating system or server assigns it. Therefore, state a cybol-path.
languagefalsetext/cybol-path | meta/languageThe language defining which prefix or suffix indicates the message length, for example binary-crlf, http-request, xdt. It is not needed for file reading since that ends with EOF.
messagetruetext/cybol-pathThe knowledge tree node storing the received data.
asynchronicityfalsetext/cybol-path | logicvalue/booleanThe flag indicating asynchronous reading from buffer in which data got stored by a sensing thread before. If null, the default is false (synchronous read).

stream/write

Description

Writes data to a device.

Examples

<node name="write_to_file" channel="inline" format="stream/write" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".id"/> <node name="message" channel="inline" format="text/ascii" model="Hello World!"/> <node name="asynchronicity" channel="inline" format="logicvalue/boolean" model="true"/> </node> <node name="write_to_pipeline" channel="inline" format="stream/write" model=""> <node name="channel" channel="inline" format="meta/channel" model="fifo"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".id"/> <node name="message" channel="inline" format="text/ascii" model="Hello World!"/> </node>

Properties

NameRequiredFormatDescription
channeltruetext/cybol-path | meta/channelThe communication channel.
serverfalsetext/cybol-path | logicvalue/booleanThe flag indicating server mode. It means server-side client stub and not standalone client. If null, the default is false (client mode).
portfalsetext/cybol-path | number/integerThe service identification. It is relevant only in server mode.
receivertruetext/cybol-pathThe device identification, for example a file descriptor. Handing it over as hard-coded integer value does not make sense, since the operating system or server assigns it. Therefore, state a cybol-path.
messagetruetext/cybol-path | text/ascii | anyThe data to be written.
asynchronicityfalsetext/cybol-path | logicvalue/booleanThe flag indicating asynchronous writing within a thread. If null, the default is false (synchronous write).
handlerfalsetext/cybol-pathThe callback cybol operation being executed when the thread finished writing data.

application/json

Description

Text data given in JavaScript Object Notation (JSON). There are three MIME assignments for json data: - application/json (official) - text/json (unofficial) - text/javascript (unofficial) Preference should be given to the OFFICIAL mime type "application/json".

Examples

<node name="data" channel="file" format="application/json" model="path/to/file.json"/>

application/xml

Description

Data given in XML format. The Extensible Markup Language (XML) version 1.0 was defined in 1998. Its structure and vocabulary can be defined freely, either as Document Type Definition (DTD) or as XML Schema Definition (XSD). If given in form of a file, then the suffix is xml in case no DTD or XSD is available. Otherwise, a suffix representing the DTD or XSD may be used. There are two MIME assignments for XML data: - application/xml (RFC 7303, previously RFC 3023) - text/xml (RFC 7303, previously RFC 3023) However, since the introduction of RFC 7303, these are to be regarded as the SAME in ALL aspects except name.

Examples

<node name="document" channel="file" format="application/xml" model="path/to/file.xml"/>

colour/rgb

Description

A colour whose values are given in the RGB colour model. The abbreviation RGB refers to the three colours: red, green, and blue.

Examples

<node name="value" channel="inline" format="colour/rgb" model="82,135,206"/>

colour/terminal

Description

A terminal colour value as written word representing the pre-defined colour name.

Examples

<node name="foreground" channel="inline" format="colour/terminal" model="blue"/> <node name="background" channel="inline" format="colour/terminal" model="white"/>

element/part

Description

A PART node of the cyboi-internal knowledge tree. Each tree node (also called part) has a DOUBLE hierarchy representing: - model hierarchy: whole-part, container-element, macrocosm-microcosm, child parts - properties hierarchy: metadata, constraints, for example parametres of a function or the size of a graphical window

Examples

<node name="empty_part_to_be_created" channel="inline" format="element/part" model=""/> <node name="part_read_from_file" channel="file" format="element/part" model="path/to/file.cybol"/>

element/property

Description

A PROPERTY node of the cyboi-internal knowledge tree. Each tree node (also called part) has a DOUBLE hierarchy representing: - model hierarchy: whole-part, container-element, macrocosm-microcosm, child parts - properties hierarchy: metadata, constraints, for example parametres of a function or the size of a graphical window

Examples

<node name="empty_property_to_be_created" channel="inline" format="element/property" model=""/> <node name="property_read_from_file" channel="file" format="element/property" model="path/to/file.cybol"/>

image/gif

Description

An image in Graphics Interchange Format (GIF). The file suffix is gif.

Examples

<node name="data" channel="file" format="image/gif" model="path/to/file.gif"/>

image/jpeg

Description

An image format defined by the Joint Photographic Experts Group (JPEG). The format itself is called JPEG as well. Data are normally stored in JPEG File Interchange Format (JFIF). Possible file suffixes are: jpeg, jpg, jpe, jfif, jif.

Examples

<node name="data" channel="file" format="image/jpeg" model="path/to/file.jpeg"/>

image/png

Description

An image in Portable Network Graphics (PNG) format. The file suffix is png.

Examples

<node name="data" channel="file" format="image/png" model="path/to/file.png"/>

logicvalue/boolean

Description

A boolean logic variable represents one of two possible states, either true or false. Sometimes, a boolean value is called a flag.

Examples

<node name="value" channel="inline" format="logicvalue/boolean" model="true"/>

meta/channel

Description

The channel over which the data is sent or received. It is normally used when reading or writing a file or transfering data. The available channels are: - clock: The system clock. - display: The graphical display. - fifo: A named pipeline represented as file in linux/unix. The abbreviation FIFO stands for first-in-first-out, following the principle of a data queue. - file: A file within the file system. - inline: A literal text within cybol. - pipe: An anonymous pipeline between two processes. - randomiser: The pseudo random number generator of the operating system. - serial: A serial device using communication protocols such as RS-232 or USB. - signal: A cyboi interpreter-internal signal sent to the event loop. - socket: The network socket. - terminal: The terminal or pseudo terminal (console).

Examples

<node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="channel" channel="inline" format="meta/channel" model="socket"/> <node name="channel" channel="inline" format="meta/channel" model="inline"/>

meta/encoding

Description

The text encoding. It is normally used when reading or writing a file or transfering data.

Examples

<node name="encoding" channel="inline" format="meta/encoding" model="utf-8"/>

meta/format

Description

The format in which the data is available. It is normally used when reading or writing a file or transfering data.

Examples

<node name="format" channel="inline" format="meta/format" model="text/plain"/> <node name="format" channel="inline" format="meta/format" model="number/integer"/> <node name="initialise_choice_part" channel="inline" format="communicate/receive" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="sender" channel="inline" format="text/cybol-path" model=".id"/> <node name="encoding" channel="inline" format="meta/encoding" model="utf-8"/> <node name="language" channel="inline" format="meta/language" model="text/cybol"/> <node name="format" channel="inline" format="meta/format" model="element/part"/> <node name="message" channel="inline" format="text/cybol-path" model=".wui.index.body.choices.table.(#name)"/> </node> <node name="initialise_choice_properties" channel="inline" format="communicate/receive" model=""> <node name="channel" channel="inline" format="meta/channel" model="file"/> <node name="sender" channel="inline" format="text/cybol-path" model=".id"/> <node name="encoding" channel="inline" format="meta/encoding" model="utf-8"/> <node name="language" channel="inline" format="meta/language" model="text/cybol"/> <node name="format" channel="inline" format="meta/format" model="element/property"/> <node name="message" channel="inline" format="text/cybol-path" model=".wui.index.body.choices.table.(#name)"/> </node>

meta/language

Description

The language also called data format in which the data are structured. It is normally used when reading or writing a file or transfering data.

Examples

<node name="language" channel="inline" format="meta/language" model="text/cybol"/> <node name="language" channel="inline" format="meta/language" model="text/html"/>

meta/model

Description

The cyboi-internal data model holding the actual data.

Examples

<node name="model" channel="inline" format="meta/model" model=""/>

meta/name

Description

The name of the part tree node.

Examples

<node name="name" channel="inline" format="meta/name" model=""/>

meta/type

Description

The cyboi-internal data type used to allocate memory.

Examples

<node name="type" channel="inline" format="meta/type" model=""/>

number/byte

Description

An integer with a size of just one byte. The standard type used internally is unsigned char with 8 Bits. It has a value range from 0 to 255. Caution! It is not to be mixed up with "text/ascii" representing a text string of characters. Numbers in an array are separated by comma; text characters of a string are not.

Examples

<node name="x" channel="inline" format="number/byte" model="0"/> <node name="y" channel="inline" format="number/byte" model="2"/> <node name="array" channel="inline" format="number/byte" model="0,1,2,3,4"/>

number/complex-cartesian

Description

A complex number written in cartesian form as real and imaginary part, separated by a (plus or minus) sign. Each number can be an element of a vector (array), e.g.: - complex cartesian: 1.2e+3+0.4e-2,2-4 Caution! The i (or j in electrical engineering) in the imaginary part is neglected: 1+2i is 1+2 Caution! Using fractions for real and imaginary part of a complex number is not supported, e.g. -1/2+3/4 The complex number given in cartesian form: 2 + 3i which can also be written using a j instead of i: 2 + 3j would be written in CYBOL as: 2+3

Examples

<node name="standard" channel="inline" format="number/complex-cartesian" model="2+4"/> <node name="negative_imaginary_part" channel="inline" format="number/complex-cartesian" model="2-4"/> <node name="negative_real_part" channel="inline" format="number/complex-cartesian" model="-2+4"/> <node name="both_parts_negative" channel="inline" format="number/complex-cartesian" model="-2-4"/> <node name="decimal_fractions" channel="inline" format="number/complex-cartesian" model="-1.2+5.0"/> <node name="scientific_notation" channel="inline" format="number/complex-cartesian" model="-1.2e6+.11e2"/>

number/complex-polar

Description

A complex number written in polar form with absolute value and argument, whereby the argument representing an exponent is encapsulated by the sequence "exp()". Caution! The i (or j in electrical engineering) in the exponent is neglected, so that -2*exp(i45) is written without i or j as -2*exp(45) in cybol. The complex number given in trigonometric form: 2 (cos 30° + i sin 30°) which can also be written in exponential form, using Euler's formula: 2 e ^(i 30) would be written in CYBOL as: 2*exp(30) -2*exp(-45)

Examples

<node name="standard" channel="inline" format="number/complex-polar" model="2*exp(45)"/> <node name="plus_sign" channel="inline" format="number/complex-polar" model="+2*exp(+45)"/> <node name="minus_sign" channel="inline" format="number/complex-polar" model="-2*exp(-45)"/> <node name="decimal_fraction_value" channel="inline" format="number/complex-polar" model="-1.5*exp(45)"/> <node name="decimal_fraction_argument" channel="inline" format="number/complex-polar" model="2*exp(-45.2)"/> <node name="scientific_notation" channel="inline" format="number/complex-polar" model="-1.5e4*exp(-45)"/>

number/fraction-decimal

Description

A decimal fraction number written as floating-point number. The standard type used internally is double with 64 Bits. It has a value range from 2^−1022 to approximately 2^1024, which is from 2 × 10^−308 to 2 × 10^308. Each number can be an element of a vector (array), e.g.: - fraction decimal: 1.2,3.4,5.6 Caution! The cybol parser is able to recognise many variants, with small or capital letter E, with or without plus sign, as shown in the examples below. However, the recommended form is as follows: 1.23E+4 The plus sign of the number is optional. The plus sign of the scientific notation exponent is optional.

Examples

<node name="simple" channel="inline" format="number/fraction-decimal" model="24.0"/> <node name="negative_sign" channel="inline" format="number/fraction-decimal" model="-24.0"/> <node name="standard" channel="inline" format="number/fraction-decimal" model="7.0"/> <node name="extra" channel="inline" format="number/fraction-decimal" model="123.45697"/> <node name="lacking_decimal_places" channel="inline" format="number/fraction-decimal" model="7."/> <node name="lacking_pre-decimal_point_position" channel="inline" format="number/fraction-decimal" model=".7"/> <node name="array" channel="inline" format="number/fraction-decimal" model="1.5,2.5,3.5"/> <node name="scientific" channel="inline" format="number/fraction-decimal" model="7e3"/> <node name="optional_plus_sign" channel="inline" format="number/fraction-decimal" model="7e+3"/> <node name="minus_sign" channel="inline" format="number/fraction-decimal" model="7e-3"/> <node name="capital_letter_possible" channel="inline" format="number/fraction-decimal" model="7E-3"/> <node name="scientific_notation_1" channel="inline" format="number/fraction-decimal" model="11e0"/> <node name="scientific_notation_2" channel="inline" format="number/fraction-decimal" model=".11e2"/> <node name="scientific_notation_3" channel="inline" format="number/fraction-decimal" model="0.007e-2"/> <node name="scientific_notation_4" channel="inline" format="number/fraction-decimal" model="0.7e-2"/> <node name="scientific_notation_5" channel="inline" format="number/fraction-decimal" model="7.0e-3"/> <node name="longer_number" channel="inline" format="number/fraction-decimal" model="-12.34567e-2"/>

number/fraction-vulgar

Description

A fraction number written as numerator and denominator, separated by a bar (solidus, slash). Each number can be an element of a vector (array), e.g.: - fraction vulgar: 1/2,3/4

Examples

<node name="positive" channel="inline" format="number/fraction-vulgar" model="1/2"/> <node name="negative" channel="inline" format="number/fraction-vulgar" model="-2/3"/>

number/integer

Description

An integer is a datum of integral data type, a data type that represents some range of mathematical integers. It is allowed to contain negative values. The standard type used internally is int with 32 Bits. It has a value range from −2,147,483,648 to 2,147,483,647, which is from −(2^31) to 2^31 - 1. Each number can be an element of a vector (array), e.g.: - integer: 1,2,3,4

Examples

<node name="decimal_base" channel="inline" format="number/integer" model="24"/> <node name="negative" channel="inline" format="number/integer" model="-24"/> <node name="array" channel="inline" format="number/integer" model="0,1,2,3,4"/> <!-- These numbers will get recognised only if the consider number base prefix flag is set. --> <node name="octal" channel="inline" format="number/integer" model="030"/> <node name="many_zeros" channel="inline" format="number/integer" model="00030"/> <node name="negative_octal" channel="inline" format="number/integer" model="-030"/> <node name="hexadecimal" channel="inline" format="number/integer" model="0x18"/> <node name="negative_hexadecimal" channel="inline" format="number/integer" model="-0x18"/> <node name="hexadecimal_small_letter" channel="inline" format="number/integer" model="0xb"/> <node name="hexadecimal_capital_letter" channel="inline" format="number/integer" model="0x1C"/>

text/ascii

Description

This is pure text data, sometimes called "string" or "character array". Caution! Use it only when single byte characters are required, for example with binary data representing an image. When working with pure text, the format "text/plain" should be used instead, since it uses multibyte characters and allows internationalisation and the usage of unicode. Caution! Do not mix it up with "number/byte" representing numbers in the range 0..255. Numbers in an array are separated by comma; text characters of a string are not.

Examples

<node name="image" channel="inline" format="text/ascii" model=""/> <node name="text" channel="file" format="text/ascii" model="path/to/file.txt"/>

text/cybol-path

Description

A path to a node within the knowledge tree (heap memory). It may point to: - heap memory (knowledge memory tree) root . - stack memory root # - signal memory root | - model part using separator . - property part using separator : - part via index using brackets [] - part via name using parentheses () - part via referenced path using curly braces {} - stack memory variable #

Examples

<node name="stack_root" channel="inline" format="text/cybol-path" model="#"/> <node name="stack_variable" channel="inline" format="text/cybol-path" model="#x"/> <node name="part" channel="inline" format="text/cybol-path" model=".a"/> <node name="sub_part" channel="inline" format="text/cybol-path" model=".b.a"/> <node name="property" channel="inline" format="text/cybol-path" model=".b:a"/> <node name="part_by_index" channel="inline" format="text/cybol-path" model=".b.[#x]"/> <node name="part_and_property_by_index" channel="inline" format="text/cybol-path" model=".b.[.b:[.d]]"/> <node name="part_by_name" channel="inline" format="text/cybol-path" model=".(.e)"/> <node name="part_by_nested_name" channel="inline" format="text/cybol-path" model=".(.(.e)).d:p"/> <node name="node_contains_path_called_reference" channel="inline" format="text/cybol-path" model="{#path}"/> <node name="part_by_reference_and_its_child_node" channel="inline" format="text/cybol-path" model="{#path}.child"/> <node name="double_reference_path_to_path_to_part" channel="inline" format="text/cybol-path" model="{{#path}}"/> <node name="part_via_reference_and_name" channel="inline" format="text/cybol-path" model=".b.d:({#path})"/> <node name="nested_path" channel="inline" format="text/cybol-path" model=".test.node2:c.node1:b"/> <node name="assign_row" channel="inline" format="modify/overwrite" model=""> <node name="destination" channel="inline" format="text/cybol-path" model="#row"/> <node name="source" channel="inline" format="text/plain" model="#row_heading"/> </node> <node name="overwrite_path" channel="inline" format="modify/overwrite" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".var.path"/> <node name="source" channel="inline" format="text/cybol-path" model=".tui.(.tui.active):actions"/> </node> <node name="focus_background" channel="inline" format="modify/overwrite" model=""> <node name="destination" channel="inline" format="text/cybol-path" model="{.var.character}"/> <node name="source" channel="inline" format="text/cybol-path" model=".settings.selection.background"/> </node> <node name="overwrite_calendar_week" channel="inline" format="modify/overwrite" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".wui.index.body.navigation.table.row.week"/> <node name="source" channel="inline" format="text/cybol-path" model=".domain.calendar.(.var.year_string).(.var.week_string)"/> </node> <node name="assign_title" channel="inline" format="modify/append" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".wui.(#destination).(.db.(#source).[#index].genre).content.(#name)"/> <node name="source" channel="inline" format="text/cybol-path" model=".db.(#source).[#index].title"/> </node> <node name="overwrite_link_reference_with_project_name" channel="inline" format="modify/append" model=""> <node name="destination" channel="inline" format="text/cybol-path" model=".wui.(#category_name).body.toc.(#project_name):href"/> <node name="source" channel="inline" format="text/cybol-path" model="#project_name"/> </node> <node name="print_action" channel="inline" format="communicate/send" model=""> <node name="channel" channel="inline" format="meta/channel" model="terminal"/> <node name="receiver" channel="inline" format="text/cybol-path" model=".stdout"/> <node name="language" channel="inline" format="meta/language" model="message/tui"/> <node name="format" channel="inline" format="meta/format" model="text/plain"/> <node name="message" channel="inline" format="text/cybol-path" model="{.var.action_path}"/> </node>

text/html

Description

A text marked up using the Hypertext Markup Language (HTML). Common file suffixes are: html, htm, shtml, inc

Examples

<node name="webpage" channel="file" format="text/html" model="path/to/webpage.html"/>

text/json

Description

Text data given in JavaScript Object Notation (JSON). There are three MIME assignments for json data: - application/json (official) - text/json (unofficial) - text/javascript (unofficial) Preference should be given to the official mime type "application/json".

Examples

<node name="data" channel="file" format="text/json" model="path/to/file.json"/>

text/plain

Description

This is pure text data, sometimes called "string" or "character array". Common file suffixes are: txt The text may be encoded in various ways, which is specified in a different property called "encoding". It is usually given when using the cybol operations send or receive.

Examples

<node name="string" channel="inline" format="text/plain" model="Hello World!"/> <node name="text" channel="file" format="text/plain" model="path/to/file.txt"/>

text/xml

Description

Data given in XML format. The Extensible Markup Language (XML) version 1.0 was defined in 1998. Its structure and vocabulary can be defined freely, either as Document Type Definition (DTD) or as XML Schema Definition (XSD). Common file suffixes are: xml If given in form of a file, then the suffix is "xml" in case no DTD or XSD is available. Otherwise, another suffix representing the DTD or XSD may be used. There are two MIME assignments for XML data: - application/xml (RFC 7303, previously RFC 3023) - text/xml (RFC 7303, previously RFC 3023) However, since the introduction of RFC 7303, these are to be regarded as the same in all aspects except name.

Examples

<node name="data" channel="file" format="text/xml" model="path/to/file.xml"/>

video/mp4

Description

A video in MP4 format, which is defined in RFC 4337. The file suffix is mp4.

Examples

<node name="data" channel="file" format="video/mp4" model="path/to/file.mp4"/>