From 672bff6efa2687b36ce79c0a97aae191a7212542 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Wed, 18 May 2011 19:41:29 +0200 Subject: [PATCH] stripped 3rd party libs for unsupported protocols --- misc/controller/vzlogger/src/ehz.c | 55 --------------- misc/controller/vzlogger/src/ehz.h | 32 --------- misc/controller/vzlogger/src/sml.h | 109 ----------------------------- 3 files changed, 196 deletions(-) delete mode 100644 misc/controller/vzlogger/src/ehz.c delete mode 100644 misc/controller/vzlogger/src/ehz.h delete mode 100644 misc/controller/vzlogger/src/sml.h diff --git a/misc/controller/vzlogger/src/ehz.c b/misc/controller/vzlogger/src/ehz.c deleted file mode 100644 index 82d4a09..0000000 --- a/misc/controller/vzlogger/src/ehz.c +++ /dev/null @@ -1,55 +0,0 @@ -/** - * eHz readout - * - * @package controller - * (c) Mathias Dalheimer , 2010 - * @copyright Copyright (c) 2011, The volkszaehler.org project - * @license http://www.gnu.org/licenses/gpl.txt GNU Public License - * @author Steffen Vogel - * based heavily on libehz (https://github.com/gonium/libehz.git) - */ -/* - * This file is part of volkzaehler.org - * - * volkzaehler.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * volkzaehler.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with volkszaehler.org. If not, see . - */ - -#include -#include -#include - -int ehz_init(char * port) { - struct termios tio; - int fd; - - memset(&tio, 0, sizeof(tio)); - - tio.c_iflag = 0; - tio.c_oflag = 0; - tio.c_cflag = CS7|CREAD|CLOCAL; // 7n1, see termios.h for more information - tio.c_lflag = 0; - tio.c_cc[VMIN] = 1; - tio.c_cc[VTIME] = 5; - - fd = open(port, O_RDWR); // | O_NONBLOCK); - cfsetospeed(&tio, B9600); // 9600 baud - cfsetispeed(&tio, B9600); // 9600 baud - - return fd; -} - -float ehz_get() { - return 0; -} - diff --git a/misc/controller/vzlogger/src/ehz.h b/misc/controller/vzlogger/src/ehz.h deleted file mode 100644 index f5283af..0000000 --- a/misc/controller/vzlogger/src/ehz.h +++ /dev/null @@ -1,32 +0,0 @@ -/** - * libehz header - * - * @package controller - * @copyright Copyright (c) 2011, The volkszaehler.org project - * @license http://www.gnu.org/licenses/gpl.txt GNU Public License - * @author Steffen Vogel - */ -/* - * This file is part of volkzaehler.org - * - * volkzaehler.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * volkzaehler.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with volkszaehler.org. If not, see . - */ - -#ifndef _EHZ_H_ -#define _EHZ_H_ - -int ehz_init(char * port); -float ehz_get(); - -#endif /* _EHZ_H_ */ diff --git a/misc/controller/vzlogger/src/sml.h b/misc/controller/vzlogger/src/sml.h deleted file mode 100644 index c6cdac6..0000000 --- a/misc/controller/vzlogger/src/sml.h +++ /dev/null @@ -1,109 +0,0 @@ -/** - * libsml header - * - * based on SML, Smart Message Language specification - * Version 1.03 from 12. Nov 2008 - * - * @package controller - * @copyright Copyright (c) 2011, The volkszaehler.org project - * @license http://www.gnu.org/licenses/gpl.txt GNU Public License - * @author Steffen Vogel - */ -/* - * This file is part of volkzaehler.org - * - * volkzaehler.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * any later version. - * - * volkzaehler.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with volkszaehler.org. If not, see . - */ - -#ifndef _SML_H_ -#define _SML_H_ - -typedef uint8_t SML_Unit; /* DLMS-Unit-List, lookup in IEC 62056-62 */ -typedef uint64_t SML_Status; -typedef char * SML_Signature; - -struct SML_File { - uint8_t version; /* should be 1 (v2 is not supported atm) */ - struct SML_Message * messages; /* linked list */ - uint16_t crc16; -} - -struct SML_Message { - char * transactionId; - uint8_t groupNo; - uint8_t abortOnError; - uint16_t crc16; - - uint32_t tag; - union { /* SML_MessageBody */ - struct SML_PublicOpen.Res * openResponse; /* 0x00000101 */ - struct SML_PublicClose.Res * closeResponse; /* 0x00000201 */ - struct SML_GetList.Res * getListResponse; /* 0x00000701 */ - } - - SML_Message * next; /* NULL for end of list */ -} - -SML_Time { - uint8_t tag; - union { /* SML_Timestamp */ - uint32_t secIndex; /* 0x01 */ - uint32_t timestamp; /* 0x02 */ - } -} - -struct SML_PublicOpen.Res { - char * codepage; /* optional */ - char * clientId; /* optional */ - char * reqFileId; - char * serverId; - struct SML_Time refTime; /* optional */ - uint8_t smlVersion; /* optional */ -} - -struct SML_PublicClose.Res { - SML_Signature globalSignature; /* optional */ -} - -struct SML_GetList.Res { - char * clientId; /* optional */ - char * serverId; - char * listName; /* optional */ - struct SML_Time actSensorTime; /* optional */ - struct SML_List valList; - struct SML_Signature listSignature; /* optional */ - struct SML_Time actGatewayTime; /* optional */ -} - -struct SML_List { - struct SML_ListEntry * valListEntry; - struct SML_ListEntry * next; /* NULL for end of list */ -} - -struct SML_ListEntry { - char * objName; - SML_Status status; /* optional */ - struct SML_Time valTime; /* optional */ - SML_Unit unit; /* optional */ - uint8_t scaler; /* optional */ - struct SML_Value value; - struct SML_Signature valueSignature; /* optional */ -} - -/* functions */ -struct SML_File SML_Parse(char * data); -void SML_Free(struct SML_File * file); -uint16_t SML_Crc16(char * data, size_t length); - -#endif /* _SML_H_ */