I am trying to import a C array that is 64kb meant to be a circular buffer for a log on a device. When I attempt to access this array in Swift I am met with the error
Value of type 'logging' has no member 'data'
To attempt to answer potential questions about bridging, I am using other types from my imported C library that are defined in the same file that this mock code originates.
The code is setup as follows:
logging.h
:
typedef struct _logging {
uint8_t data[64*1024];
} logging;
In ReadLog.swift
:
struct ReadLog {
var log: logging = logging()
func read() {
//...Do some stuff...
let char = log.data.0 // <- Error here 'Value of type 'logging' has no member 'data'
}
}
Changing the size of data to 256 imported this member with no issue. (I don't know what the cutoff is).
What would be the best way to handle this?