- code formatting; compiler warnings

pull/266/head
Michael Zillgith 5 years ago
parent 7ee278cead
commit 98e7c5816a

@ -70,8 +70,8 @@
/* Ethernet interface ID for GOOSE and SV */ /* Ethernet interface ID for GOOSE and SV */
#define CONFIG_ETHERNET_INTERFACE_ID "eth0" #define CONFIG_ETHERNET_INTERFACE_ID "eth0"
//#define CONFIG_ETHERNET_INTERFACE_ID "vboxnet0" /* #define CONFIG_ETHERNET_INTERFACE_ID "vboxnet0" */
//#define CONFIG_ETHERNET_INTERFACE_ID "en0" // OS X uses enX in place of ethX as ethernet NIC names. /* #define CONFIG_ETHERNET_INTERFACE_ID "en0" // OS X uses enX in place of ethX as ethernet NIC names. */
/* Set to 1 to include GOOSE support in the build. Otherwise set to 0 */ /* Set to 1 to include GOOSE support in the build. Otherwise set to 0 */
#define CONFIG_INCLUDE_GOOSE_SUPPORT 1 #define CONFIG_INCLUDE_GOOSE_SUPPORT 1
@ -174,9 +174,9 @@
#define CONFIG_IEC61850_FORCE_MEMORY_ALIGNMENT 1 #define CONFIG_IEC61850_FORCE_MEMORY_ALIGNMENT 1
/* overwrite default results for MMS identify service */ /* overwrite default results for MMS identify service */
//#define CONFIG_DEFAULT_MMS_VENDOR_NAME "libiec61850.com" /* #define CONFIG_DEFAULT_MMS_VENDOR_NAME "libiec61850.com" */
//#define CONFIG_DEFAULT_MMS_MODEL_NAME "LIBIEC61850" /* #define CONFIG_DEFAULT_MMS_MODEL_NAME "LIBIEC61850" */
//#define CONFIG_DEFAULT_MMS_REVISION "1.0.0" /* #define CONFIG_DEFAULT_MMS_REVISION "1.0.0" */
/* MMS virtual file store base path - where MMS file services are looking for files */ /* MMS virtual file store base path - where MMS file services are looking for files */
#define CONFIG_VIRTUAL_FILESTORE_BASEPATH "./vmd-filestore/" #define CONFIG_VIRTUAL_FILESTORE_BASEPATH "./vmd-filestore/"

@ -65,8 +65,8 @@
/* Ethernet interface ID for GOOSE and SV */ /* Ethernet interface ID for GOOSE and SV */
#define CONFIG_ETHERNET_INTERFACE_ID "eth0" #define CONFIG_ETHERNET_INTERFACE_ID "eth0"
//#define CONFIG_ETHERNET_INTERFACE_ID "vboxnet0" /* #define CONFIG_ETHERNET_INTERFACE_ID "vboxnet0" */
//#define CONFIG_ETHERNET_INTERFACE_ID "en0" // OS X uses enX in place of ethX as ethernet NIC names. /* #define CONFIG_ETHERNET_INTERFACE_ID "en0" // OS X uses enX in place of ethX as ethernet NIC names. */
/* Set to 1 to include GOOSE support in the build. Otherwise set to 0 */ /* Set to 1 to include GOOSE support in the build. Otherwise set to 0 */
#cmakedefine01 CONFIG_INCLUDE_GOOSE_SUPPORT #cmakedefine01 CONFIG_INCLUDE_GOOSE_SUPPORT

@ -96,4 +96,5 @@ main(int argc, char** argv)
GooseReceiver_stop(receiver); GooseReceiver_stop(receiver);
GooseReceiver_destroy(receiver); GooseReceiver_destroy(receiver);
return 0;
} }

@ -12,11 +12,11 @@
#include "goose_publisher.h" #include "goose_publisher.h"
#include "hal_thread.h" #include "hal_thread.h"
// has to be executed as root! /* has to be executed as root! */
int int
main(int argc, char** argv) main(int argc, char **argv)
{ {
char* interface; char *interface;
if (argc > 1) if (argc > 1)
interface = argv[1]; interface = argv[1];
@ -73,6 +73,8 @@ main(int argc, char** argv)
} }
LinkedList_destroyDeep(dataSetValues, (LinkedListValueDeleteFunction) MmsValue_delete); LinkedList_destroyDeep(dataSetValues, (LinkedListValueDeleteFunction) MmsValue_delete);
return 0;
} }

@ -82,4 +82,6 @@ main(int argc, char** argv)
GooseReceiver_stop(receiver); GooseReceiver_stop(receiver);
GooseReceiver_destroy(receiver); GooseReceiver_destroy(receiver);
return 0;
} }

@ -137,6 +137,7 @@ close_connection:
} }
IedConnection_destroy(con); IedConnection_destroy(con);
return 0;
} }

@ -201,5 +201,6 @@ main(int argc, char** argv)
cleanup_and_exit: cleanup_and_exit:
IedConnection_destroy(con); IedConnection_destroy(con);
return 0;
} }

@ -97,6 +97,7 @@ int main(int argc, char** argv) {
} }
IedConnection_destroy(con); IedConnection_destroy(con);
return 0;
} }

@ -87,6 +87,7 @@ main(int argc, char** argv)
IedConnection_destroy(con); IedConnection_destroy(con);
AcseAuthenticationParameter_destroy(auth); AcseAuthenticationParameter_destroy(auth);
return 0;
} }

@ -94,6 +94,7 @@ int main(int argc, char** argv) {
} }
IedConnection_destroy(con); IedConnection_destroy(con);
return 0;
} }

@ -316,6 +316,7 @@ int main(int argc, char** argv) {
ClientDataSet_destroy(clientDataSet); ClientDataSet_destroy(clientDataSet);
IedConnection_destroy(con); IedConnection_destroy(con);
return 0;
} }

@ -214,6 +214,7 @@ int main(int argc, char** argv) {
} }
IedConnection_destroy(con); IedConnection_destroy(con);
return 0;
} }

@ -337,6 +337,7 @@ main(int argc, char** argv)
} }
IedConnection_destroy(con); IedConnection_destroy(con);
return 0;
} }

@ -140,6 +140,7 @@ int main(int argc, char** argv) {
} }
IedConnection_destroy(con); IedConnection_destroy(con);
return 0;
} }

@ -455,6 +455,7 @@ main(int argc, char** argv) {
ClientDataSet_destroy(clientDataSet); ClientDataSet_destroy(clientDataSet);
IedConnection_destroy(con); IedConnection_destroy(con);
return 0;
} }

@ -188,6 +188,7 @@ exit_error:
} }
IedConnection_destroy(con); IedConnection_destroy(con);
return 0;
} }

@ -100,6 +100,7 @@ int main(int argc, char** argv) {
IedConnection_destroy(con); IedConnection_destroy(con);
return 0;
} }

@ -114,6 +114,7 @@ int main(int argc, char** argv) {
} }
IedConnection_destroy(con); IedConnection_destroy(con);
return 0;
} }

@ -1,4 +1,3 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
@ -439,5 +438,7 @@ int main(int argc, char** argv)
free(componentName); free(componentName);
MmsConnection_destroy(con); MmsConnection_destroy(con);
return 0;
} }

@ -41,7 +41,6 @@ void sigint_handler(int signalId)
running = 0; running = 0;
} }
bool bool
controlHandlerForIntegerOutput(ControlAction action, void* parameter, MmsValue* value, bool test) controlHandlerForIntegerOutput(ControlAction action, void* parameter, MmsValue* value, bool test)
{ {
@ -60,8 +59,9 @@ controlHandlerForIntegerOutput(ControlAction action, void* parameter, MmsValue*
return true; return true;
} }
int main(int argc, char** argv) { int
main(int argc, char** argv)
{
int tcpPort = 102; int tcpPort = 102;
if (argc > 1) { if (argc > 1) {
@ -99,4 +99,6 @@ int main(int argc, char** argv) {
/* Cleanup - free all resources */ /* Cleanup - free all resources */
IedServer_destroy(iedServer); IedServer_destroy(iedServer);
return 0;
} /* main() */ } /* main() */

@ -202,4 +202,5 @@ main(int argc, char** argv)
/* Cleanup - free all resources */ /* Cleanup - free all resources */
IedServer_destroy(iedServer); IedServer_destroy(iedServer);
return 0;
} /* main() */ } /* main() */

@ -26,7 +26,7 @@ sigint_handler(int signalId)
} }
static void static void
updateCMVArrayElement(MmsValue* cval, int index, float magnitude, float angle, Quality quality, Timestamp timestamp) updateCMVArrayElement(MmsValue *cval, int index, float magnitude, float angle, Quality quality, Timestamp timestamp)
{ {
MmsValue* cmv = MmsValue_getElement(cval, index); MmsValue* cmv = MmsValue_getElement(cval, index);
@ -48,7 +48,9 @@ updateCMVArrayElement(MmsValue* cval, int index, float magnitude, float angle, Q
MmsValue_setUtcTimeByBuffer(t, timestamp.val); MmsValue_setUtcTimeByBuffer(t, timestamp.val);
} }
int main(int argc, char** argv) { int
main(int argc, char **argv)
{
int tcpPort = 102; int tcpPort = 102;
@ -65,7 +67,6 @@ int main(int argc, char** argv) {
/* Get access to the corresponding MMS value data structure - the MX(FC) part of the data object */ /* Get access to the corresponding MMS value data structure - the MX(FC) part of the data object */
MmsValue* mhai1_ha_phsAHar_mx = IedServer_getFunctionalConstrainedData(iedServer, mhai1_ha_phsAHar, IEC61850_FC_MX); MmsValue* mhai1_ha_phsAHar_mx = IedServer_getFunctionalConstrainedData(iedServer, mhai1_ha_phsAHar, IEC61850_FC_MX);
/* assuming the array has 16 elements */ /* assuming the array has 16 elements */
float mag = 200.f; float mag = 200.f;
float angle = 0.01f; float angle = 0.01f;
@ -123,4 +124,6 @@ int main(int argc, char** argv) {
/* Cleanup - free all resources */ /* Cleanup - free all resources */
IedServer_destroy(iedServer); IedServer_destroy(iedServer);
return 0;
} /* main() */ } /* main() */

@ -125,4 +125,5 @@ main(int argc, char** argv)
IedServer_destroy(iedServer); IedServer_destroy(iedServer);
IedModel_destroy(model); IedModel_destroy(model);
return 0;
} /* main() */ } /* main() */

@ -193,4 +193,5 @@ main(int argc, char** argv)
/* Cleanup - free all resources */ /* Cleanup - free all resources */
IedServer_destroy(iedServer); IedServer_destroy(iedServer);
return 0;
} /* main() */ } /* main() */

@ -101,4 +101,5 @@ int main(int argc, char** argv) {
/* destroy dynamic data model */ /* destroy dynamic data model */
IedModel_destroy(model); IedModel_destroy(model);
return 0;
} /* main() */ } /* main() */

@ -95,5 +95,6 @@ main(int argc, char** argv)
/* Cleanup - free all resources */ /* Cleanup - free all resources */
IedServer_destroy(iedServer); IedServer_destroy(iedServer);
return 0;
} /* main() */ } /* main() */

@ -152,4 +152,5 @@ int main(int argc, char** argv) {
/* Cleanup - free all resources */ /* Cleanup - free all resources */
IedServer_destroy(iedServer); IedServer_destroy(iedServer);
return 0;
} /* main() */ } /* main() */

@ -238,5 +238,6 @@ main(int argc, char** argv)
/* Release connection to database and free resources */ /* Release connection to database and free resources */
LogStorage_destroy(statusLog); LogStorage_destroy(statusLog);
return 0;
} /* main() */ } /* main() */

@ -217,4 +217,5 @@ int main(int argc, char** argv) {
/* Cleanup - free all resources */ /* Cleanup - free all resources */
IedServer_destroy(iedServer); IedServer_destroy(iedServer);
return 0;
} /* main() */ } /* main() */

@ -285,4 +285,5 @@ main(int argc, char** argv)
/* Cleanup - free all resources */ /* Cleanup - free all resources */
IedServer_destroy(iedServer); IedServer_destroy(iedServer);
return 0;
} /* main() */ } /* main() */

@ -34,13 +34,15 @@ extern IedModel iedModel;
static int running = 0; static int running = 0;
void sigint_handler(int signalId) void
sigint_handler(int signalId)
{ {
running = 0; running = 0;
} }
int main(int argc, char** argv) { int
main(int argc, char** argv)
{
int tcpPort = 102; int tcpPort = 102;
if (argc > 1) { if (argc > 1) {
@ -49,7 +51,7 @@ int main(int argc, char** argv) {
IedServer iedServer = IedServer_create(&iedModel); IedServer iedServer = IedServer_create(&iedModel);
// set initial measurement and status values from process /* set initial measurement and status values from process */
/* MMS server will be instructed to start listening to client connections. */ /* MMS server will be instructed to start listening to client connections. */
IedServer_start(iedServer, tcpPort); IedServer_start(iedServer, tcpPort);
@ -73,4 +75,6 @@ int main(int argc, char** argv) {
/* Cleanup - free all resources */ /* Cleanup - free all resources */
IedServer_destroy(iedServer); IedServer_destroy(iedServer);
return 0;
} /* main() */ } /* main() */

@ -225,5 +225,6 @@ main(int argc, char** argv)
/* Cleanup - free all resources */ /* Cleanup - free all resources */
IedServer_destroy(iedServer); IedServer_destroy(iedServer);
return 0;
} /* main() */ } /* main() */

@ -150,4 +150,5 @@ main(int argc, char** argv)
/* Cleanup - free all resources */ /* Cleanup - free all resources */
IedServer_destroy(iedServer); IedServer_destroy(iedServer);
return 0;
} /* main() */ } /* main() */

@ -8,7 +8,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include "../server_example_write_handler/static_model.h" #include "static_model.h"
/* import IEC 61850 device model created from SCL-File */ /* import IEC 61850 device model created from SCL-File */
extern IedModel iedModel; extern IedModel iedModel;
@ -41,8 +41,9 @@ writeAccessHandler (DataAttribute* dataAttribute, MmsValue* value, ClientConnect
return DATA_ACCESS_ERROR_OBJECT_ACCESS_DENIED; return DATA_ACCESS_ERROR_OBJECT_ACCESS_DENIED;
} }
int main(int argc, char** argv) { int
main(int argc, char** argv)
{
iedServer = IedServer_create(&iedModel); iedServer = IedServer_create(&iedModel);
/* MMS server will be instructed to start listening to client connections. */ /* MMS server will be instructed to start listening to client connections. */
@ -75,4 +76,6 @@ int main(int argc, char** argv) {
/* Cleanup - free all resources */ /* Cleanup - free all resources */
IedServer_destroy(iedServer); IedServer_destroy(iedServer);
return 0;
} /* main() */ } /* main() */

@ -81,4 +81,5 @@ main(int argc, char** argv)
else { else {
printf("Failed to create SV publisher\n"); printf("Failed to create SV publisher\n");
} }
return 0;
} }

@ -90,4 +90,5 @@ main(int argc, char** argv)
/* Cleanup and free resources */ /* Cleanup and free resources */
SVReceiver_destroy(receiver); SVReceiver_destroy(receiver);
return 0;
} }

@ -154,6 +154,7 @@ int main(int argc, char** argv) {
IedConnection_destroy(con); IedConnection_destroy(con);
TLSConfiguration_destroy(tlsConfig); TLSConfiguration_destroy(tlsConfig);
return 0;
} }

@ -225,4 +225,5 @@ main(int argc, char** argv)
TLSConfiguration_destroy(tlsConfig); TLSConfiguration_destroy(tlsConfig);
return 0;
} /* main() */ } /* main() */

Loading…
Cancel
Save