Skip to content
asn1jsasn1jsasn1jsv4.1.0

BaseBlock

  • LocalBaseBlock

T extends ValueBlock = ValueBlock

J extends ValueBlockJson = ValueBlockJson

new BaseBlock<T, J>(__namedParameters?, valueBlockType?): BaseBlock<T, J>

BaseBlockParams = {}

ValueBlockConstructor<T>

BaseBlock<T, J>

LocalBaseBlock.constructor

blockLength: number

LocalBaseBlock.blockLength


error: string

LocalBaseBlock.error


idBlock: LocalIdentificationBlock


lenBlock: LocalLengthBlock


name: string

IBaseBlock.name


optional: boolean

IBaseBlock.optional


optional primitiveSchema?: BaseBlock<ValueBlock, LocalBaseBlockJson>

IBaseBlock.primitiveSchema


valueBeforeDecodeView: Uint8Array

3.0.0

LocalBaseBlock.valueBeforeDecodeView


valueBlock: T


warnings: string[]

LocalBaseBlock.warnings


static NAME: string = "BaseBlock"

Name of the block

LocalBaseBlock.NAME

get valueBeforeDecode(): ArrayBuffer

ArrayBuffer

set valueBeforeDecode(value): void

ArrayBuffer

void

LocalBaseBlock.valueBeforeDecode

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

Base function for converting block from BER encoded array of bytes

Uint8Array

ASN.1 BER encoded array

number

Offset in ASN.1 BER encoded array where decoding should be started

number

Maximum length of array of bytes which can be using in this function

FromBerContext

number

Offset after least decoded byte

IBerConvertible.fromBER


isEqual(other): other is BaseBlock<T, J>

Determines whether two object instances are equal

unknown

Object to compare with the current object

other is BaseBlock<T, J>


toBER(sizeOnly?, writer?): ArrayBuffer

Encoding of current ASN.1 block into ASN.1 encoded array (BER rules)

boolean

Flag that we need only a size of encoding, not a real array of bytes

ViewWriter

ArrayBuffer

ASN.1 BER encoded array

IBerConvertible.toBER


toJSON(): BaseBlockJson<J>

Returns a JSON representation of an object

BaseBlockJson<J>

JSON object

LocalBaseBlock.toJSON


toString(encoding?): string

Returns a string representation of an object.

StringEncoding = "ascii"

string


static blockName(): string

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

string

Returns name of the block

LocalBaseBlock.blockName