Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DatatypeCacheEntry

Implementation of TopicCacheEntry for topics with a given datatype

Hierarchy

  • any
    • DatatypeCacheEntry

Index

Constructors

constructor

  • Create a new DatatypeCacheEntry instance

    Parameters

    Returns DatatypeCacheEntry

Properties

Private Optional buffer

buffer: Buffer

The CBOR data containing the cached value

Private datatype

datatype: DataType<any, any, any>

The data type of the entry

Private dontRetainValue

dontRetainValue: boolean

Private value

value: any

The current cached value

Methods

handleDelta

  • handleDelta(received: Buffer, registry: StreamRegistryImpl, errorHandler: function): void
  • Handle a delta

    Reads the delta of the entry's data type and caches it. The calls notifyValue

    Parameters

    • received: Buffer

      the content as a Buffer

    • registry: StreamRegistryImpl

      the stream registry

    • errorHandler: function
        • (e: any): void
        • Parameters

          • e: any

          Returns void

    Returns void

handleValue

  • handleValue(received: Buffer, registry: StreamRegistryImpl, errorHandler: function): void
  • Handle a value

    Reads a value of the entry's data type and caches it. The calls notifyValue

    Parameters

    • received: Buffer

      the content as a Buffer

    • registry: StreamRegistryImpl

      the stream registry

    • errorHandler: function

      an error handler that will be called if an error occurs

        • (e: any): void
        • Parameters

          • e: any

          Returns void

    Returns void

notifyValueToNewStream

  • Notify a new stream of the cached value

    Parameters

    Returns void