plptools
Loading...
Searching...
No Matches
sistypes.h
Go to the documentation of this file.
1/*
2 * This file is part of plptools.
3 *
4 * Copyright (C) 2002 Daniel Brahneborg <basic.chello@se>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * along with this program; if not, see <https://www.gnu.org/licenses/>.
18 */
19#pragma once
20
21#include <stdint.h>
22#include <sys/types.h>
23
27enum SisRC {
28 SIS_OK = 0,
38};
39
40extern uint16_t read16(uint8_t* p);
41
42extern uint32_t read32(uint8_t* p);
43
44extern void write16(uint8_t* p, int val);
45
46extern void createCRCTable();
47
48extern uint16_t updateCrc(uint16_t crc, uint8_t value);
49
50extern int logLevel;
51
57 uint16_t m_no;
58 char m_code[3];
59 const char* m_name;
60};
61
void createCRCTable()
Definition: sistypes.cpp:27
SisRC
Return Codes.
Definition: sistypes.h:27
@ SIS_OK
Definition: sistypes.h:28
@ SIS_ABORTED
Definition: sistypes.h:33
@ SIS_TRUNCATEDDATA
Definition: sistypes.h:30
@ SIS_VER_EARLIER
Definition: sistypes.h:35
@ SIS_DIFFERENT_APP
Definition: sistypes.h:34
@ SIS_TRUNCATED
Definition: sistypes.h:29
@ SIS_CORRUPTED
Definition: sistypes.h:31
@ SIS_FAILED
Definition: sistypes.h:32
@ SIS_SAME_OR_LATER
Definition: sistypes.h:36
@ SIS_OTHER_VARIANT
Definition: sistypes.h:37
uint16_t updateCrc(uint16_t crc, uint8_t value)
Definition: sistypes.cpp:39
LangTableEntry langTable[]
Definition: sistypes.cpp:65
uint32_t read32(uint8_t *p)
Definition: sistypes.cpp:56
void write16(uint8_t *p, int val)
Definition: sistypes.cpp:60
int logLevel
Definition: sistypes.cpp:25
uint16_t read16(uint8_t *p)
Definition: sistypes.cpp:52
Holder of a language entry, translating from language numbers to names.
Definition: sistypes.h:56
const char * m_name
Definition: sistypes.h:59
uint16_t m_no
Definition: sistypes.h:57
char m_code[3]
Definition: sistypes.h:58