Objective Systems, Inc.  
Home
About ASN.1
Products
Free Software
Open Source
Documents
Services
Resources
Resellers
Customers
Careers
About Us
Contact Us
 

Google


Objective Systems, Inc.

Asn1Tag Class Reference

List of all members.

Detailed Description

This is a container class for holding the components of an ASN.1 tag value.


Public Member Functions

 Asn1Tag (short tagclass, short form, int idCode)
 Asn1Tag ()
bool Equals (Asn1Tag tag)
virtual bool Equals (short tagclass, short form, int idCode)
virtual bool IsEOC ()
override System.String ToString ()

Public Attributes

const short APPL = (short) (0x40)
const short Bit8Mask = (short) (0x80)
const short ClassMask = (short) (0xC0)
const short CONS = (short) (0x20)
const short CTXT = (short) (0x80)
const bool EXPL = true
const short EXTIDCODE = (short) (0x1F)
const short FormMask = (short) (0x20)
const short IDMask = (short) (0x1F)
const bool IMPL = false
const short L7BitsMask = (short) (0x7f)
short mClass
short mForm
int mIDCode
const short PRIM = (short) (0x00)
const short PRIV = (short) (0xC0)
const short UNIV = (short) (0x00)

Static Public Attributes

static readonly Asn1Tag ENUM
static readonly Asn1Tag EOC
static readonly Asn1Tag SEQUENCE
static readonly Asn1Tag SET

Properties

virtual bool Constructed


Constructor & Destructor Documentation

Asn1Tag  ) 
 

The default constructor initializes all fields to zero

Asn1Tag short  tagclass,
short  form,
int  idCode
 

This constructor initializes all fields to the given values

Parameters:
tagclass Tag class value (UNIV, APPL, CTXT, or PRIV)
form Tag form value (PRIM or CONS)
idCode Tag identifier code


Member Function Documentation

bool Equals Asn1Tag  tag  ) 
 

This method compares this tag with the given tag value for equality.

Parameters:
tag Asn1Tag object to which this tag is to be compared
Returns:
true if the specified Tags are equal; otherwise, false.

virtual bool Equals short  tagclass,
short  form,
int  idCode
[virtual]
 

This method compares this tag with the given tag value for equality.

Parameters:
tagclass Tag class value (UNIV, APPL, CTXT, or PRIV)
form Tag form value (PRIM or CONS)
idCode Tag identifier code
Returns:
true if the specified Tags are equal; otherwise, false.

virtual bool IsEOC  )  [virtual]
 

This method tests if the tag is an end-of-contents (EOC) tag.

Returns:
True if tag is an EOC.

override System.String ToString  ) 
 

This method will return a formatted string representing the tag value. The form is "[<class> <ID>]" (i.e. the ASN.1 standard syntax for a tag value).

Returns:
Formatted tag string


Member Data Documentation

const short APPL = (short) (0x40)
 

Mask value for an APPLICATION tag

const short Bit8Mask = (short) (0x80)
 

Bit 8 (MSB) octet mask value

const short ClassMask = (short) (0xC0)
 

Mask value to mask the class bits from a tag

const short CONS = (short) (0x20)
 

Mask value for CONSTRUCTED form

const short CTXT = (short) (0x80)
 

Mask value for a context-specific tag

readonly Asn1Tag ENUM [static]
 

ASN.1 ENUMERATED type tag value

readonly Asn1Tag EOC [static]
 

ASN.1 end-of-contents (EOC) type tag value

const bool EXPL = true
 

This specifies that explicit tagging should be used.

const short EXTIDCODE = (short) (0x1F)
 

Mask value for extended tag identifier indicator

const short FormMask = (short) (0x20)
 

Mask value to mask the form bit from a tag

const short IDMask = (short) (0x1F)
 

Mask value to mask the tag ID bits from a tag

const bool IMPL = false
 

This specifies that implicit tagging should be used.

const short L7BitsMask = (short) (0x7f)
 

Lower 7 bits octet mask value

short mClass
 

Tag class value (UNIV, APPL, CTXT, or PRIV)

short mForm
 

Tag form value (PRIM or CONS)

int mIDCode
 

Tag ID code

const short PRIM = (short) (0x00)
 

Mask value for PRIMITIVE form

const short PRIV = (short) (0xC0)
 

Mask value for a PRIVATE tag

readonly Asn1Tag SEQUENCE [static]
 

ASN.1 SEQUENCE type tag value

readonly Asn1Tag SET [static]
 

ASN.1 SET type tag value

const short UNIV = (short) (0x00)
 

Mask value for a UNIVERSAL tag


Property Documentation

virtual bool Constructed [get]
 

Gets the tag is constructed.

Value: true if tag is constructed; otherwise false.


Copyright © 1997-2005 Objective Systems,Inc.
All Rights Reserved.
This document may be distributed in any form, electronic
or otherwise, provided that it is distributed in its entirety
and that the copyright and this notice are included.

This file was last modified on 18 Nov 2005.
ASN1C C# Runtime Library, 5.8