interface.jl 1.27 KB
Newer Older
Fredrik Bagge Carlson's avatar
Fredrik Bagge Carlson committed
1
export AbstractProcess, PhysicalProcess, SimulatedProcess
Fredrik Bagge Carlson's avatar
Fredrik Bagge Carlson committed
2
3
4
5
6
7
8
9
10
11
12
export  num_outputs,
        num_inputs,
        outputrange,
        inputrange,
        isstable,
        sampletime,
        control,
        measure

# Interface specification ===================================================================
abstract type AbstractProcess end
Fredrik Bagge Carlson's avatar
Fredrik Bagge Carlson committed
13
abstract type PhysicalProcess  <: AbstractProcess end
Fredrik Bagge Carlson's avatar
Fredrik Bagge Carlson committed
14
15
16
17
18
19
20
21
22
23
24
25
26
27
abstract type SimulatedProcess <: AbstractProcess end

num_outputs(p::AbstractProcess) = error("Function not implemented for $(typeof(p))")
num_inputs(p::AbstractProcess)  = error("Function not implemented for $(typeof(p))")
outputrange(p::AbstractProcess) = error("Function not implemented for $(typeof(p))")
inputrange(p::AbstractProcess)  = error("Function not implemented for $(typeof(p))")
isstable(p::AbstractProcess)    = error("Function not implemented for $(typeof(p))")
sampletime(p::AbstractProcess)  = error("Function not implemented for $(typeof(p))")

control(p::AbstractProcess, u)  = error("Function not implemented for $(typeof(p))")
measure(p::AbstractProcess)     = error("Function not implemented for $(typeof(p))")

initialize(p::AbstractProcess)  = error("Function not implemented for $(typeof(p))")
finalize(p::AbstractProcess)    = error("Function not implemented for $(typeof(p))")