Sweet that works well, thank you.
Type: Posts; User: Prediluted
Sweet that works well, thank you.
Hey everybody...
I am taking a string full of hex values and putting them into an array of unsigned shorts. However I want to be able to check to see if the value is actually a hex value (IE...
So I know generally how to use bit-wise functions, but I cannot figure out how to do this...
I want to change \/
10100000000000000110001100100000 (num1)
to ...
Hi, I am trying to push short ints onto a char vector, with 4 digit padding (ie 1 becomes 0001 pushed on the vector )
This is what I have...but I keep on having these crazy f's appear all over the...
Ok that makes sense. Then how do I set it so the RxBuffer will have the same size as the TxBuffer that is already filled with data of unknown size? Is there a better method to use then strlen?
Hey everyone, I have a problem that is really puzzling...
I have the following code:
// Determine size of transfer
packageSize = strlen( TxBuffer );
cout << "packageSize "<< packageSize...
He wants the actual values, padded with 0's. So if the number is 0x0F it needs to be sent as 000F. I think I have that already figured out though, but thank you for all the help! Even if I am not...
That does sound reasonable. There are spaces between the hex values, but I can easily read them all into a string without spaces and send them without risk of flipping anything.
I just talked to...
Is there any way to avoid the endianness? That will cause havock with my equipment haha. I suppose I could reverse the numbers before I send them in, then they would go through in the right order....
^^ +1 I was just going to say that.
If you do not know how then check this out:
4. Multiplication of Matrices
Or maybe use Paul's Online Notes, another excellent resource. The basics look...
Ok, so I shouldn't even bother to try and print the values in the char* because they will be all messed up right?
On the flip side when data is coming back from the pci card (Also as a char* of...
And this line here wont drop any data? This is basically just some type casting trickery to get the API to take the argument? Once the card reads in the information I have a peice of equipment...
Interesting. I will give it a shot and send/receive some test packets on a loopback to see how it handles
Is there any reason why it would not work by indiviually assigning each index? That does...
Hmm strange your way does make much more sense, they were originally not declared as any value but VS complained when compiled saying they were not initialized. The reason it is +5 is because who...
Thank you! It isn't complaining using the type_cast.
I ended up with something like this:
void packetBuilder ( int count, string package ){
short int *pack = 0; // Hex array of values...
It needs to be a char* because the card comes with a very specific API that demands a char* in the sending/receiving functions
I will try your recommendation, see how that goes. Thank you
Hey, this is my first post I have been a long time creeper, this place is an excellent resource.
My problem is that I am sending data to a PCI card via a c++ console interface, and the data is...