Can you please provide me with an example of how to use that function in junction with ping?
Type: Posts; User: knik653
Can you please provide me with an example of how to use that function in junction with ping?
System ping Linux questions
I am trying to write a function to do a ping on a known IP address and then parse the output to see if "1 packet transmitted, 1 received..." is printed.
I am new...
I am trying to write a C++ function to do a ping on a known IP address and then parse the output to see if "1 packet transmitted, 1 received..." is printed.
I am new to this kind of programming...
I apologize for not getting it. Based on your code, how do you know which value is the oldest to replace?
This is what I need to do and I get one value at a time.
/* if first time /
* set all array values to current value
* return average equals to current value
*/
/* else
* replace...
Any hints on how to keep track of the oldest?
But don't you have to rotate the the other values?
I having a hard time wrapping my mind around this.
I get to read in one value at a time
I have successfully stored hex values to memory using the method below and wanted to know if I can store decimal values as well.
Thanks.
*(int*)(0xeff000040) = 405;
So I got a little bit more information. It should be a running average will each time a new value is read in, an average is calculated on the last 5 readings, by replacing the oldest value read in....
I am trying to figure out how to keep a running average of the last 5 temps read in. I don't know how/where to reset my counter to 0 or increment it? Will something like the code below work to keep a...
Thank you, that was very helpful.
Sorry the type is not an issue, and that was my mistake. They call be floats. The basic jist is I need to calculate the result of taking two numbers x and y and making the result x.y.
My issue is this:
int convert ( int x, int y)
{
int result;
// result = x.y; <-- this is what I need to compute
It's been a long time since I have written code and need a bit of help.
If you have two number x and y, and you want x to be the whole number and y to be the decimal, x.y, how would you code that in...
Jim, I am not looking just to print it.
Once I store the value as a decimal into another variable, I need to be able to do comparisons of the new decimal value against other decimals.
Yes, that is correct. The number will always have digits only/ never characters. Any suggestions on the implementation of the routine?
How can I convert an in int stored in hex such as
int x = (0x2710); to decimal 2710?
For example, I want to set another variable
x= y, but y would be decimal and equal to 2710.
I have...
First off, my thanks for those who responded to my other post and advanced apologies for the "messiness" that happened with my first post.
Now given that, I am have reduced my original problem to...
I wasn't able to further edit my last post, so I am posting another one here with 2 additional questions ( as another design change was just mentioned to me) and the list will be in ASCII format. If...
There is no formal requirements doc/ assignment sheet.
The basic summary is that I will be reading a int value from memory (using a pre-exisiting function where I pass in the memory address of...
the prototype for the function is as follows:
memory_read_function ( uint32_type start_address,
uint32_type words_to_read,
uint32_type...
My apologies for the duplicate PM, I thought the first one hadn't gone through because I didn't see it in my sent box . Also, the delay in my response was because I was waiting on a decision on the...
OK, so since I last asked about the memory reading/parsing; the design changed a bit for what I am supposed to be implementing, and I have some new questions I need some help please.
So I am...
Thank you for the feedback. I will put some code together today and request your review when I am done. thanks again.
Hello,
It's been quite awhile since I have been away from programming and need some help please.
I need to add functionality to existing code to read from memory (I am assuming there will be a...