summaryrefslogtreecommitdiffstats
path: root/pcilib/unit.h
blob: 4a99f5ba78ff92b9474f1f8168e3e1697885cf3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef _PCILIB_UNITS_H
#define _PCILIB_UNITS_H

#include "pcilib.h"

#define PCILIB_MAX_TRANSFORMS_PER_UNIT 16

typedef struct pcilib_unit_s pcilib_unit_t; 
typedef struct pcilib_transform_unit_s pcilib_transform_unit_t;

/**
 * type to save a transformation unit in the pcitool program
 */
struct pcilib_transform_unit_s{
  char *name;
  char *transform_formula;
};

/**
 * type to save a unit in the pcitool programm
 */
struct pcilib_unit_s{
  char* name;
  pcilib_transform_unit_t other_units[PCILIB_MAX_TRANSFORMS_PER_UNIT];
};

/**
 * function to populate the ctx with units
 */
int pcilib_add_units(pcilib_t* ctx, size_t n, const pcilib_unit_t* units);

#endif