Simple Component and Waveform Issue - redhawksdr

I have created a simple component and waveform. All the component is suppose to do is output a line of text, specifically a value of a simple property (in this case a frequency value as double data type). I have the component placed in the waveform diagram. When I try to run the waveform from the domain I get this error:
Failed to create application: testWaveform_203_101836155 'load' failed for component:
'maxFreq' with component id: 'DCE:f5144a97-0978-4178-a718-
136c72d6cbla:testWaveform_203_101836155_1' with implementation id: 'DCE:afa7ddfd-bc2f-
422b-82e3-6876608dab26'; on device id: 'DCE:5fbc2a7a-3f0e-4d38-adb3-e35ecf19b6b8' in
waveform 'testWaveform_203_101836155_1' error occurred near line:1909 infile:
ApplicaitonFactory_impl.cpp;
IDL:CF/ApplicationFactory/CreateApplicationError:1.0
My Python component is extremely simple, all I did was autogenerate the code and add "print self.maxFreq" in the def process(self) function, where maxFreq is the frequency value of 2.45 GHz. What exactly is going wrong and how do I fix it?

Double check to make sure that your user has write permissions to $SDRROOT.
Then try running the Device Manager from a command line with a higher debug level to get more information on the source of the error:
$ nodeBooter -d /<nodePath>/DeviceManager.dcd.xml -debug 5
A few other questions:
Does this error cause either the Device Manager or the Domain Manager to terminate execution?
What devices are included in your current node?

Related

Translation Error: ThermalZone; Medium.enthalpyOfCondensingGas

I am trying to run a simulation for the first time in OpenModelica with the Buildings library. I have a Thermal Zone and I am dragging and dropping components to the workspace. I connected an EP Spawn widget to the Zone Surface, then connected the Zone surface to the ThermalZone. I have encountered an error when checking the model
[Buildings.ThermalZones.EnergyPlus_9_6_0.ThermalZone: 81:3-82:48]: Function Medium.enthalpyOfCondensingGas not found in scope ThermalZone.
picture of thermal zone components
I click the link and the code clearly shows me a line where the function does exist.
Picture of Function Code
So, what does this mean in two sentences or less?
I am trying to run a check in OpenModelica using the LBL Buildings library and I encounter an error for the ThermalZone. The code seems fine. I want it to run.

What does "Code move event for unknown code" mean when processing node.js profiling?

In node (v10.15.3), I've been profiling with node --prof <script> then summarizing the output with node --prof-process <output>. The resulting summary has a lot of unaccounted for ticks, which might connect to the slew of errors when running that second step, similar to the following:
...
Code move event for unknown code: 0x3663777f8b98
Code move event for unknown code: 0x3663777f9018
Code move event for unknown code: 0x3663777f9790
Code move event for unknown code: 0x36635f5fb5a8
Code move event for unknown code: 0x3663777f9b78
Code move event for unknown code: 0x3663777f9d00
Code move event for unknown code: 0x3663777fa150
Code move event for unknown code: 0x3663777fa7f8
Code move event for unknown code: 0x36635f5fe630
What does this "Code move event for unknown code" error signify? Is there a remedy to this that would give me more details in my profiling investigation?
In short: it means something was weird, and there's (probably) nothing you can do about it :-(
The log file generated with --prof contains, among other things, three related types of entries:
(1) "code object for function F created at address A with size S"
(2) "code object moved from address A1 to address A2"
(3) "execution sample was taken at address E"
The tick processor uses entries of types (1) and (2) to build up a map of code objects corresponding to functions, so when it sees an entry of type (3) it looks for the right function such that A <= E && E <= A+S and then reports that function as having received a profiler tick.
When something about the data is inconsistent, it can happen that the log file contains a move event (entry of type (2)) for a supposed code object at an address A1 that was never mentioned in an entry of type (1) before. In that case, the tick processor doesn't know what to do, so it prints a warning.
Your guess that this is somehow related to seeing many unaccounted ticks is very likely correct.
One workaround you can try (which may or may not help) is to specify --nocompact-code-space along with --prof. That shouldn't be necessary, but then you shouldn't be getting those move events for unknown code either...
Found the root cause. In my case, it was because for MacOS, the symbols are processed through c++filt and nm. The latter was not working properly because:
» nm --version
Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.
After running this command to accept the license, the symbols resolved correctly.

Jmeter passes steps and not print to consul

I am facing an issue that I could not understand how to resolve.
I created a test plan that need to connect DB and count the results.
The problem is that Jmeter not perform any validation afterwards, I created a JSSR223 in the JDBC request and just want to print the results and Jmeter not print.
I created another sampler to print the DB results and still Jmeter not printing.
Jmeter just passes this steps,
In the results tree I saw that it connects to DB and failed in the assertion, but why it passes the other steps? and just moving to debug sampler?
I can not print the results, I can not perform any debug since it is just black box.
can someone please advise?
you can see in yellow all the steps that Jmeter not performed and just not exists in the results tree.
enter image description here
Get used to check jmeter.log file, it normally contains information regarding what went wrong, you should be able to figure out the root cause by looking into the log file. If you are not - update your question with jmeter.log file contents (at least essential parts)
My expectation is that your ${Conv_sense} variable is not defined (or cannot be cast to Integer). Double check whether it is defined or not using Debug Sampler and View Results Tree listener combination.
Also don't refer JMeter Variables like ${Conv_sense} in Groovy scripts body, use vars.get('Conv_sense}') instead, otherwise it might conflict with Groovy GStringTemplate resulting in undefined behavior.

REDHAWK UHD device usage

I have successfully installed the UHD device along side REDHAWK version 1.8.3. It isn't obvious to me how to connect a component in a waveform to a device being managed by a device manager. I am also unclear on the interplay between the IDL interfaces and the data ports on the USRP device.
I was unable to find a trivial example to send and receive waveform that utilizes the USRP device (e.g. a signal generator component sending a sine wave to the USRP). Does anyone have experience with this or any suggestions?
One way to connect a Component to a Device in a running environment is through the REDHAWK python module. It is able to attach to a running domain, query any launched Applications and connect Ports from Components to Devices. The following is an example python script (Note the ports must both be the same type in order for the connection to succeed):
from ossie.utils import redhawk
from ossie.cf import CF
# Connect to the running domain
domain = redhawk.attach("REDHAWK_DEV")
# Gets a reference to the running application
for app in domain.apps:
# Find desired application
if app.name == 'desired_name':
application = app
# Gets the component from the application
for comp in application.comps:
# Find desired component
if comp.name == 'desired_name':
component = comp
# Gets the device to connect
for devMgr in domain.devMgrs:
for dev in devMgr.devs:
# Find desired device
if dev.name = 'desired_name':
device = dev
# Gets the references to the input and output ports
comp_port = component.getPort('port_name')._narrow(CF.Port)
dev_port = device.getPort('port_name')
# Makes the actual connection
comp_port.connectPort(dev_port, 'ConnectionID')
# Make sure device is started
device.start()
# Start application
application.start()
# To disconnect:
# Stop device and application
application.stop()
device.stop()
comp_port.disconnectPort('ConnectionID')
There are multiple ways to accomplish this depending on your situations. Here are a few:
A.) Problem: You are debugging an issue in the IDE and quickly want to connect a device port to a component port
Solution: With the component and device both running in either domain or in the sandbox, expand the component and device in your SCA Explorer view to expose the ports. Click on the output port then ctrl+click the input port you would like to connect to. With both ports highlighted you can now right click and select Connect.
B.) Problem: You need a generic way of connecting a components input port, regardless of implementation language, to a particular type of devices output port, regardless of language implementation.
Solution: This is a multi-step process and is not that intuitive at first. I recommend you look at the SCA spec page D-43 for additional detail for step 10 and beyond below.
Open the component in your editor and navigate to the Implementations tab.
Right click on the implementation you would like to use for this connection (ex. python)
Select New → Uses Device
Generate (or enter) a unique DCE ID for this connection
Enter the type "usesDevice" although I'm not 100% sure if the type matters, I used usesDevice
Right click on the Uses Device select new Property Ref. You will not be directly connecting component X to device Y. Instead you are connecting component X to a device which meets the property restrictions set here. ie. model, type, etc.
In your device, in the properties tab, set a property like device_kind or device_model's Name field to something you want to match to. We'll say XYZ123 for an example. Save and deploy this to the SDR ROOT
Back in the component where we were setting the property Ref, select browse and select the property on the device you just set as your matching property.
Set the Value to the value you set it to ex XYZ123. Save and deploy the compnent
Now in your waveform, you'll need to hand edit the SAD file and add something like this, where [[TEXT]] indicates something for you to change:
<connections>
<connectinterface id="[[Connection_Name]]">
<usesport>
<usesidentifier>[[Output Port Name]]</usesidentifier>
<deviceusedbythiscomponentref refid="[[DCE matching the componentinstantiationID]]" usesrefid="[[DCE matching the generated ID from step 4]]"/>
</usesport>
<providesport>
<providesidentifier>[[Input Port Name]]</providesidentifier>
<componentinstantiationref refid="[[DCE matching the componentinstantiationID]]"/>
</providesport>
</connectinterface>
</connections>
I recommend you add a dummy component to your SAD editor and connect dummy component to the real compnent just so your SAD file is populated with the connectinterface block and you can see an example of a connection.
After making those changes, the IDE may tell you that an error exists in your SAD file, save anyway, close the SAD editor and reopen. If no error is displayed then your syntax is fine. Deploy the waveform and launch as usual.
C.) Problem: You want to connect to a device via a python script outside of REDHAWK, a python service within REDHAWK, or through a python component in your waveform.
Solution: See Adam's solution.

Why doesn't kcachegrind display the call graph?

I am trying to get some information about the flow of a large program. KCachegrind used to be great for this in the past. But the latest version (0.6kde) I have on my system (Kubuntu 10.10) won't display the call tree and caller map. It only draws a box with the current function, but no arrows and no callers. Here's the console output:
kcachegrind(27917)/kdecore (services) KMimeTypeFactory::parseMagic: Now parsing "/usr/share/mime/magic"
QInotifyFileSystemWatcherEngine::addPaths: inotify_add_watch failed: No such file or directory
QFileSystemWatcher: failed to add paths: /home/cosmin/.config/ibus/bus
Bus::open: Can not get ibus-daemon's address.
IBusInputContext::createInputContext: no connection to ibus-daemon
CallGraphView::refresh
CallGraphView::refresh: Started process 0x1346f50, 'dot -Tplain'
CallGraphView::readDotOutput: QProcess 0x1346f50
CallGraphView::dotExited: QProcess 0x1346f50
I have dot (graphviz) installed, and the application was compiled with -g -O0.
Do you have any idea where the problem could be?
Oops... I was calling valgrind --tool=cachegrind instead of valgrind --tool=callgrind.

Resources