modeIndicator returns the segment header bits for a segment of type dataMode.
(dataMode dataMode)
| 371 | |
| 372 | // modeIndicator returns the segment header bits for a segment of type dataMode. |
| 373 | func (d *dataEncoder) modeIndicator(dataMode dataMode) *bitset.Bitset { |
| 374 | switch dataMode { |
| 375 | case dataModeNumeric: |
| 376 | return d.numericModeIndicator |
| 377 | case dataModeAlphanumeric: |
| 378 | return d.alphanumericModeIndicator |
| 379 | case dataModeByte: |
| 380 | return d.byteModeIndicator |
| 381 | default: |
| 382 | log.Panic("Unknown data mode") |
| 383 | } |
| 384 | |
| 385 | return nil |
| 386 | } |
| 387 | |
| 388 | // charCountBits returns the number of bits used to encode the length of a data |
| 389 | // segment of type dataMode. |
no outgoing calls
no test coverage detected