/ fm / liveswitch / CircularBuffer
Class: CircularBuffer
fm.liveswitch.CircularBuffer
A circular buffer.
Table of contents
Constructors
Methods
- fmliveswitchCircularBufferInit
- getAvailable
- getLatency
- getLength
- getLittleEndian
- getReadOffset
- getTypeString
- getWriteOffset
- read
- write
Constructors
constructor
+ new CircularBuffer(length
: number, latency
: number): CircularBuffer
Initializes a new instance of the [[fm.liveswitch.circularBuffer]] class.
Parameters:
Name | Type | Description |
---|---|---|
length |
number | The length. |
latency |
number | The latency. |
Returns: CircularBuffer
Defined in: Generated/TypeScript/fm.liveswitch/CircularBuffer.ts:32
+ new CircularBuffer(length
: number, latency
: number, littleEndian
: boolean): CircularBuffer
Initializes a new instance of the [[fm.liveswitch.circularBuffer]] class.
Parameters:
Name | Type | Description |
---|---|---|
length |
number | The length. |
latency |
number | The latency. |
littleEndian |
boolean | Whether the data is little-endian. |
Returns: CircularBuffer
Defined in: Generated/TypeScript/fm.liveswitch/CircularBuffer.ts:40
Methods
fmliveswitchCircularBufferInit
▸ Private
fmliveswitchCircularBufferInit(): void
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/CircularBuffer.ts:25
getAvailable
▸ getAvailable(): number
Gets the number of bytes available for reading.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/CircularBuffer.ts:103
getLatency
▸ getLatency(): number
Gets the latency.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/CircularBuffer.ts:115
getLength
▸ getLength(): number
Gets the length.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/CircularBuffer.ts:127
getLittleEndian
▸ getLittleEndian(): boolean
Gets whether the data is little-endian.
Returns: boolean
Defined in: Generated/TypeScript/fm.liveswitch/CircularBuffer.ts:139
getReadOffset
▸ getReadOffset(): number
Gets the read offset.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/CircularBuffer.ts:151
getTypeString
▸ getTypeString(): string
Returns: string
Defined in: Generated/TypeScript/fm.liveswitch/CircularBuffer.ts:9
getWriteOffset
▸ getWriteOffset(): number
Gets the read offset.
Returns: number
Defined in: Generated/TypeScript/fm.liveswitch/CircularBuffer.ts:163
read
▸ read(length
: number): DataBuffer
Reads data from the buffer.
Parameters:
Name | Type | Description |
---|---|---|
length |
number | The number of bytes to read. |
Returns: DataBuffer
Defined in: Generated/TypeScript/fm.liveswitch/CircularBuffer.ts:176
write
▸ write(buffer
: DataBuffer): void
Writes data to the buffer.
Parameters:
Name | Type | Description |
---|---|---|
buffer |
DataBuffer | The data to write. |
Returns: void
Defined in: Generated/TypeScript/fm.liveswitch/CircularBuffer.ts:243