/src/libiec61850/src/common/buffer_chain.c
Line | Count | Source |
1 | | /* |
2 | | * buffer_chain.c |
3 | | * |
4 | | * Copyright 2013 Michael Zillgith |
5 | | * |
6 | | * This file is part of libIEC61850. |
7 | | * |
8 | | * libIEC61850 is free software: you can redistribute it and/or modify |
9 | | * it under the terms of the GNU General Public License as published by |
10 | | * the Free Software Foundation, either version 3 of the License, or |
11 | | * (at your option) any later version. |
12 | | * |
13 | | * libIEC61850 is distributed in the hope that it will be useful, |
14 | | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | | * GNU General Public License for more details. |
17 | | * |
18 | | * You should have received a copy of the GNU General Public License |
19 | | * along with libIEC61850. If not, see <http://www.gnu.org/licenses/>. |
20 | | * |
21 | | * See COPYING file for the complete license text. |
22 | | */ |
23 | | |
24 | | #include "libiec61850_platform_includes.h" |
25 | | |
26 | | #include "buffer_chain.h" |
27 | | |
28 | | void |
29 | | BufferChain_init(BufferChain self, int length, int partLength, BufferChain nextPart, uint8_t* buffer) |
30 | 54 | { |
31 | 54 | self->length = length; |
32 | 54 | self->partLength = partLength; |
33 | 54 | self->partMaxLength = partLength; |
34 | 54 | self->nextPart = nextPart; |
35 | 54 | self->buffer = buffer; |
36 | 54 | } |