AGG Software Forums
November 21, 2024, 07:14:13 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome on our forum!
 
   Home   Help Search Login Register  

Pages: [1]
  Print  
Author Topic: Parsing a hex data stream  (Read 18557 times)
mccallum4004
Jr. Member
**

Karma: +0/-0
Posts: 15


View Profile
« on: June 18, 2010, 10:48:38 PM »

I receive a data stream in binary that I am trying to parse.  I have parsed the data as a word (unsigned integer).  The parser apparently finds the correct portion of the data but when exporting via DDE, I get the message "'+' is not a valid integer" for the hex word 2B 07.  Since 2B is the ASCII for +, I assume this is doing something correctly.  Why doesn't the word data type accept two bytes?  And why does it try to make it an ASCII character rather than an integer?  The data is also in little endian format.  Can this program read that correctly?  I find no option for setting this parameter.
Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
*****

Karma: +0/-0
Posts: 806



View Profile WWW
« Reply #1 on: June 21, 2010, 08:30:54 AM »

Please, select the "String" data type for your parser item. Then convert this variable to a WORD value with help of the Expressions plugin.
Logged
mccallum4004
Jr. Member
**

Karma: +0/-0
Posts: 15


View Profile
« Reply #2 on: June 21, 2010, 11:44:35 PM »

Will the Expressions plugin work for arrays or do I need to use the scripting plugin?  Once I get the array, I will want to subtract a vector, mulitply it by a cosine of the index, and sum over the array.  It seems like it might be best to go directly to the scripting plugin if I will be needing it later.
Logged
Arthur Grasin
Tech. Support
Administrator
Hero Member
*****

Karma: +0/-0
Posts: 806



View Profile WWW
« Reply #3 on: June 22, 2010, 09:16:43 AM »

Quote
It is not clear exactly what these functions do.  For example, I have an array of hex in little endian format. When I run WORDTOSTR(X) on that data, I get an integer that seems unrelated to the input array, X.  Does this function operate on the entire array?  Just the first two bytes?

This function operates with 2 bytes only.

Quote
This topic refers to 'arrays' but can the expressions module work with arrays or does one need the scripting module to do this?

The scripting module is more flexible and it is better for your task.
Logged
mccallum4004
Jr. Member
**

Karma: +0/-0
Posts: 15


View Profile
« Reply #4 on: June 22, 2010, 06:36:08 PM »

Thanks.  For the most part, I have this working and purchased a license yesterday.  From the time stamps on this forum it looks like we are 10 time zones apart.  Considering that, the help from this forum has been all that I could hope for. 
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines