ASN1C C# Runtime Library
7.5
|
Static Public Member Functions | |
static String | ConvertToDER (String timeValue) |
static String | DecodeDate (Asn1OerDecodeBuffer source, int flags) |
static System.String | DecodeDate (Asn1PerDecodeBuffer source, int flags) |
static String | DecodeDateTime (Asn1OerDecodeBuffer source, int flags) |
static System.String | DecodeDateTime (Asn1PerDecodeBuffer source, int flags) |
static String | DecodeDuration (Asn1OerDecodeBuffer buffer) |
static System.String | DecodeDuration (Asn1PerDecodeBuffer source, bool recurring) |
static String | DecodeTime (Asn1OerDecodeBuffer buffer, int flags) |
static System.String | DecodeTime (Asn1PerDecodeBuffer source, int flags) |
static void | EncodeDate (Asn1OerEncodeBuffer encoder, String value, int flags) |
static void | EncodeDate (Asn1PerEncoder encoder, System.String val, int flags) |
static void | EncodeDateTime (Asn1OerEncodeBuffer buffer, String value, int flags) |
static void | EncodeDateTime (Asn1PerEncoder encoder, System.String val, int flags) |
static void | EncodeDuration (Asn1OerEncodeBuffer buffer, String value) |
static void | EncodeDuration (Asn1PerEncoder encoder, System.String val, bool recurring) |
static void | EncodeTime (Asn1OerEncodeBuffer buffer, String value, int flags) |
static void | EncodeTime (Asn1PerEncoder encoder, System.String val, int flags) |
Public Attributes | |
const int | ANY = 0x8000 |
const int | CENTURY = 0x4000 |
const int | DIFF = 0x0020 |
const int | DURATION = 0x0010 |
const int | FRACTION = 0x000F |
const int | UTC = 0x0040 |
const int | WEEK = 0x0800 |
encoding rules. The application representation of the TIME value is simply a String, whose content shall be a TimeValue, as defined in X.680. Some notes on formatting:
|
static |
Return the DER representation of a TimeValue. Given some TimeValue, this function returns a string representing the characters that should be encoded for that TimeValue when using DER.
This can be invoked for values of type TIME. Its result is not correct for values of type DATE, TIME-OF-DAY, DATE-TIME, or DURATION, all of which require removing certain characters that are not removed for values of type TIME. However, for DURATION, this function can first be used and then the leading P removed.
References Asn1DecodeBitBuffer.DecodeBit(), Asn1OerDecodeBuffer.DecodeIntSigned(), and Asn1OerDecodeBuffer.DecodeIntUnsigned().
Referenced by Asn1Duration.Asn1Duration(), and Asn1Time.Asn1Time().
|
static |
Decode a date value according to OER from the given source. This should be used for types having Basic="Date" and Date equal to "Y", "YM", or "YMD".
Referenced by Asn1Date.Encode().
|
static |
Decode a date value from the given source.
This should be used for types having Basic="Date".
source | |
flags |
|
static |
Decode a date-time value from the given source.
This should be used for types having Basic="Date-Time", Date equal to "Y", "YM", or "YMD", Time equal to "H", "HM", "HMS", or "HMSFn" and Local-or-UTC equal to "L", "Z", or "LD".
flags | Indicates what fields are expected. The flags should indicate a complete date (YMD, YWD, or YD) and at least an hour component. |
Referenced by Asn1DateTime.Encode().
|
static |
Decode a date-time value from the given source.
This should be used for types having Basic="Date-Time".
source | |
flags | Indicates what fields are expected. The flags should indicate a complete date (YMD, YWD, or YD) and at least an hour component. |
References Asn1PerDecodeBuffer.DecodeBit(), Asn1PerDecodeBuffer.DecodeConsWholeNumber(), and Asn1Integer.DecodeValue().
|
static |
Decode a duration according to OER from the given buffer. This should be used for types having Basic="Interval" and Interval-type="D"
Referenced by Asn1Duration.Encode().
|
static |
Decode a (possibly recurring) duration from the given source.
This should be used for types having Basic="Interval" or "Rec-Interval" and Interval-type="D"
source | |
recurring | true if the duration is a recurring duration |
References Asn1PerDecodeBuffer.DecodeBit(), Asn1PerDecodeBuffer.DecodeConsWholeNumber(), and Asn1Integer.DecodeValue().
|
static |
Decode a time value according to OER from the given source. This should be used for types meeting the following: 1) Basic="Time" 2) Time is one of "H", "HM", "HMS", "HMSFn" (for some fixed n) 3) Local-or-UTF is "L", "Z", or "LD"
flags | Indicates the expected fields. |
References Asn1Integer.DecodeValue().
Referenced by Asn1TimeOfDay.Encode().
|
static |
Decode a time value from the given source.
This should be used for types having Basic="Time".
source | |
flags | Indicates the expected fields. |
References Asn1OerEncodeBuffer.EncodeIntSigned(), and Asn1OerEncodeBuffer.EncodeIntUnsigned().
|
static |
Encode a date value according to OER, using the given encoder.
This should be used for types having Basic="Date" and Date equal to "Y", "YM" or "YMD".
flags | Must have YEAR set. |
Referenced by Asn1Date.Encode().
|
static |
Encode a date value according to PER, using the given
encoder. This should be used for types having Basic="Date".
encoder | |
val | |
flags |
References Asn1PerEncoder.EncodeInt(), and Asn1Integer.EncodeValue().
|
static |
Encode a datetime value according to OER. This should be used for types having Basic="Date-Time", Date equal to "Y", "YM", or "YMD", Time equal to "H", "HM", "HMS", or "HMSFn" and Local-or-UTC equal to "L", "Z", or "LD".
References Asn1OerEncodeBuffer.EncodeIntUnsigned().
|
static |
Encode a datetime value.
This should be used for types having Basic="Date-Time".
encoder | |
val | |
flags |
References Asn1PerEncoder.EncodeBit(), Asn1PerEncoder.EncodeInt(), and Asn1Integer.EncodeValue().
|
static |
Encode a duration according to OER. This should be used for types having Basic="Interval" and Interval-type="D".
value | The duration |
References Asn1OerEncodeBuffer.EncodeIntSigned(), and Asn1OerEncodeBuffer.EncodeIntUnsigned().
|
static |
Encode a duration according to PER.
This should be used for types having Basic="Interval" or "Rec-Interval", and Interval-type="D".
encoder | |
val | The duration |
recurring | true if value represents a recurring duration. |
References Asn1PerEncoder.EncodeBit(), Asn1PerEncoder.EncodeConsWholeNumber(), Asn1PerEncoder.EncodeInt(), and Asn1Integer.EncodeValue().
|
static |
Encode a time value according to OER. This may be used only for TIME types that have been constrained so as to have an optimized encoding. This means being constrained as follows: 1) Basic=Time 2) Time is one of H, HM, HMS, HMSFn for some fixed n. 3) Local-or-UTF is one of L, Z, or LD
flags | Indicates the property constraints on the TIME type |
References Asn1PerEncoder.EncodeInt(), and Asn1Integer.EncodeValue().
|
static |
Encode a time value.
This should be used for types having Basic="Time".
encoder | |
val | |
flags |
const int ANY = 0x8000 |
For PER, when ANY is combined with CENTURY/YEAR, it indicates that the type is constrained to values with Year=Ln or NEGATIVE (as for the defined types named ANY-*), while absence of ANY indicates the type is constrained to values with Year=Basic or Proleptic. There is a little inconsistency here, however. At present, code generation will use the DT_ANY* constants for a type that has Year=Negative, or that has Year=Ln for some n. By contrast, the defined types named ANY-* include values that have either Year=Negative or Year=L5. I think this discrepancy doesn't matter though, because PER uses the same encodings whether type includes:
The ANY flag's presence/absence is irrelevant to OER, as OER's optimized encodings do not depend on the Year property.
const int CENTURY = 0x4000 |
Flags for Date properties. Each flag indicates a particular component that is required for dates.
const int DIFF = 0x0020 |
Indicates a time includes a timezone difference from UTC.
DIFF and UTC should never appear together.
const int DURATION = 0x0010 |
Indicates a duration.
No other flags should be used with DURATION.
const int FRACTION = 0x000F |
This is a mask that is used to mark off the bits used for
the number of decimal places for a fraction.
value & FRACTION = # of decimal places
const int UTC = 0x0040 |
Indicates a time is UTC. Its string format includes the 'Z' timezone designator.
const int WEEK = 0x0800 |
Week is present.
When used for a duration (with DURATION), the following are excluded: CENTURY, YEAR, MONTH, DAY, HOURS, MINUTES, SECONDS
When used for a date/datetime (without DURATION), MONTH is excluded.