CYBOL API Specification Version 0.23.0

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.

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.

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=""/>

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 the model or properties branch is to be used 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.

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. ?? TODO: splitting a source string into parts which are stored as child nodes of the destination part Description: Deserialises the source- into 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="format" channel="inline" format="meta/format" model="number/integer"/> <node name="language" channel="inline" format="meta/language" model="text/cybol"/> </node>

Properties

NameRequiredFormatDescription
TODOfalsetext/cybol-pathTODO
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
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. ?? TODO: concatenating 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 Description: Serialises the source- into the destination part.

Examples

<node name="serialise_operand" channel="inline" format="represent/serialise" 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="format" channel="inline" format="meta/format" model="number/integer"/> <node name="language" channel="inline" format="meta/language" model="text/cybol"/> </node>

Properties

NameRequiredFormatDescription
TODOfalsetext/cybol-pathTODO
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
newlinefalselogicvalue/booleanThe flag indicating whether or not a line break is added at the end of the printed characters. Used with text (pseudo) terminal.
clearfalselogicvalue/booleanThe flag indicating whether or not the terminal screen is cleared before printing characters on it. 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.

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.

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"/>

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 --&#x003E; 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, separated by a (plus or minus) sign. CAUTION! The i (or j in electrical engineering) in the exponent is NEGLECTED: -2*exp(i45) --&#x003E; -2*exp(45) 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) CAUTION! The cybol parser is able to recognise many variants, with sequence exp or capital letter E, with or without times sign, as shown in the examples below. However, the RECOMMENDED FORM is as follows: -2*exp(-45)

Examples

<node name="standard" channel="inline" format="number/complex-polar" model="-2*exp(-45)"/> <node name="with_capital_letter_e" channel="inline" format="number/complex-polar" model="-2*E(-45)"/> <node name="without_times_sign_1" channel="inline" format="number/complex-polar" model="-2exp(-45)"/> <node name="without_times_sign_2" channel="inline" format="number/complex-polar" model="-2E(-45)"/> <node name="decimal_fraction" channel="inline" format="number/complex-polar" model="-1.5*exp(-45)"/> <node name="scientific_notation" channel="inline" format="number/complex-polar" model="-1.5E4E(-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 MANDATORY.

Examples

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

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="simple" channel="inline" format="number/integer" model="24"/> <node name="positive" channel="inline" format="number/integer" model="+24"/> <node name="negative" channel="inline" format="number/integer" model="-24"/> <node name="octal" channel="inline" format="number/integer" model="-030"/> <node name="hexadecimal" channel="inline" format="number/integer" model="-0x18"/> <node name="array" channel="inline" format="number/integer" model="1,2,3,4"/>

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"/>

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. The file suffix is commonly 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). 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="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"/>