Liking cljdoc? Tell your friends :D

roughtime-protocol.tlv


decode-rt-messageclj

(decode-rt-message ba)

Decode a raw byte array into a map of {tag bytes}.

Decode a raw byte array into a map of {tag bytes}.
sourceraw docstring

decode-rt-message-recursiveclj

(decode-rt-message-recursive msg)

takes a partially-decoded message from decode-rt-message and fully decodes it. translates values into clojure objects, including nested TLV messages.

takes a partially-decoded message from `decode-rt-message` and fully
decodes it.  translates values into clojure objects, including
nested TLV messages.
sourceraw docstring

encode-rt-messageclj

(encode-rt-message msg-map)

encode a roughtime message

Args:

  • msg-map: map {"tag" bytes}

Format:

uint32 num_tags uint32 offsets[max(0, num_tags-1)] uint32 tags[num_tags] byte-string-values

tags sorted by numeric value, and offsets appear in the same order as tags. tags must contain only A-Z or the padding byte 0x00

(see §4 of the spec.)

encode a roughtime message

Args:
  - msg-map: map {"tag" bytes}

Format:

  uint32 num_tags
  uint32 offsets[max(0, num_tags-1)]
  uint32 tags[num_tags]
  byte-string-values

  tags sorted by numeric value, and offsets appear in the same order
  as tags.  tags must contain only A-Z or the padding byte 0x00

(see §4 of the spec.)
sourceraw docstring

(print-rt-message-recursive decoded-msg)

print a decoded message in human-readable form. this operates on a fully decoded message from decode-rt-message-recursive.

print a decoded message in human-readable form.  this operates on a
fully decoded message from `decode-rt-message-recursive`.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close