-
Notifications
You must be signed in to change notification settings - Fork 4
vmcu_model_t
Milo-D edited this page Sep 6, 2021
·
2 revisions
Defined in libvmcu_analyzer.h |
---|
typedef struct vmcu_model vmcu_model_t; |
Opaque forward declaration of the vmcu_model_t
structure. A model holds device specific information required for
the analysis.
A single instance of vmcu_model_t
can be created by calling the model constructor
vmcu_model_t* vmcu_model_ctor(VMCU_DEVICE device);
#include "libvmcu_analyzer.h" // vmcu_model_t
int main(const int argc, const char **argv) {
// create a device model
vmcu_model_t *m328p = vmcu_model_ctor(VMCU_DEVICE_M328P);
// pass m328p to the analyzer in order to start analysis of "file.hex"
vmcu_report_t *report = vmcu_analyze_file("file.hex", m328p);
// do something...
// destroy report
vmcu_report_dtor(report);
// destroy model
vmcu_model_dtor(m328p);
return 0;
}
1 vmcu_model_t
is opaque to the user, therefore its members can not be accessed
2 vmcu_model_t* vmcu_model_ctor(VMCU_DEVICE device)
will allocate a model on the heap