ScByteArray Struct Reference

Public Member Functions

uint32_t sc_byte_array_get_size (ScByteArray array)
 
const uint8_t * sc_byte_array_get_data (ScByteArray array)
 
const char * sc_byte_array_get_string (ScByteArray array)
 

Data Fields

union {
const uint8_t * bytes
 
const char * str
 
}; 
 
uint32_t size
 
uint32_t flags
 

Detailed Description

A nul terminated array of bytes.

The array is always terminated with a nul-byte, but nul-characters may appear in the middle. Use sc_byte_array_get_size() to get the complete length of the data.

Since
4.6.0
Examples:
ScanditNativeBarcodeScannerCameraDemo.c, and ScanditNativeBarcodeScannerDemo.c.

Member Function Documentation

uint32_t sc_byte_array_get_size ( ScByteArray  array)

Get the number of bytes in the array.

Returns
The number of bytes.
Parameters
arrayThe byte array.
Since
4.6.0
const uint8_t * sc_byte_array_get_data ( ScByteArray  array)

Get a const pointer to the byte data.

Returns
a constant pointer.
Parameters
arrayThe byte array.
Since
4.6.0
const char * sc_byte_array_get_string ( ScByteArray  array)

Get a const string pointer to the array data.

Returns
a constant pointer.
Parameters
arrayThe byte array.
Since
4.6.0

The documentation for this struct was generated from the following file: