OpenV2G
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions
BitEncoderChannel.c File Reference
#include "EncoderChannel.h"
#include "EXIOptions.h"
#include "BitOutputStream.h"
#include "EXITypes.h"

Macros

#define BIT_ENCODER_CHANNEL_C
 

Functions

int encode (bitstream_t *stream, uint8_t b)
 Encode byte value. More...
 
int encodeBoolean (bitstream_t *stream, int b)
 Encode a single boolean value. More...
 
int encodeNBitUnsignedInteger (bitstream_t *stream, uint16_t nbits, uint32_t val)
 Encode n-bit unsigned integer. More...
 
int encodeFinish (bitstream_t *stream)
 Flush underlying bit output stream. More...
 

Macro Definition Documentation

#define BIT_ENCODER_CHANNEL_C

Function Documentation

int encode ( bitstream_t stream,
uint8_t  b 
)

Encode byte value.

Parameters
streamOutput Stream
bbyte
Returns
Error-Code <> 0
int encodeBoolean ( bitstream_t stream,
int  b 
)

Encode a single boolean value.

Encode a single boolean value. A false value is encoded as bit 0 and true value is encode as bit 1.

int encodeFinish ( bitstream_t stream)

Flush underlying bit output stream.

Flush underlying bit output stream.

int encodeNBitUnsignedInteger ( bitstream_t stream,
uint16_t  nbits,
uint32_t  val 
)

Encode n-bit unsigned integer.

Encode n-bit unsigned integer. The n least significant bits of parameter b starting with the most significant, i.e. from left to right.