Page 1 of 1
					
				UDP sockkets in BlackBox CP
				Posted: Sat Oct 17, 2015 6:29 pm
				by dmaksimiuk
				Hi all,
 Is there any (fast, easy, and simple) way to get UDP sockets working with the framework? The CommTCP supports only  ... TPC right?
 There is Ta_ subsystem developed by Dmitry V.Dagaev but at this stage it would be an overkill for my application.
 Any suggestions ?
Cheers,
  Darek
			 
			
					
				Re: UPD sockkets in BlackBox CP
				Posted: Sun Oct 18, 2015 2:22 am
				by Ivan Denisov
				Yes, Peter Kushnir made this:
https://bitbucket.org/oberoncore/ypk/sr ... at=default
Look at the CommUDP.odc. It is the alternative for CommTCP.
All the 
ypk subsystem may be useful 

 
			
					
				Re: UPD sockkets in BlackBox CP
				Posted: Sun Oct 18, 2015 11:35 am
				by dmaksimiuk
				Hi Ivan,
  I got the ypk software from the repository (I could not find the WinHdrs subsystem). When I tried to compiler the ypkCommUDP module I got an error:
Code: Select all
PROCEDURE NameToAdr (IN peername: ARRAY OF CHAR; VAR inaddr: WinNet.in_addr; OUT ok: BOOLEAN);
		VAR hostentry: WinNet.Ptrhostent; shortPName: ARRAY 64 OF SHORTCHAR;
	BEGIN
		shortPName := SHORT(peername$);
		IF IsIPAddress(peername) THEN
			inaddr.S_un.S_addr := WinNet.inet_addr(shortPName);
			ok := (peername$ = '255.255.255.255') OR (inaddr.S_un.S_addr # WinNet.INADDR_NONE); 
                       (* pk,  потому что: An Internet address with a dot notation value of 255.255.255.255 or its 
                           equivalent in a different base format causes the inet_addr subroutine to return an unsigned integer 
                           value of 4294967295. This value is identical to the unsigned representation of the error value. 
                           Otherwise, the inet_addr subroutine considers 255.255.255.255 a valid Internet address. 
                        *)
			ASSERT(ok);
		ELSE
			hostentry := WinNet.gethostbyname(shortPName);
			ok := hostentry # NIL;
			IF ok THEN
				inaddr := hostentry.h_addr_list^[0]^[0]  [b]  <-- Error : incompatible assignment 
			ELSE
				Error("gethostbyname()", WinNet.WSAGetLastError())
			END
		END
	END NameToAdr;
I seems that Peter's version of the software is not compatible with the BBox I am using (1.7-RC6 built number 44).
Cheers,
  Darek
 
			
					
				Re: UPD sockkets in BlackBox CP
				Posted: Sun Oct 18, 2015 1:59 pm
				by Romiras
				Look at 
Transparent Architecture component.
Transparent Architecture is a library for distributed systems development. It is designed as cross-platform, tested for Windows and Linux.
TA implements non-blocking I/O with a set of transport protocols supported: multicast, UDP, TCP, ICMP, Shared Memory, Unix Domain Sockets, Unix Message Queue.
TA is designed to cover a wide range of communication: Real-Time, LAN Ethernet and WAN SOAP. It can be a pilot of unified substituting technology for CORBA, COM and DDS.
TA is distributed in C and Oberon versions compatible with each other.
 
			
					
				Re: UPD sockkets in BlackBox CP
				Posted: Sun Oct 18, 2015 2:24 pm
				by Ivan Denisov
				dmaksimiuk wrote:Hi Ivan,
  I got the ypk software from the repository (I could not find the WinHdrs subsystem). 
It is not easy to compile this subsystem 

 there is 
some instruction how to build superset of 
ypk called 
bb.open
The WinHdrs was transformed and now it is placed here:
https://bitbucket.org/oberoncore/interf ... efault.zip
dmaksimiuk wrote:I seems that Peter's version of the software is not compatible with the BBox I am using (1.7-RC6 built number 44).
For sure, he was using he's own version. But it should be compatible with 1.6.
Now I recommend you to use Center version. CommUDP is compatible with Center BB 1.7 Alpha 1.
UPD:
I asked, Peter Kushnir, unfortunately he have no time to support 
ypk anymore for new versions of BlackBox.
 
			
					
				Re: UPD sockkets in BlackBox CP
				Posted: Sun Oct 18, 2015 3:50 pm
				by dmaksimiuk
				Hi Ivan,
  where I can find the center version of the CommUDP ?
Cheers,
  Darek
			 
			
					
				Re: UPD sockkets in BlackBox CP
				Posted: Sun Oct 18, 2015 4:46 pm
				by Ivan Denisov
				dmaksimiuk wrote:Hi Ivan,
  where I can find the center version of the CommUDP ?
Cheers,
  Darek
I mean Center version of BlackBox!
http://blackboxframework.org/lastdev/zip.php
Peter's CommUDP is compatible with it.
UPD: 
ypkCommUDP is independent from 
ypk, you can use it separately as a single module like 
CommTCP.