Programming :: Function Successfully Called But It Did Not Run Device Properly?
Jan 6, 2010
I have our own C written program code which is communicating with a third party C++ written program code to run a moving device. We have successfully communicated with the third party code with wrapper functions. (Thanks to member in LQ that helped me solved this.)Now, we tried to run some functions to move the device. I think it is better for me to attach the related code first. pro.c (The source code we used to run the device)
Code:
#include<stdio.h>
#include "wrapper.h"
[code]....
View 7 Replies
ADVERTISEMENT
Mar 2, 2011
I am using Debian linux. I have 100 timers running. If a timer expired which will generate a signal and it was mapped to a same function handler. All the timers are mapped to one function handler. The problem is if the timer expires one at a time, the function handler called at a time. But if the 2 timers expires at a time, the function handler is called one time only instead 2 times. Is it possible to invoke the function handler as many times based on timer expirary happens simultaneoulsy?
View 14 Replies
View Related
Jul 7, 2009
I wanna write a file in kernel space but from my searching I can to know that instead of writeing file in kernel space ,I can write data to user space by copy_to_user space.
But link is missing ...I dont know how will my user space will access kernel space means my function in kernel space which will do copy_to_user /....How my user space function will call my kernel level function ..
Can any one of you provide me with some example file which are doing this .I know every char driver is using it ...but i could not trace back how user level function is accessing it ...i m confused between user space and kernel space.
View 2 Replies
View Related
Jul 13, 2011
I feel there's a bit of a misunderstanding going on between C++ and me...My problem is that I have a deque of pointers to a class, and create objects then add them to the deque in a for loop. However, the destructor is called on the object as soon as the loop quits.
Code:
This prints:
Code:
Now, if I change the deque from deque<Test*> to deque<Test> then it works fine - I get:
Code:
However, I can't do this with my actual code, because I am creating a deque of pointers to an abstract class, so it won't let me instantiate the class. (This is all so that I can take advantage of polymorphism, and call functions on a set of similar objects without worrying what type of object I'm dealing with).
So, I suppose my question is: what is the correct way to create that deque of pointers to the abstract class? I don't seem to be barking up the right tree currently.
View 4 Replies
View Related
Jul 16, 2011
I want to enable a function which is called clone mac...see in the picture. while, some systems don't support such a function... such as centos, the picture was taken in ubuntu 11.04... so, if i want to enable the function in centos or some other distributions which doesn't support this originally, what should i do? is upgrading the network manager functional?
View 4 Replies
View Related
Sep 30, 2010
I made the following script:
Code:
#!/bin/bash
logErrors(){exec 2>/tmp/errorlogfifowhile truedocat /tmp/errorlogfifo |echo $(date "+[%Y-%m-%d %H:%m:%S]") Error: >/var/log/error.logdone}
logErrors
ls inexistentFile
exit 0
If I execute the script I see the formated error message in /var/log/error.log, as to be expected. After the script execution, I hoped "logErrors" was not executing anymore, but when, in another terminal, I call "echo something > /tmp/errorlogfifo", I still see the formated error message "something" in "/var/log/error.log". How can I finalize "logErrors" before the script ends? Or, maybe someone knows a better way to format and log the erros in a script.
I forgot to say that the file "/tmp/errorlogfifo" is a named pipe created by the command "mkfifo /tmp/errorlogfifo".
View 8 Replies
View Related
Aug 10, 2010
Under KDE (3.5) in Lenny, whenever I "safely remove" a SD card, I get the following message
"The device was successfully unmounted, but could not be ejected"
The message is obviously ridiculous, and the crashing windows error sound that accompanies it very annoying.
View 3 Replies
View Related
Nov 16, 2010
Code:
#include <iostream>
using namespace std;
[code]...
View 1 Replies
View Related
May 18, 2010
I am doing some Linux kernel programming for my research project. I need to record the timestamp (by using cpuid and rdtsc) when an interrupt handler (top half) is first invoked. Due to the time critical nature of the problem itself, I have to do the timestamping inside the interrupt handler itself (the first operation when the handler is called). However, I understand that tasks that are not so time critical should be deferred to a tasklet function (bottom half) for processing because other interrupts are disabled in a (top-half) interrupt handler. I am currently out of idea on how I can pass the timestamp information that I have obtained in the interrupt handler to the corresponding tasklet function.
View 2 Replies
View Related
Mar 18, 2009
attempting to start Jack using the qjackctl frontend...code...
then Jack stops... how do i start Jack successfully?
View 3 Replies
View Related
Nov 25, 2010
I have a centos 5.5 server running great, but i am having issues with my xen vm01 virtual machine. The first probelm is, i have created the vm01 fine and it was running ( even though i can not login into it ) by running:
vm console vm01
View 2 Replies
View Related
May 22, 2010
Computer is an ACER Power F6, BIOS AMI F6, XPPro installed, C only 80 Gygabites, 2 Gyg RAM, 3000MHZ Pentium4.today I installed 10.0.4 from Canonical 32 bit, all was ok,I followed the suggested dual boot partition and proceedings,which gave XP 44 Gyga and Ubuntu 37 Gyga ,successfully finished install,rebooted and began updating and customizing with great zest as I was really happy about this new version. then I decided to make a break of an hour and thought : 'let's try now the suspend function as i read about it not working properly sometimes'.....so an hour later i tried to revive from suspension,but the pc remains utterly insensitive and black.Tried Del to get into BIOS,F12 to get to boot config,BART PE disk i made for an XP machine in the past, and tried to boot again from the live Ubuntu Cd .....all in vain.I suspect it might be the fact the BIOS was set by me for
1st Floppy
2nd CDROM
3rd HD or PenDrive
as this machine I inherited since a few days dates back to 2006 and has no burner only CD-DVD reader and Floppy is disabled in BIOS.After Ubuntu install the machine stopped for a long time on a black screen with white reading about errors during install,then I reset it and it seemed like a good install anyway.Apart from checking if the HD is still ok,what can I do or try in such a situation?
View 1 Replies
View Related
May 30, 2011
I have a simple fileserver built of my good old ASUS TX97 with K6-III 400 MHz. It boots the latest debian stable from a PATA 1G IDE flashdisk. For almost 3 years I have hooked on a SATA Samsung HD502JI 500G harddisk onto a VIA VT6421 based SATA Controller, which work real fine. Since I ran out of diskspace I bought a Samsung HD204UI 2T drive, hung it on the second SATA port, and it took about 8 hours to copy the 500G data from the old disk to the new one. All seems fine this far. However, if I stream a movie from the 2T drive, the movie freezes every now and then, and Dmesg get spammed with errors. The 500G disk still works fine.Of course the VIA SATA is just SATA 1.0 (1.5Gbit/s), but I thought all harddisks are backwards compatible. Since the 2T drive is recognized, the serial line-protocol is fine I suppose. I have also flashed the latest F4EG firmware to the HD204UI succesfully.
View 13 Replies
View Related
Feb 9, 2011
I may have some confusion but the below code should be changed to using "likely" macro?
schedule()
{
...
[code]...
View 1 Replies
View Related
May 20, 2010
I have been using an XFX 5770 with Windows 7 in EyeFinity and running a 5760x1080 resolution. My setup is as follows for Windows
x3 Viewsonic VA2223WM monitors (vga/dvi only)
I have two monitors connected connected with DVI and my 3rd monitor is connected with a DVI to Active Display port adapter, bizlink brand. This works wonderfully in Windows 7.
I cannot get my 3 displays to function properly in Ubuntu. I have tried removing the display port adapter and connecting my 3rd monitor with a DVI to HDMI cable and still no success. I can only use any of my 3 monitors in a dual configuration...how do I get the 3rd extended? Using the ATI driver that was auto downloaded for me...
View 1 Replies
View Related
Aug 23, 2010
The announcement of several new make scripts in the 2.6.32 release notes is very exciting.1.8. Easy local kernel configuration.Most people uses the kernel shipped by distros - and that's good. But some people like to compile their own kernels from kernel.org, or maybe they like following the Linux development and want to try it. Configuring your own kernel, however, has become a very difficult and tedious task - there're too many options, and some times userspace software will stop working if you don't enable some key option. You can use a standard distro .config file, but it takes too many time to compile all the options it enables.
To make easier the process of configuration, a new build target has been added: make localmodconfig. It runs "lsmod" to find all the modules loaded on the current running system. It will read all the Makefiles to map which CONFIG enables a module. It will read the Kconfig files to find the dependencies and selects that may be needed to support a CONFIG. Finally, it reads the .config file and removes any module "=m" that is not needed to enable the currently loaded modules. With this tool, you can strip a distro .config of all the unuseful drivers that are not needed in our machine, and it will take much less time to build the kernel. There's an additional "make localyesconfig" target, in case you don't want to use modules and/or initrds.
View 1 Replies
View Related
May 10, 2011
i'm using ASUS K40IE laptop, installed Ubuntu 10.10 and online upgraded to 11.04 (natty), and i have a problem about my wifi.This laptop using Fn+F2 to enable/disable wifi (using Windows work properly with driver from asus) and have a Led that trigger on/off.Using ubuntu, that's shortcut it's useless. i press Fn+F2 many times, but that led indicator never turn off. Is there a way to make that shortcut can function properly? Actually, i'm not often using wifi, so i want to make it default disable on start up. Both ubuntu 10.10 or 11.04 can't using this shortcut.
View 1 Replies
View Related
Feb 14, 2010
the problem i am experiencing on my laptop (hp pavillion zv5000) which runs ubuntustudio 9.10 (this problem also occurred with ubuntu 9.10, before i upgraded to ubuntu studio) is that whenever i view a video on firefox, be it videos, metacafe, and generally any site where you can see online videos, the video glitches a lot, and after a few seconds firefox grays out, and is not responsive, which means i either have to kill firefox.i am running firefox 3.5.7 with the ubuntu firefox modifications 0.8 pack added. in the preferences, on the content tab the enable java button is not ticked. the following is the list of plugins i have on firefox:
View 5 Replies
View Related
May 24, 2010
I want to declare a function in a function, but had no success till now, see the error code below and visit the project at sourceforge
[Code]...
View 14 Replies
View Related
Jun 20, 2010
I looked on the net for such function or example and didin't find anything, thus after having made one i guess it would be legitimate to drop it to see what others thinks of it.
#!/bin/bash
addelementtoarray()
{
local arrayname=$1
[code]....
View 10 Replies
View Related
Jun 30, 2011
I am writing a ping kind of program for my own application. This application needs to run with non root user privileges. This needs me to create a raw socket. But the ping connection is failing because of creating raw socket with non root user.How can I run the application successfully with non root user privileges using raw socket creation?
View 4 Replies
View Related
Nov 27, 2010
I'm wondering about this kind of GUI Interfaces like Slackware setup program
What is called ? Also, Can it be used with Python?
View 6 Replies
View Related
Jul 13, 2010
I have written a code in which i have used vectors:
vector< vector<double> > arr;
arr.resize(x,vector<double>(x,0));
x is a variable which is taken from a very beg text file > 64MB
first line of my code is
cout<<"
Wait Running...";
my code takes text file as an input, takes its data and generates an output text file....
Code is running fine for small data tried till x= 10
but while trying to run with large data ie x = 5000000 approx it is giving error
Even the first line of the code is not displayed. NOTE: variable is declared global but its size is defined in main.
The error that i am getting after approx 2-3 minutes is:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Wait Running...Aborted (core dumped)
View 6 Replies
View Related
Feb 14, 2011
What is the Terminology called of a Binary using a file that is not part of it's self? An example would be when a browser uses a HTML file for it's interface. The binaries code has to know how to find it and so on. I imagine that the applications binary uses a system call and that another application takes over.
View 1 Replies
View Related
Sep 3, 2010
I suspect this will be beyond my abilities but thought I'd give it a try. A few months ago I wrote code for an application called nagios which would send me tweets when a system within my network ran into a problem (code below):
Code:
define command {
command_name notify-host-twitter
[code]....
View 7 Replies
View Related
Oct 11, 2010
I thought about this a while ago when reading through a Python tutorial and I googled some and couldn't find an answer. Now I want to know it for Ruby, also, and it's more important now because I want to invoke Ruby with -w.
How can you use:
Code:
with a -w option to ruby, like:
Code:
This doesn't work and I can't find an explanation of how to do it.
Code:
View 1 Replies
View Related
Mar 18, 2010
Script programming question for the experts. I have written a bash script that works fine if I execute from the shell interactively. However, once I schedule it to be executed via cron, it just wouldn't work. I believe this has to do with cron running in a different environment than the one I am in when I putty in.
The bash shell script does refer to environment variables in the .cshrc file. I guess these aren't available to the cron? How can I load them into the script if I want them to be available to the cron locally within the script?
View 1 Replies
View Related
Jun 24, 2011
Now i have a problem.I want to used a hid usb device under linux 2.6.11.But i can't know how to used ioctl function to send and receive data to a hid device
View 3 Replies
View Related
Feb 25, 2010
I'm running 9.10. I was installing ALSA so that I could run my EMU 1616, and when I tried to go through the steps to install, I'm running into two errors that I've noticed so far. I think. Anyway, the first is that is states that the panelw library isn't there, and that alsamixer: function snd_ctl_open failed for default: No such device or address. The alsamixer one is really odd, since it's there, but I don't know why it won't run.
I initially had it running, and now it isn't. I've yet to get sound out of my EMU. the terminal window also tells me that it can't find the snd_emu file, even though it exists on the computer as well. I need an answer for a dummy.
View 5 Replies
View Related
Sep 16, 2010
fit a surface i.e. W(x,y) using svdfit() provided by "Numerical Recipes in C". svdfit() is written for curve fitting and not for surface fitting.But one can use svdfit(), as claimed by authors of NR book, to do surface fitting. On page 680 of NR book, authors have given a hint on how to use svdfit() for fitting a surface. But I have not understood it.This link may be helpful (Chapter 15 th is relevant here.):[URL]This is my problem:
Code:
I have a set of 100 numbers. I want to fit a 2-Dimensional function W(x,y) to these numbers.
[code]....
View 2 Replies
View Related