C/C++ Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingC/C++ Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old February 14th, 2013, 03:39 AM
Sajas K K Sajas K K is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Feb 2013
Posts: 1 Sajas K K User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 11 m 2 sec
Reputation Power: 0
Question General - Encoding a data structure based on TLV encoding

I have to encode the parameters present inside a structure based on X.690 encoding.
Suppose, my structure is:

struct Data_Struct
{
parameter1
parameter2
parameter3
}
Some or all of these parameter may be having valid data, say, parameter1 and parameter3.
Then I am supposed to encode only parameter1 and parameter3 using TLV encoding.
Do I have to follow a sequencial procedure to follow this. Like,


Check whether parameter 1 is present
If present, find the tag of the parameter from a lookup table and encode it
Check whether parameter 2 is present
If present, find the tag of the parameter from a lookup table and encode it
Check whether parameter 3 is present
If present, find the tag of the parameter from a lookup table and encode it

As the procedure is repetative can I modularize it? What will be the best way to do it? Is there any way to access the parameters sequentially? How can I have a relationship between the parameter and it's tag? Length of the value is variable.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingC/C++ Help > General - Encoding a data structure based on TLV encoding


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.

© 2003-2014 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap