I have a third party DLL that downloads everything from a device to a
particular device into the following Hex format:
080 : 13 70 05 00 (Timestamp)
081 : 35 E1 91 F9 9F BF (Mode 1 Supported Parameters)
How would I go about translating this into readable values? 3 7609
I assume that you're interested in converting from hex values to integers.
In this case I recommend the following:
Convert.ToInt16 ( string, base );
Convert.ToInt32 ( string, base );
Convert.ToInt64 ( string, base );
Each of these returns the respective integer. <string> is a string
containing the data to convert. <base> is the number base and must have a
value of 2, 8, 10 or 16.
..ARN.
"aaa" wrote: I have a third party DLL that downloads everything from a device to a particular device into the following Hex format:
080 : 13 70 05 00 (Timestamp) 081 : 35 E1 91 F9 9F BF (Mode 1 Supported Parameters)
How would I go about translating this into readable values?
That doesn't work.
int i = Convert.ToInt32 ( "B3 0C 00 20", 2 );
"alanrn" <al****@discuss ions.microsoft. com> wrote in message
news:28******** *************** ***********@mic rosoft.com... I assume that you're interested in converting from hex values to integers. In this case I recommend the following:
Convert.ToInt16 ( string, base ); Convert.ToInt32 ( string, base ); Convert.ToInt64 ( string, base );
Each of these returns the respective integer. <string> is a string containing the data to convert. <base> is the number base and must have a value of 2, 8, 10 or 16.
.ARN.
"aaa" wrote:
I have a third party DLL that downloads everything from a device to a particular device into the following Hex format:
080 : 13 70 05 00 (Timestamp) 081 : 35 E1 91 F9 9F BF (Mode 1 Supported Parameters)
How would I go about translating this into readable values?
Try the following:
1) Take the spaces out of the string
2) use a base of 16 (for hexadecimal)
like this:
int i = Convert.ToInt32 ( "B30C0020", 16 );
When I tried this, I got a value of -1291059168 for i.
Using the following gave me a value of 3003908128:
Int64 i = Convert.ToInt64 ("B30C0020", 16 );
..ARN.
"aaa" wrote: That doesn't work. int i = Convert.ToInt32 ( "B3 0C 00 20", 2 );
"alanrn" <al****@discuss ions.microsoft. com> wrote in message news:28******** *************** ***********@mic rosoft.com... I assume that you're interested in converting from hex values to integers. In this case I recommend the following:
Convert.ToInt16 ( string, base ); Convert.ToInt32 ( string, base ); Convert.ToInt64 ( string, base );
Each of these returns the respective integer. <string> is a string containing the data to convert. <base> is the number base and must have a value of 2, 8, 10 or 16.
.ARN.
"aaa" wrote:
I have a third party DLL that downloads everything from a device to a particular device into the following Hex format:
080 : 13 70 05 00 (Timestamp) 081 : 35 E1 91 F9 9F BF (Mode 1 Supported Parameters)
How would I go about translating this into readable values? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Grant Edwards |
last post by:
Perhaps I'm doing something wrong: the struct module docs say
it's IEE 754, but I can't figure out how to get it to handle
NaN values correctly (either packing or unpacking).
>>> x = float('nan')
>>> struct.pack("<f",x)
Traceback (most recent call last):
File "<stdin>", line 1, in ?
SystemError: frexp() result out of range
|
by: GuyInTn |
last post by:
Hi all,
I am trying to convert all the NULL values in a column to "Open". Any
ideas??
TIA
|
by: Prabhudhas Peter |
last post by:
Hello,
Need an easy way to Display the property values of an object (dynamically)
ie I need to show the values of an Object in a rich text box.
Background : We have a form, with a rich text box, where we want to display
the values of any given object (say customer, order etc). We declared (Dim
Obj as New Object) and assigned our application object. Now we want to print
|
by: Bob Homes |
last post by:
In VB6, foreground and background colors of controls had to be assigned a
single number. If you knew the RGB values for the color, you still had to
convert them into the single number accepatable to the VB6 controls.
In VB.NET, you can't set colors that way anymore, now you have to use a
"color". There is a way to convert RGB values to a "color", using the
Color.FromARGB method. But there doens't seem to be a way to convert the old...
|
by: Angus |
last post by:
Hello
I have an unsigned char and I want to convert the individual array
values into hex and copy to a std::string.
The array does not always hold 14 values - but I do know the length of
the data - obviously up to 14 chars.
An example is an array of six items with decimal values: 0, 10, 228,
164, 72, 11. I want to convert these values to hex and copy to a
| |
by: =?Utf-8?B?YW1pcg==?= |
last post by:
I am trying to convert a Dictionary into an array so that I can compare
values and compare keys individually.
I am looking for a solution like array i.e array of array.
|
by: Stephen Cattaneo |
last post by:
Hi all,
I am relatively new to socket programming. I am attempting to use raw
sockets to spoof my IP address. From what I can tell I will have to
build from the Ethernet layer on up. This is fine, but I am having
some trouble with manipulating my hex values.
Seems to me that there are two ways to store hex values:
1. as literal hex - 0x55aa
2. as a string - "\x55aa"
|
by: puzzlecracker |
last post by:
Is it possible, in a clean way, to convert int values too bool
int i=10;
bool b=(bool)i;
instead of doing b=(i>0);
|
by: Jeroen Mostert |
last post by:
Bruce wrote:
Sure, hence my "easy to say after the fact" remark. Once you've got it
wrong, you're usually stuck with it.
But if that's the only problem, isn't it trivial for you to just ignore the
time part?
Per above, what's stopping you from doing that? All you need to do is force
the .Kind of the DateTime to UTC after reading it from the DB (it should be
Unknown initialy). It isn't UTC, but that doesn't matter -- what matters is
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |