Module ecapnp_val

Cap'n Proto value support.

Copyright © 2013, Andreas Stenius

Authors: Andreas Stenius (kaos@astekk.se).

Description

Cap'n Proto value support.

Everything value.

Data Types

value_type()

value_type() = ecapnp:value_type()

Function Index

get/2Decode data from Cap'n Proto format.
get/3Decode data from Cap'n Proto format.
set/2Encode value to Cap'n Proto format.
set/3Encode value to Cap'n Proto format.
size/1Get number of bits for ValueType.

Function Details

get/2

get(ValueType::value_type(), Data::binary()) -> number() | boolean()

Decode data from Cap'n Proto format.

get/3

get(ValueType::value_type(), Data::binary(), Default::binary()) -> number() | boolean()

Decode data from Cap'n Proto format.

The Data is XOR'ed with Default prior to decoding.

set/2

set(ValueType::value_type(), Value::number() | boolean()) -> binary()

Encode value to Cap'n Proto format.

set/3

set(ValueType::value_type(), Value::number() | boolean(), Default::binary()) -> binary()

Encode value to Cap'n Proto format.

The result is XOR'ed with Default.

size/1

size(ValueType::value_type()) -> non_neg_integer()

Get number of bits for ValueType.


Generated by EDoc, May 30 2014, 12:56:29.