* Get the optional value (being phase) * @this {!FieldModelOptional} * @returns {!number} Optional begin offset
()
| 2245 | * @returns {!number} Optional begin offset |
| 2246 | */ |
| 2247 | getBegin () { |
| 2248 | if (!this.hasValue) { |
| 2249 | return 0 |
| 2250 | } |
| 2251 | |
| 2252 | let fbeOptionalOffset = this.readUInt32(this.fbeOffset + 1) |
| 2253 | console.assert((fbeOptionalOffset > 0), 'Model is broken!') |
| 2254 | if (fbeOptionalOffset <= 0) { |
| 2255 | return 0 |
| 2256 | } |
| 2257 | |
| 2258 | this._buffer.shift(fbeOptionalOffset) |
| 2259 | return fbeOptionalOffset |
| 2260 | } |
| 2261 | |
| 2262 | /** |
| 2263 | * Get the optional value (end phase) |
no test coverage detected