TEMU
2
The Terma Emulator
Main Page
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Power.h
Go to the documentation of this file.
1
//===------------------------------------------------------------*- C++ -*-===//
2
//
3
// T-EMU: The Terma Emulator
4
// (c) Terma 2017
5
// Authors: Mattias Holm <maho (at) terma.com>
6
//
7
//===----------------------------------------------------------------------===//
8
9
/*
10
* EXPERIMENTAL INTERFACE: This interface is undergoing public review
11
*/
12
#ifndef TEMU_MODELS_POWER_H
13
#define TEMU_MODELS_POWER_H
14
15
#include "
temu-c/Support/Objsys.h
"
16
17
18
#ifdef __cplusplus
19
extern
"C"
{
20
#endif
21
23
typedef
enum
{
24
tePS_Off
,
25
tePS_On
,
26
}
temu_PowerState
;
27
28
typedef
struct
{
29
void (*powerOn)(
void
*Obj);
30
void (*powerOff)(
void
*Obj);
31
temu_PowerState
(*getPowerState)(
void
*Obj);
32
}
temu_PowerIface
;
33
34
#define TEMU_POWER_IFACE_TYPE "PowerIface"
35
TEMU_IFACE_REFERENCE_TYPE
(temu_Power);
36
37
38
// Power line interface is experimental
39
typedef
struct
{
40
void (*setCurrent)(
void
*Obj,
double
Current);
41
double (*getCurrent)(
void
*Obj);
42
void (*setVoltage)(
void
*Obj,
double
Voltage);
43
double (*getVoltage)(
void
*Obj);
44
}
temu_PowerLineIface
;
45
46
#define TEMU_POWER_LINE_IFACE_TYPE "PowerLineIface"
47
TEMU_IFACE_REFERENCE_TYPE
(temu_PowerLine);
48
49
50
#ifdef __cplusplus
51
}
52
#endif
53
54
#endif
/* !TEMU_MODELS_POWER_H */
temu_PowerLineIface
Definition:
Power.h:39
tePS_Off
System is powered off.
Definition:
Power.h:24
temu_PowerIface
Definition:
Power.h:28
temu_PowerState
temu_PowerState
Used to indicate whether a model is powered on.
Definition:
Power.h:23
TEMU_IFACE_REFERENCE_TYPE
#define TEMU_IFACE_REFERENCE_TYPE(N)
Definition:
Objsys.h:129
Objsys.h
tePS_On
System is powered on.
Definition:
Power.h:25
include
temu-c
Models
Power.h
Generated on Fri May 22 2020 02:47:41 for TEMU by
1.8.5