An mbed implementation of IEC 61850-9-2LE Sample Values. Creating using the rapid61850 library, available at: https://github.com/stevenblair/rapid61850.

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers datatypes.c Source File

datatypes.c

00001 /**
00002  * Rapid-prototyping protection schemes with IEC 61850
00003  *
00004  * Copyright (c) 2012 Steven Blair
00005  * 
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010 
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015 
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00019  */
00020 
00021 #include <stdlib.h>
00022 #include "ctypes.h"
00023 #include "datatypes.h"
00024 #include "ied.h"
00025 
00026 
00027 
00028 
00029 
00030 void init_IEC_61850_9_2LEAV(struct IEC_61850_9_2LEAV *IEC_61850_9_2LEAV) {
00031 }
00032 void init_IEC_61850_9_2LEsVCAmp(struct IEC_61850_9_2LEsVCAmp *IEC_61850_9_2LEsVCAmp) {
00033     IEC_61850_9_2LEsVCAmp->scaleFactor = 0.001;
00034     IEC_61850_9_2LEsVCAmp->offset = 0;
00035 }
00036 void init_IEC_61850_9_2LEsVCVol(struct IEC_61850_9_2LEsVCVol *IEC_61850_9_2LEsVCVol) {
00037     IEC_61850_9_2LEsVCVol->scaleFactor = 0.01;
00038     IEC_61850_9_2LEsVCVol->offset = 0;
00039 }
00040 void init_IEC_61850_9_2LESAVAmp(struct IEC_61850_9_2LESAVAmp *IEC_61850_9_2LESAVAmp) {
00041 }
00042 void init_IEC_61850_9_2LESAVVol(struct IEC_61850_9_2LESAVVol *IEC_61850_9_2LESAVVol) {
00043 }
00044 void init_IEC_61850_9_2LEINC(struct IEC_61850_9_2LEINC *IEC_61850_9_2LEINC) {
00045 }
00046 void init_datatypes() {
00047     init_IEC_61850_9_2LEsVCAmp(&LE_IED.S1.MUnn.IEC_61850_9_2LETCTR_1.Amp.sVC);
00048     init_IEC_61850_9_2LEsVCAmp(&LE_IED.S1.MUnn.IEC_61850_9_2LETCTR_2.Amp.sVC);
00049     init_IEC_61850_9_2LEsVCAmp(&LE_IED.S1.MUnn.IEC_61850_9_2LETCTR_3.Amp.sVC);
00050     init_IEC_61850_9_2LEsVCAmp(&LE_IED.S1.MUnn.IEC_61850_9_2LETCTR_4.Amp.sVC);
00051     init_IEC_61850_9_2LEsVCVol(&LE_IED.S1.MUnn.IEC_61850_9_2LETVTR_1.Vol.sVC);
00052     init_IEC_61850_9_2LEsVCVol(&LE_IED.S1.MUnn.IEC_61850_9_2LETVTR_2.Vol.sVC);
00053     init_IEC_61850_9_2LEsVCVol(&LE_IED.S1.MUnn.IEC_61850_9_2LETVTR_3.Vol.sVC);
00054     init_IEC_61850_9_2LEsVCVol(&LE_IED.S1.MUnn.IEC_61850_9_2LETVTR_4.Vol.sVC);
00055     init_IEC_61850_9_2LEsVCAmp(&LE_IED_RECV.S1.MUnn.IEC_61850_9_2LETCTR_1.Amp.sVC);
00056     init_IEC_61850_9_2LEsVCAmp(&LE_IED_RECV.S1.MUnn.IEC_61850_9_2LETCTR_2.Amp.sVC);
00057     init_IEC_61850_9_2LEsVCAmp(&LE_IED_RECV.S1.MUnn.IEC_61850_9_2LETCTR_3.Amp.sVC);
00058     init_IEC_61850_9_2LEsVCAmp(&LE_IED_RECV.S1.MUnn.IEC_61850_9_2LETCTR_4.Amp.sVC);
00059     init_IEC_61850_9_2LEsVCVol(&LE_IED_RECV.S1.MUnn.IEC_61850_9_2LETVTR_1.Vol.sVC);
00060     init_IEC_61850_9_2LEsVCVol(&LE_IED_RECV.S1.MUnn.IEC_61850_9_2LETVTR_2.Vol.sVC);
00061     init_IEC_61850_9_2LEsVCVol(&LE_IED_RECV.S1.MUnn.IEC_61850_9_2LETVTR_3.Vol.sVC);
00062     init_IEC_61850_9_2LEsVCVol(&LE_IED_RECV.S1.MUnn.IEC_61850_9_2LETVTR_4.Vol.sVC);
00063 }
00064