OpenV2G
EncoderChannel.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007-2018 Siemens AG
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published
6  * by the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 /*******************************************************************
19  *
20  * @author Daniel.Peintner.EXT@siemens.com
21  * @version 2017-03-02
22  * @contact Richard.Kuntschke@siemens.com
23  *
24  * <p>Code generated by EXIdizer</p>
25  * <p>Schema: V2G_CI_MsgDef.xsd</p>
26  *
27  *
28  ********************************************************************/
29 
30 
31 
38 #ifndef ENCODER_CHANNEL_H
39 #define ENCODER_CHANNEL_H
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45 #include "EXITypes.h"
46 
47 
56 int encode(bitstream_t* stream, uint8_t b);
57 
58 
69 int encodeBoolean(bitstream_t* stream, int b);
70 
71 
84 int encodeNBitUnsignedInteger(bitstream_t* stream, size_t nbits, uint32_t val);
85 
86 
101 
102 
116 int encodeUnsignedInteger16(bitstream_t* stream, uint16_t n);
117 
118 
119 
133 int encodeUnsignedInteger32(bitstream_t* stream, uint32_t n);
134 
135 
149 int encodeUnsignedInteger64(bitstream_t* stream, uint64_t n);
150 
151 
165 int encodeInteger(bitstream_t* stream, exi_integer_t* iv);
166 
167 
181 int encodeInteger16(bitstream_t* stream, int16_t n);
182 
196 int encodeInteger32(bitstream_t* stream, int32_t n);
197 
198 
212 int encodeInteger64(bitstream_t* stream, int64_t n);
213 
214 
228 int encodeFloat(bitstream_t* stream, exi_float_me_t* f);
229 
230 
247 int encodeDecimal(bitstream_t* stream, exi_decimal_t* d);
248 
249 
260 int encodeString(bitstream_t* stream, exi_string_t* string);
261 
262 
277 int encodeStringValue(bitstream_t* stream, exi_value_string_table_t* stringTable, size_t namespaceUriID, size_t localNameID,
278  exi_string_value_t* string);
279 
280 
297  size_t namespaceUriID, size_t localNameID, exi_rcs_t* rcs, exi_string_value_t* string);
298 
299 
313 int encodeCharacters(bitstream_t* stream, exi_string_character_t* chars, size_t len);
314 
315 
332 int encodeRCSCharacters(bitstream_t* stream, exi_string_character_t* chars, size_t len, size_t rcsCodeLength, size_t rcsSize, const exi_string_character_t rcsSet[]);
333 
334 
335 
346 int encodeBinary(bitstream_t* stream, exi_bytes_t* bytes);
347 
348 
360 int encodeBytes(bitstream_t* stream, uint8_t* data, size_t len);
361 
373 int encodeDateTime(bitstream_t* stream, exi_datetime_t* datetime);
374 
375 
383 int encodeFinish(bitstream_t* stream);
384 
385 #ifdef __cplusplus
386 }
387 #endif
388 
389 #endif
Integer value container.
Definition: EXITypes.h:323
int encodeStringValue(bitstream_t *stream, exi_value_string_table_t *stringTable, size_t namespaceUriID, size_t localNameID, exi_string_value_t *string)
Encode string value.
int encodeFloat(bitstream_t *stream, exi_float_me_t *f)
Encode float.
Definition: EncoderChannel.c:323
int encodeInteger32(bitstream_t *stream, int32_t n)
Encode integer.
Definition: EncoderChannel.c:277
int encodeInteger(bitstream_t *stream, exi_integer_t *iv)
Encode integer.
Definition: EncoderChannel.c:208
int encodeCharacters(bitstream_t *stream, exi_string_character_t *chars, size_t len)
Encode characters.
Definition: EncoderChannel.c:367
int encodeUnsignedInteger64(bitstream_t *stream, uint64_t n)
Encode unsigned integer.
Definition: EncoderChannel.c:190
Float value container.
Definition: EXITypes.h:350
int encodeFinish(bitstream_t *stream)
Flush underlying bit output stream.
Definition: EncoderChannel.c:604
int encodeUnsignedInteger(bitstream_t *stream, exi_integer_t *iv)
Encode unsigned integer.
Definition: EncoderChannel.c:43
int encodeBinary(bitstream_t *stream, exi_bytes_t *bytes)
Encode binary.
Definition: EncoderChannel.c:418
Bit stream container.
Definition: EXITypes.h:158
int encodeDateTime(bitstream_t *stream, exi_datetime_t *datetime)
Encode datetime.
Definition: EncoderChannel.c:442
Decimal value container.
Definition: EXITypes.h:359
Restricted Characeter Set.
Definition: EXITypes.h:301
int encodeString(bitstream_t *stream, exi_string_t *string)
Encode string.
Definition: EncoderChannel.c:354
int encodeUnsignedInteger32(bitstream_t *stream, uint32_t n)
Encode unsigned integer.
Definition: EncoderChannel.c:137
Definition: EXITypes.h:524
uint32_t exi_string_character_t
EXI string character.
Definition: EXITypes.h:271
Basic type definitions and structs.
int encodeRCSCharacters(bitstream_t *stream, exi_string_character_t *chars, size_t len, size_t rcsCodeLength, size_t rcsSize, const exi_string_character_t rcsSet[])
Encode characters.
Definition: EncoderChannel.c:382
int encodeBoolean(bitstream_t *stream, int b)
Encode a single boolean value.
Definition: EncoderChannel.c:535
int encodeInteger64(bitstream_t *stream, int64_t n)
Encode integer.
Definition: EncoderChannel.c:300
int encodeInteger16(bitstream_t *stream, int16_t n)
Encode integer.
Definition: EncoderChannel.c:252
int encode(bitstream_t *stream, uint8_t b)
Encode byte value.
Definition: EncoderChannel.c:509
int encodeDecimal(bitstream_t *stream, exi_decimal_t *d)
Encode decimal.
Definition: EncoderChannel.c:339
int encodeBytes(bitstream_t *stream, uint8_t *data, size_t len)
Encode binary data.
Definition: EncoderChannel.c:428
Universal Character Set (UCS) strings.
Definition: EXITypes.h:277
int encodeRCSStringValue(bitstream_t *stream, exi_value_string_table_t *stringTable, size_t namespaceUriID, size_t localNameID, exi_rcs_t *rcs, exi_string_value_t *string)
Encode restricted character set value.
Byte value container.
Definition: EXITypes.h:312
Datetime value container.
Definition: EXITypes.h:370
int encodeUnsignedInteger16(bitstream_t *stream, uint16_t n)
Encode unsigned integer.
Definition: EncoderChannel.c:98
String value.
Definition: EXITypes.h:288
int encodeNBitUnsignedInteger(bitstream_t *stream, size_t nbits, uint32_t val)
Encode n-bit unsigned integer.
Definition: EncoderChannel.c:551