Multicast Receiver

Sub forums for various specialist XMOS applications. e.g. USB audio, motor control and robotics.
bmacdbacks
New User
Posts: 3
Joined: Tue Nov 14, 2017 3:55 pm

Multicast Receiver

Postby bmacdbacks » Tue Nov 14, 2017 10:08 pm

I have an xCore-200 Explorer Kit and I'm looking for any examples of receiving a multicast message using xtcp that is broadcast to an address:port (i.e. 224.224.24.23:11007).
I'm able to use xtcp to send/receive messages, but I'm unable to find any examples as to how to receive multicast messages, I've tried joining a multicast group and then connect to the above ip address:port.

xtcp_ipaddr_t ip_add = {224,224,24,23};
int port_num = 11007;

xtcp_join_multicast_group(c_xtcp, ip_add);
//xtcp_listen(c_xtcp, port_num, XTCP_PROTOCOL_UDP);
while (1)
{
select
{
// Respond to an event from the tcp server
case xtcp_event(c_xtcp, conn):
switch (conn.event)
{
case XTCP_IFUP:
xtcp_connect(c_xtcp,port_num,ip_add, XTCP_PROTOCOL_UDP);
break;
case XTCP_IFDOWN:
break;
case XTCP_NEW_CONNECTION:
if (responding_connection.id == INIT_VAL)
responding_connection = conn;
else
xtcp_close(c_xtcp, conn);
break;
case XTCP_RECV_DATA:
response_len = xtcp_recv_count(c_xtcp, rx_buffer, RX_BUFFER_SIZE);
rx_buffer[response_len] = 0;

Return to “Applications”

Who is online

Users browsing this forum: No registered users and 10 guests