Google Answers Logo
View Question
 
Q: Convert Octet String in VB.Net (VS 2005) ( No Answer,   0 Comments )
Question  
Subject: Convert Octet String in VB.Net (VS 2005)
Category: Computers > Programming
Asked by: robw1234-ga
List Price: $100.00
Posted: 25 Aug 2006 11:45 PDT
Expires: 25 Aug 2006 15:22 PDT
Question ID: 759501
I am having trouble untangling/interpreting an octet string that I am
retrieving from a device. The standards documentation is available,
but I'm not familiar with manipulating octets & etc.

An example string retrieved from the device is:

0801480000000503d700050014147b001400262e14002600385999003800599999005900b3ca3d00b300d9cccc00d900ff

The documentation for standards has the following explanation and
interpretation table:
the relationship between 'Brightness Levels', 'Light Output' and the
brightness table defined by 'dmsIllumBrightnessValues'. Brightness
level refers to the values used by the objects
dmsIllumNumBrightLevels, dmsIllumBrightLevelStatus and
dmsIllumManLevel. There is no direct correlation between the
Brightness Level and the amount of light actually used to illuminate
the sign (except for level 0, which indicates no illumination, and
that numerically higher Brightness levels do not have a Light Output
lower than the previous level). The actual amount
of light, or Light Output, used for a given Brightness Level is
defined using the dmsIllumBrightnessValues (in the fields labeled
Brightness
Level x) and is reported to the user in the dmsIllumLightOutputStatus
object. In addition to defining the Light Output for a given
Brightness Level, the dmsIllumBrightnessValues object also defines the
photocell readings used to move up or down to other levels when
DmsIllumControl is set to photocell (2). When defining the Light
Output for the different Brightness Levels, it is important to note
that the  range for these values is always 0 (off) to 65536 (Full
brightness), and cannot be sub ranged, thus providing for
interoperability and  interchangeability. The brightness control
system in the DMS can map these values to whatever the hardware
requires to generate the  selected illumination levels. The table that
used to exist within the MIB is below:

-- 0                   1                   2                   3 
-- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 
-- +-+-+-+-+-+-+-+-+ 
-- |NumEntries = n | 
--+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
-- | Brightness level 1 | Photocell-Level-Down point 1 | 
--+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
-- | Photocell-Level-Up point 1 | Brightness level 2 | 
-- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
-- | Photocell-Level-Down point 2 | Photocell-Level-Up point 2 | 
-- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
-- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
-- | Photocell-Level-Down point n | Photocell-Level-Up point n | 
-- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 

Using the above, wouldn't the parsing of the string:
0801480000000503d700050014147b001400262e14002600385999003800599999005900b3ca3d00b300d9cccc00d900ff
proceed as follows?

numEntries                =             08 01 48 00
Brightness level 1        =             00 00 05 03
Photocell Level Down 1    =             d7 00 05 00
Photocell Level up 1      =             14 14 7b 00
Brightness Level 2        =             14 00 26 2e
Photocell Level Down 2    =             14 00 26 00
Photocell Level Up 2      =             38 59 99 00
Brightness Level 3        =             38 00 59 99
Photocell Level Down 3    =             99 00 59 00
Photocell Level Up 3      =             b3 ca 3d 00
? (CRC?)                  =             b3 00 d9 cc
? (CRC?)                  =             cc 00 d9 00
Tail (?)                  =             ff

I have output from the manufacturer's (unsupported) software, which
states the outcome as follows:

 % Photocel Range    % Brightness Out
1      0.00 1.96     0.50
2      1.96 7.84     1.50
3      7.84 14.9     8.00
4     14.90 21.96   18.00
5     21.96 34.90   35.00
6     34.90 70.20   60.00
7     70.20 85.10   80.00
8     85.10 100.00  80.00

So, the question is: can anyone help to to understand how to parse the
above string and get these outputs?

Thanks.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy