mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
c++: more porting
This commit is contained in:
parent
702dc34052
commit
37f5bfe24c
6 changed files with 18 additions and 14 deletions
|
@ -53,6 +53,15 @@ union model_parameter_value {
|
|||
bool bol;
|
||||
};
|
||||
|
||||
struct xsg_model {
|
||||
uint32_t *map;
|
||||
ssize_t maplen;
|
||||
};
|
||||
|
||||
struct hls_model {
|
||||
|
||||
};
|
||||
|
||||
struct model {
|
||||
enum model_type type; /**< Either HLS or XSG model */
|
||||
|
||||
|
@ -60,13 +69,8 @@ struct model {
|
|||
struct list infos; /**< A list of key / value pairs with model details */
|
||||
|
||||
union {
|
||||
struct xsg_model {
|
||||
uint32_t *map;
|
||||
ssize_t maplen;
|
||||
} xsg; /**< XSG specific model data */
|
||||
struct hls_model {
|
||||
|
||||
} hls; /**< HLS specific model data */
|
||||
struct xsg_model xsg; /**< XSG specific model data */
|
||||
struct hls_model hls; /**< HLS specific model data */
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -164,6 +164,6 @@ int node_type_start(struct node_type *vt, struct super_node *sn);
|
|||
int node_type_stop(struct node_type *vt);
|
||||
|
||||
/** Return a printable representation of the node-type. */
|
||||
char * node_type_name(struct node_type *vt);
|
||||
const char * node_type_name(struct node_type *vt);
|
||||
|
||||
/** @} */
|
||||
|
|
|
@ -60,8 +60,8 @@ enum plugin_type {
|
|||
};
|
||||
|
||||
struct plugin {
|
||||
char *name;
|
||||
char *description;
|
||||
const char *name;
|
||||
const char *description;
|
||||
void *handle;
|
||||
char *path;
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ static int restart_stop(struct hook *h)
|
|||
|
||||
static int restart_read(struct hook *h, struct sample *smps[], unsigned *cnt)
|
||||
{
|
||||
int i;
|
||||
unsigned i;
|
||||
struct restart *r = (struct restart *) h->_vd;
|
||||
struct sample *prev, *cur = NULL;
|
||||
|
||||
|
@ -65,7 +65,7 @@ static int restart_read(struct hook *h, struct sample *smps[], unsigned *cnt)
|
|||
|
||||
if (prev) {
|
||||
/* A wrap around of the sequence no should not be treated as a simulation restart */
|
||||
if (cur->sequence == 0 && prev->sequence <= UINT32_MAX - 128) {
|
||||
if (cur->sequence == 0 && prev->sequence <= (int) (UINT32_MAX - 128)) {
|
||||
warn("Simulation from node %s restarted (previous->seq=%u, current->seq=%u)",
|
||||
node_name(h->node), prev->sequence, cur->sequence);
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ int node_type_stop(struct node_type *vt)
|
|||
return ret;
|
||||
}
|
||||
|
||||
char * node_type_name(struct node_type *vt)
|
||||
const char * node_type_name(struct node_type *vt)
|
||||
{
|
||||
return plugin_name(vt);
|
||||
}
|
||||
|
|
|
@ -604,7 +604,7 @@ int path_start(struct path *p)
|
|||
struct path_source *ps = (struct path_source *) list_at(&p->sources, i);
|
||||
|
||||
for (size_t j = 0; j < list_length(&ps->mappings); j++) {
|
||||
struct mapping_entry *me = (struct path_source *) list_at(&ps->mappings, j);
|
||||
struct mapping_entry *me = (struct mapping_entry *) list_at(&ps->mappings, j);
|
||||
|
||||
int len = me->length;
|
||||
int off = me->offset;
|
||||
|
|
Loading…
Add table
Reference in a new issue