Changes between Version 2 and Version 3 of Proposal


Ignore:
Timestamp:
May 27, 2013, 12:03:50 PM (11 years ago)
Author:
Frédéric
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Proposal

    v2 v3  
    44
    55This page is more or less a sandbox where I put my ideas. Feel free to comment.
     6
     7== Main line ==
     8
     9'''pKNyX''' is not a ready-to-use application: it is a '''framework'''. This means that it is up-to-you to write the application which fits your needs.
     10
     11For that, you will need to know '''Python''', a powerfull , high level, object oriented, scripting language. Don't be afraid: Python is really easy to learn. It is now very popular, and used in many free and commercial applications to extend capabilities of compiled applications. It is now even teached at school, to young people (~15 years old)! There are hundreds documentations, tutorials and example on the web, and a huge community. Learning Python is really not a waste of time, and will help you to do other task than building your KNX application!
     12
     13'''pKNyX''' will provide you powerfull tools so you will only focus on '''your''' problem, and not on language subtilities, like it can be the case with other languages, like C, C++...
     14
     15Ok, let me show you what I have in mind.
     16
     17== Virtual Device ==
     18
     19This is a central feature of '''pKNyX''', allowing user to create virtual devices which mimics real KNX devices. They follow the same architecture, like having '''Datapoints''' (aka as Communication Objects), which have to be linked to '''Group Address''' to communicate.
     20
     21Here is a very simple example:
     22
     23{{{
     24#!python
     25from pknyx.api import Device, ETS
     26
     27class Vent(Device):
     28    DP_01 = ("temp_1", "9.001", "cwtu", "low", 0)
     29    DP_02 = {'name': "temp_2", dptId: "9.001", 'flags': "cwtu", 'priority': "low", 'initValue': 0}
     30    DP_03 = dict(name="temp_3", dptId="9.001", flags="cwtu", priority="low", initValue=0)
     31
     32myVent = Vent("1.2.3")
     33ETS.link(myVent, "temp_1", "1/1/1")
     34ETS.link(myVent, "temp_2", "1/1/2")
     35ETS.link(myVent, "temp_3", "1/1/3")
     36}}}
     37
     38That's it!