OpenV2G
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
Macros | Functions
BitDecoderChannel.c File Reference
#include "DecoderChannel.h"
#include "BitInputStream.h"
#include "EXITypes.h"
#include "ErrorCodes.h"

Macros

#define BIT_DECODER_CHANNEL_C
 

Functions

int decode (bitstream_t *stream, uint8_t *b)
 Decode byte value. More...
 
int decodeBoolean (bitstream_t *stream, int *b)
 Decode boolean. More...
 
int decodeNBitUnsignedInteger (bitstream_t *stream, uint16_t nbits, uint32_t *uint32)
 Decode n-bit unsigned integer. More...
 

Macro Definition Documentation

#define BIT_DECODER_CHANNEL_C

Function Documentation

int decode ( bitstream_t stream,
uint8_t *  b 
)

Decode byte value.

Parameters
streamInput Stream
bbyte (out)
Returns
Error-Code <> 0
int decodeBoolean ( bitstream_t stream,
int *  b 
)

Decode boolean.

Decode a single boolean value. The value false is represented by 0, and the value true is represented by 1.

Parameters
streamInput Stream
bboolean (out)
Returns
Error-Code <> 0
int decodeNBitUnsignedInteger ( bitstream_t stream,
uint16_t  nbits,
uint32_t *  uint32 
)

Decode n-bit unsigned integer.

Decodes and returns an n-bit unsigned integer.

Parameters
streamInput Stream
nbitsNumber of bits
uint32Value (out)
Returns
Error-Code <> 0