LinViex user manual

Version 0.9.2

Table Of Contents

  1. LinViex user manual
    1. Table Of Contents
    2. Introduction
      1. Some small ideas for LinViex programs:
      2. License
      3. GNU GENERAL PUBLIC LICENSE
      4. Contact info
    3. Getting Started
    4. Basic Operation
    5. Workspace
      1. File Menu
      2. Edit Menu
      3. View Menu
      4. New Objects Menu
      5. Connection Menu
      6. Help Menu
    6. Objects
    7. Connections
      1. - Trigger connections:
      2. - Logic (Boolean) connections:
      3. - Integer connections:
      4. - Real connections:
      5. - QString connections:
    8. Cosmetic Symbols
    9. Working with objects
    10. Working with connections
      1. Creating new connections:
      2. Alternative way to create new connections
      3. Selection of connections
      4. Activation / deactivation of connections
      5. Deleting connections
      6. Duplication of connections
      7. Modifying the shape of connections
      8. Moving connections
      9. Using the connection dialog window
      10. Precautions for making connections
    11. Creating LinViex programs
    12. Creating user interfaces
      1. Using multiple dialog windows
    13. Objects references
      1. And
      2. AppController
      3. AudioPlayer
      4. AudioMixer
      5. Bool
      6. BoolGlobal
      7. Box
      8.  Button
      9. Chronometer
      10. Clock
      11. Counter
      12. Delay
      13. Dialog
      14. HostView
      15. Integer
      16. IntCalculator
      17. IntComparator
      18. IntGlobal
      19. IntMultiplexer
      20. IntSelector
      21. IntToReal
      22. IntToString
      23. Label
      24. Led
      25. LogReader
      26. LogWriter
      27. Loop
      28. MailReceiver
      29. MailSender
      30. MenuControl
      31. Not
      32. Or
      33. PowerDimmer
      34. PowerSwitch
      35. RandomNumber
      36. Real
      37. RealCalculator
      38. RealComparator
      39. RealGlobal
      40. RealMultiplexer
      41. RealSelector
      42. RealToInt
      43. RealToString
      44. RemoteControl
      45. ShellCommand
      46. SmokeDetector
      47. String
      48. StringBuilder
      49. StringFinder:
      50. StringGlobal
      51. StringMultiplexer
      52. StringReplacer:
      53. StringSelector
      54. StringSplitter
      55. StringToInt
      56. StringToReal
      57. TempSensor
      58. TextToWav
      59. Timer
      60. Toggler
      61. Translator
      62. WaterSensor
      63. Xor
    14. Tips & Tricks
      1. How to initialize a starting LinViex program
      2. How to delay an arbitrary signal
    15. How to install additional  software
      1. Setting up IO Warrior usb devices
      2. Setting up usb devices to be accessible for all users
      3. Additional software for the TextToWav object:
      4. Additional software xmms for the AudioPlayer object:
      5. Additional software Kaboodle for the AudioPlayer object:
      6. Additional software Amarok for the AudioPlayer object:
      7. Additional software for the AudioMixer object:
      8. Additional software for the MailSender object:
      9. Additional software installation for using FS20 and HMS equipment:
      10. Additional software installation for using RF switches and dimmers in combination with EZControl T-10
      11. Additional software for the PowerSwitch object using the parallel port:
    16. Known Bugs
    17. Stuff
    18. Hyperlinks


Introduction

LinViex is a graphical programming application, suitable for creating home automation programs.

LinViex provides a wide variety of functional objects. These objects are able to provide input information from external stimuli like e-mail or sensors, to process this information and to drive output reactions based on this information. By creating objects and setting up data connections between them you can solve almost every task of home automation and data logging.

Because many, partially complex interfaces and functionalities should be supported, LinViex relies on the functionalities of some other applications by controlling them remotely.

Usable applications are xmms, Kaboodle, and Amarok  (for output of audio files and creating tones), kmail (for sending mails), kmix (for controlling the master volume of audio output), Lirc (for Remote Control support), and txt2pho and mbrola (for text-to-speech conversion). RF sensors and actors of the standards FS20 and HMS are controlled with the server software fhz1000.pl which controls the ELV FHZ1000pc which is connteted via USB. If you would like to use linViex objects, that rely on the function of the external programs, described above, you should at least install one of them on the system. Details on which external applications are needed and how to install all the additional software can be found at the end of this document.

Some small ideas for LinViex programs:

Example 1:

Implement an alarm clock by connecting a clock object to an AudioPlayer, so you can let yourself wake up by the computer with your favorite song or by hearing web radio. Connect a PowerSwitch to your coffee machine, so your morning coffee waits for you when you get up.

Example 2:

Safe money by connecting RF remote power switches to electric appliances that consume standby energy. So, you can automatically switch of these power-appliances at night or when you are not at home.

Example 3:

Play an audio message whenever you receive a new mail.

... and lots more. The object collection will be expanded continuously.

 

License

LinViex is open source and released under the GPL license:

Copyright (C) 2006 Andreas Koerpert
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA

GNU GENERAL PUBLIC LICENSE

Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS

Contact info

In case you find any bugs, you have any idea for a new object or new functionality, or you even are interested in participating at this project, feel free to contact me:

mailto: andikt@t-online.de

Getting Started

To get started, in this chapter, you can follow a step-by-step example, which lets you get first practical experience on how to create your own LinViex programs.

·         Start the LinViex application by typing linviex on a shell command window, or start LinViex from the Program menu. The progam starts and you see a main window with an empty workspace. On this empty workspace, objects can be created and interconnected.

·         As a first trivial program example, we use a Timer object which will be connected to a Counter object. The Timer emits signals in a 1 sec time interval, and the Counter is counting up the signals.

·         Right-click on the empty workspace window of LinViex. The context menu appears. Choose the submenu new objects and then you can see that there are a number of different submenues containing a number of different objects to choose from. Now choose in the submenue Time and Date the object Timer. A Timer object in form of an hour class appears on the workspace. You can also see a stop sign in front of the Timer object. This means that the Timer is currently not working. All objects that are providing an input or output functionality usually are deactivated at the time of creation.

·     In order to activate the Timer object, double click on the it or choose the command properties in its context menu. The Timer properties dialog appears. Now, select the Run button and you can see, that the stop sign of the Timer object disappears and it is now blinking with its blue LED in a 1 sec time interval. The Run and Stop Buttons are available for all of the more complex objects. You can change the time interval of the Timer by changing the settings in the Timer properties dialog window. Then, close the properties dialog.

·         In order to create a Counter object, right-click again on the workspace, near the Timer object. The context menu appears. Choose the command new objects >Integer > Counter. Then, a Counter object appears.

·         Now we can make a connection between the two objects. A connection is always created from the data sending object to the receiving object. Right-click directly on the Timer and select the command create connection > output().

Then, a rubber band line is drawn from the Timer object to the mouse cursor. Now, drag this rubber band line to the Counter object and left-click on the Counter object. A context menu opens up and gives a selection of the Counter object's inputs. Select the line count().

You will see that a blue line is drawn between the Timer and the Counter. Through this connection, a triggering signal (type anything()) is transported over this connection each second. The timer is counting the signals.

·

         Now it is possible to save the program by choosing the save command from the file menu. This saves all objects, their settings and positions, and also the connections between them.

·         You can now also experiment with this little linViex program. Drag the objects with the mouse cursor, select and move the connection between them. Surround the objects with a rubber band frame in order to select them and duplicate the objects with copy and paste.

·         Details on operation and programming are explained in detail in the following chapters.

Basic Operation

Just like other applications, after starting of the program you find a workbench like surface and an application menu. In the file menu, you find the well known file operations “new”, “open”, “save”, “save as”, and “quit” commands. The LinViex handles files with the extension ".lvp" (LinViex program). The Edit Menu holds the commands of "copy", "cut", "paste", and "delete". The "new objects" menu holds the complete collection of available objects, and the connections menu has commands for creating, modifying and deleting of connections. The help menu contains the standard commands for program version and help windows.

Workspace

After starting LinViex, the main application window is shown. A menu bar is shown as well as a task bar carrying symbols for some frequently used menu commands. The workspace itself is a big area, where objects called objects can be placed and interconnected with lines, called connections. A status bar at the window bottom shows messages.

File Menu

In the file menu you find the general commands for file operations, namely new file, open, save, save as. They serve to generate load and save the program files of LinViex, memorizing all objects, including the current data and connections. The program files have the extension .lvp which stands for LinViex program.

The quit command exits the application. In case of unsaved changes, the user is prompted to save the .lvp file.

Edit Menu

In the edit menu, you find the general commands for copy, cut, paste, and delete objects. Selected objects and any connections between selected objects can be duplicated or removed. Because object names must be unique within the LinViex application, the names of duplicated objects will receive a numeric extension, automatically.

Example: copying a object with the name “myobject” will create an identical object with the name “myobject(1)”.

View Menu

The View menu contains commands for zooming in and zooming out the workspace. This helps to do editing of the LinViex program schematics and does not have any influence on the program’s functionality. Zoom levels can also be changed by pressing the “+“ or “-“ keys.

New Objects Menu

The New Objects menu holds a complete set of all objects. They can be selected from this menu and are created on the workspace at the last position of a mouse click. Optionally, this menu can be “torn off” by a mouse drag and is then available in a separate little window. This can be of practical use in case the user wants to create a lot of different objects on the workspace.

Connection Menu

The connection menu provides commands for the creation, the modification, and the deletion of connections between the objects. Details on the use of connections are described in the later chapters.

Help Menu

In the help menu, there are some commands which show info about the application, and also the command for calling this LinViex help window.

Objects

Objects are functional units which are represented by graphical objects on the application window. These functional units have certain properties and certain functional behaviors.

By creating these objects and interconnecting them you can build up whole applications for almost any purpose in the area of home automation.

LinViex has a wide variety of different objects, serving for data input, data processing or data output.

In the next picture, you can see an overview of all currently available objects. They are described in detail in the following chapters.

Connections

Connections are point-to-point assignments between the objects, which represent data transport from one object's output to another object's input.

Over these connections, the data flow is not continuous. Instead, the data is sent in form of single messages, like datagrams, which are sent from the objects in case they have data available to output.

Each data connection has a defined data type and is represented by different colors. It is in general not possible to connect an output signal of a certain data type with an input signal of a different data type. The one exception though is described in the following chapter.

The data transport from one object to another is not graphically visible to the user. Some objects have a color LED though to show their operating state and also blink when they emit a signal.

Connections can not exist by themselves, and must always be connected between a sending and a receiving object. If one of the objects is deleted, the connection will also be deleted automatically.

It is possible to create multiple connections from one object’s output to multiple objects inputs. Then all receiving objects are stimulated by a sending object. The order in which the receiving objects react is arbitrary.

Also it is allowed to connect multiple objects outputs to one single object input. Then, the last signal of the sending objects is valid at the receiving objects input.

Beware that if you have two parallel connections going from one output to one input, two signals are send from the sending to the receiving object for one single event.

The following data types for connections exist:

- Trigger connections:

This type of signal is just an event-like information that "something happened".

Examples:

- The Timer object emits the signal output() each time, its internal timer has waited for the configured time interval.

- The Mail object emits a Message newMail() each time it finds a new mail on the mail server.


Connections of the type <anything>() are represented by blue lines.


Exception to the data type safety:

This type of connection is the only data type that can be established from a object output signal of any type to an input signal of the type <anything>(). The reason is that any signal which is emitted from a object can represent that something happened. So it is perfectly okay for example to connect an output signal output(bool) to an input input(). The line is colored blue, because of its trigger signal nature. Then, any output signal which is emitted, is stimulating the input signal, regardless of the output data value being true or false or anything else.

- Logic (Boolean) connections:

This type of signal <anything>(bool) carries a binary information, having the values true or false.

Example:

The PowerSwitch object can switch 230V Power appliances via a RF remote control signal. One of the inputs into the object is switch(bool) which tells the PowerSwitch to switch the device on or off, depending if this input signal is true or false.


Connections of the type <anything>(bool) are represented by green lines.

- Integer connections:

This type of signal <anything>(int) carries an numeric integer value.

Example:

The counter object has an output of output(int) where it emits the new actual counter value, each time after it was triggered to count.

 

Connections of the type <anything>(int) are represented by orange lines.

- Real connections:

This type of signal <anything>(double) carries an numeric double precision real value.

Example:

The TempSensor object has an output of temperature(double) where it emits the actual temperature value, each time after it was triggered to do a measurement. 

 

Connections of the type <anything>(double) are represented by yellow lines.

 

- QString connections:

This type of signal <anything>(QString) carries a text value. The text can be of arbitrary length and can also contain carriage returns.

Example:

The LogWriter object has a input input(QString). If a QString input is received, the object takes this text and appends it to a log file. Connections of the type <anything>(QString) are represented by purple lines.

 

Cosmetic Symbols

Cosmetic symbols are used to make the LinViex program more readable. They do not have any functionality and therefore can not be connected with any other objects. Currently there is only a Box object available. They serve as a border to group a number of objects together, as well as they can display written text for documenting a the linViex program schematics.

Box objects can be created on the workspace. They are always painted in the background of the objects and connections. Box objects can be selected with the mouse, moved and resized by dragging the edges of the Box object.

Double clicking opens up the Box properties dialog. There you can enter and format text which will be displayed in the frame. Also the colors of the frame and the background of the frame object can be changed.

If you place objects inside a Box, they will be part of the Box object. Then, they are moved, deleted, or copied as part of the Box object. It is also possible to put Boxes inside other boxes.



Working with objects

·        Objects can be created by choosing the menu item "new objects" from the main menu or from the context menu of the workspace (right click on the window background). A sub menu pops up showing a number of object categories. As items under these categories, you find a whole selection of different objects. Choosing a object type from the menu will create one instance of the selected object class on the desktop.



Hint:

For faster creation of many new objects, you can also tear off the "new objects" menu by clicking and pulling the dotted line at the top of the menu. Then this menu is shown constantly in a small dialog window for faster access.

·        objects can be selected by a single left-click. Multiple objects can be selected by holding the <Shift> or <Ctrl> key down while left-clicking, or by surrounding the objects with a rubber band drag.

·        With a left mouse-drag on selected objects, you can move the objects to any location on the application window.

·        Some objects, for example the String object can be resized in order to show its contents in a convenient way. This can be achieved by dragging the sides of the objects, after the mouse cursor changes to the horizontal double arrow.

·        Left double clicking on the object will open up the objects property menu. There you can read and set all relevant properties, options and input values. The property dialog can also be opened by selecting it from the object's context menu.

·        Each object has a name property. Please give each object a unique and meaningful name in order to identify it later on in the connections dialog. If a name is already existing, the new assigned name will be extended by a unique number, e.g. Name(1).

·        Some objects have a start and stop button in the object's dialog. When a object is stopped it does not process any data and it does not send any output signal. You can see if a object is stopped, when a stop sign is painted on top of the object.

·        You can delete a object by selecting "delete" from the context menu or by selecting a object and press <Shift-Del>.

·        Cut, copy and paste work as well on the objects. When objects are duplicated, the object names are changed (a number is appended to the name) in order to avoid double names.

·        Not all inputs of the objects must be connected. There is also the possibility to enter data in the object's dialog. This data will be used by the object, just like data coming via a connection.

 

Working with connections

Creating new connections:

Right click on the object that should be the starting point of the connection. Select under the context menu submenu create connection the output signal that you want to connect. A rubber band line appears from the sending object to the mouse arrow. Drag this line to the object that should be the receiving object of the data connection. After left click on the receiving object, a context menu appears which lists all input signals of the receiving object. After choosing the input, a connected line appears and the connection is established successfully. In case the new connection is represented by a dotted line, the connection is not functional. A dotted line is usually a symptom that the sender and receiver do not have compatible data types.

Alternative way to create new connections

Choose the object in the object tree, which you want to output data. Right click on this object and choose the context menu item "create connection". Another popup shows then all output signals which are available for this object. Select the desired output signal and a new connection will appear as a child object of the object. If the new connection is selected in the object tree, look at the right side of the dialog. There you find three selectors. For each connection you can specify here the receiver of the connection signals. Just work these selectors from top down.

- First, select the Receiving object's Class.

- Then select the right receiving object you want to connect to.

- Afterwards, you are able to choose to which input of the receiving object you want to connect to. - After the selection, you should be able to see a dashed line from the sender to the receiver object.

- Finally press the "activate Connection" button in order to activate this connection.

If this connection is activated successfully can be verified, when the symbol in the

object tree is changed to "green". Also, you can see on the object window that the

connection line between the objects is a filled line in the correct color.

Selection of connections

- Connections can be selected by clicking on the line segments. Selected connections are highlighted with little squares at the corners of the line segments.

- It is only possible to select a single connection. Multiple connection selection is not supported.

Activation / deactivation of connections

- Connections can be deactivated for debugging reasons, so no data is transported over this connection. Deactivated connections are represented by dotted lines. Just select the desired connection and choose deactivate or activate from the connection menu.

Deleting connections

Connections can be deleted by selecting and choosing the delete Connection command in the context menu of the graphical connection itself, or of the connection entry in the connections dialog window. If object objects are deleted, any connection attached to the object will also be deleted automatically.

Duplication of connections

- If you copy and paste two or more objects, all connections between these objects are copied, too. Connections which are only connected to the selected objects on one side are not duplicated at all. In general it is not possible to copy/paste single connections without its attached objects in order to avoid defect connections which are partially unconnected.

Modifying the shape of connections

For realization of a clearly structured LinViex program, it is necessary to group and align connected objects, and also to move and reshape connections. These LinViex program schematics can get easily very confusing when they are not laid out carefully.

Connections can be selected by a mouse click on its line segments. At the joints of the connection lines, little boxes appear when the connection is selected. Then clicking and moving the boxes will change the connection shape. By doing this, you can modify the shape of any connection as desired.

In case that a connection has an undesired shape, because of modifications of the connection or after moving of one of the connected objects, the command normalize connection ( Shortcut is  <Ctrl-B> ) can be selected in order to give the selected connection a recalculated normalized shape.

Moving connections

Connections are directly moved automatically when the sending and receiving objects are moved by a mouse drag. The connections do not need to be selected for this operation.

Using the connection dialog window

- Connections can be handled within the connections dialog. You can open this dialog window by selecting the menu item, the button on the task bar or by choosing it from the context menus.

- In the connections dialog you find a list of all created objects in the object tree on the left side of the dialog. The objects are grouped by their object classes. Pressing the buttons [1] and [2] on top of the tree view expands or collapses the object tree.

- Within the connection dialog, you can see which signal of the sending object is connected to another signal of the receiving object. The symbol on the left side indicates if the connection is incomplete, deactivated or activated.

- Connections can be activated / deactivated by selecting the appropriate command from the context menu or with the buttons of the connection dialog window. Activated connections do not transport any data and they are represented as a dashed line.

- Any property of the connection can be changed within the connection dialog by choosing the appropriate properties from the drop down menus at the right side of the dialog. Before accepting changes, the connections are deactivated automatically.

- The sending signal type and the sending object of an existing connection can not be changed though. When there is any need for changes, just delete the existing connection and create a new one with the correct sending object and signal type.

Precautions for making connections

It is up to the responsibility of the LinViex programmer to avoid recursive data emission by connecting signal loops. Signal loops are, for example, when you connect a logical NOT gate’s output with its own input, will cause a fast and endless loop of signals. This in general can lead to freezing of the LinViex application or to unexpected and slow behavior of the complete computer system. Even signal loops over several objects can lead to problems, when its output somehow stimulates another signal flow through the chain.

Creating LinViex programs

By creating objects and interconnecting them, programs can be generated. In opposition to other programming languages, a LinViex program is not executed sequentially. LinViex programs rather look more like a chain of functional blocks. Especially in the area of automation, usually an input stimulus is detected, causes some reaction for analysis of this input stimulus. Then, after an appropriate decision based on this analysis has been found, an output is generated, which should be the desired reaction to the input.

The execution of a LinViex program is purely event driven. Something is causing an input object to generate a Signal, carrying information. Examples are: A Timer generating the output signal output() regularly after its interval time is elapsing. This output signal can be connected to the input of another object, for example to the input play() of a AudioPlayer object. After the signal from the timer has reached the AudioPlayer, the current audio file or playlist is played back. Another example is that tempSensor object receives a signal of a remote sensor. As soon as the temperature value is received, the tempSensor emits the output signal temperature(double), which can be connected to further objects which are displaying the current temperature, logging it to file, or it can be compared with limits in order to switch an electrical heater.

Creating user interfaces

Besides creating applications by combining functional objects together, it is also possible to create dialog windows which can serve as a user interface. On these dialog windows, objects like Buttons, Leds, Numerical and Text input and output objects, etc, can be placed, and symbols representing these objects can be connected with the other functional objetcs on the workspace.

In the simple example below, you can see a dialog window with a Button and a Led. The user can switch the blinking of the Led on and off by pushing the Button. On the workspace you see a symbol of the dialog window (upper left), a symbol for a Button and a symbol for the Led. You can see, that on the program schematics, the Button switches a Timer on or off, which drives a Toggler to switch its output signal periodically between true and false. The Led is showing the boolean output of the Toggler by blinking.



All available objects for the user interface can be found in the menu “new Objects->User Dialog”.

To start with creating a user interface dialog window, create a dialog object on the workspace of linViex, like the other functional objects. A symbol of an Dialog object appears on the workspace and separate empty dialog window appears.

Then to create a object on the dialog window, create an object object on the workspace, e.g. A Button object , by choosing it from the menu “new Objects->User Dialog”. You see again, that a Button symbol appears on the workspace and also a Button object appears on the dialog interface.

Double-click on the Button symbol opens the Button properties dialog. There you can see, that you can change a lot of properties of the object, like the dialog window, it should appear on, its position on the dialog window, its size, its color and text.




You can connect the symbols of the objects on the workspace with other objects. Then, the input of the objects of the user dialog is connected to your program schematics on the workspace. The output of your program can also be connected to indicator objects, like Leds or Text Label objects.

Beware, that deleting a dialog object also deletes all its objects.

Using multiple dialog windows

It is possible to create more than one dialog window. Then, new created objects appear on the last created dialog window. When you want to put the objects on other dialog windows, open the object's properties dialog and choose the name of the dialog window, it should appear on.

Objects references

.-.-.-.-.-

And


And: This is a object which performs the logic AND operation of two Boolean inputs, input1(bool) and input2(bool). The Signal output(bool) carrying the result is emitted, whenever the output value has changed.

 

LED States:

Green:                                                        The signal output(bool) of the AND gate has the value true
Red:                                                           The signal output(bool) of the AND gate has the value false

  

.-.-.-.-.-

AppController




ApplicationController: This is an input object that sends signals right after the start of the application and just before the application exits.

The output signals startingUp() and shutingDown() can be used for proper initialization and for cleanup procedures within linViex programs. There is also an output signal uptime(int) which displays the number of seconds elabsed since the start of the linviex application. The input signal stopIt() can be used to shut down the complete linViex application.

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-

 

AudioPlayer


 

AudioPlayer: This is an output object that is able to play a sound file or a playlist.

There are currently three media player software supported by this AudioPlayer object:

xmms. Media player, which is able to play all kinds of audio files, web radio and even tones. Many plugins are available for supporting all kinds of media formats. Several xmms instances can play simultaneously.

Kaboodle. Media Player that comes with kde. No playlists are supported, only single audio files can be played back. Not all media formats are supported. Several Kaboodle instances can play simultaneously.

Amarok. Media Player that comes with the SUSE linux distribution. Nice medial player that supports many audio formats and also web radio. Supports playlists. Only one instance of Amarok is supported, so it is not possible to have two audio outputs simultaneously.

Which media player you want to use, can be selected in the AudioPlayer’s dialog window. Of course, the appropriate media player must be installed on your system.

The media player software is started as soon as the AudioPlayer is activated with setActivated(true) or by pushing the run button in the dialog window. It plays the sound file or play-list, specified by the input signal filename(QString). After the input signal play() is received, the player starts. Optionally, if configured in the dialog window, the player also can start directly after receiving the input signal filename(QString). As output there is the signal error(QString) that emits possible error messages. Also the input signals stop(), reward(), forward() and pause() are implemented so that the media player can be completely controlled by LinViex.

The signals reward() and forward() are not supported by the Kaboodle player, because no playlists are supported there.

 

LED States:

Gray:                                                          AudioPlayer is disabled
DarkBlue:                                                   AudioPlayer is active but not playing
Blue:                                                           AudioPlayer starts playing
Red:                                                           Error Condition

This object can be enabled and disabled by the input signal setActivated(bool).

In the AudioPlayer dialog window, you can select the file that should be played. For commodity reasons, a play and a stop button is also available, so that it is possible to start and stop the audio output manually.

For each new AudioPlayer object, a new player instance is started. All players are able to play in parallel.

Some of the media players are also able to play streamed audio channels. This can be realized with an appropriate input to filename(QString) which can be a URL to an audio stream server. Example:

“http://... “

Another interesting application of the AudioPlayer is also based on a xmms plugin, that enables xmms to generate tones. This plugin is usually contained in the xmms installation package and can be enabled in the settings menu.

To generate a tone, send an input signal to the AudioPlayer’s filename(QString) of the format

“tone://2000”

which for example let xmms generate a tone of 2000Hz.

Even polyphonic tones can be generated when other frequency parameters are attached, separated by semicolons. The frequency value must be an integer number.

Example: “tone://2000;2500”

Because this specification of tones is reloading a playlist in xmms, it is not possible to play a fast number of tone changes. Just a rather slow combination of tones can be played with this functionality.

Table of frequencies of tones:

 

c          528       Hz
h          498,4    Hz
b          470,4    Hz
a          444,0    Hz
g#        419,1    Hz
g          395,6    Hz
f#         373,4    Hz
f           352,4    Hz
e          332,6    Hz
d#        314,0    Hz
d          296,3    Hz
c#        279,7    Hz
c          264       Hz

For playing tones which are an octave higher, just multiply the frequency by 2.

The following table represents tones which are used for telephone dialing. Maybe this can be helpful to have the pc do a phone call or check a remote answering machine.

DTMF Frequenzen nach ITU-T Q.23

F in Hz

1209

1336

1477

1633

697

1

2
abc

3
def

A

770

4
ghi

5
jkl

6
mno

B

852

7
pqrs

8
tuv

9
wxyz

C

941

*

0

#

D

 

Details on how to install and setup the different media player software can be found in the chapter How to install additional software.

 -.-.-.-.-.-

 

AudioMixer




AudioMixer: This is an output object that is able to control the volume of the computer. This software is communicating with the KDE application kmix using the dcop functionality of KDE. Therefore kmix must be installed. Inputs are volumeUp(), volumeDown(), volume(int) and mute(bool). Valid integer values for volume are numbers between 0 and 100. As a object output, error(QString) gives information about the object status.

 

LED States:

Gray:                                                          AudioMixer is disabled
Dark Blue:                                                   AudioMixer is active
Blue:                                                           AudioMixer is executing a volume change
Red:                                                           Error Condition
 

This object can be enabled and disabled by the input signal setActivated(bool).

Multiple AudioMixer objects can be used within programs, all controlling the single kmix instance of the KDE desktop.

Details on how to download and install the kde and kmix can be found at http://kde.org.

.-.-.-.-.-

 

Bool


 

Bool: This is a bool variable object. It holds one bit of Boolean information 'true' or 'false'. The value can be set in the dialog or by the input signal input(bool). The output signal valueChanged(bool) is only emitted after the value of this variable has changed from true to false or vice versa. The output(bool) of the current value of this variable object is stimulated by the input signal trigger(). If in the dialog window the option "emit valueChanged(bool) on startup" is set, the aBool object emits a valueChanged(bool) signal right after connecting to another object or right after a program file *.lvp is loaded.

.-.-.-.-.-
 

BoolGlobal


 

BoolGlobal: This is the global variable object for the bool data type. A global variable object is able to send data to or receive data from another global variable object. The receiving object can be within the same application, on the same pc in another application, or on another pc, reachable over the internet. The data transport is realized using UDP packets, which are sent over IP.

In order to send data, you have to specify the IP address or the host name of the receiving pc in the dialog window of the global variable objects. Also choose a unique UDP port number. Use an arbitrary number between 49152 and 65535. These are the UDP channel numbers for private use. A data value in the object’s input input(bool) is then send to the configured destination.

For receiving data a BoolGlobal object of the same type has to be available at the destination. For this object, specify the UDP port number in the object’s dialog window, on which this global variable object should listen for incoming data. In case a UDP data packet is received, it is emitted by the object through the signal output(bool).

In case of any error, an output signal error(QString) is emitted carrying an error message.

Remarks:

-          Each global variable object is able to send and receive data at the same time.

-         It is possible that a global variable object is sending data to a second one while receiving data from a third one.

-         It is possible to configure two global variable objects to send data to the same receiving object.

-         In general, it is possible to configure two global variable objects to receive data at the same host under the same UDP port, but only one object will receive the data, while the other one will not receive anything.

 

This object can be enabled and disabled by the input signal setActivated(bool).

 

.-.-.-.-.-

Box


 

Box: This is a cosmetics object. It serves as a surrounding symbol for grouping objects and for writing text. It can be used for documentation of linViex schematics. objects can be placed within a Box symbol and is then kept as a child object of the Box. Then it can be moved, deleted, or copied as part of the Box object itself. The Box object itself has no functionality which can be connected to other objects.

.-.-.-.-.-

 Button

myButton.png

Button: This is a gui object that brings a push button on a user dialog window. With the button, the user can input a boolean signal by clicking on a button. The output signal valueChanged(bool) represents the button state and can be connected with other functional symbols with boolean inputs. The button can be also set by an input signal input(bool).

Gui objects have parameters like position on the dialog window, size, visibility, etc. which all can be set in the properties dialog of the Button symbol.

. -.-.-.-.-

Chronometer


 

Chronometer: This is a time object which can measure the time between two events. Input signals connected to start(), and stop() can start and stop a time measurement. When the measurement is stopped, the measured time is emitted with the output signal milliseconds(int) is emitted. At the start of the measurement, the output signal working(bool) is emitted with the value true, and at the stop of the measurement, thee signal working(bool) is emitted with the value false. The input signal trigger() can be used for starting AND stopping the measurements with the same signal input connection.

 
This object can be enabled and disabled by the input signal setActivated(bool).

. -.-.-.-.-

Clock


 

Clock: This is a time object which sends an alarm() signal when the alarm time is reached, just like an alarm clock. The time can be set in hours, minutes and seconds.

Optionally, the alarm time can be specified for a one-time, daily, weekly, or monthly basis.

Other output signals are secsToAlarm(int) which is emitted each second, when the alarm clock is active. Also, the output signal currentDateTime(QString) is emitted each second.

LED States:
Gray:                                                          Clock is disabled
Dark blue:                                                   Clock is enabled
Light blue:                                                   Clock emits the output() signal

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-

 

Counter


 

Counter: This is a counter object which increments its value by increment(int) whenever it receives a signal count(). The counter emits the signal output(int) when it has a new value. A counter value can be set with the input signal setValue(int) and the counter can be reset to 0 with the input signal reset(). By specifying values for min(int) and max(int), the Counter can be configured as a loop counter.
 

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-

 

Delay


 

Delay: This is a time object which sends a delayed signal output() in reaction to an input signal input(). The delay time is specified by the interval parameter. The output signal running(bool) represents the working state of the delay. Signals in the delay line can be removed with the clear() input signal. The delay interval can be set in means of days, hours, minutes, seconds and milliseconds. The new value will be valid for the next input signal. Multiple input signals (a burst of signals) are allowed and each signal is delayed independently from each other, so that the output also shows the same burst of signals.

LED States:
Gray:                                                          Delay is disabled
Dark blue:                                                   Delay is enabled, but not started
Dark green:                                                 Delay was started, time is running
Blue:                                                           Delay emits the delayed output() signal

This object can be enabled and disabled by the input signal setActivated(bool).

-.-.-.-.-.-.-.-.-.-

Dialog

myDialog.png

Dialog: This is the basic gui object for a user dialog window. The Dialog represents an empty dialog window, on which you can place gui objects like Buttons, Leds, Text indicators, etc.

The Dialog objects have parameters like position, size, visibility, etc. All can be set in the properties dialog of the Dialog symbol.

On closing the Dialog window, the Dialog obbbject emits a signal closed().

.-.-.-.-.-.-.-.-.-.-

HostView



HostView: This is an input object that is able to check the ability to reach a host via internet. The method is that an ICMP ping request is sent to this host and the answer is checked. Input signal is trigger() which starts the scan procedure, and hostAdress(QString) which holds a host name or IP address that should be scanned. As output there is the signal online(bool) available and the error(QString) that emits possible error messages.

LED States:
Gray:                                                          HostView is disabled or error
Green:                                                        The host is reachable
Red:                                                           The host is not reachable

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-

 

Integer


 

Integer: This is an integer variable object. It provides an Input and Store possibility for an integer Value. Its value can be set by the Signal input(int), and the output Signal valueChanged(int) is emitted each time, the integer value changes. The output signal output(int) can be stimulated by the input signal trigger() at any time. If in the dialog window the option "emit valueChanged(int) on startup" is set, the Integer object emits a signal valueChanged(int) right after connecting to another object or right after a program file *.lvp is loaded.

The object displays the integer value in the text field.
 

.-.-.-.-.-

IntCalculator


 

intCalculator: This object is an arithmetic object which can perform integer arithmetic of two integer numbers, input1(int) and input2(int). The operations "+", "-", "*", "/", and "%" (modulo)  are supported and can be set in the dialog or by using the input signal operation(int).

 Valid numbers of the input signal operation(int):

1 addition (+)

2 subtraction (-)

3 multiplication (*)

4 division (/)

 5 modulo (%)

The result is transmitted with the signal output(int). The signal error(QString) is emitted in case of invalid operations. In case of error, no output(int) signal will be emitted. The object displays the result of the calculation.

.-.-.-.-.-

 

IntComparator


 

IntComparator: This is an integer object which compares an input Signal input(int) to an upper and lower limit of an interval. The outputs are withinLimits(bool), belowLimits(bool), and aboveLimits(bool). Optional, it can be configured, if the interval limits are to be considered within or outside the interval. The output values change according to changing inputs or changing interval limits. If the input value is within the limits, the signal output(int) is emitted.

Attention:

 This object is only emitting the signals withinLimits(bool), belowLimits(bool), and aboveLimits(bool), when the signals are changing from true to false or vice versa. Example: if the limits are 0 and 10, and the last input value was 5, then the current values are:

aboveLimits(bool)    false

withinLimits(bool)    true

belowLimits(bool)    false.

Now, when a new input Signal is coming in, having the int value 20, then the two output signals are emitted:

aboveLimits(bool)    true

withinLimits(bool)    false

 
The signal belowLimits(bool)            remains false and therefore is not emitted. 

The object displays three LEDs with the Boolean values according to the above description.

. -.-.-.-.-

IntGlobal


 

IntGlobal: This is the global variable object for the integer data type. A global variable object is able to send data to or receive data from another global variable object. The receiving object can be within the same application, on the same pc in another application, or on another pc, reachable over the internet. The data transport is realized using UDP packets, which are sent over IP.

In order to send data, you have to specify the IP address or the host name of the receiving pc in the dialog window of the global variable objects. Also choose a unique UDP port number. Use an arbitrary number between 49152 and 65535. These are the UDP channel numbers for private use.  A data value in the object’s input input(int) is then send to the configured destination.

For receiving data a IntGlobal object of the same type has to be available at the destination. For this object, specify the UDP port number in the object’s dialog window, on which this global variable object should listen for incoming data. In case a UDP data packet is received, it is emitted by the object through the signal output(int).

In case of any error, an output signal error(QString) is emitted carrying an error message.

Remarks:

-          Each global variable object is able to send and receive data at the same time.

-         It is possible that a global variable object is sending data to a second one while receiving data from a third one.

-         It is possible to configure two global variable objects to send data to the same receiving object.

-         In general, it is possible to configure two global variable objects to receive data at the same host under the same UDP port, but only one object will receive the data, while the other one will not receive anything.

This object can be enabled and disabled by the input signal setActivated(bool).

. -.-.-.-.-
 

IntMultiplexer


 

IntMultiplexer: This is an integer object that uses the input select(bool) to select, to which one of the two available outputs any input signal input(int) is forwarded. The input signals are forwarded to output1(int) when select(bool)  is true and to output2(int) when select(bool) is false. Each input signal input(int) is forwarded to the one selected output output1(int) or output2(int).

When the select(bool)  signal changes its value, the switch over does not re-emit any output of the last valid input signal on the newly selected output. Only new approaching input signals are then forwarded to the newly selected output.

.-.-.-.-.-

IntSelector


 

IntSelector: This is an integer object that uses the input select(bool) to select one of the two inputs input1(int)  for select(bool) is true and input2(int) for select(bool) is false

Any incoming signal of the selected input<x>(int) is directly forwarded to output(int).

Input signals approaching into the unselected input<x>(int) are simply ignored.

When the select(bool) signal changes, the object switches the new selected input<x>(int) to the output and instantly re-emits the last valid input signal of the newly selected input<x>(int) through the output.

.-.-.-.-.-
 

IntToReal


 

IntToReal: This is an integer object which converts an input Signal input(int) into an output Signal output(double).

.-.-.-.-.-

 

IntToString


 

IntToString: This is an integer object which converts an input Signal input(int) into an output Signal output(QString). Just like in the ANSI C function of printf, the format String format(QString) serves as an format descriptor, where you can write text and specify the position and format of the integer by using the %d placeholder.

.-.-.-.-.-

Label

myLabel.png

Label: This is a gui object that brings a text message on a user dialog window. The Label shows a text message, supplied by an String input signal input(QString).

Gui objects have parameters like position on the dialog window, size, visibility, optional frame, color, and the text style. All can be set in the properties dialog of the Label symbol.

-.-.-.-.-

Led

myLed.png

Led: This is a gui object that brings a Led indicator on a user dialog window. The Led shows the user a boolean signal by having two optical states on and off. The input signal input(bool) determines the state of the Led object. The output signal valueChanged(bool) represents the current Led state and can be connected with other functional symbols with boolean inputs.

Gui objects have parameters like position on the dialog window, size, visibility, color, and the text of the two Led states. All can be set in the properties dialog of the Led symbol.

.-.-.-.-.-

LogReader


 

LogReader: This is an input object which can read a log file and output part of it. Depending on the options, this object outputs one or more lines of the log file or even all lines of a certain time interval. The output output(QString) contains the result.

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-
 

LogWriter


 

LogWriter: This is an output object which can write Strings into a log file. It provides an Input Signal input(QString) where the log message is supplied. It takes this string, prepends a time stamp and appends this log messages to a file, specified in the LogWriter object properties. The output signals of this objects are error and file size information. Using the input signal clear(), the log file will be cleared from former log messages.

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.

 

Loop



Loop: This is a integer object which serves as a loop counter. It can be used to stimulate an operation for a defined number of cycles. Compared to the Counter object, the Loop object must first be started by the start() signal. Then it emits its initial value, set by minValue(int), with output(int) and the signal working(bool) emits a true value. Then, each time the signal next() is received, the Loop object increments its value by increment(int) and emits the new value with output(int). This can be repeated until the final value maxValue(int) is reached. Then the signal working(bool) with the value false is emitted and further next() signals are ignored. A new loop cycle could be started with the input of the start() signal. A running loop can be finished early by the input signal stop().

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-

MailReceiver


 

MailReceiver: This is an input object that is able to receive emails from an internet email address. As a preparation, a valid mail pop3 server and proper email account user and password must be configured in the dialog. The input signal to this object in orderto check for new mails is the signal trigger(). As output, there is from(QString), title(QString), body(QString), error(QString), and a copy of the complete mail mail(QString). If more than one mail is found in the mail box, the mails are emitted from this object in a 5 seconds time interval.

Be careful not to check for new mail too frequently, because some mail servers have a minimal wait time between two connections from the same user.

 

LED States:
Gray:                                                           MailReceiver is disabled
Dark green:                                                 MailReceiver is not actively receiving mails, no errors
Green:                                                         MailReceiver is currently receiving mail data
Red:                                                             MailReceiver can not receive mails, error

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-
 

MailSender


 

MailSender: This is an output object that is able to send an email to an arbitrary internet email address. This object uses the application kmail in order to send its messges. Therefore, it is important to have kmail installed and configured in a way, that it can start up and send e-mails automatically without password entry and with the automated sending of outgoing mails being enabled.

Enabling the MailSender object with the run button, kmail will be started up, if it has not already been running.

The inputs to this object are: to(QString), cc(QString), title(QString), body(QString), and attachment(QString). A mail is sent triggering the send() input. As optional output there is the signal error(QString).

All sent mails are found in the sent Items folder of kmail.

LED States:
Gray:                                                          MailSender is disabled
Dark blue:                                                 MailSender is not actively sending mails, no errors
Blue:                                                        MailSender is currently sending a mail
Red:                                                           Mail Sender can not send mails, error

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-
 

MenuControl


 

MenuControl: This object serves as a data processing object. It supports a menu like structure which can be navigated through using simple stimuli like for example the RemoteControl object.

A menu structure can be configured into the objects input MenuConfiguration(QString). Input for navigation through the menu is the signal input(QString). Valid input values are “menu”, “enter”, “up”, “down”, “left”, “right” and the digits  “0” to “9”. Output is a text based signal message(QString) during the navigation procedure and a text base signal task(QString) which represents the successful selection of a menu item with its optional parameter values. At the start of the menu navigation, the signal working(bool) emitting the value true, ant afterwards set to false when the menu navigation has finished.

LED States:

gray:                                                           the object is disabled or the menu is not activated by the input.
red:                                                             an error occurred and the object will not output any task
yellow:                                                        the navigation through the menu is in progress
green:                                                         the selection was finished successfully and a task signal is emitted

This object can be enabled and disabled by the input signal setActivated(bool).

Example of the structure of a menu configuration:

________________________________________

# Format of the menu configuration:

# tree:message:inputtype:value range:task output string

 

1:powerswitch:powerswitch :

1-1:channel:d:0-64:%d :

1-1-1:switch:s:on ,off :%s :

 

2:clock:clock :

2-1:current time: current time:

2-1-1:read: read:

2-2:alarm time: alarm time :

2-2-1:read: read:

2-2-2:set: set:

2-2-2-1:hour :d: 0-23: hour %d:

2-2-2-2:minute :d: 0-59: minutes %d:

2-2-2-3:alarm set :s: on, off: set %s:

_______________________________________

This will yield to a task output of e.g.:
 

"powerswitch 16 on" or

"clock current time read"
 

.-.-.-.-.-

 

Not


 

Not: This is a object which performs the logic invert operation of a Boolean input, input(bool). The Signal output(bool) carrying the inverse value of the input is emitted each time an input was received.

LED States:

Green:  The output(bool) of the NOT gate has the value "true"

Red:      The output(bool) of the NOT gate has the value "false"

.-.-.-.-.-
 

Or




Or: This is a object which performs the logic OR operation of two Boolean inputs, input1(bool) and input2(bool). The Signal output(bool) carrying the result is send each time one of the inputs was received.

LED States:

Green:  The signal output(bool) of the OR gate has the value "true"

Red:      The signal output(bool) of the OR gate has the value "false"

.-.-.-.-.-

 

PowerDimmer




PowerDimmer: This is an output object that is able to remotely control 230V AC power dimmer. There are different HW solutions available that are supported by this PowerDimmer.

As inputs there are the trigger(), level(int) and channel(int) signals. As output signal, you can find error(QString).

Options can be set in the dialog window, which input stimulates the dimming process. ( trigger(), level(int), or channel(int) ). Also as an option, for increased reliability of the switching, a repeater can be configured, so that the last switch signal will be repeated in regular time intervals.

The object symbol displays the channel number and the power level of this channel.

For proper function of this object, additional software has to be installed onto the computer. See the chapter How to install additional software for details.

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-

PowerSwitch



PowerSwitch: This is an output object that is able to remote switch 230V AC power adaptors. There are different HW solutions available that are supported by this PowerSwitch.

Options can be set in the dialog window, which input stimulates the switching. ( trigger(), setSwitched(bool), or setChannel(int) ). Also as an option, for increased reliability of the switching, a repeater can be configured, so that the last switch signal will be repeated in regular time intervals.

The object symbol displays the channel number and the switching state of this channel.

For proper function of this object, additional software has to be installed onto the computer. See the chapter How to install additional software for details.

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-

RandomNumber




RandomNumber: This object emits a random integer number output(int) whenever it receives a signal trigger().

The random number is within the interval, specified by the input signals minValue(int) and maxValue(int).

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-


Real



Real: This is a real variable object. It provides an Input and Store possibility for an double precision real Value. Its value can be set by the Signal input(double), and the output Signal valueChanged(double) is emitted each time, the variable value changes. The output signal output(double) can be stimulated by the input signal trigger() at any time. If in the dialog window the option "emit valueChanged(double) on startup" is set, the Real object emits a signal valueChanged(double) right after connecting to another object or right after a program file *.lvp is loaded.

The object displays the variable value in its object icon.

.-.-.-.-.-

RealCalculator



RealCalculator: This object is an arithmetic object which can perform integer arithmetic of two real numbers, input1(double) and input2(double). The operations "+", "-", "*", and "/" are supported and can be set in the dialog or by using the input signal operation(int).

Valid numbers of the input signal operation(int):

1 addition (+)

2 subtraction (-)

3 multiplication (*)

4 division (/)

The result is transmitted with the signal output(double). The signal error(QString) is emitted in case of invalid operations. In case of error, no output(double) signal will be emitted. The object displays the result of the calculation.

.-.-.-.-.-
 

RealComparator



RealComparator: This is a real object which compares an input Signal input(double) to an upper and lower limit of an interval. The outputs are withinLimits(bool), belowLimits(bool), and aboveLimits(bool). Optional, it can be configured, if the interval limits are to be considered within or outside the interval. The output values change according to changing inputs or changing interval limits. If the input value is within the limits, the signal output(double) is emitted.

Attention:

This object is only emitting the signals withinLimits(bool), belowLimits(bool), and aboveLimits(bool), when the signals are changing from true to false or vice versa. Example: if the limits are 0.0 and 1.0, and the last input value was 0.5, then the current values are:

aboveLimits(bool)    false

withinLimits(bool)    true

belowLimits(bool)    false.

Now, when a new input Signal is coming in, having the double value 2.0, then the two output signals are emitted:

aboveLimits(bool)   true

withinLimits(bool)   false

The signal belowLimits(bool) remains false and therefore is not emitted.


The object displays three LED indicators with the Boolean values according to the above description.

.-.-.-.-.-

RealGlobal



RealGlobal: This is the global variable object for the real numbers data type. A global variable object is able to send data to or receive data from another global variable object. The receiving object can be within the same application, on the same pc in another application, or on another pc, reachable over the internet. The data transport is realized using UDP packets, which are sent over IP.

In order to send data, you have to specify the IP address or the host name of the receiving pc in the dialog window of the global variable objects. Also choose a unique UDP port number. Use an arbitrary number between 49152 and 65535. These are the UDP channel numbers for private use. A data value in the object’s input input(double) is then send to the configured destination.

For receiving data a RealGlobal object of the same type has to be available at the destination. For this object, specify the UDP port number in the object’s dialog window, on which this global variable object should listen for incoming data. In case a UDP data packet is received, it is emitted by the object through the signal output(double).

In case of any error, an output signal error(QString) is emitted carrying an error message.

Remarks:

-          Each global variable object is able to send and receive data at the same time.

-         It is possible that a global variable object is sending data to a second one while receiving data from a third one.

-         It is possible to configure two global variable objects to send data to the same receiving object.

-         In general, it is possible to configure two global variable objects to receive data at the same host under the same UDP port, but only one object will receive the data, while the other one will not receive anything.


This object can be enabled and disabled by the input signal setActivated(bool).

. -.-.-.-.-

RealMultiplexer



RealMultiplexer: This is a real object that uses the input select(bool) to select, to which one of the two available outputs any input signal input(double) is forwarded. The input signals are forwarded to output1(double) when select(bool) is "true" and to output2(double) when select(bool) is "false". Each input signal input(double) is forwarded to the one selected output output1(double) or output2(double).

When the select(bool) signal changes its value, the switch over does not re-emit any output of the last valid input signal on the newly selected output. Only new approaching input signals are then forwarded to the newly selected output.

.-.-.-.-.-

RealSelector


RealSelector: This is a real object that uses the input select(bool) to select one of the two inputs input1(double) for select(bool) is "true" and input2(double) for select(bool) is "false". 

Any incoming signal of the selected input<x>(double) is directly forwarded to output(double).

Input signals approaching into the unselected input<x>(double) is simply ignored.

When the select(bool) signal changes, the object switches the new selected input<x>(double) to the output and instantly re-emits the last valid input signal of the newly selected input<n>(double) through the output.

.-.-.-.-.-

RealToInt



RealToInt: This is a real object which converts an input Signal input(double) into an output Signal output(int). Attention: In case that the real number value is too large for the integer value range, the integer value is set to an incorrect value, but in general, no error condition is recognizable. So take care in your programs that this conversion is within the integer value range.

.-.-.-.-.-

RealToString



RealToString: This is a real object which converts an input Signal input(double) into an output Signal output(QString). Just like in the ANSI C function of printf, the format String format(QString) serves as an format descriptor, where you can write text and specify the position and format of the integer by using the %g or %f placeholder.

.-.-.-.-.-

RemoteControl



RemoteControl: This object serves as an input object for remote control commands. There are three types of remote Control access supported by this object:

Which input method should be used, can be selected in the RemoteControl’s dialog window.

The RemoteControl object outputs the information of any pressed button to the signal output(QString). In case of any error, an error message is emitted with the signal error(QString).

The object sends repeated signals (~500ms) when a button on the remote control is pressed continuously. After all buttons are released, an empty signal is sent through output(QString).

A LED indicator on the IO-Warrior interface board is also flashing whenever a signal is emitted by the object. This gives direct optical feedback for the remote control user.

LED States:
Gray:                 the object is disabled
Red:                   an error occurred and the object is not functional
Dark blue:          the receiver is connected and the object is functional
Light blue:          a signal was received and is emitted

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-

ShellCommand



ShellCommand: This object represents the functionality to start a shell command, specified by an input signal command(QString). The shell command is then executed in the working directory workingDirectory(QString). The commands can be started and optionally stopped with the input signals start() and stop(). Any output, which the command usually brings to the standard output is send with the output signal output(QString) and any command output to the standard error will be sent by the object’s signal error(QString).

As options, it can be specified that commands are executed instantly when they are sent to the ShellCommander, and it can be specified if the output(QString) is sent continuously during execution of the command or only after the termination of the command execution.

LED States:

<Remark: No LED is implemented yet, it might be added later>

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-

SmokeDetector


SmokeDetector: This is an input object, which is able to provide data from a smoke detector ELV SDxxxxx, which also can send a HMS signal. In order to receive data from the smoke detector, a module ELV FHZ1000 PC has to be connected to the PC. The house code of the smoke detector has to be input into the object’s dialog.

The sensor emits periodically (approx. each 30 min) a signal, indicating if smoke is detected or not. This information is received by the FHZ1000 PC and analyzed by the SmokeDetector object, which in turn emits the signal alarm(bool). Possible errors are emitted by the output signal error(QString). When no signal is received from the smoke detector within a certain time (hours), an error message error(QString) is emitted. 

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-
 

String


 

String: This is a string variable object. It provides an Input and Store possibility for a String value. Its value can be set by the Signal input(QString), and the output Signal valueChanged(QString) is emitted each time, the String value changes. The output output(QString) can be stimulated by the input signal trigger() at any time. The string length length(int) is also emitted as an output signal. If in the dialog window the option "emit valueChanged(QString) on startup" is set, the String object emits a valueChanged(QString) signal right after connecting to another object or right after a program file *.lvp is loaded.

The object displays the output String in its display.

.-.-.-.-.-

StringBuilder



StringBuilder: This is a string object that outputs output(QString) which is a copy of input(QString) concatenated with append(QString).

.-.-.-.-.-

StringFinder:


 

StringFinder: this is a String object that searches for searchString(QString) inside the input(QString). The search starts at String position start(int) and finds the next appearance of the search string. If start(int) is smaller than 0, the search starts from the right side of the input string at the length()-n position.

The foundIt(bool) signal is send, indicating if the search string was found., Another output signal exactMatch(bool) is also emitted indicating if the search String and the input string are identical. As a further output pos(int), you get a zero based index of the first found appearance of the search string or -1, if no appearance was found. The output count(int) specifies how often the search string is contained in the input string. For convenience, the input string will be divided and copied into output1(QString) and output2(QString) right at the pos(int) position. Optional, the search string can be included or excluded from each output String.

LED States:
Green:                                                        The search string is inside input String
Red:                                                           The search string is not inside input String

.-.-.-.-.-

StringGlobal


 

StringGlobal: This is the global variable object for the string data type. A global variable object is able to send data to or receive data from another global variable object. The receiving object can be within the same application, on the same pc in another application, or on another pc, reachable over the internet. The data transport is realized using UDP packets, which are sent over IP.

In order to send data, you have to specify the IP address or the host name of the receiving pc in the dialog window of the global variable objects. Also choose a unique UDP port number. Use an arbitrary number between 49152 and 65535. These are the UDP channel numbers for private use. A data value in the object’s input input(double) is then send to the configured destination.

For receiving data a StringGlobal object of the same type has to be available at the destination. For this object, specify the UDP port number in the object’s dialog window, on which this global variable object should listen for incoming data. In case a UDP data packet is received, it is emitted by the object through the signal output(QString).

In case of any error, an output signal error(QString) is emitted carrying an error message.

Remarks:

-          Each global variable object is able to send and receive data at the same time.

-         It is possible that a global variable object is sending data to a second one while receiving data from a third one.

-         It is possible to configure two global variable objects to send data to the same receiving object.

-         In general, it is possible to configure two global variable objects to receive data at the same host under the same UDP port, but only one object will receive the data, while the other one will not receive anything.

This object can be enabled and disabled by the input signal setActivated(QString).

. -.-.-.-.-

StringMultiplexer


 

StringMultiplexer: This is a string object that uses the input select(bool) to select one of the two outputs output1(QString) when select(bool) is "true" and output2(QString) for select(bool) is"false". The input Signal input(QString) is copied to the selected output<x>(QString).

The object displays a LED for each output, which blink purple when a signal is emitted.

.-.-.-.-.-

StringReplacer:

StringReplacer: this is a String object that searches for searchString(QString) inside the input(QString)  and replaces it with the input value replace(QString). The search finds the next appearance of the search string. Optionally, by enabling the option fromRight in the widegt’s dialog, the search can be started from the right side. Other options are the Case Sensitivity and the option that all found occurrences of searchString(QString) are replaced by replace(QString).

The foundIt(bool) signal is send, indicating if the search string was found and replaced. The output output(QString) is always emitted in reaction to an input signal input(QString), regardless if the search expression was found (and replaced) or not.

LED States:
Green:                                           The search string is found and replaced within the input String
Red:                                              The search string was not found within the input String

.-.-.-.-.-

StringSelector



StringSelector: This is a string object that uses the input select(bool) to select one of the two inputs input1(QString) and input2(QString). The selected String is emitted through output(QString).

.-.-.-.-.-

StringSplitter


StringSplitter: This is a string object that is able to divide or split the input signal input(QString) into three output signals output1(QString), output2(QString),and output3(QString). The substring starting at the index pos(int) with the length, length(int) is cut out of the input string and emitted as output2(QString). The part of the input string, which is in front of the cut-out substring is emitted as output1(QString) and the part of the input string which is behind the cut-out substring is emitted as output3(QString).

.-.-.-.-.-

StringToInt



StringToInt: This is an integer variable object. It provides an input possibility for a string value input(QString). This value is converted into an integer number and emitted with output(int). The success of the conversion is shown by the output signal ok(bool).

.-.-.-.-.-

StringToReal


 

StringToReal: This is an real variable object. It provides an input possibility for a string value input(QString). The value is converted into an real number and emitted with output(double). The success of the conversion is shown by the output signal ok(bool).

.-.-.-.-.-

TempSensor



TempSensor: This is an input object, which is able to read the temperature from a temperature sensor device.

There are different HW solutions available that are supported by this TempSensor object. This Hardware can be selected by the mode Selector in the object dialog window.

-          A I2C based temperature sensor which is connected to an IOWarrior USB device. All is contained on a self built hardware device which uses the USB I/O device IOW-24 of the CodeMercenaries GmbH. For operation, the pc system must be configured to support the IOW24 device. See appendix for details. Some schematics for this hardware can also be found in the appendix. In order to select a specific temperature sensor attached to the pc, the serial number of the IOWarrior module and the I2C temperature device id (0-7) has to be specified in the Dialog window. The reading of the temperature value from the sensor must be initialized by the TempSensor object. Therefore a timer value in the object dialog specifies the interval time, when a temperature reading is performed and the result is emitted from the object. The temperature device is able to measure the temperature range from -25°C to +125°C in temperature steps of 0.5°C and an absolute error of +/- 2°C.

-          The HMS temp Sensors of the company ELV. Signals of the RF sensor devices are received by the ELV FHZ1000 PC device, which is connected to the PC via USB. The TempSensor function relies on the server application fhz1000.pl which has to be installed on the system. For details on installation, refer to chapter How to install additional software. In the dialog window, the channel of the RF temperature sensor must be specified. It can be read from the log file of the fhz1000.pl usually found in /tmp/fhz1000.log. There, all received messages are listed with their channel numbers. The HMS Sensor devices automatically send the current temperature value in time intervals of approximately 5 minutes. Then the TempSensor object reads it immediately.

The temperature sensor ELV HMS100 T has a range of -30°C to +70°C and a resolution of 0.1°C. The range is approx. 100m in the open field.

The current temperature reading is emitted as an output signal temperature(double). The object displays the last measured temperature value in its display.

Possible errors are emitted by the output signal error(QString). When no signal is received from the temperature sensor within a certain time (hours), an error message error(QString) is emitted.

LED States:
Gray:                 TempSensor is not enabled
Dark Yellow:    Waiting for the next Temperature value
Yellow:             TempSensor emits the curr. temperature
Red:                  An error occurred

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.- 

TextToWav



TextToWav: This object serves as data conversion object. It converts input(QString) into a spoken voice output, saved to an audio file. The file name can be specified with the input signal filename(QString). The conversion process can be started either with the trigger() input or with input(QString), depending on the parameter set in the object dialog. When the conversion is completed, two signals are emitted: output() and outputFile(QString). In case of errors, the signal error(QString) is emitted, specifying the error symptoms.

In the object dialog, there is also the possibility to specify the path to the voice files which should be used for speech conversion as well as a parameter for male or female voices, so you can choose the optimal languages and voices for your application.

This object can be enabled and disabled by the input signal setActivated(bool).

Information on how to install the software used for this object functionality (txt2pho and mbrola) can be found in the chapter How to install additional software.

.-.-.-.-.-
 

Timer


 

Timer: this is a time object which sends a periodical signal output() each time after the time interval has elapsed. The interval can be set in means of days, hours, minutes, seconds, and milliseconds. When the interval is changed during the timer is active, the new value will be valid after the next output() signal. The option fire on startup will lead to an initial output() signal at the activation of the object. The option restart timer on interval change will lead to an immediate timer restart as soon as a new timer interval value has been specified.

LED States:
Gray:                               Timer is not active (stop Button is pressed)
Dark blue:                        Timer is active
Light blue:                       Timer emits the output() signal
Yellow:                            New time interval is set, but old value is still valid

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-
 

Toggler



Toggler: This is a digital toggling object, similar to a Flip-Flop. It receives input signals input() or input(bool) (it reacts optional on the rising edge and/or falling edge) and toggles its own bool value from "true" to "false" and vice versa. The Toggler emits the signal output(bool) when it has a new value. Optional the signal output() can be emitted at the rising or falling edge of output(bool). The toggler value can be set with the input signal setValue(bool).

LED States:
Green:                                                        The signal output(bool) of the toggler has the value "true"
Red:                                                           The signal output(bool) of the toggler has the value "false"
 

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-
 

Translator


 

Translator: This object serves as a data processing object. It provides the functionality, that input signals of an arbitrary type are translated to arbitrary output signals. Input signals are of the types input(bool), input(int), input(double), and input(QString). Output signals are also available in multiple types, namely: output(bool), output(int), output(double), and output(QString). Additionally, the output signal foundIt(bool) is also emitted, showing if the input signal is found in the translate table.

In the table-like configuration with 4 columns, it can be specified which input signal will cause a certain output signal.

Example:

# input                           output

# type       value             type          value

int              3                  QString   “exactly three”

QString      “wahr”     bool        true

bool           false              int           0

QString      “Hallo Welt” QString   “hello world”

Lines starting with a # symbol are comment lines. The 4 parameters of each line must be separated with white space (spaces or tabs). QString values must be put in parenthesis when they contain white space. In the above example configuration, you see three different input-output assignments. An input signal input(int) carrying the integer value 3 will stimulate the output signal output(QString) with the value “exact three” ‘(without the parenthesis). An input signal input(QString) carrying the value “wahr” will stimulate the output signal output(bool) with the value true. An input signal input(bool) carrying the Boolean value false will stimulate the output signal output(int) with the value 0.

LED States:
Gray:                                                           the object is disabled or no signal is emitted
Green:                                                         an output signal output(bool) is emitted
Orange:                                                       an output signal output(int) is emitted
Yellow:                                                       an output signal output(double) is emitted
Purple:                                                        an output signal output(QString) is emitted
Red:                                                             an error of the configuration file is detected

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-
 

WaterSensor


 

WaterSensor: This is an input object, which is able to provide data from a moisture sensor device ELV HMS100 WD. In order to receive data from the sensor, a module ELV FHZ1000 PC has to be connected to the PC. The house code of the moisture sensor has to be input into the object’s dialog.  

The sensor emits periodically (approx. each 30 min) a signal, indicating if water is detected or not. This information is received by the FHZ1000 PC and analyzed by the WaterSensor object, which in turn emits the signal alarm(bool). Possible errors are emitted by the output signal error(QString).  When no signal is received from the temperature sensor within a certain time (hours), an error message error(QString) is emitted.

This object can be enabled and disabled by the input signal setActivated(bool).

.-.-.-.-.-
 

Xor



Xor: This is a object which performs the logic eXclusive OR operation of two Boolean inputs, input1(bool) and input2(bool). The Signal output(bool) carrying the result is emitted in reaction to any input signal.

LED States:
Green:                                                        The signal output(bool) of the XOR gate has the value "true"
Red:                                                           The signal output(bool) of the XOR gate has the value "false"

.-.-.-.-.-

Tips & Tricks

How to initialize a starting LinViex program

It is quite important to think about initializing a functional object setup, so that the system behavior is always correct after restarting an application. An easy way of accomplishing this is, to use a variable to provide and initial value to other objects. In the variable dialog you can select the option "emit valueChanged(<anytype>) after startup". Then, right after loading a *.lvp program, this variable is emitting the initial value.

If you need an initial signal of the type anything() you can also create a timer, set its time interval to a maximum (e.g. 999 days) and set the checkmark fire on startup. Then, one trigger event output() is emitted right after startup.

How to delay an arbitrary signal

It happens quit often, that a signal has to be delayed for a certain amount of time. This is necessary for example, when a signal has to be analyzed before it can be passed through a multiplexer or selector. A very simple approach is the following combination of a variable object and a delay:



The incoming signal is connected to the variable’s input(<anytype>) This causes an output of the variable valueChanged(<anytype>). This output stimulates the input input() of the delay object. After the delay time, the output of the Delay sends the signal output() which is connected to the variable’s  input signal trigger(). Finally, this trigger signal causes the variable object to emit the output signal output(<anytype>).

How to install additional  software

Setting up IO Warrior usb devices

Quick 'n dirty solution for Fedora Core 5:

# Code Mercenaries IOW 24

SYSFS{idVendor}==“07c0“, SYSFS{idProduct}==“1501“, SYMLINK+=“scanner-%k“

# Code Mercenaries IOW 40

SYSFS{idVendor}==“07c0“, SYSFS{idProduct}==“1500“, SYMLINK+=“scanner-%k“

For Suse 10.1, this procedure seems not to be necessary, because in the file /etc/udev/rules.d/50-udev.rules, there are libusb devices explicitly supported (see below in Setting up usb devices to be accessible for all users).

Setting up usb devices to be accessible for all users

Procedure for Fedora Core 5:

KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp", MODE="0666"

KERNEL=="tty[A-Z]*", NAME="%k", GROUP="uucp", MODE="0666"

Procedure for Suse 10.1:

SubSYSTEM==“usb_device“..."

Additional software for the TextToWav object:

- download txt2pho

- download mbrola

- download voice(s)

- install txt2pho

- check if txt2pho works

- install mbrola

- install voice(s)

- check if mbrola works

- follow the README files for details

adapt settings for TextToWav object in its property dialog.

Additional software xmms for the AudioPlayer object:

The AudioPlayer object uses the media player xmms to play the audio files.

- If not available in your system, please download and install xmms.

- Verify the functionality of xmms by typing "xmms <any audio file>" on a command shell. Xmms should start up and play the audio file. If this is successful, The AudioPlayer object should work as well.

- Also install optionally some xmms plugins, so you can play wma and mp3 files.

- make a right click on xmms main window and select the settings/options submenu. Set a checkmark so that more than one instance of xmms can be started.

 

Additional software Kaboodle for the AudioPlayer object:

The AudioPlayer object uses the media player Kaboodle to play the audio files.

- If not available in your system, please download and install xmms.

- Verify the functionality of xmms by typing "xmms <any audio file>" on a command shell. Xmms should start up and play the audio file. If this is successful, The AudioPlayer object should work as well.

- Also install optionally some xmms plugins, so you can play wma and mp3 files.

- make a right click on xmms main window and select the settings/options submenu. Set a checkmark so that more than one instance of xmms can be started.

 

Additional software Amarok for the AudioPlayer object:

The AudioPlayer object uses the media player Amarok to play the audio files.

- If not available in your system, please download and install xmms.

- Verify the functionality of xmms by typing "xmms <any audio file>" on a command shell. Xmms should start up and play the audio file. If this is successful, The AudioPlayer object should work as well.

- Also install optionally some xmms plugins, so you can play wma and mp3 files.

- make a right click on xmms main window and select the settings/options submenu. Set a checkmark so that more than one instance of xmms can be started.

 

Additional software for the AudioMixer object:

The AudioMixer object uses the KDE application kmix. It controls the master volume of kmix by sending dcop commands. Dcop is the inter-application protocol of KDE. If you are not using KDE, this object is probably not functional ( not tested, if  it works with gnome).



Additional software for the MailSender object:

The MailSender object uses the KDE application kmail. LinViex communicates with kmail using dcop. dcop is the inter-application protocol of KDE. If you are not using KDE, this object is probably not functional ( not tested, if  it works with gnome ).

Install and configure kmail in a way, that it starts up without asking for password input. Also, composed mails should be automatically sent from the folder outgoing mails without the need of manual interaction by the user.



Additional software installation for using FS20 and HMS equipment:

For driving RF power switches and power dimmers of the standard FS20, or for receiving data from sensor devices of the HMS standard ( Temperature Sensor, Smoke Detector... ), you need an interface for sending and receiving the RF signals. The system that is supported with LinViex is the “interface device” FHZ 1000 PC, from the company ELV. This device is connected to the pc via an USB port. Beware, that only the more expensive professional version of the FHZ1000 PC is supporting the HMS sensor devices.

For more details see



For operation, the Liviex objects PowerDimmer, PowerSwitch, TempSensor, WaterSensor,... rely on the server application fhz1000.pl, which can be downloaded under the above link. It should be installed according to the installation hints on the fhz1000.pl homepage.



The version 2.6 or higher of fhz1000.pl should be installed.



There must be a configuration file available, containing the default values and the correct directory paths. It should be named as fhz1000 and located in the /etc/ directory. Here the contents of this file:

logfile /tmp/fhz1000.log

savefile /tmp/fhz1000.save

verbose 3

fhzdev /dev/ttyUSB0

port 7072

modpath /usr/local/lib



In order to support HMS sensor devices, the RF interface ELV FHZ1x00 PC is used in the professional version. Otherwise HMS devices are not supported. In order to activate the HMS functionality, the license key must be programmed into the fhz100 PC device. Just perform this procedure with the windows application, according to the fhz1000 PC user manual.



Additional software installation for using RF switches and dimmers in combination with EZControl T-10

The EZControl T-10 will be delivered with a CD containing a small application called ezconsole. Just copy ezconsole to /usr/local/bin. This application will be called from the PowerSwitch and the PowerDimmer objects.

Refer to the T-10 user manual to configure an IP address to the T-10.

Open up an internet browser and specify the link http://<ip address of the T-10>. Then you see a configuration window where you can assign to a number of channels the power switches and power dimmers that you want to use. The PowerSwitch and PowerDimmer objects can address these configured channel numbers and do the switching and dimming operations.

Additional software for the PowerSwitch object using the parallel port:

In case you want to use the PowerSwitch object in combination with the parallel port device, the following installation steps have to be performed:

- download and install parashell

- set up parashell

- description of used hardware components

Known Bugs

Currently none

Stuff

Hyperlinks

The following links are implemented, so that the LinViex application’s help function can easily navigate to the object specific help information.

 

And

AppController

AudioPlayer

AudioMixer

Bool

BoolGlobal

Chronometer

Clock

Counter

Delay

HostView

Integer

IntCalculator

IntComparator

IntGlobal

IntMultiplexer

IntSelector

IntToString

LogReader

LogReader

MailReceiver

MailSender

MenuControl

Not

Or

PowerDimer

PowerSwitch

RandomNumber

Real

RealCalculator

RealComparator

RealGlobal

RealMultiplexer

RealSelector

RealToInt

RealToString

RemoteControl

ShellCommand

String

StringBuilder

StringFinder

StringMultiplexer

StringGlobal

StringReplacer

StringSelector

StringToInt

TempSensor

TextToWav

Timer

Toggler

Translator

WaterSensor

Xor