Is there an example to change a CC26xx channel using contiki after initialization? - contiki

I've found the function for setting the channel of cc2240, but nothing for cc2650. Can anyone help me with an example of implementation?

You need to call the function set_value() of the Contiki radio API:
int channel = 11;
NETSTACK_RADIO.set_value(RADIO_PARAM_CHANNEL, channel);

Related

Dialpad and Dual Channel Recordings

The documentation found here, Known Limitations has a section stating:
Dual channel recording requires recordingStatusCallback to be set
The recordingStatusCallback attribute must be set in the Conference instruction attributes when enabling dual channel recording. See this support article for more information.
But the referenced support article does not provide any information on Dual Channel recordings.
There is a code snippet:
flex.Actions.addListener("beforeAcceptTask", (payload) => {
payload.conferenceOptions.record = 'true';
payload.conferenceOptions.recordingStatusCallback = 'https://example.com/recordingcallbackurl';
});
Which I believe generates a mono recording, not a dual channel (stereo) recording. Any suggestions where to look or can you provide some clarity around this? Not clear about the requirement for:
The recordingStatusCallback attribute must be set in the Conference instruction attributes
To generate a dual channel recording, I think you need to add the recordingChannels option, set to "dual":
flex.Actions.addListener("beforeAcceptTask", (payload) => {
payload.conferenceOptions.record = 'true';
payload.conferenceOptions.recordingStatusCallback = 'https://example.com/recordingcallbackurl';
payload.conferenceOptions.recordingChannels = 'dual'
});

Send ethernet/udp packet via CAPL

How to send ethernet packets or UDP packets via CAPL? I know there is an ethernet IG block but I wanted to know if we can send it via capl script just like a CAN messagee is sent via CaPL
Function ethernetPacket <packet var>; can be used to create an Ethernet send object. The object data can be manipulated by selectors associated with this object. More information about these selectors can be found in Help at the following path:
CAPL Functions » Ethernet » ethernetPacket
Here an example on how to send a Ethernet Packet via CAPL
ethernetPacket txPacket;
int i;
txPacket.msgChannel = 1;
txPacket.hwChannel = 2;
txPacket.source = EthGetMacAddressAsNumber( "20:00:00:00:00:01" );
txPacket.destination = EthGetMacAddressAsNumber( "FF:FF:FF:FF:FF:FF" );
txPacket.Length = 100;
txPacket.type = 0xF123;
for( i = 0; i < txPacket.Length; i++ )
{
txPacket.Byte(i) = i & 0xFF;
}
output( txPacket );
You may indeed send ethernet packets through CAPL.
With option .Ethernet several APIs are provided for receiving and transmitting Ethernet frames.
The CAPL Function guide.
For instance, the function ethernetPacket is used to create an Ethernet send object. Unfortunately, I've never done it myself, so I don't have a snippet to demostrate this, yet I urge you to refer to the CANoe/CANalyzer guide under section CAPL Functions > Ethernet CAPL Functions. Interrupt-like procedures are also provided for Ethernet communication, e.g. on ethernetPacket. In addition, you might want to put some more effort in the research, next time...
I know nothing of UDP, yet for sake of completeness CAPL provides APIs for TCP/IP, FlexRay, RS232 (serial), and standards like J1939, K-Line.

How do I fire a list var from a DTM direct call?

I am trying to fire values into a list var in Adobe Analytics from a DTM direct call but can't seem to get any values to appear.
In my custom code in the direct call rule I have
cTS = _satellite.getVar('conversionTypeShown');
s.list1 = cTS;
and the Data Element conversionTypeShown is getting information from the digitalData layer on the page (which is updated just before the direct call)
if ((digitalData.searchResults !== undefined) && (digitalData.searchResults !== ""))
{
return digitalData.otherJobsType + digitalData.searchResults;
}
I know that these values are being populated correctly because I am firing an eVar with the same data in it (within the same rule) which is coming through OK into Adobe Analytics. But I am not getting any values for the list var?
Does a direct call not allo me to use custom code in this manner?
Any help would be gratefully received.
Owen.
Many thanks to Owen. I didn't find this hint in the Adobe documentation.
Finally my code looks like this and works.
s.linkTrackVars="list1,list2";
s.list1=_satellite.getVar("FieldsSubmitted");
s.list2=_satellite.getVar("FieldsAborted");

Getting IMediaExtension to work with MediaComposition

I was attempting to use Windows Phone Media Extensions sample with MediaComposition:
I'm trying to run InvertTransform from the sample by adding it to MediaComposition on Windows Phone 8:
var composition = new MediaComposition();
var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///videos/test.mp4"));
var clip = await MediaClip.CreateFromFileAsync(file);
clip.VideoEffectDefinitions.Add(new VideoEffectDefinition("InvertTransform.InvertEffect"));
composition.Clips.Add(clip);
This fails, probably because video subtype is MFVideoFormat_NV12 while effect is handling only MFVideoFormat_ARGB32.
How can invert transform be used in this scenario? Does it have to be changed to support MFVideoFormat_NV12 and how best to accomplish this?
Thank you
After doing lot of tests, only way to do this is to handle NV12 format, and convert to and back from RGB, if needed.

How to send dtmf tones using BlackBerry API?

I have tried to use
PhoneArguments phoneArgs = new PhoneArguments(PhoneArguments.ARG_CALL, num);
Invoke.invokeApplication(Invoke.APP_TYPE_PHONE, phoneArgs);
PhoneCall call = Phone.getActiveCall();
call.sendDTMFTones(tones);
but it doesnt work.
Can anyone point me to a working code snippet for sending DTMF?
regards
Tom
Did you try sending them one at a time? Are you checking the return value of sendDTMFTones() ?
PhoneCall pc = new PhoneCall();
boolean added = pc.sendDTMFTone(7);

Resources