Source file widget_intf.ml

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
35
36
37
38
39
40
41
open Base
open Hardcaml_waveterm

module type S = sig
  type wave

  val run_async
    :  ?ui_state_file:string
    -> ?signals_width:int
    -> ?values_width:int
    -> ?start_cycle:int
    -> ?wave_width:int
    -> ?display_rules:Display_rules.t
    -> wave
    -> unit Async.Deferred.t

  (** Run interactive waveterm viewer. [ESC] to quit. *)
  val run
    :  ?ui_state_file:string
    -> ?signals_width:int
    -> ?values_width:int
    -> ?start_cycle:int
    -> ?wave_width:int
    -> ?display_rules:Display_rules.t
    -> wave
    -> unit
end

module M (Data : Hardcaml.Wave_data.S) = struct
  module type S = S with type wave := Data.t Hardcaml.Wave_data.Wave.t array
end

module type Widget = sig
  module type S = S

  module M = M
  module Make (Data : Hardcaml.Wave_data.S) : M(Data).S
  module By_cycle : M(Hardcaml.Wave_data_in_cycles).S
  module By_event : M(Hardcaml.Wave_data_in_events.Bits).S
  include S with type wave := Hardcaml.Wave_data.t
end