Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Sending events in C# UPnP renderer stack

torstenh
Beginner
943 Views

Hi,

We are trying to write an UPnP renderer using the C# renderer stack generatedfrom the Intel Device Builder. However we are unsure, what we have to do to send LastChange events.

Using the Intel Device Spy we can see that there is a single LastChange event send automatically (returning just the default "Sample String"), when subsribing to one of our UPnP sevices (AVTransport or RenderingControl).

Does anyone know, what we have to do to send any more of these events?

Thanks

0 Kudos
2 Replies
BRYAN_R_Intel
Employee
943 Views

Hi,

There is an API in the generated service classes in the form Evented_xxx, where xxx is the name of the evented state variable. This is a property. Simply setting this value, will cause an event to get sent out. The type of this property is the .net equivalent to the upnp type that the state variable is.

If you refer to SampleDevice.cs in the generated code, you can see where these properties are set at the end of the constructor.

0 Kudos
media4all
Beginner
943 Views
Quoting - torstenh

Hi,

We are trying to write an UPnP renderer using the C# renderer stack generatedfrom the Intel Device Builder. However we are unsure, what we have to do to send LastChange events.

Using the Intel Device Spy we can see that there is a single LastChange event send automatically (returning just the default "Sample String"), when subsribing to one of our UPnP sevices (AVTransport or RenderingControl).

Does anyone know, what we have to do to send any more of these events?

Thanks


Hi there,

since I had some problems to find the solution myself, here it is.

For example if you want to send a state change of the player you can do this like here:

string avt = string.Empty;

avt += "n";
avt += "n";
avt += "n";
avt += "
n";
avt += "
";
AVTransport.Evented_LastChange = avt;

For examle if you want to send a change of the volume left / right you can do this like here:

string rcs = "n";
rcs += "n";
rcs += "n";
rcs += "n";
rcs += "
n";
rcs += "
";
RenderingControl.Evented_LastChange = rcs;

The event will be automaticly triggered by the stack. You can find all variables in the device spy or subscribe to the events to see what you need to do. Its quite equal on all services.

Btw thanks Intel fot this great framework. Never thought it can generate C# code.

Cheers
Media4all

0 Kudos
Reply