CYBOL Version 2013-05-16 API Specification
logic
access
count
Description
Count parts of a compound part.
Format
access/count
Example
Properties
name
|
description
|
required
|
format
|
model
|
get-channel (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
get-encoding (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
get-format (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
get-language (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
get-model (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
get-name
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
get-properties (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
get-reference (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
get-type (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
indicate-empty
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
indicate-exists
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
calculate
absolute
Description
Determine the absolute value of a number.
Format
calculate/absolute
Example
<part name="absolute" channel="inline" format="calculate/absolute" model="">
<property name="result" channel="inline" format="path/knowledge" model=".result"/>
<property name="operand" channel="inline" format="number/integer" model="1,2,3"/>
<property name="type" channel="inline" format="meta/type" model="number/integer"/>
</part>
Properties
name
|
description
|
required
|
format
|
model
|
result
|
The absolute value of the given number.
|
true
|
path/*
|
|
operand
|
... .
|
true
|
path/* | number/*
|
|
type
|
The number type. It has to be identical for all parametres.
|
true
|
path/* | meta/type
|
|
add
Description
Adds two numbers of the given format.
Format
calculate/add
Example
<part name="add" channel="inline" format="calculate/add" model="">
<property name="result" channel="inline" format="path/knowledge" model=".result"/>
<property name="operand" channel="inline" format="number/integer" model="1,2,"/>
<property name="type" channel="inline" format="meta/type" model="number/integer"/>
</part>
Properties
name
|
description
|
required
|
format
|
model
|
result
|
The sum resulting from the addition. It initially contains the first summand.
|
true
|
path/*
|
|
operand
|
The second summand for the addition.
|
true
|
path/* | number/*
|
|
type
|
The number type. It has to be identical for all parametres.
|
true
|
path/* | meta/type
|
|
divide
Description
Divides two numbers of the given format
Format
calculate/divide
Example
<part name="divide" channel="inline" format="calculate/divide" model="">
<property name="result" channel="inline" format="path/knowledge" model=".result"/>
<property name="operand" channel="inline" format="number/integer" model="1,2,3"/>
<property name="type" channel="inline" format="meta/type" model="number/integer"/>
</part>
Properties
name
|
description
|
required
|
format
|
model
|
result
|
The quotient resulting from the divison. It initially contains the dividend.
|
true
|
path/*
|
|
operand
|
The divisor for the division.
|
true
|
path/* | number/*
|
|
type
|
The number type. It has to be identical for all parametres.
|
true
|
path/* | meta/type
|
|
multiply
Description
Multiplies two numbers of the given format.
Format
calculate/multiply
Example
<part name="multiply" channel="inline" format="calculate/multiply" model="">
<property name="result" channel="inline" format="path/knowledge" model=".result"/>
<property name="operand" channel="inline" format="number/integer" model="1,2,3"/>
<property name="type" channel="inline" format="meta/type" model="number/integer"/>
</part>
Properties
name
|
description
|
required
|
format
|
model
|
result
|
The product resulting from the multiplication. It initially contains the first factor.
|
true
|
path/*
|
|
operand
|
The second factor for the multiplication.
|
true
|
path/* | number/*
|
|
type
|
The number type. It has to be identical for all parametres.
|
true
|
path/* | meta/type
|
|
negate
Description
Negates a given number.
Format
calculate/negate
Example
<part name="negate" channel="inline" format="calculate/negate" model="">
<property name="result" channel="inline" format="path/knowledge" model=".result"/>
<property name="operand" channel="inline" format="number/integer" model="1,2,3"/>
<property name="type" channel="inline" format="meta/type" model="number/integer"/>
</part>
Properties
name
|
description
|
required
|
format
|
model
|
result
|
The output resulting from the negation.
|
true
|
path/*
|
|
operand
|
The number which is to negate.
|
true
|
path/* | number/*
|
|
type
|
The number type. It has to be identical for all parametres.
|
true
|
path/* | meta/type
|
|
reduce (TODO)
Description
Not implemented yet.
Format
calculate/reduce
Example
Properties
name
|
description
|
required
|
format
|
model
|
remainder (TODO)
Description
Not implemented yet.
Format
calculate/remainder
Example
Properties
name
|
description
|
required
|
format
|
model
|
subtract
Description
Subtracts two numbers of the given format.
Format
calculate/subtract
Example
<part name="subtract" channel="inline" format="calculate/subtract" model="">
<property name="result" channel="inline" format="path/knowledge" model=".result"/>
<property name="operand" channel="inline" format="number/integer" model="1,2,3"/>
<property name="type" channel="inline" format="meta/type" model="number/integer"/>
</part>
Properties
name
|
description
|
required
|
format
|
model
|
result
|
The difference resulting from the subtraction. It initially contains the minuend.
|
true
|
path/*
|
|
operand
|
The subtrahend for the subtraction.
|
true
|
path/* | number/*
|
|
type
|
The number type. It has to be identical for all parametres.
|
true
|
path/* | meta/type
|
|
cast
byte
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
character
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
double
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
integer
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
communicate
receive
Description
Receives a message via the given channel.
Format
communicate/receive
Example
Properties
name
|
description
|
required
|
format
|
model
|
send
Description
Sends a message via the given channel.
Format
communicate/send
Example
Properties
name
|
description
|
required
|
format
|
model
|
compare
equal
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
greater
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
greater-or-equal
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
smaller
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
smaller-or-equal
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
unequal
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
convert
decode (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
encode (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
file
archive-file
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
copy-file
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
copy-file-unix-shell
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
copy-file-win32-command
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
list-directory-contents
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
flow
branch
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
loop
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
sequence
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
live
interrupt
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
sense
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
logify
and (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
not (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
or (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
maintain
shutdown
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
startup
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
manipulate
clear (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
rotate-left (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
rotate-right (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
set (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
shift-left (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
shift-right (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
toggle (TODO)
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
memorise
create
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
destroy
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
modify
append
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
build
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
empty
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
fill
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
insert
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
overwrite
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
remove
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
represent
deserialise
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
serialise
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
run
run
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
sleep
Description
Format
Example
Properties
name
|
description
|
required
|
format
|
model
|
state
device
keyboard
Description
A keyboard key.
Format
Example
<part name="arrow-up" channel="inline" format="path/knowledge" model=".logic.move_arrow_up"/>
<part name="arrow-down" channel="inline" format="path/knowledge" model=".logic.move_arrow_down"/>
<part name="arrow-left" channel="inline" format="path/knowledge" model=".logic.move_arrow_left"/>
<part name="arrow-right" channel="inline" format="path/knowledge" model=".logic.move_arrow_right"/>
<part name="enter" channel="inline" format="path/knowledge" model=".logic.enter_sub_menu"/>
<part name="escape" channel="inline" format="path/knowledge" model=".logic.exit_programme"/>
Properties
name
|
description
|
required
|
format
|
model
|
arrow-up
|
The arrow up key.
|
false
|
path/*
|
a logic model to be executed
|
arrow-down
|
The arrow down key.
|
false
|
path/*
|
a logic model to be executed
|
arrow-left
|
The arrow left key.
|
false
|
path/*
|
a logic model to be executed
|
arrow-right
|
The arrow right key.
|
false
|
path/*
|
a logic model to be executed
|
enter
|
The enter key.
|
false
|
path/*
|
a logic model to be executed
|
escape
|
The escape key.
|
false
|
path/*
|
a logic model to be executed
|
mouse
Description
A mouse button.
Format
Example
<part name="exit_button" channel="inline" format="text/plain" model="Exit">
<property name="cell" channel="inline" format="text/plain" model="east"/>
<property name="left-release" channel="inline" format="path/knowledge" model=".app.logic.exit_programme"/>
</part>
Properties
name
|
description
|
required
|
format
|
model
|
left-press
|
The left mouse button press event.
|
false
|
path/*
|
a logic model to be executed
|
left-release
|
The left mouse button release event.
|
false
|
path/*
|
a logic model to be executed
|
left-click
|
The left mouse button click (press + release) event.
|
false
|
path/*
|
a logic model to be executed
|
middle-press
|
The middle mouse button press event.
|
false
|
path/*
|
a logic model to be executed
|
middle-release
|
The middle mouse button release event.
|
false
|
path/*
|
a logic model to be executed
|
middle-click
|
The middle mouse button click (press + release) event.
|
false
|
path/*
|
a logic model to be executed
|
right-press
|
The right mouse button press event.
|
false
|
path/*
|
a logic model to be executed
|
right-release
|
The right mouse button release event.
|
false
|
path/*
|
a logic model to be executed
|
right-click
|
The right mouse button click (press + release) event.
|
false
|
path/*
|
a logic model to be executed
|
move
|
The mouse move event.
|
false
|
path/*
|
a logic model to be executed
|
drag
|
The mouse drag (press + move) event.
|
false
|
path/*
|
a logic model to be executed
|
user_interface
graphical
Description
A graphical user interface element.
Format
Example
<part name="window" channel="file" format="element/part" model="gui/window.cybol">
<property name="position" channel="inline" format="number/integer" model="0,0"/>
<property name="size" channel="inline" format="number/integer" model="800,600"/>
<property name="background" channel="inline" format="colour/rgb" model="255,255,255"/>
<property name="foreground" channel="inline" format="path/knowledge" model=".app.settings.foreground"/>
<property name="layout" channel="inline" format="text/plain" model="compass"/>
<property name="title" channel="inline" format="text/plain" model="Test Application Window"/>
<property name="icon" channel="file" format="image/png" model="gui/window/icon.png"/>
<property name="expose" channel="inline" format="path/knowledge" model=".app.logic.refresh_gui"/>
</part>
Properties
name
|
description
|
required
|
format
|
model
|
position
|
The position (x, y) in unit [pixel], starting from zero, in relation to the surrounding parent element's origo.
|
true
|
path/* | number/integer
|
a two-dimensional vector
|
size
|
The size (width, height) in unit [pixel], starting from zero.
|
true
|
path/* | number/integer
|
a two-dimensional vector
|
background
|
The background colour.
|
false
|
path/* | colour/rgb
|
|
foreground
|
The foreground colour.
|
false
|
path/* | colour/rgb
|
|
layout
|
The layout of contained child components.
|
false
|
path/* | text/plain
|
absolute | flow | grid | compass
|
cell
|
The component's cell (position) within the surrounding parent component. Possible values depend on the parent component's layout.
|
false
|
path/* | text/plain | number/integer
|
x, y (absolute) || row,column (grid) || centre | north | south | west | east (compass)
|
title
|
The window title.
|
false
|
path/* | text/plain
|
|
icon
|
The window icon.
|
false
|
path/* | image/*
|
|
expose
|
The expose event to redraw the window content.
|
false
|
path/*
|
a logic model to be executed
|
text
Description
A text user interface element.
Format
Example
<part name="window" channel="file" format="element/part" model="tui/window.cybol">
<property name="position" channel="inline" format="number/integer" model="0,0"/>
<property name="size" channel="inline" format="number/integer" model="80,15"/>
<property name="background" channel="inline" format="colour/terminal" model="green"/>
<property name="foreground" channel="inline" format="path/knowledge" model=".app.settings.foreground"/>
<property name="bold" channel="inline" format="logicvalue/boolean" model="true"/>
<!-- This property is evaluated by win32 console only. -->
<property name="intense" channel="inline" format="logicvalue/boolean" model="false"/>
<property name="border" channel="inline" format="text/plain" model="ascii"/>
</part>
Properties
name
|
description
|
required
|
format
|
model
|
position
|
The position (x, y) in unit [character], starting from zero, in relation to the surrounding parent element's origo.
|
true
|
path/* | number/integer
|
a two-dimensional vector
|
size
|
The size (width, height) in unit [character], starting from zero.
|
true
|
path/* | number/integer
|
a two-dimensional vector
|
background
|
The background colour. The default is the terminal's current background.
|
false
|
path/* | colour/terminal
|
black | blue | cyan | green | magenta | red | white | yellow
|
foreground
|
The foreground colour. The default is the terminal's current foreground.
|
false
|
path/* | colour/terminal
|
black | blue | cyan | green | magenta | red | white | yellow
|
bold
|
The flag indicating whether or not to use bold foreground.
|
false
|
path/* | logicvalue/boolean
|
false | true
|
intense
|
The flag indicating whether or not to use intense colour. This property is evaluated by win32 console only.
|
false
|
path/* | logicvalue/boolean
|
false | true
|
border
|
The kind of border characters to apply.
|
false
|
path/* | text/plain
|
ascii | simple | double | round
|
web
Description
A web user interface element.
Format
Example
<part name="heading" channel="inline" format="text/plain" model="Web User Interface (WUI) Example">
<property name="tag" channel="inline" format="text/plain" model="h1"/>
</part>
<part name="content" channel="inline" format="text/plain" model="This is a text paragraph.">
<property name="tag" channel="inline" format="text/plain" model="p"/>
</part>
<part name="newline" channel="inline" format="text/plain" model="">
<property name="tag" channel="inline" format="text/plain" model="br"/>
</part>
<part name="some_block" channel="inline" format="text/plain" model="">
<property name="tag" channel="inline" format="text/plain" model="div"/>
</part>
<part name="preformatted_external_text" channel="file" format="text/plain" model="wui/text.txt">
<property name="tag" channel="inline" format="text/plain" model="p"/>
<property name="preformatted" channel="inline" format="logicvalue/boolean" model="true"/>
<property name="class" channel="inline" format="text/plain" model="preformatted"/>
</part>
<part name="link" channel="inline" format="text/plain" model="Some link.">
<property name="tag" channel="inline" format="text/plain" model="a"/>
<property name="href" channel="inline" format="text/plain" model="http://www.cybop.org/"/>
</part>
<part name="sub_heading" channel="inline" format="text/plain" model="Example Table">
<property name="tag" channel="inline" format="text/plain" model="h4"/>
</part>
<part name="table" channel="file" format="element/part" model="wui/table.cybol">
<property name="tag" channel="inline" format="text/plain" model="table"/>
</part>
Properties
name
|
description
|
required
|
format
|
model
|
tag
|
The html tag to use. Void tags are detected automatically.
|
true
|
path/* | text/plain
|
a valid html tag without arrow brackets
|
class
|
The 'class' html attribute.
|
false
|
path/* | text/plain
|
a css class as html attribute
|
preformatted
|
??
|
false
|
path/* | logicvalue/boolean
|
??
|
property
|
??
|
false
|
path/* | text/plain
|
??
|