An mbed implementation of IEC 61850-9-2LE Sample Values. Creating using the rapid61850 library, available at: https://github.com/stevenblair/rapid61850.
An mbed implementation of IEC 61850-9-2LE Sample Values. Creating using the rapid61850 library, available at: https://github.com/stevenblair/rapid61850.
rapid61850/datatypes.c@0:f09b7bb8bcce, 2012-10-02 (annotated)
- Committer:
- sblair
- Date:
- Tue Oct 02 21:31:05 2012 +0000
- Revision:
- 0:f09b7bb8bcce
converted library to folder
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
sblair | 0:f09b7bb8bcce | 1 | /** |
sblair | 0:f09b7bb8bcce | 2 | * Rapid-prototyping protection schemes with IEC 61850 |
sblair | 0:f09b7bb8bcce | 3 | * |
sblair | 0:f09b7bb8bcce | 4 | * Copyright (c) 2012 Steven Blair |
sblair | 0:f09b7bb8bcce | 5 | * |
sblair | 0:f09b7bb8bcce | 6 | * This program is free software; you can redistribute it and/or |
sblair | 0:f09b7bb8bcce | 7 | * modify it under the terms of the GNU General Public License |
sblair | 0:f09b7bb8bcce | 8 | * as published by the Free Software Foundation; either version 2 |
sblair | 0:f09b7bb8bcce | 9 | * of the License, or (at your option) any later version. |
sblair | 0:f09b7bb8bcce | 10 | |
sblair | 0:f09b7bb8bcce | 11 | * This program is distributed in the hope that it will be useful, |
sblair | 0:f09b7bb8bcce | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
sblair | 0:f09b7bb8bcce | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
sblair | 0:f09b7bb8bcce | 14 | * GNU General Public License for more details. |
sblair | 0:f09b7bb8bcce | 15 | |
sblair | 0:f09b7bb8bcce | 16 | * You should have received a copy of the GNU General Public License |
sblair | 0:f09b7bb8bcce | 17 | * along with this program; if not, write to the Free Software |
sblair | 0:f09b7bb8bcce | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
sblair | 0:f09b7bb8bcce | 19 | */ |
sblair | 0:f09b7bb8bcce | 20 | |
sblair | 0:f09b7bb8bcce | 21 | #include <stdlib.h> |
sblair | 0:f09b7bb8bcce | 22 | #include "ctypes.h" |
sblair | 0:f09b7bb8bcce | 23 | #include "datatypes.h" |
sblair | 0:f09b7bb8bcce | 24 | #include "ied.h" |
sblair | 0:f09b7bb8bcce | 25 | |
sblair | 0:f09b7bb8bcce | 26 | |
sblair | 0:f09b7bb8bcce | 27 | |
sblair | 0:f09b7bb8bcce | 28 | |
sblair | 0:f09b7bb8bcce | 29 | |
sblair | 0:f09b7bb8bcce | 30 | void init_IEC_61850_9_2LEAV(struct IEC_61850_9_2LEAV *IEC_61850_9_2LEAV) { |
sblair | 0:f09b7bb8bcce | 31 | } |
sblair | 0:f09b7bb8bcce | 32 | void init_IEC_61850_9_2LEsVCAmp(struct IEC_61850_9_2LEsVCAmp *IEC_61850_9_2LEsVCAmp) { |
sblair | 0:f09b7bb8bcce | 33 | IEC_61850_9_2LEsVCAmp->scaleFactor = 0.001; |
sblair | 0:f09b7bb8bcce | 34 | IEC_61850_9_2LEsVCAmp->offset = 0; |
sblair | 0:f09b7bb8bcce | 35 | } |
sblair | 0:f09b7bb8bcce | 36 | void init_IEC_61850_9_2LEsVCVol(struct IEC_61850_9_2LEsVCVol *IEC_61850_9_2LEsVCVol) { |
sblair | 0:f09b7bb8bcce | 37 | IEC_61850_9_2LEsVCVol->scaleFactor = 0.01; |
sblair | 0:f09b7bb8bcce | 38 | IEC_61850_9_2LEsVCVol->offset = 0; |
sblair | 0:f09b7bb8bcce | 39 | } |
sblair | 0:f09b7bb8bcce | 40 | void init_IEC_61850_9_2LESAVAmp(struct IEC_61850_9_2LESAVAmp *IEC_61850_9_2LESAVAmp) { |
sblair | 0:f09b7bb8bcce | 41 | } |
sblair | 0:f09b7bb8bcce | 42 | void init_IEC_61850_9_2LESAVVol(struct IEC_61850_9_2LESAVVol *IEC_61850_9_2LESAVVol) { |
sblair | 0:f09b7bb8bcce | 43 | } |
sblair | 0:f09b7bb8bcce | 44 | void init_IEC_61850_9_2LEINC(struct IEC_61850_9_2LEINC *IEC_61850_9_2LEINC) { |
sblair | 0:f09b7bb8bcce | 45 | } |
sblair | 0:f09b7bb8bcce | 46 | void init_datatypes() { |
sblair | 0:f09b7bb8bcce | 47 | init_IEC_61850_9_2LEsVCAmp(&LE_IED.S1.MUnn.IEC_61850_9_2LETCTR_1.Amp.sVC); |
sblair | 0:f09b7bb8bcce | 48 | init_IEC_61850_9_2LEsVCAmp(&LE_IED.S1.MUnn.IEC_61850_9_2LETCTR_2.Amp.sVC); |
sblair | 0:f09b7bb8bcce | 49 | init_IEC_61850_9_2LEsVCAmp(&LE_IED.S1.MUnn.IEC_61850_9_2LETCTR_3.Amp.sVC); |
sblair | 0:f09b7bb8bcce | 50 | init_IEC_61850_9_2LEsVCAmp(&LE_IED.S1.MUnn.IEC_61850_9_2LETCTR_4.Amp.sVC); |
sblair | 0:f09b7bb8bcce | 51 | init_IEC_61850_9_2LEsVCVol(&LE_IED.S1.MUnn.IEC_61850_9_2LETVTR_1.Vol.sVC); |
sblair | 0:f09b7bb8bcce | 52 | init_IEC_61850_9_2LEsVCVol(&LE_IED.S1.MUnn.IEC_61850_9_2LETVTR_2.Vol.sVC); |
sblair | 0:f09b7bb8bcce | 53 | init_IEC_61850_9_2LEsVCVol(&LE_IED.S1.MUnn.IEC_61850_9_2LETVTR_3.Vol.sVC); |
sblair | 0:f09b7bb8bcce | 54 | init_IEC_61850_9_2LEsVCVol(&LE_IED.S1.MUnn.IEC_61850_9_2LETVTR_4.Vol.sVC); |
sblair | 0:f09b7bb8bcce | 55 | init_IEC_61850_9_2LEsVCAmp(&LE_IED_RECV.S1.MUnn.IEC_61850_9_2LETCTR_1.Amp.sVC); |
sblair | 0:f09b7bb8bcce | 56 | init_IEC_61850_9_2LEsVCAmp(&LE_IED_RECV.S1.MUnn.IEC_61850_9_2LETCTR_2.Amp.sVC); |
sblair | 0:f09b7bb8bcce | 57 | init_IEC_61850_9_2LEsVCAmp(&LE_IED_RECV.S1.MUnn.IEC_61850_9_2LETCTR_3.Amp.sVC); |
sblair | 0:f09b7bb8bcce | 58 | init_IEC_61850_9_2LEsVCAmp(&LE_IED_RECV.S1.MUnn.IEC_61850_9_2LETCTR_4.Amp.sVC); |
sblair | 0:f09b7bb8bcce | 59 | init_IEC_61850_9_2LEsVCVol(&LE_IED_RECV.S1.MUnn.IEC_61850_9_2LETVTR_1.Vol.sVC); |
sblair | 0:f09b7bb8bcce | 60 | init_IEC_61850_9_2LEsVCVol(&LE_IED_RECV.S1.MUnn.IEC_61850_9_2LETVTR_2.Vol.sVC); |
sblair | 0:f09b7bb8bcce | 61 | init_IEC_61850_9_2LEsVCVol(&LE_IED_RECV.S1.MUnn.IEC_61850_9_2LETVTR_3.Vol.sVC); |
sblair | 0:f09b7bb8bcce | 62 | init_IEC_61850_9_2LEsVCVol(&LE_IED_RECV.S1.MUnn.IEC_61850_9_2LETVTR_4.Vol.sVC); |
sblair | 0:f09b7bb8bcce | 63 | } |
sblair | 0:f09b7bb8bcce | 64 |