Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:sw:02-apis:01-evok [2020/03/10 08:48]
jan_kozak
en:sw:02-apis:01-evok [2024/01/04 14:35] (current)
tomhora [Available protocols]
Line 1: Line 1:
-======%hide Evok ====== +====== Evok ====== ​  ​ 
-~~NOTOC~~ +~~NOTOC~~  
 +<WRAP group> 
 +<WRAP half column 81%>
 {{ :​en:​sw:​evok_1_.png?​400&​nolink |}} {{ :​en:​sw:​evok_1_.png?​400&​nolink |}}
 +</​WRAP>​
 +<WRAP half column 15%>
 +;;#
 +<​html><​span class="​dev-tag dev-patron">​Patron</​span></​html>​ \\
 +<​html><​span class="​dev-tag dev-neuron">​Neuron</​span></​html>​ \\
 +<​html><​span class="​dev-tag dev-gate">​Gate*</​span></​html>​ \\
 +<​html><​span class="​dev-tag dev-unipi11">​Unipi&​nbsp1.1</​span></​html>​ \\
 +<​html><​span class="​dev-tag dev-axon">​Axon</​span></​html>​
 +;;#
 +</​WRAP>​
 +</​WRAP>​
  
-The EVOK is our Apache-licensed open-source ​application programming interface (API), serving for remote access ​to our PLC unitsIt is a simple software ​to make access to hardware ​as simple as possible ​without ​any extensive ​programming.+The EVOK is our Open-Source ​application programming interface (API) providing interfaces ​to access physical inputs, outputs and communication interfacesIts goal is to provide simple ​access to the hardware without ​the need to deal with low-level ​programming.
  
-The software ​can be downloaded via its [[https://​github.com/​UniPiTechnology/​evok|GitHub repository]]. Here, the user can also find documentation,​ installation instructions and a technical manual+Documentation,​ installation guide and description of APIs can be found at [[https://​github.com/​UniPiTechnology/​evok|GitHub repository]]. ​
  
-==== Basic features ==== 
  
-EVOK is equipped with six protocols (or unified methods) serving as a replacement ​of the need to write custom code that means the user can use almost any programming language. The API itself then serves as a layer between the hardware ​and the EVOK web-based ​control interface. The resulting software is so easy to use, even an absolute beginner can use it. +===== Basic features ===== 
 +Evok consists ​of two modules: 
 +  ​Evok API - the core handling the communication ​between ​all APIs and the hardware 
 +  - Evok Web - a practical example of some of the APIs in a Web-based ​application which also serves as a simple UI of all I/Os of the unit
  
-EVOK gives the user an option to control basic operations ​via a simple web interface, such as switching I/O modules, monitoring ​the system ​state, carrying out measurements etc. For more complex operations (such as specific system/​behaviour programming), the user has to use a suitable ​external application. Such an application would then use EVOK as a communication layer between the I/O modules and itself. +Application logic and other operations ​(implementation of different components of the system) ​should be handled by an external application.
- +
-Support for [[en:​sw:​02-sdks:​02-modbus-tcp|TCP-Modbus]] interface and [[en:​sw:​02-sdks:​04-sysfs|SysFS]] is also included, along with a basic Wi-Fi functionality.+
  
 {{:​en:​sw:​02-evok:​evokedited.png?​400|Simplified EVOK scheme}} {{:​en:​sw:​02-evok:​evokedited.png?​400|Simplified EVOK scheme}}
  
-==== Protocols used ==== +===== Available protocols ===== 
-**REST** ​is a type of API design, which is based on endpoint operations under the HTTP specification. The WebForm interface provides native web-based access to our API, based on the same communication principle as plain HTML forms. +  ​* ​**REST** 
- +  ​* ​**Bulk JSON** 
-**Bulk JSON** ​protocol is designed to send a series of commands at once, achieving much lower latency than using separate TCP connections. Without the use of this protocol, sending e.g. 20 commands -each with 25-millisecond latency- would take up to 0.5 s. That would make the device unsuitable for use in time-critical applications,​ such as for lighting switches. With the bulk protocol, however, the user can send a large series of commands such as this, with total latency (for the example given) not exceeding 30 milliseconds. +  ​* ​**REST JSON** 
- +  ​* ​**SOAP** 
-**REST JSON** ​is very similar to REST WebForms. The difference is that it uses the JSON (JavaScript Object Notation) file format, which transmits attribute-value pairs, along with array certain array data types, in the form of JavaScripts data objects. This makes it much easier to process in JavaScript. +  * **WebSocket**  
- +  * **JSON-RPC** 
-**SOAP** ​(Simple Object Access Protocol) is a protocol based on XML, which utilises a pre-defined access interface called WSDL, making it simpler to parse and allowing easier integration of EVOK into existing systems.+\\
  
-**WebSocket** is an independent communication protocol, which allows creating a full-duplex (i.e. two-way, simultaneous ​data transfer) communication over a standard TCP connection. It can be used in machine-to-user as well as machine-to-machine applications.+<​html><​span class="​kbBlueText">​Quick examples using curl and JSON:</​span></​html>​ 
 +  ​Returning the state of digital input **DI 1_01**: <​code>​curl --request GET --url http://​your-ip-goes-here:​8080/​json/​input/​1_01</​code>​ 
 +  * Switch-on the **RO 2_01** relay: <​code>​curl --request POST --url http://​your-ip-goes-here:​8080/​json/​output/​2_01 --header '​content-type:​ application/​json' ​--data ​'​{"​value":"​1"​}'</​code>​ 
 +  * Switch-off the **RO 2_01** relay: <​code>​curl ​--request POST --url http://​your-ip-goes-here:​8080/​json/​output/​2_01 --header '​content-type:​ application/​json'​ --data '​{"​value":"​0"​}'</​code>​
  
-**JSON-RPC** is a designation for a protocol which uses JSON objects to remotely invoke scripting functionsThis allows the integration of remote functions, without the need to create transport objects.+See the {{https://​kb.unipi.technology/​_media/​en~:​sw:​02-evok:evok.html | complete documentation including API usage examples}}.
  
-==== Full EVOK technical scheme ====+===== Full EVOK technical scheme ​=====
 {{:​en:​sw:​02-evok:​neuron_diagram.png?​direct&​400|}} {{:​en:​sw:​02-evok:​neuron_diagram.png?​direct&​400|}}
  
 ~~NOCACHE~~ ~~NOCACHE~~