ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Typedefs
CVirtualStruct.h File Reference
#include <stdint.h>
Include dependency graph for CVirtualStruct.h:

Go to the source code of this file.

Typedefs

typedef const char *const *(* VirtualStruct_names) (void *handle)
 must return an array of zero terminated strings. More...
 
typedef const char *const *(* VirtualStruct_prettyNames) (void *handle)
 similar to above array but with human readable/alternative field names (see etiss::VirtualStruct) More...
 
typedef uint64_t(* VirtualStruct_read) (void *handle, uint32_t index)
 read the value of the field at the given index More...
 
typedef void(* VirtualStruct_write) (void *handle, uint32_t index)
 write the value of the field at the given index More...
 
typedef void(* VirtualStruct_setListenerCallback) (void *handle, void *callbackHandle, void(*callback) (void *handle, void *callbackHandle, uint32_t index))
 setter function to register the callback handle for listener supported fields. More...
 

Typedef Documentation

◆ VirtualStruct_names

typedef const char* const*(* VirtualStruct_names) (void *handle)

must return an array of zero terminated strings.

the array must have a zero sentinel e.g. const char * const * array = { "field_1", "field_2", (const char*)0 // sentinel }

the field names of this array must be prefixed with a '.' character. befor the dot character the following characters may be put to set flags of that field:

'R' - field supports read access 'W' - field supports write access 'P' - private field (see etiss::copy() for it's implications) 'L' - supports listening (VirtualStruct_setListenerCallback must be provided)

Definition at line 61 of file CVirtualStruct.h.

◆ VirtualStruct_prettyNames

typedef const char* const*(* VirtualStruct_prettyNames) (void *handle)

similar to above array but with human readable/alternative field names (see etiss::VirtualStruct)

Attention
this array MUST have the same size as the array returned by the corresponding VirtualStruct_names function

Note: the array may contain 0 pointers or the function may return a 0 pointer. in that case the name will be used as the pretty name

pretty names have no prefixes like the names from VirtualStruct_names

Definition at line 74 of file CVirtualStruct.h.

◆ VirtualStruct_read

typedef uint64_t(* VirtualStruct_read) (void *handle, uint32_t index)

read the value of the field at the given index

Definition at line 79 of file CVirtualStruct.h.

◆ VirtualStruct_setListenerCallback

typedef void(* VirtualStruct_setListenerCallback) (void *handle, void *callbackHandle, void(*callback)(void *handle, void *callbackHandle, uint32_t index))

setter function to register the callback handle for listener supported fields.

one handle per virtual struct not per field. variables with the same name in this function and the callback must have the same value

Definition at line 89 of file CVirtualStruct.h.

◆ VirtualStruct_write

typedef void(* VirtualStruct_write) (void *handle, uint32_t index)

write the value of the field at the given index

Definition at line 83 of file CVirtualStruct.h.