Initial version of donated sources by Avertec, 3.4p5.
[tas-yagle.git] / distrib / sources / pavo / pavo_lib.h
1
2 #ifndef PAVO
3 #define PAVO
4
5 /*****************************************************************************/
6 /* includes */
7 /*****************************************************************************/
8
9
10 #include <stdio.h>
11 #include <stdlib.h>
12 #include <string.h>
13 #include <limits.h>
14 #include MUT_H
15 #include MLO_H
16 #include MLU_H
17 #include RCN_H
18 #include CNS_H
19 #include ELP_H
20
21
22 /*****************************************************************************/
23 /* defines */
24 /*****************************************************************************/
25
26 #define PAVO_SIGNAL_SIMULATION_INFORMATIONS 0xf0250705
27 #define PAVO_SIGNAL_VOLTAGE 0xf1250705
28
29 #define PAVO_VOLTAGE_RESOLUTION 10000.0
30 #define PAVO_UNKNOWN_VOLTAGE 100.0
31 #define PAVO_HZ_VOLTAGE 200.0
32
33 #define PAVO_CONE2LOSIG ((long)0x10000000)
34
35
36 /*****************************************************************************/
37 /* Global */
38 /*****************************************************************************/
39
40 /*****************************************************************************/
41 /* Structures */
42 /*****************************************************************************/
43 typedef struct SignalEvent
44 {
45 struct SignalEvent *Next;
46 float Time;
47 float Voltage;
48 } SignalEvent;
49
50 typedef struct
51 {
52 int Flags;
53 ptype_list *USER;
54 SignalEvent *Events;
55 float CurrentVoltage;
56 } SignalSimulationInformations;
57
58 /*****************************************************************************/
59 /* functions */
60 /*****************************************************************************/
61 SignalSimulationInformations *pavo_GetSignalSimulationInformations(losig_list *ls);
62 void pavo_RemoveSignalSimulationInformations(losig_list *ls);
63 SignalSimulationInformations *pavo_CreateSignalSimulationInformations(losig_list *ls);
64 void pavo_SetSignalVoltage(losig_list *ls, float voltage);
65 float pavo_GetSignalVoltage(losig_list *ls);
66 void pavo_RemoveSignalVoltage(losig_list *ls);
67
68 losig_list *pavo_SetSigVoltByName (cnsfig_list *cnsfig, char *name, float voltage);
69 losig_list *pavo_GetLosigByCone (cnsfig_list *cnsfig,cone_list *cone);
70 float pavo_CalcInternalNodeVoltage (cone_list *cone);
71
72
73
74 #endif