Skip to main content

ObjectIdentifier

Extends​

  • BaseBlock<LocalObjectIdentifierValueBlock, LocalObjectIdentifierValueBlockJson>

Constructors​

Constructor​

new ObjectIdentifier(parameters?): ObjectIdentifier

Parameters​

parameters?​

ObjectIdentifierParams = {}

Returns​

ObjectIdentifier

Overrides​

BaseBlock.constructor

Properties​

blockLength​

blockLength: number

Inherited from​

BaseBlock.blockLength


error​

error: string

Inherited from​

BaseBlock.error


idBlock​

idBlock: LocalIdentificationBlock

Inherited from​

BaseBlock.idBlock


lenBlock​

lenBlock: LocalLengthBlock

Inherited from​

BaseBlock.lenBlock


name​

name: string

Inherited from​

BaseBlock.name


optional​

optional: boolean

Inherited from​

BaseBlock.optional


primitiveSchema?​

optional primitiveSchema?: BaseBlock<ValueBlock, LocalBaseBlockJson>

Inherited from​

BaseBlock.primitiveSchema


valueBeforeDecodeView​

valueBeforeDecodeView: Uint8Array

Since​

3.0.0

Inherited from​

BaseBlock.valueBeforeDecodeView


valueBlock​

valueBlock: LocalObjectIdentifierValueBlock

Inherited from​

BaseBlock.valueBlock


warnings​

warnings: string[]

Inherited from​

BaseBlock.warnings


NAME​

static NAME: string = "OBJECT IDENTIFIER"

Name of the block

Overrides​

BaseBlock.NAME

Accessors​

strict​

Get Signature​

get strict(): boolean

Whether value assignment and encoding throw on invalid OIDs. Defaults to false. Changing this flag does not validate or alter the value; the next assignment or encoding checks it.

Returns​

boolean

Set Signature​

set strict(value): void

Parameters​
value​

boolean

Returns​

void


valueBeforeDecode​

Get Signature​

get valueBeforeDecode(): ArrayBuffer

Deprecated​

since version 3.0.0

Returns​

ArrayBuffer

Set Signature​

set valueBeforeDecode(value): void

Deprecated​

since version 3.0.0

Parameters​
value​

ArrayBuffer

Returns​

void

Inherited from​

BaseBlock.valueBeforeDecode

Methods​

fromBER()​

fromBER(inputBuffer, inputOffset, inputLength, context?): number

Replaces decoded value state and refreshes diagnostics using the prepared length block.

Parameters​

inputBuffer​

Uint8Array

inputOffset​

number

inputLength​

number

context?​

FromBerContext

Returns​

number

Overrides​

BaseBlock.fromBER


getValue()​

getValue(): string

Gets string representation of Object Identifier

Returns​

string

Since​

3.0.0


isEqual()​

isEqual(other): other is ObjectIdentifier

Determines whether two object instances are equal

Parameters​

other​

unknown

Object to compare with the current object

Returns​

other is ObjectIdentifier

Inherited from​

BaseBlock.isEqual


onAsciiEncoding()​

protected onAsciiEncoding(): string

Returns​

string

Overrides​

BaseBlock.onAsciiEncoding


setValue()​

setValue(value): void

Sets Object Identifier value from a complete decimal string. Invalid input clears the value and sets error and valueBlock.error. Throws when strict is enabled; a successful assignment clears previous value errors.

Parameters​

value​

string

String value

Returns​

void

Since​

3.0.0


toBER()​

toBER(sizeOnly?, writer?): ArrayBuffer

Encodes the value and copies value errors to this block's diagnostics. In strict mode, invalid values throw, including for sizeOnly and nested encoding. Discard an externally supplied writer if encoding throws; writes are not rolled back.

Parameters​

sizeOnly?​

boolean

writer?​

ViewWriter

Returns​

ArrayBuffer

Overrides​

BaseBlock.toBER


toJSON()​

toJSON(): ObjectIdentifierJson

Returns a JSON representation of an object

Returns​

ObjectIdentifierJson

JSON object

Overrides​

BaseBlock.toJSON


toString()​

toString(encoding?): string

Returns a string representation of an object.

Parameters​

encoding?​

StringEncoding = "ascii"

Returns​

string

Inherited from​

BaseBlock.toString


blockName()​

static blockName(): string

Aux function, need to get a block name. Need to have it here for inheritance

Returns​

string

Returns name of the block

Inherited from​

BaseBlock.blockName