Hi,
I need to broadcast video by powerlink. I have a frame 1280x1024. I want to send a video's string(1280 bytes) per cycle. How can I make data struct using openConfigurator?
Thank you.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
First of all we would like to have some more understanding about the application you are working on. Some information such as:
What is the source of Video stream?
How you handle the stream in the application?
Priorities
POWERLINK Node used to broadcast the frames (Master/Slave).
etc.
This will help us to suggest the most precise way to achieve it with openPOWERLINK and openCONFIGURATOR.
Coming to your question, I assume that you are using a POWERLINK master, then the straight forward way to handle it with openCONFIGURATOR will to create a mapping for TPDO/RPDO for 1280 bytes using 32bits data type. The openCONFIGURATOR will generate the required configuration file (mnobd.cdc) along with the xap.h. This xap.h contains the structure definition containing the 1280 bytes as 32 bits variable. This structure can then be used in your application to create a buffer used to exchange 1280 byte per cycle. Every cycle you can copy 1280 byte into this buffer from the 1280x1024 frame.
The approach to achieve the exchange might be different depending upon your application also. So some more information will surely help us to answer this question precisely.
Regards,
Powerlink Team
Kalycito
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for answer.
1. I'm trying to broadcasting video file from a computer to another. But in the future i will broadcast video-stream from a camera to computer.
2. If i understood correctly the question, I assume to read frame's string from ImageObject by function oplk_linkProcessImageObject() and every 40 msec to display on the monitor.
3. I will be to broadcast data as async, but i will not be mind if data is broadcasted as isochronously.
4. I will use relationship Master/Slave.
How can I create array with 1280 elements? Should I added to TPDO/RPDO every ele ments by hands?
Thank you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
As you wish to broadcast the data into the ASync phase of POWERLINK you just need to configure the Asynchronous MTU size to the value 1500 which will allow to send a packet of size (1500bytes - header size)bytes.
After this you can use the virtual Ethernet interface (Linux demo) which may be suitable for your application. You can send and receive data by creating sockets over the openPOWERLINK interface at sender and receiver for communication.
Regards,
Powerlink Team,
Kalycito
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I catch packets by wireshark. The packets go through the net as IpV4 UDP. Is it true? How to distinguish "simple" udp packets from "powerlink" udp packets?
Thank you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The type of the communication (TCP/UDP) depends on the type of socket specified during the creation of socket.
In your case, you have specified SOCK_DGRAM which will create UDP socket on PLK interface. To check for the packets from POWERLINK interface please look for the specified source port id (25112 in your case) in the trace.
Regards,
POWERLINK Team,
Kalycito
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I need to broadcast video by powerlink. I have a frame 1280x1024. I want to send a video's string(1280 bytes) per cycle. How can I make data struct using openConfigurator?
Thank you.
Hello Riyan,
Thanks for your interest in openPOWERLINK.
First of all we would like to have some more understanding about the application you are working on. Some information such as:
etc.
This will help us to suggest the most precise way to achieve it with openPOWERLINK and openCONFIGURATOR.
Coming to your question, I assume that you are using a POWERLINK master, then the straight forward way to handle it with openCONFIGURATOR will to create a mapping for TPDO/RPDO for 1280 bytes using 32bits data type. The openCONFIGURATOR will generate the required configuration file (mnobd.cdc) along with the xap.h. This xap.h contains the structure definition containing the 1280 bytes as 32 bits variable. This structure can then be used in your application to create a buffer used to exchange 1280 byte per cycle. Every cycle you can copy 1280 byte into this buffer from the 1280x1024 frame.
The approach to achieve the exchange might be different depending upon your application also. So some more information will surely help us to answer this question precisely.
Regards,
Powerlink Team
Kalycito
Thanks for answer.
1. I'm trying to broadcasting video file from a computer to another. But in the future i will broadcast video-stream from a camera to computer.
2. If i understood correctly the question, I assume to read frame's string from ImageObject by function oplk_linkProcessImageObject() and every 40 msec to display on the monitor.
3. I will be to broadcast data as async, but i will not be mind if data is broadcasted as isochronously.
4. I will use relationship Master/Slave.
How can I create array with 1280 elements? Should I added to TPDO/RPDO every ele ments by hands?
Thank you!
Hello Riyan,
As you wish to broadcast the data into the ASync phase of POWERLINK you just need to configure the Asynchronous MTU size to the value 1500 which will allow to send a packet of size (1500bytes - header size)bytes.
After this you can use the virtual Ethernet interface (Linux demo) which may be suitable for your application. You can send and receive data by creating sockets over the openPOWERLINK interface at sender and receiver for communication.
Regards,
Powerlink Team,
Kalycito
Could you tell me where i may found example with creating openPOWERLINK socket?
Thank you!
Hello Riyan,
On Linux, openPOWERLINK provides a network interface (plk) like any other NIC with an IP address (Default 192.168.100.NODEID).
You can create Linux sockets on this interface like any other NIC interface.
Regards,
Powerlink Team,
Kalycito
Hello, Powerlink-team!
I catch packets by wireshark. The packets go through the net as IpV4 UDP. Is it true? How to distinguish "simple" udp packets from "powerlink" udp packets?
Thank you!
Hello Riyan,
The type of the communication (TCP/UDP) depends on the type of socket specified during the creation of socket.
In your case, you have specified SOCK_DGRAM which will create UDP socket on PLK interface. To check for the packets from POWERLINK interface please look for the specified source port id (25112 in your case) in the trace.
Regards,
POWERLINK Team,
Kalycito