Please somebody complete this page!
Sutrumpinimas VSCP, išvertus iš anglų kalbos, reiškia “Labai Paprastas Valdymo Protokolas” ir kaip matome iš pavadinimo jis yra iš tikro labai paprastas.Jis paprastas todėl kad yra naudojami mažo našumo ir pigūs mikrokontroleriai.
Bet iš tikro VSCP yra žymiai daugiau negu vien tik protokolas.Tai visas programų komplektas kartu su kontroleriais yra pavadintas kaip “VSCP ir draugai”.Tai pilnas sprendimų paketas skirtas matavimams ir valdymui.Protokolas buvo paviešintas 2000 metais ir yra atviras ir nemokamas visiems.
VSCP naudoja labai gerai suformuluotą pranešimų formatą ir palaiko globalius indentifikatorius mazgu indentifikavimui kuriam pasaulio taške jie bebūtų instaliuoti.Jis palaiko registrų modelį kuris yra labai lankstus visu mazgų konfiguravimui ir funkcionavimui.
VSCP neužsimena nieko apie žemo lygio protokolus.Jis tik kaip transporto mechanizmas kaip ir Ethernet,TCP/IP,Wireless,ZigBee,Bluetooth,CAN,GPRS,RS-232,USB sąsajos.
Kiekvienas valdymo ar matavimo sprendimas gali būti realizuotas naudojant VSCP.
VCSP is designed to be used where other solutions are to expensive to implement. This can typically be in code overhead where most other protocols use more resources (flash/ram) on a micro-controller then the actual “application” adding a lot of cost to the project.
VSCP yra naudojamas tada , kai kiti sprendimai būna per daug brangūs.Daugelis kitų protokolu reikalauja žymiai didesnių mikrokontrolerių resursų ( flash ir/arba operatyviosios atminčių) kas padidina projekto kaina.
VSCP can work with a typical lowest cost dumb nodes like the Microchip MCP250xx series, to a 1K-2K flash micro controller module up to a full implemention with all features in about 5K flash.
VSCP gali veikti su tokiais primityviais mazgais kaip Microchip MCP250xx ir užimti iki 1K-2K mikrokontrolerio atminties arba iki 5K atminties kai yra realizuotos visos VSCP funkcijos.
VSCP is both free and open. Everyone can join the project and help to add features and functionality to the protocol. There is free firmware and driver code available for most micro-controllers which uses many communication techniques. Anyone can use this code with no demand to share back any new code added even if most users do just that. VSCP yra laisvas visiems.Kiekvienas gali prisijungti prie projekto ir padėti papildyti šį protokola naujomis funkcijomis bei papildomomis savybėmis. Visi mikorkontolerių programiniai kodai kaip ir draiveriai yra laisvai pasiekiami ir nemokami.Šiuos kodus kiekvienas gali naudoti laisvai įvairiems projektas be būtinybės apie tai pranešti apie kodų pakeitimus.
VSCP is an event based system. Nodes generate events and nodes react on events. Normally events is not addressed but instead they are broadcasted on the bus. Its up to the receiving end to decide if its interested in the event or not.
VSCP pagrindą sudaro įvykiai.Kiekvienas mazgas reaguoja į įvykius.Paprastai įvykiai nėra adresuojami , o siunčiami į bendrą magistralę kur kiekvinas mazgas turi spręsti domina jį šis įvykis ar ne.
All events got a originating address for the node they are sent from. This is a GUID consisting of 16 bytes but a shorter, typically, one byte nickname id is used on most system. It is always possible to deduce the full GUID from the nickname.
Visiems įvykiams yra suteikiamas siunėjo adresas.Tai GUID (globalus ir unikalus indentifikatorius) kurį sudaro 16 baitų , bet kaip taisyklė daugelyje sistemų naudojamas supaprastintas indentifikatorius , kurį sudaro 1 baitas.Pilną GUID visada galima atkurti iš šio supaprastinto identifikatoriaus.
Events are divided into groups. First there is Level I and Level II events. Level I events are limited to a maximum of eight bytes of data while Level II events can have up to 488 bytes of data. The low maximum data count for Level I comes from that CAN has been used as the least common denominator. This does not limit VSCP Level I to be used only over CAN.
Įvykiai yra skirstomi į grupes.Tai pirmo lygio “Lygis I” ir antro lygio “Lygis II” įvykiai.”Lygis I” pranešimų dydis yra ne didesnis kaip 8 informacijos baitai. kai tuo metu “Lygis II” gali turėti iki informacijos 488 baitų.”Lygis I” duomenų ribojimas yra atėjęs iš CAN standarto specifikacijos.Bet tai nereiškia, kad “Lygis I” privalo būti naudojamas tik su CAN standarto magistralėmis.
Both Level I and Level II events are divided into a class and a type. The class defines a group of events of a specific type. Typical examples are classes for measurements, information and control.
Abiejų tipų įvykiai yra skirstomi į klases ir tipus.Klasė apsprendžia įvykių grupės specifinį tipą.Tipiniai pavyzdžiai tai matavimai, informacija ir kontrolė.
As mentioned above events are not addressed. This is not entirely true as one class in each level (CLASS1.PROTOCOL and CLASS2.PROTOCOL) have events that are addressed. These classes defines protocol functionality that all nodes must implement. Typical examples found here is event typse for boot loader, register access and status information.
Kaip buvo minėta aukščiau įvykiai nėra adresuojami.Tai nėra visiškai tiesa dėlto kad kiekviename lygyje yra klasės (CLASS1.PROTOCOL ir CLASS2.PROTOCOL) įvykiai , kurie yra adresuojami.Šių klasių įvykius privalo palaikyti kiekvienas VSCP mazgas.Tipiniai pvydžiai tai programų užkrovimo (booloaders) įvykiai ir duomenų iš registrų nuskaitymas iš konkrečių mazgų.
Most of the events can use a zone/subzone definition to define a group of nodes.
Daugelis įvykių gali būti sugrupuoti pagal zonas arba zonų dalis.
Each node has a specified number of byte wide registers defined. This is the second interface to the black box the node represents. The register space of a node is 256 bytes divided in two halves. The lower part (0×00-0x7f) is application specific. The upper part content is mandatory and specified by VSCP. This space hold, among many other things, the firmware and hardware version of the node. The GUID, user module id, alarm status and similar registers.
Kiekvienas VSCP mazgas nusako konkretų skaičių registrų, kurie yra naudojami kaip ryšis tarp “juodosios dežės” , kuri yra VSCP mazgas.Registrų adresų sritis - 256 baitai kuri yra padalinta į dvi dalis.Pirmąji dalis (0×00-0×70) priklauso nuo konkrečios mazgo paskirties.Kita registrų dalis yra privaloma ir aprasyta VSCP standarte.Šioje dalyje aprašomi daugelis daiktų kaip programinė ir konstrukcinės versijos, identifikatoriai,GUID, avarinės situacijos ir pan.
In the top of the mandatory register space is a 32 byte string stored, the MDF, which contains an URL that points to a location where to find an XML file that describe this module its registers and its functionality.
Viršutinėje privalomoje pagal standartą 32 baitų dalyje taip pat yra talpinama MDF informacija ,kurioje nurodytas URL adresas kur reikia ieškoti XML apyrašo apie modulį.
The lower part of the register space is used to define control and status registers and more complex structures. The area is mapped and 65535 pages can be used if needed allowing for very complex scenarios if needed.
Apatinė dalis skrta aprašyti kontrolei ir būsenoms, o taip pat sudėtingesnėms struktūromas.
The MDF file describe the module in a high level way. It gives information about the maker of the module, what events can be expected from it and the definition of its register content. The MDF looks at the module from a high level perspective and can see floating point values, bit arrays, option tables in register space and thus give application software a way to present registers in a much more user friendly way.
MDF failas aprašo modulius aukštesniame lygmenyje.Jame yra įtraukta informacija apie modulio gamintoją,numatomus įvykius ir registrų turinius.MDF palaiko plaukiojančio kablelio, bitų masyvų, savybių lenteles registų masyvuose reikšmes kurias programinės aplikacijos gali geriau suprasti.
There is two way to obtain the MDF after getting it from the module by reading the registers holding it . As VSCP is designed for low end nodes it is normally to much for such a node to have the MDF stored internally. In this case the string points to a web server from which the XML can be downloaded and processed. In a more capable module with more resources the MDF is stored internally in which case the read string has zero length and in this case the MDF data can be fetched from the module itself. The node constructor decide which method he/she wants to use.
Yra 2 būdai nuskaityti MDF failą: pirmas tai nuskaitymas iš modulio registrų.Taip kaip VSCP yra sukurtas moduliams su ribotais resursais, sie moduliai neturi galimybės saugoti visą MDF filą savyje.Tuo atveju URL eilutė nurodo vietą WEB serveryje iš kur ir galima parsisiųsti šį failą.Modulis su didesniais resursai jau sugeba savyje sutalpinti visą MDF failą.Šiuo atveju MDF failas yra siunčiamas tiesiaii iš modulio.Taip pat MDF failas nusako kur ieškoti ivairius draiverius moduliu funkcionalumui palaikyti.
The MDF also point out where drivers for different environments and systems for the module and user manuals etc can be found.
All nodes can optionally implement a decision matrix. This matrix is used to define one or a group of events that should trigger a predefined functionality at the module. In VSCP this is called the Event-Decision-Action mechanism from the predecessor of the project which was called EDA.
Visi moduliai gali papildomai savyje turėti sprendimų matricą.Ši matrica yra naudojama aprašyti vienam arba grupei įvykių , kurie vėliau aktyvuoja tam tikras funkcijas moduliuose.VSCP sistemoje tai vadinama Įvykis-Sprendimas-Atoveiksmis , kuris yra kilęs iš EDA projekto.
A typical examples can be to trigger a relay. The module got one action that set the relay and another action that reset it. Typically this could be implemented hard coded so that the relay would be set when an ON-event was received and reseted when an OFF-event was received. With the use of the DM it is easy to use any event to trigger the action not just the ON/OFF events.
Tipinis pavyzdys - relės junginėjimas.Modulis gali gauti užduotį įjungti relę arba ją išjungti.Tai gali būti realizuojama tokiu principu kad kai reles modulis gauna ivykį “įjungti” relė yra įjungiama ir gavus “išjungti” įvyki relė yra išjungiama.Naudojant sprendimų matricą relei valdyti galima panaudoti betkokį įvykį , o net tik “įjungti” arba “išjungti”.
Physically the DM is located in register space just as any other parameters of the module so register access functions are used to changed it.
Sprendimų matrica, kaip ir kiti modulio parametrai, randasi registrų zonoje ir gali būti lengvai modifikuojama.
A special class is used for measurements and events for all SI units and derived units is defined. The class will grow over time when new types are needed. This means that for example a temperature measurement is normally sent as a Kelvin temperature. Celsius and Fahrenheit is also possible in this case and similar alternatives is available for other types but the SI unit is always the default.
Matavimams yra naudojama speciali atskira klasė kur visoms reikšmėms naudojai SI standartai.Laikui bėgant ši klasė yra plečiama ivedant naujas reikšmes.Tai reiškia kad pagal nutylėjimą temperatūros reikšmė yra naudojama pagal Kelvino skalę.Celsijaus ir Farengeito skalės taip pat gali būti panaudotos kaip ir kitos alternatyvos, bet pagal nutylėjima visada naudojami SI standartai.
How the measurement is presented in the frame is also well specified. Bit field, string, integer, normalized integer (decimal) and floating point values are possible. The normalized integer is especially well suited for a low end system to send decimal data. As the event and its content is well specified it is very easy to interpret the data on the receiving end where it should be processed, stored in a database, logged or displayed.
Bitai,bitų laukai,eilutės,sveiki skaičiai,normuoti skaičiai ir skaičiai su plaukiojančiu kableliu taip pat gali būti naudojami.D Dėl tos priežasties kad visi duomenų tipai ir įvykiai yra standartizuoti yra lengva juos primti imtuve ir atvaizduoti ekrane arba duomenų bazėje.
As VSCP is event based one often need to think a bit differently when constructing a system. A typical example is a tank with a level sensor and a pump which together construct a self contained system. A traditional system system would have used a master to control the pump and the sensor. In VSCP we allow for this also but try to distribute as much of the intelligence as possible to the nodes themselves.
Dėlto kad visos VSCP sistemos pagrindą sudaro
So what we do is to tell the level sensor to send level information with a predefined interval. Possibly having several sensors for redundancy.
We tell the pump that it should start to fill up the tank when the tank reach a low level and stop at a high level. This might be dangerous as the sensor may stop working, the cable get cut or whatever. In this case the we also program the pump goes to its safe state == pump off and alarming this state to the rest of the system when it does not receive sensor measurements any more.. This “safe state“ is often possible to find for most control situations.
As the transport mechanism is unknown to the application, timing must be very lose for VSCP. We cannot be certain when an event arrives or if it arrives. Many transport mechanisms, such as CAN and TCP/IP, makes delivery more certain while other solutions like UDP, RF and PLC can be problematic. It is therefore very important that a sent event always get a confirmation event back.
For some nodes this might not be important. A temperature node or the level sensor node above just send there measurements and don't care if someone uses them or not. This thinking is central. The node that originate an event should – if possible - know as little as possible about how the event it sends out will be used. This make the system very flexible.
A software package called VSCP & Friends is available to support VSCP users. This package can be downloaded and used for free and contain a lot of application and code. Everything is available both for Windows and Linux based systems.
First and possibly most important it contain the VSCP daemon. This is a server software that makes it possible to control several VSCP segments over the Internet.
The server expose a secure Internet interface and makes it possible to add drivers for segments of nodes or special equipment. A driver can communicate with the server using the CANAL interface for a Level I driver and the TCP/IP interface for a Level II driver.
CANAL stands for CAN Abstraction Layer and was initially developed as a software layer between application software and CAN equipment. For the VSCP it is not limited to interface CAN equipment but CAN drivers for most CAN adapters such as PEAK, IXXAT, PORT etc is included in the package as many CAN users use the system.
A lot of code is available that confirms to the CANAL interface. This same code can be used to communicate directly to a device that use the CANAL driver as can be used to talk to the daemon. This makes, among many other advantages, it easy to build simulated systems that use the same code base as the resulting system.
The daemon can do a lot more such as remotely replace/install drivers, remotely handle users and permissions, set up and handle an internal decision matrix to set up a self contained control system etc.
VSCP Works is a client application that is included in the package. This application can be used to send/receive VSCP events to/from every segment/device that export a CANAL interface and also talk to a remote VSCP daemon. VSCP Works can be used to investigate register space on any VSCP node and will also have support for remote firmware upgrade.
Server and client application is released under the GPL license. Libraries and classes is released under a modified LGPL license that make sure they can be used in proprietary projects.
Maybe the most important aspect of the VSCP & Friends package is that it can be used as an abstraction for interfacing other technologies and protocols. One just need to build a driver that translate the systems functionality to/from VSCP events and then install this driver for the VSCP daemon and then remote control functionality, software interface etc is directly available.
This way one application interface can be constructed to control several technologies using different protocols. One can compare this to the situation for printers before windows was announced. Each application needed to distribute a stack of disks with printer drivers. Windows ended this by introducing the printer API abstraction for printers. VSCP & Friends does the same for SECO (SEensor/COntrol) devices .
A web interface named OHAS is under development that will make it possible to build dynamic control interfaces with drag and drop technology. Summary
VSCP makes it easy and very cost effective to build systems with distributed intelligence. The protocol is placed in the Public Domain so it is therefore free for anyone to use and modify to there own needs. VSCP can be used all the way from the application down to the device but it can also be used as an abstraction to other technologies so one application can be written that transparently use several different technologies..
More information and downloads is available at http://www.vscp.org
Discussion