-
Notifications
You must be signed in to change notification settings - Fork 2
/
demo1.jl
34 lines (26 loc) · 812 Bytes
/
demo1.jl
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
33
34
#Test code
#-------------------------------------------------------------------------------
using SpiceData
include("importCppSimData.jl")
#No real test code yet... just demonstrate use:
stdout_ct = IOContext(stdout, :compact=>true)
testpath(testfile::String) = joinpath(CppSimData.rootpath, "core/data", testfile)
testfile = "test.tr0"
filepath = testpath(testfile)
println("\nLoad $filepath:")
reader = SpiceData._open(filepath)
@show(reader)
println("\nCompact output:")
show(stdout_ct, reader)
println("\n")
println("\nRead in list of signal names:")
@show names(reader)
signame = reader.sweepname
println("\nRead in sweep vector \"$signame\":")
t = reader.sweep
@show t[1], t[end]
signame = "vin"
println("\nRead in \"$signame\" vector:")
v = read(reader, signame)
@show v[1], v[end]
:Test_Complete