Skip to content

Commit

Permalink
Add type Osc.bundle
Browse files Browse the repository at this point in the history
Signed-off-by: John Else <john.else@citrix.com>
  • Loading branch information
johnelse committed Nov 13, 2015
1 parent 2520c82 commit 9ac117a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
9 changes: 7 additions & 2 deletions lib/osc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ type timetag =
| Immediate
| Time of time

type packet =
type bundle = {
timetag: timetag;
packets: packet list;
}

and packet =
| Message of message
| Bundle of (timetag * packet list)
| Bundle of bundle
13 changes: 11 additions & 2 deletions lib/osc.mli
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,18 @@ type timetag =
(** A time at which an OSC method should be invoked. *)
(** An OSC time tag. *)

type packet =
type bundle = {
timetag: timetag;
(** A timetag, representing the time at which any actions triggered by this
bundle should begin. *)
packets: packet list;
(** The list of packets contained within this bundle. *)
}
(** An OSC bundle. *)

and packet =
| Message of message
(** A single OSC message. *)
| Bundle of (timetag * packet list)
| Bundle of bundle
(** An OSC bundle, containing a timetag and zero or more child packets. *)
(** An OSC packet. *)

0 comments on commit 9ac117a

Please sign in to comment.