You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Beremiz connector which loads a dynamic lib and use it as a transport to PLC.
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:
inthandle_open (void**handle, char*uri, uint32_turi_len); //Returns zero on successfull connection creationinthandle_close (void**handle); //Returns zero on successinthandle_read (void**handle, void*buf, size_tnbyte); //Returns numer of bytes redinthandle_write (void**handle, void*buf, size_tnbyte); //Returns number of bytes written
Where:
handle - an opaque pointer for transport control entity.
uri - a pointer to sockets/pipes/files/devices/etc name.
uri_len - URI length (yes we will try address possible buffer overflow).
buf - a pointer to data buffer used for communication.
nbyte - a number of byte to transmit/receive.
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:
Path_to_dynamic_lib - A path to dynamic lib file (I beleive it should be relative to some base dir).
Transport_uri - a string that will be passed to handle_open as uri.
So PLC vendors can implement any transport layer they like and they can use the same connector for different transports.
Issues
32/64 bit: 32bit python wants 32bit dll, 64bit python wants 64bit lib at least on Windowr(R).
Boot protocol: different vendors use different boot protocols (e.g. we use STMicros-bootloader for program boot) and different file types to boot their PLCs, we must design some common way to handle these differences.
The text was updated successfully, but these errors were encountered:
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:
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:
Where:
So PLC vendors can implement any transport layer they like and they can use the same connector for different transports.
Issues
The text was updated successfully, but these errors were encountered: