Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can I get a SetByte() function for Card2+?
#1
There's a GetByte(), but I'm setting up a Card8 value and I have to switch all the bytes around. A SetByte(index, Card1) would be really useful.

Of course, I'll be done with this driver before it becomes a reality....but it'd be nice to be on the list. :cool
Reply
#2
If you just need to swap the byte order, there's a SwapBytes() method to do that.
Dean Roddey
Explorans limites defectum
Reply
#3
Where is the SwapBytes() method? Is that another Easter egg?

Also, in this case, I'm setting the value with 5 bytes, not the full 8. So it'd be easier to set the bytes directly, all 5 of them, than it is to do what I'm doing now, which is set, left shift, set, left shift, etc.
Reply
#4
I'll put it on the list. But for now you'd have to stick with the shifting and OR'ing. All of the CardX classes have a SwapBytes() that switches them back and forth between big and little endian format.
Dean Roddey
Explorans limites defectum
Reply
#5
sounds good.

Card8 is missing the documentation about Swapbytes().
Reply
#6
Yeh, I added that to my list o' doc stuff to get done.
Dean Roddey
Explorans limites defectum
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Configure Elk Function Keys kblagron 2 1,589 12-29-2019, 11:30 PM
Last Post: kblagron
  Links or function calls to code: A Good Programming Practice advise rocker 15 4,628 05-23-2009, 05:19 PM
Last Post: Dean Roddey
  Pure virtual function call hucker 3 2,066 05-04-2009, 06:27 PM
Last Post: Dean Roddey
  CQC needs global Method or Function calls penngray 9 2,625 06-20-2007, 02:31 PM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)