nucleron / YAPLC

Other
54 stars 22 forks source link

Universal serial connector for Beremiz proposal #1

Open nucleron opened 7 years ago

nucleron commented 7 years ago

Architecture

The connector consists of two parts:

Dynamic lib

Dynamic lib gives us a serial transport with standart API/ABI. Libs internals may use sockets/pipes/files/devices/etc. It can implement any transport that PLC vendor like, the only requirement, is standart API/ABI. The proposed API/ABI is:

int handle_open (void ** handle, char * uri, uint32_t uri_len); //Returns zero on successfull connection creation
int handle_close (void ** handle); //Returns zero on success
int handle_read  (void ** handle, void *buf, size_t nbyte); //Returns numer of bytes red
int handle_write (void ** handle, void *buf, size_t nbyte); //Returns number of bytes written

Where:

Beremiz connector

The connector itself implements serial connection protocol, we propose LPCManager or YAPLC/IDE protocols as a base.

It also should have standart Beremiz side connector API, if someone adds data buffering to connector it would be very cool.

We propose the following URI format for connector:

UNIDBG://Path_to_dynamic_lib//Transport_uri

Where:

Issues