1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

Remove trailing whitespace

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
Steffen Vogel 2024-02-29 22:02:08 +01:00
parent 535d64a644
commit 449e132f27
13 changed files with 73 additions and 73 deletions

View file

@ -161,7 +161,7 @@ UI-ASSIST is a joint research project between India and the US.
%% Min : Minimum value allowed.
%% Max : Maximum value allowed.
%% Flags : Ored values of flags definitions or '-'.
%% Available values :
%% Available values :
%% NOT_SIMUL_MOD : Cannot be modified during simulation.
%% Description : Short description of parameter (BETWEEN DOUBLE QUOTES)
%%
@ -193,7 +193,7 @@ UI-ASSIST is a joint research project between India and the US.
%% Fields descriptions:
%%
%% Name : Connector's unique identifier (tag).
%%
%%
%% Units : Signal's units.
%% Text field: use the official SI symbols.
%% Enter a "-" when not used
@ -219,7 +219,7 @@ UI-ASSIST is a joint research project between India and the US.
switchr no int in auto S "Receive Data"
switchs no int in auto S "Send Data"
datain no double in auto I "Data Input"
datain no double in auto I "Data Input"
dataout no double out auto O "Data Output"
%% END CONTROL IOS
@ -236,7 +236,7 @@ dataout no double out auto O "Data Output"
%% Fields descriptions:
%%
%% Name : Node's unique identifier.
%%
%%
%% Phases : Number of phases.
%% Text field: Enter a number (1, 3) or
%% 0 for dynamic number of phases.
@ -401,13 +401,13 @@ dataout no double out auto O "Data Output"
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATORY INCLUDES PATHS LIST -- Modify the following list...
UCM_PREP_INCLUDES_PATHS =
UCM_PREP_INCLUDES_PATHS =
%% END PREPARATORY INCLUDES PATHS LIST
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
%% 8.5- Required dependency libraries pathnames list.
%%
%%
%% Enter the pathnames of your dependency libraries
%% separated by spaces after "=".
%% Put an "\" at end of line to continue list on next line.
@ -437,7 +437,7 @@ UCM_PREP_INCLUDES_PATHS =
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATORY DEPENDANT LIBRARIES LIST -- Modify the following list...
UCM_PREP_DEP_LIBS_PATHNAMES =
UCM_PREP_DEP_LIBS_PATHNAMES =
%% END PREPARATORY DEPENDANT LIBRARIES LIST
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -452,7 +452,7 @@ UCM_PREP_DEP_LIBS_PATHNAMES =
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN PREPARATORY LIBRARIES LIST -- Modify the following list...
UCM_PREP_LIBRARIES =
UCM_PREP_LIBRARIES =
%% END PREPARATORY LIBRARIES LIST
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -630,9 +630,9 @@ struct sockaddr_in rec_addr;
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN SIMULATION INITIALIZATION FUNCTION CODE -- Enter code ->...
int ret;
unsigned int yes = 1;
unsigned int yes = 1;
if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) {
perror("socket creation failed");
@ -643,7 +643,7 @@ struct sockaddr_in rec_addr;
perror("socket creation failed");
exit(EXIT_FAILURE);
}
memset(&rec_addr, 0, sizeof(rec_addr));
rec_addr.sin_family = AF_INET; // IPv4
rec_addr.sin_addr.s_addr = htonl(INADDR_ANY);
@ -654,12 +654,12 @@ struct sockaddr_in rec_addr;
send_addr.sin_addr.s_addr = inet_addr(REMOTE_ADR);
send_addr.sin_port = htons(PORT);
if (bind(sockfd, (struct sockaddr*)&rec_addr, sizeof(struct sockaddr_in)) < 0)
if (bind(sockfd, (struct sockaddr*)&rec_addr, sizeof(struct sockaddr_in)) < 0)
fprintf(stdout,"ERROR DETECTED !!! There is a problem in binding");
if (connect(sockfds, (struct sockaddr*)&send_addr, sizeof(struct sockaddr_in)) < 0)
if (connect(sockfds, (struct sockaddr*)&send_addr, sizeof(struct sockaddr_in)) < 0)
fprintf(stdout,"ERROR DETECTED !!! There is a problem in connecting");
#if 0
// Join a multicast group
struct ip_mreq mreq;
@ -687,7 +687,7 @@ struct sockaddr_in rec_addr;
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN BEFORE VOLTAGE CALCULATION CODE -- Enter code ->...
%% END BEFORE VOLTAGE CALCULATION CODE
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
%%
@ -696,9 +696,9 @@ struct sockaddr_in rec_addr;
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...
int ret;
/* Receiving data */
char bufr[MSG_LEN(MAX_VALUES)];
struct msg *msgr = (struct msg *) bufr;
@ -706,18 +706,18 @@ struct sockaddr_in rec_addr;
struct sockaddr_in cli_addr;
int cli_addrlen = sizeof(cli_addr);
if (switchr == 1) {
if (switchr == 1) {
memset(&cli_addr, 0, sizeof(cli_addr));
memset((char *) msgr, 0, sizeof(bufr));
ret = recvfrom(sockfd, (char *) msgr, sizeof(bufr), 0, (struct sockaddr *) &cli_addr, &cli_addrlen);
msgr->length = htons(msgr->length);
msgr->sequence = htonl(msgr->sequence);
msgr->ts.sec = htonl(msgr->ts.sec);
msgr->ts.nsec = htonl(msgr->ts.nsec);
msgr->data[0].i = ntohl(msgr->data[0].i);
dataout = (float) msgr->data[0].f;
}
@ -740,14 +740,14 @@ struct sockaddr_in rec_addr;
msg->ts.sec = now.tv_sec;
msg->ts.nsec = now.tv_nsec;
msg->data[0].f = datain;
msg->data[0].f = datain;
msg->data[0].i = htonl(msg->data[0].i);
msg->length = htons(msg->length);
msg->sequence = htonl(msg->sequence);
msg->ts.sec = htonl(msg->ts.sec);
msg->ts.nsec = htonl(msg->ts.nsec);
ret = sendto(sockfds, (char *) msg, MSG_LEN(NO_SEND_DATA), 0, (struct sockaddr *) &send_addr, sizeof(send_addr));
}
@ -761,7 +761,7 @@ struct sockaddr_in rec_addr;
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN SIMULATION INCLUDES PATHS LIST -- Modify the following list...
UCM_SIMULATION_INCLUDES_PATHS =
UCM_SIMULATION_INCLUDES_PATHS =
%% END SIMULATION INCLUDES PATHS LIST
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -776,7 +776,7 @@ UCM_SIMULATION_INCLUDES_PATHS =
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN SIMULATION DEP LIBS LIST -- Modify the following list...
UCM_SIMULATION_DEP_LIBS_PATHNAMES =
UCM_SIMULATION_DEP_LIBS_PATHNAMES =
%% END SIMULATION DEP LIBS LIST
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@ -788,20 +788,20 @@ UCM_SIMULATION_DEP_LIBS_PATHNAMES =
%%
%% ARCHITECTURE DEPENDANT PATHS: See NOTE in section 8.5
%%
%% UCM_SIMULATION_LIBRARIES_<ARCH>: use for compiler dependant librairies
%% UCM_SIMULATION_LIBRARIES_<ARCH>: use for compiler dependant librairies
%%
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
%% BEGIN SIMULATION LIBRARIES LIST -- Modify the following list...
UCM_SIMULATION_LIBRARIES =
UCM_SIMULATION_LIBRARIES_WINDOWS =
UCM_SIMULATION_LIBRARIES_LINUX_RHEL5_32 =
UCM_SIMULATION_LIBRARIES_LINUX_RHEL6_64 =
UCM_SIMULATION_LIBRARIES_LINUX_SLES9_ia64 =
UCM_SIMULATION_LIBRARIES_LINUX_SLES10_ia64 =
UCM_SIMULATION_LIBRARIES_LINUX_SLES11SP1_x86_64 =
UCM_SIMULATION_LIBRARIES_LINUX_SLES11SP3_x86_64 =
UCM_SIMULATION_LIBRARIES_LINUX_SLES12SP1_x86_64 =
UCM_SIMULATION_LIBRARIES =
UCM_SIMULATION_LIBRARIES_WINDOWS =
UCM_SIMULATION_LIBRARIES_LINUX_RHEL5_32 =
UCM_SIMULATION_LIBRARIES_LINUX_RHEL6_64 =
UCM_SIMULATION_LIBRARIES_LINUX_SLES9_ia64 =
UCM_SIMULATION_LIBRARIES_LINUX_SLES10_ia64 =
UCM_SIMULATION_LIBRARIES_LINUX_SLES11SP1_x86_64 =
UCM_SIMULATION_LIBRARIES_LINUX_SLES11SP3_x86_64 =
UCM_SIMULATION_LIBRARIES_LINUX_SLES12SP1_x86_64 =
%% END SIMULATION LIBRARIES LIST
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

View file

@ -32,9 +32,9 @@ disp('Receiving data');
while i < num_samples
% Wait for connection
% Read data from the socket
[ dat, count ] = fread(t, num_values, 'float32');
data(:,i) = dat;
i = i + 1;
end

View file

@ -41,7 +41,7 @@ ifneq ($(RTLAB_ROOT),)
endif
CC_OPTS = -std=c99 -D_GNU_SOURCE -MMD
LD_OPTS =
LD_OPTS =
OBJS = main.o msg.o utils.o socket.o $(INTEL_OBJS)
ifneq ($(PROTOCOL),)

View file

@ -66,7 +66,7 @@ static void * SendToIPPort(void *arg)
OpalPrint("%s: SendToIPPort: No transimission block for this controller. Stopping thread.\n", PROGNAME);
return NULL;
}
do {
/* This call unblocks when the 'Data Ready' line of a send icon is asserted. */
ret = OpalWaitForAsyncSendRequest(&SendID);
@ -109,7 +109,7 @@ static void * SendToIPPort(void *arg)
msg->data[i].f = (float) mdldata[i];
msg_hton(msg);
len = MSG_LEN(msg->length);
#elif PROTOCOL == GTNET_SKT
uint32_t *imsg = (uint32_t *) msg;
@ -117,7 +117,7 @@ static void * SendToIPPort(void *arg)
msg[i] = (float) mdldata[i];
imsg[i] = htonl(imsg[i]);
}
len = mdldata_size / sizeof(double) * sizeof(float);
#else
#error Unknown protocol
@ -185,12 +185,12 @@ static void * RecvFromIPPort(void *arg)
OpalPrint("%s: Timeout while waiting for data\n", PROGNAME, errno);
if (ret == -1) /* a more serious error, so we print it */
OpalPrint("%s: Error %d while waiting for data\n", PROGNAME, errno);
continue;
}
break;
}
/* Get the number of signals to send back to the model */
OpalGetAsyncRecvIconDataLength(&mdldata_size, RecvID);
cnt = mdldata_size / sizeof(double);
@ -202,18 +202,18 @@ static void * RecvFromIPPort(void *arg)
#if PROTOCOL == VILLAS
msg_ntoh(msg);
ret = msg_verify(msg);
if (ret) {
OpalPrint("%s: Skipping invalid packet\n", PROGNAME);
continue;
}
if (cnt > msg->length) {
OpalPrint("%s: Number of signals for RecvID=%d (%d) exceeds what was received (%d)\n",
PROGNAME, RecvID, cnt, msg->length);
}
for (int i = 0; i < msg->length; i++) {
mdldata[i] = (double) msg->data[i].f;
printf("Data rcvd from VILLAS %f\n", mdldata[i]);
@ -225,7 +225,7 @@ static void * RecvFromIPPort(void *arg)
uint32_t *imsg = (uint32_t *) msg;
for (int i = 0; i < cnt; i++)
imsg[i] = ntohl(imsg[i]);
printf("Protocol GTNET_SKT\n");
for (int i = 0; i < cnt; i++) {
mdldata[i] = (double) msg[i];
@ -259,7 +259,7 @@ int main(int argc, char *argv[])
fputs ("test file to check if main runs", testfile);
fclose (testfile);
}
int ret;
Opal_GenAsyncParam_Ctrl IconCtrlStruct;
@ -293,7 +293,7 @@ int main(int argc, char *argv[])
/* Get IP Controler Parameters (ie: ip address, port number...) and
* initialize the device on the QNX node. */
memset(&IconCtrlStruct, 0, sizeof(IconCtrlStruct));
ret = OpalGetAsyncCtrlParameters(&IconCtrlStruct, sizeof(IconCtrlStruct));
if (ret != EOK) {
OpalPrint("%s: ERROR: Could not get controller parameters (%d).\n", PROGNAME, ret);
@ -311,7 +311,7 @@ int main(int argc, char *argv[])
ret = pthread_create(&tid_send, NULL, SendToIPPort, NULL);
if (ret == -1)
OpalPrint("%s: ERROR: Could not create thread (SendToIPPort), errno %d\n", PROGNAME, errno);
ret = pthread_create(&tid_recv, NULL, RecvFromIPPort, NULL);
if (ret == -1)
OpalPrint("%s: ERROR: Could not create thread (RecvFromIPPort), errno %d\n", PROGNAME, errno);
@ -320,14 +320,14 @@ int main(int argc, char *argv[])
ret = pthread_join(tid_send, NULL);
if (ret != 0)
OpalPrint("%s: ERROR: pthread_join (SendToIPPort), errno %d\n", PROGNAME, ret);
ret = pthread_join(tid_recv, NULL);
if (ret != 0)
OpalPrint("%s: ERROR: pthread_join (RecvFromIPPort), errno %d\n", PROGNAME, ret);
/* Close the ip port and shared memories */
socket_close(&skt, IconCtrlStruct);
OpalCloseAsyncMem (ASYNC_SHMEM_SIZE, ASYNC_SHMEM_NAME);
OpalSystemCtrl_UnRegister(PRINT_SHMEM_NAME);

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<!--
<!--
SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
SPDX-License-Identifier: Apache-2.0
-->

View file

@ -33,7 +33,7 @@ paths:
description: Success
content:
application/json:
examples:
examples:
example1:
value:
sessions:

View file

@ -11,7 +11,7 @@
Institute for Automation of Complex Power Systems (ACS)
EON Energy Research Center (EONERC)
RWTH University, Aachen, Germany
Steffen Vogel <post@steffenvogel.de>
---------------------------------------------------------------------

View file

@ -171,7 +171,7 @@ rsync --ignore-errors --archive --verbose /villas/node/packaging/live-iso/build/
# Find the architecture we are on
arch=$(uname -m)
releasever=$(rpm --eval '%{fedora}')
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary
@ -183,7 +183,7 @@ rm -f /var/lib/systemd/random-seed
# The enp1s0 interface is a left over from the imagefactory install, clean this up
rm -f /etc/NetworkManager/system-connections/*.nmconnection
dnf -y remove dracut-config-generic
# Remove machine-id on pre generated images

View file

@ -1,6 +1,6 @@
# `villas` as a Nix Flake
<!--
<!--
SPDX-FileCopyrightText: 2023 OPAL-RT Germany GmbH
SPDX-License-Identifier: Apache-2.0
-->

View file

@ -12,7 +12,7 @@ source_node = {
target_node = {
type = "nanomsg",
in = {
in = {
signals = {
count = ${NUM_VALUE},
type = "float"

View file

@ -7,7 +7,7 @@ source_node = {
polling = true,
vectorize = 1,
in = {
in = {
signals = {
count = ${NUM_VALUE},
type = "float"
@ -26,7 +26,7 @@ target_node = {
polling = true,
vectorize = 1,
in = {
in = {
signals = {
count = ${NUM_VALUE},
type = "float"

View file

@ -15,7 +15,7 @@ source_node = {
target_node = {
type = "zeromq",
in = {
in = {
signals = {
count = ${NUM_VALUE},
type = "float"

View file

@ -3,7 +3,7 @@
<!--
-- WebRTC demo
--
--
-- Author: Steffen Vogel <post@steffenvogel.de>
-- SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
-- SPDX-License-Identifier: Apache-2.0
@ -21,51 +21,51 @@
.filename {
font-size: small !important;
}
#log {
display: inline;
}
#received-container {
overflow: auto;
height: 300px;
border: 1px solid darkgray;
}
#log-container {
overflow: auto;
height: 300px;
border: 1px solid darkgray;
}
.log-warn {
color: orange
}
.log-error {
color: red
}
.log-info {
color: darkblue;
}
.log-log {
color: black;
}
.log-warn,
.log-error {
font-weight: bold;
}
.filename {
background-color: #adadad;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
margin-bottom: -8px;
padding: 5px;
}
h3,
h4,
h5 {