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:
parent
535d64a644
commit
449e132f27
13 changed files with 73 additions and 73 deletions
|
@ -161,7 +161,7 @@ UI-ASSIST is a joint research project between India and the US.
|
||||||
%% Min : Minimum value allowed.
|
%% Min : Minimum value allowed.
|
||||||
%% Max : Maximum value allowed.
|
%% Max : Maximum value allowed.
|
||||||
%% Flags : Ored values of flags definitions or '-'.
|
%% Flags : Ored values of flags definitions or '-'.
|
||||||
%% Available values :
|
%% Available values :
|
||||||
%% NOT_SIMUL_MOD : Cannot be modified during simulation.
|
%% NOT_SIMUL_MOD : Cannot be modified during simulation.
|
||||||
%% Description : Short description of parameter (BETWEEN DOUBLE QUOTES)
|
%% 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:
|
%% Fields descriptions:
|
||||||
%%
|
%%
|
||||||
%% Name : Connector's unique identifier (tag).
|
%% Name : Connector's unique identifier (tag).
|
||||||
%%
|
%%
|
||||||
%% Units : Signal's units.
|
%% Units : Signal's units.
|
||||||
%% Text field: use the official SI symbols.
|
%% Text field: use the official SI symbols.
|
||||||
%% Enter a "-" when not used
|
%% 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"
|
switchr no int in auto S "Receive Data"
|
||||||
switchs no int in auto S "Send 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"
|
dataout no double out auto O "Data Output"
|
||||||
|
|
||||||
%% END CONTROL IOS
|
%% END CONTROL IOS
|
||||||
|
@ -236,7 +236,7 @@ dataout no double out auto O "Data Output"
|
||||||
%% Fields descriptions:
|
%% Fields descriptions:
|
||||||
%%
|
%%
|
||||||
%% Name : Node's unique identifier.
|
%% Name : Node's unique identifier.
|
||||||
%%
|
%%
|
||||||
%% Phases : Number of phases.
|
%% Phases : Number of phases.
|
||||||
%% Text field: Enter a number (1, 3) or
|
%% Text field: Enter a number (1, 3) or
|
||||||
%% 0 for dynamic number of phases.
|
%% 0 for dynamic number of phases.
|
||||||
|
@ -401,13 +401,13 @@ dataout no double out auto O "Data Output"
|
||||||
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
%% BEGIN PREPARATORY INCLUDES PATHS LIST -- Modify the following list...
|
%% BEGIN PREPARATORY INCLUDES PATHS LIST -- Modify the following list...
|
||||||
|
|
||||||
UCM_PREP_INCLUDES_PATHS =
|
UCM_PREP_INCLUDES_PATHS =
|
||||||
|
|
||||||
%% END PREPARATORY INCLUDES PATHS LIST
|
%% END PREPARATORY INCLUDES PATHS LIST
|
||||||
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
%%
|
%%
|
||||||
%% 8.5- Required dependency libraries pathnames list.
|
%% 8.5- Required dependency libraries pathnames list.
|
||||||
%%
|
%%
|
||||||
%% Enter the pathnames of your dependency libraries
|
%% Enter the pathnames of your dependency libraries
|
||||||
%% separated by spaces after "=".
|
%% separated by spaces after "=".
|
||||||
%% Put an "\" at end of line to continue list on next line.
|
%% Put an "\" at end of line to continue list on next line.
|
||||||
|
@ -437,7 +437,7 @@ UCM_PREP_INCLUDES_PATHS =
|
||||||
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
%% BEGIN PREPARATORY DEPENDANT LIBRARIES LIST -- Modify the following list...
|
%% BEGIN PREPARATORY DEPENDANT LIBRARIES LIST -- Modify the following list...
|
||||||
|
|
||||||
UCM_PREP_DEP_LIBS_PATHNAMES =
|
UCM_PREP_DEP_LIBS_PATHNAMES =
|
||||||
|
|
||||||
%% END PREPARATORY DEPENDANT LIBRARIES LIST
|
%% END PREPARATORY DEPENDANT LIBRARIES LIST
|
||||||
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -452,7 +452,7 @@ UCM_PREP_DEP_LIBS_PATHNAMES =
|
||||||
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
%% BEGIN PREPARATORY LIBRARIES LIST -- Modify the following list...
|
%% BEGIN PREPARATORY LIBRARIES LIST -- Modify the following list...
|
||||||
|
|
||||||
UCM_PREP_LIBRARIES =
|
UCM_PREP_LIBRARIES =
|
||||||
|
|
||||||
%% END PREPARATORY LIBRARIES LIST
|
%% END PREPARATORY LIBRARIES LIST
|
||||||
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -630,9 +630,9 @@ struct sockaddr_in rec_addr;
|
||||||
%%
|
%%
|
||||||
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
%% BEGIN SIMULATION INITIALIZATION FUNCTION CODE -- Enter code ->...
|
%% BEGIN SIMULATION INITIALIZATION FUNCTION CODE -- Enter code ->...
|
||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
unsigned int yes = 1;
|
unsigned int yes = 1;
|
||||||
|
|
||||||
if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) {
|
if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0 ) {
|
||||||
perror("socket creation failed");
|
perror("socket creation failed");
|
||||||
|
@ -643,7 +643,7 @@ struct sockaddr_in rec_addr;
|
||||||
perror("socket creation failed");
|
perror("socket creation failed");
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(&rec_addr, 0, sizeof(rec_addr));
|
memset(&rec_addr, 0, sizeof(rec_addr));
|
||||||
rec_addr.sin_family = AF_INET; // IPv4
|
rec_addr.sin_family = AF_INET; // IPv4
|
||||||
rec_addr.sin_addr.s_addr = htonl(INADDR_ANY);
|
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_addr.s_addr = inet_addr(REMOTE_ADR);
|
||||||
send_addr.sin_port = htons(PORT);
|
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");
|
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");
|
fprintf(stdout,"ERROR DETECTED !!! There is a problem in connecting");
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// Join a multicast group
|
// Join a multicast group
|
||||||
struct ip_mreq mreq;
|
struct ip_mreq mreq;
|
||||||
|
@ -687,7 +687,7 @@ struct sockaddr_in rec_addr;
|
||||||
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
%% BEGIN BEFORE VOLTAGE CALCULATION CODE -- Enter code ->...
|
%% BEGIN BEFORE VOLTAGE CALCULATION CODE -- Enter code ->...
|
||||||
|
|
||||||
|
|
||||||
%% END BEFORE VOLTAGE CALCULATION CODE
|
%% END BEFORE VOLTAGE CALCULATION CODE
|
||||||
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
%%
|
%%
|
||||||
|
@ -696,9 +696,9 @@ struct sockaddr_in rec_addr;
|
||||||
%%
|
%%
|
||||||
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...
|
%% BEGIN AFTER VOLTAGE CALCULATION -- Enter code ->...
|
||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* Receiving data */
|
/* Receiving data */
|
||||||
char bufr[MSG_LEN(MAX_VALUES)];
|
char bufr[MSG_LEN(MAX_VALUES)];
|
||||||
struct msg *msgr = (struct msg *) bufr;
|
struct msg *msgr = (struct msg *) bufr;
|
||||||
|
@ -706,18 +706,18 @@ struct sockaddr_in rec_addr;
|
||||||
struct sockaddr_in cli_addr;
|
struct sockaddr_in cli_addr;
|
||||||
int cli_addrlen = sizeof(cli_addr);
|
int cli_addrlen = sizeof(cli_addr);
|
||||||
|
|
||||||
if (switchr == 1) {
|
if (switchr == 1) {
|
||||||
memset(&cli_addr, 0, sizeof(cli_addr));
|
memset(&cli_addr, 0, sizeof(cli_addr));
|
||||||
memset((char *) msgr, 0, sizeof(bufr));
|
memset((char *) msgr, 0, sizeof(bufr));
|
||||||
|
|
||||||
ret = recvfrom(sockfd, (char *) msgr, sizeof(bufr), 0, (struct sockaddr *) &cli_addr, &cli_addrlen);
|
ret = recvfrom(sockfd, (char *) msgr, sizeof(bufr), 0, (struct sockaddr *) &cli_addr, &cli_addrlen);
|
||||||
|
|
||||||
msgr->length = htons(msgr->length);
|
msgr->length = htons(msgr->length);
|
||||||
msgr->sequence = htonl(msgr->sequence);
|
msgr->sequence = htonl(msgr->sequence);
|
||||||
msgr->ts.sec = htonl(msgr->ts.sec);
|
msgr->ts.sec = htonl(msgr->ts.sec);
|
||||||
msgr->ts.nsec = htonl(msgr->ts.nsec);
|
msgr->ts.nsec = htonl(msgr->ts.nsec);
|
||||||
msgr->data[0].i = ntohl(msgr->data[0].i);
|
msgr->data[0].i = ntohl(msgr->data[0].i);
|
||||||
|
|
||||||
dataout = (float) msgr->data[0].f;
|
dataout = (float) msgr->data[0].f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -740,14 +740,14 @@ struct sockaddr_in rec_addr;
|
||||||
msg->ts.sec = now.tv_sec;
|
msg->ts.sec = now.tv_sec;
|
||||||
msg->ts.nsec = now.tv_nsec;
|
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->data[0].i = htonl(msg->data[0].i);
|
||||||
|
|
||||||
msg->length = htons(msg->length);
|
msg->length = htons(msg->length);
|
||||||
msg->sequence = htonl(msg->sequence);
|
msg->sequence = htonl(msg->sequence);
|
||||||
msg->ts.sec = htonl(msg->ts.sec);
|
msg->ts.sec = htonl(msg->ts.sec);
|
||||||
msg->ts.nsec = htonl(msg->ts.nsec);
|
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));
|
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
|
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
%% BEGIN SIMULATION INCLUDES PATHS LIST -- Modify the following list...
|
%% BEGIN SIMULATION INCLUDES PATHS LIST -- Modify the following list...
|
||||||
|
|
||||||
UCM_SIMULATION_INCLUDES_PATHS =
|
UCM_SIMULATION_INCLUDES_PATHS =
|
||||||
|
|
||||||
%% END SIMULATION INCLUDES PATHS LIST
|
%% END SIMULATION INCLUDES PATHS LIST
|
||||||
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -776,7 +776,7 @@ UCM_SIMULATION_INCLUDES_PATHS =
|
||||||
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
%% BEGIN SIMULATION DEP LIBS LIST -- Modify the following list...
|
%% BEGIN SIMULATION DEP LIBS LIST -- Modify the following list...
|
||||||
|
|
||||||
UCM_SIMULATION_DEP_LIBS_PATHNAMES =
|
UCM_SIMULATION_DEP_LIBS_PATHNAMES =
|
||||||
|
|
||||||
%% END SIMULATION DEP LIBS LIST
|
%% END SIMULATION DEP LIBS LIST
|
||||||
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -788,20 +788,20 @@ UCM_SIMULATION_DEP_LIBS_PATHNAMES =
|
||||||
%%
|
%%
|
||||||
%% ARCHITECTURE DEPENDANT PATHS: See NOTE in section 8.5
|
%% 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
|
%%vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
|
||||||
%% BEGIN SIMULATION LIBRARIES LIST -- Modify the following list...
|
%% BEGIN SIMULATION LIBRARIES LIST -- Modify the following list...
|
||||||
|
|
||||||
UCM_SIMULATION_LIBRARIES =
|
UCM_SIMULATION_LIBRARIES =
|
||||||
UCM_SIMULATION_LIBRARIES_WINDOWS =
|
UCM_SIMULATION_LIBRARIES_WINDOWS =
|
||||||
UCM_SIMULATION_LIBRARIES_LINUX_RHEL5_32 =
|
UCM_SIMULATION_LIBRARIES_LINUX_RHEL5_32 =
|
||||||
UCM_SIMULATION_LIBRARIES_LINUX_RHEL6_64 =
|
UCM_SIMULATION_LIBRARIES_LINUX_RHEL6_64 =
|
||||||
UCM_SIMULATION_LIBRARIES_LINUX_SLES9_ia64 =
|
UCM_SIMULATION_LIBRARIES_LINUX_SLES9_ia64 =
|
||||||
UCM_SIMULATION_LIBRARIES_LINUX_SLES10_ia64 =
|
UCM_SIMULATION_LIBRARIES_LINUX_SLES10_ia64 =
|
||||||
UCM_SIMULATION_LIBRARIES_LINUX_SLES11SP1_x86_64 =
|
UCM_SIMULATION_LIBRARIES_LINUX_SLES11SP1_x86_64 =
|
||||||
UCM_SIMULATION_LIBRARIES_LINUX_SLES11SP3_x86_64 =
|
UCM_SIMULATION_LIBRARIES_LINUX_SLES11SP3_x86_64 =
|
||||||
UCM_SIMULATION_LIBRARIES_LINUX_SLES12SP1_x86_64 =
|
UCM_SIMULATION_LIBRARIES_LINUX_SLES12SP1_x86_64 =
|
||||||
|
|
||||||
%% END SIMULATION LIBRARIES LIST
|
%% END SIMULATION LIBRARIES LIST
|
||||||
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
%%^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
@ -32,9 +32,9 @@ disp('Receiving data');
|
||||||
while i < num_samples
|
while i < num_samples
|
||||||
% Wait for connection
|
% Wait for connection
|
||||||
% Read data from the socket
|
% Read data from the socket
|
||||||
|
|
||||||
[ dat, count ] = fread(t, num_values, 'float32');
|
[ dat, count ] = fread(t, num_values, 'float32');
|
||||||
|
|
||||||
data(:,i) = dat;
|
data(:,i) = dat;
|
||||||
i = i + 1;
|
i = i + 1;
|
||||||
end
|
end
|
||||||
|
|
|
@ -41,7 +41,7 @@ ifneq ($(RTLAB_ROOT),)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
CC_OPTS = -std=c99 -D_GNU_SOURCE -MMD
|
CC_OPTS = -std=c99 -D_GNU_SOURCE -MMD
|
||||||
LD_OPTS =
|
LD_OPTS =
|
||||||
OBJS = main.o msg.o utils.o socket.o $(INTEL_OBJS)
|
OBJS = main.o msg.o utils.o socket.o $(INTEL_OBJS)
|
||||||
|
|
||||||
ifneq ($(PROTOCOL),)
|
ifneq ($(PROTOCOL),)
|
||||||
|
|
|
@ -66,7 +66,7 @@ static void * SendToIPPort(void *arg)
|
||||||
OpalPrint("%s: SendToIPPort: No transimission block for this controller. Stopping thread.\n", PROGNAME);
|
OpalPrint("%s: SendToIPPort: No transimission block for this controller. Stopping thread.\n", PROGNAME);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
do {
|
||||||
/* This call unblocks when the 'Data Ready' line of a send icon is asserted. */
|
/* This call unblocks when the 'Data Ready' line of a send icon is asserted. */
|
||||||
ret = OpalWaitForAsyncSendRequest(&SendID);
|
ret = OpalWaitForAsyncSendRequest(&SendID);
|
||||||
|
@ -109,7 +109,7 @@ static void * SendToIPPort(void *arg)
|
||||||
msg->data[i].f = (float) mdldata[i];
|
msg->data[i].f = (float) mdldata[i];
|
||||||
|
|
||||||
msg_hton(msg);
|
msg_hton(msg);
|
||||||
|
|
||||||
len = MSG_LEN(msg->length);
|
len = MSG_LEN(msg->length);
|
||||||
#elif PROTOCOL == GTNET_SKT
|
#elif PROTOCOL == GTNET_SKT
|
||||||
uint32_t *imsg = (uint32_t *) msg;
|
uint32_t *imsg = (uint32_t *) msg;
|
||||||
|
@ -117,7 +117,7 @@ static void * SendToIPPort(void *arg)
|
||||||
msg[i] = (float) mdldata[i];
|
msg[i] = (float) mdldata[i];
|
||||||
imsg[i] = htonl(imsg[i]);
|
imsg[i] = htonl(imsg[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
len = mdldata_size / sizeof(double) * sizeof(float);
|
len = mdldata_size / sizeof(double) * sizeof(float);
|
||||||
#else
|
#else
|
||||||
#error Unknown protocol
|
#error Unknown protocol
|
||||||
|
@ -185,12 +185,12 @@ static void * RecvFromIPPort(void *arg)
|
||||||
OpalPrint("%s: Timeout while waiting for data\n", PROGNAME, errno);
|
OpalPrint("%s: Timeout while waiting for data\n", PROGNAME, errno);
|
||||||
if (ret == -1) /* a more serious error, so we print it */
|
if (ret == -1) /* a more serious error, so we print it */
|
||||||
OpalPrint("%s: Error %d while waiting for data\n", PROGNAME, errno);
|
OpalPrint("%s: Error %d while waiting for data\n", PROGNAME, errno);
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the number of signals to send back to the model */
|
/* Get the number of signals to send back to the model */
|
||||||
OpalGetAsyncRecvIconDataLength(&mdldata_size, RecvID);
|
OpalGetAsyncRecvIconDataLength(&mdldata_size, RecvID);
|
||||||
cnt = mdldata_size / sizeof(double);
|
cnt = mdldata_size / sizeof(double);
|
||||||
|
@ -202,18 +202,18 @@ static void * RecvFromIPPort(void *arg)
|
||||||
|
|
||||||
#if PROTOCOL == VILLAS
|
#if PROTOCOL == VILLAS
|
||||||
msg_ntoh(msg);
|
msg_ntoh(msg);
|
||||||
|
|
||||||
ret = msg_verify(msg);
|
ret = msg_verify(msg);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
OpalPrint("%s: Skipping invalid packet\n", PROGNAME);
|
OpalPrint("%s: Skipping invalid packet\n", PROGNAME);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cnt > msg->length) {
|
if (cnt > msg->length) {
|
||||||
OpalPrint("%s: Number of signals for RecvID=%d (%d) exceeds what was received (%d)\n",
|
OpalPrint("%s: Number of signals for RecvID=%d (%d) exceeds what was received (%d)\n",
|
||||||
PROGNAME, RecvID, cnt, msg->length);
|
PROGNAME, RecvID, cnt, msg->length);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < msg->length; i++) {
|
for (int i = 0; i < msg->length; i++) {
|
||||||
mdldata[i] = (double) msg->data[i].f;
|
mdldata[i] = (double) msg->data[i].f;
|
||||||
printf("Data rcvd from VILLAS %f\n", mdldata[i]);
|
printf("Data rcvd from VILLAS %f\n", mdldata[i]);
|
||||||
|
@ -225,7 +225,7 @@ static void * RecvFromIPPort(void *arg)
|
||||||
uint32_t *imsg = (uint32_t *) msg;
|
uint32_t *imsg = (uint32_t *) msg;
|
||||||
for (int i = 0; i < cnt; i++)
|
for (int i = 0; i < cnt; i++)
|
||||||
imsg[i] = ntohl(imsg[i]);
|
imsg[i] = ntohl(imsg[i]);
|
||||||
|
|
||||||
printf("Protocol GTNET_SKT\n");
|
printf("Protocol GTNET_SKT\n");
|
||||||
for (int i = 0; i < cnt; i++) {
|
for (int i = 0; i < cnt; i++) {
|
||||||
mdldata[i] = (double) msg[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);
|
fputs ("test file to check if main runs", testfile);
|
||||||
fclose (testfile);
|
fclose (testfile);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
Opal_GenAsyncParam_Ctrl IconCtrlStruct;
|
Opal_GenAsyncParam_Ctrl IconCtrlStruct;
|
||||||
|
@ -293,7 +293,7 @@ int main(int argc, char *argv[])
|
||||||
/* Get IP Controler Parameters (ie: ip address, port number...) and
|
/* Get IP Controler Parameters (ie: ip address, port number...) and
|
||||||
* initialize the device on the QNX node. */
|
* initialize the device on the QNX node. */
|
||||||
memset(&IconCtrlStruct, 0, sizeof(IconCtrlStruct));
|
memset(&IconCtrlStruct, 0, sizeof(IconCtrlStruct));
|
||||||
|
|
||||||
ret = OpalGetAsyncCtrlParameters(&IconCtrlStruct, sizeof(IconCtrlStruct));
|
ret = OpalGetAsyncCtrlParameters(&IconCtrlStruct, sizeof(IconCtrlStruct));
|
||||||
if (ret != EOK) {
|
if (ret != EOK) {
|
||||||
OpalPrint("%s: ERROR: Could not get controller parameters (%d).\n", PROGNAME, ret);
|
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);
|
ret = pthread_create(&tid_send, NULL, SendToIPPort, NULL);
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
OpalPrint("%s: ERROR: Could not create thread (SendToIPPort), errno %d\n", PROGNAME, errno);
|
OpalPrint("%s: ERROR: Could not create thread (SendToIPPort), errno %d\n", PROGNAME, errno);
|
||||||
|
|
||||||
ret = pthread_create(&tid_recv, NULL, RecvFromIPPort, NULL);
|
ret = pthread_create(&tid_recv, NULL, RecvFromIPPort, NULL);
|
||||||
if (ret == -1)
|
if (ret == -1)
|
||||||
OpalPrint("%s: ERROR: Could not create thread (RecvFromIPPort), errno %d\n", PROGNAME, errno);
|
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);
|
ret = pthread_join(tid_send, NULL);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
OpalPrint("%s: ERROR: pthread_join (SendToIPPort), errno %d\n", PROGNAME, ret);
|
OpalPrint("%s: ERROR: pthread_join (SendToIPPort), errno %d\n", PROGNAME, ret);
|
||||||
|
|
||||||
ret = pthread_join(tid_recv, NULL);
|
ret = pthread_join(tid_recv, NULL);
|
||||||
if (ret != 0)
|
if (ret != 0)
|
||||||
OpalPrint("%s: ERROR: pthread_join (RecvFromIPPort), errno %d\n", PROGNAME, ret);
|
OpalPrint("%s: ERROR: pthread_join (RecvFromIPPort), errno %d\n", PROGNAME, ret);
|
||||||
|
|
||||||
/* Close the ip port and shared memories */
|
/* Close the ip port and shared memories */
|
||||||
socket_close(&skt, IconCtrlStruct);
|
socket_close(&skt, IconCtrlStruct);
|
||||||
|
|
||||||
OpalCloseAsyncMem (ASYNC_SHMEM_SIZE, ASYNC_SHMEM_NAME);
|
OpalCloseAsyncMem (ASYNC_SHMEM_SIZE, ASYNC_SHMEM_NAME);
|
||||||
OpalSystemCtrl_UnRegister(PRINT_SHMEM_NAME);
|
OpalSystemCtrl_UnRegister(PRINT_SHMEM_NAME);
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!--
|
<!--
|
||||||
SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
|
SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
|
||||||
SPDX-License-Identifier: Apache-2.0
|
SPDX-License-Identifier: Apache-2.0
|
||||||
-->
|
-->
|
||||||
|
|
|
@ -33,7 +33,7 @@ paths:
|
||||||
description: Success
|
description: Success
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
examples:
|
examples:
|
||||||
example1:
|
example1:
|
||||||
value:
|
value:
|
||||||
sessions:
|
sessions:
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
Institute for Automation of Complex Power Systems (ACS)
|
Institute for Automation of Complex Power Systems (ACS)
|
||||||
EON Energy Research Center (EONERC)
|
EON Energy Research Center (EONERC)
|
||||||
RWTH University, Aachen, Germany
|
RWTH University, Aachen, Germany
|
||||||
|
|
||||||
Steffen Vogel <post@steffenvogel.de>
|
Steffen Vogel <post@steffenvogel.de>
|
||||||
|
|
||||||
---------------------------------------------------------------------
|
---------------------------------------------------------------------
|
||||||
|
|
|
@ -171,7 +171,7 @@ rsync --ignore-errors --archive --verbose /villas/node/packaging/live-iso/build/
|
||||||
|
|
||||||
# Find the architecture we are on
|
# Find the architecture we are on
|
||||||
arch=$(uname -m)
|
arch=$(uname -m)
|
||||||
|
|
||||||
releasever=$(rpm --eval '%{fedora}')
|
releasever=$(rpm --eval '%{fedora}')
|
||||||
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-$releasever-primary
|
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
|
# The enp1s0 interface is a left over from the imagefactory install, clean this up
|
||||||
rm -f /etc/NetworkManager/system-connections/*.nmconnection
|
rm -f /etc/NetworkManager/system-connections/*.nmconnection
|
||||||
|
|
||||||
dnf -y remove dracut-config-generic
|
dnf -y remove dracut-config-generic
|
||||||
|
|
||||||
# Remove machine-id on pre generated images
|
# Remove machine-id on pre generated images
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# `villas` as a Nix Flake
|
# `villas` as a Nix Flake
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
SPDX-FileCopyrightText: 2023 OPAL-RT Germany GmbH
|
SPDX-FileCopyrightText: 2023 OPAL-RT Germany GmbH
|
||||||
SPDX-License-Identifier: Apache-2.0
|
SPDX-License-Identifier: Apache-2.0
|
||||||
-->
|
-->
|
||||||
|
|
|
@ -12,7 +12,7 @@ source_node = {
|
||||||
target_node = {
|
target_node = {
|
||||||
type = "nanomsg",
|
type = "nanomsg",
|
||||||
|
|
||||||
in = {
|
in = {
|
||||||
signals = {
|
signals = {
|
||||||
count = ${NUM_VALUE},
|
count = ${NUM_VALUE},
|
||||||
type = "float"
|
type = "float"
|
||||||
|
|
|
@ -7,7 +7,7 @@ source_node = {
|
||||||
polling = true,
|
polling = true,
|
||||||
vectorize = 1,
|
vectorize = 1,
|
||||||
|
|
||||||
in = {
|
in = {
|
||||||
signals = {
|
signals = {
|
||||||
count = ${NUM_VALUE},
|
count = ${NUM_VALUE},
|
||||||
type = "float"
|
type = "float"
|
||||||
|
@ -26,7 +26,7 @@ target_node = {
|
||||||
polling = true,
|
polling = true,
|
||||||
vectorize = 1,
|
vectorize = 1,
|
||||||
|
|
||||||
in = {
|
in = {
|
||||||
signals = {
|
signals = {
|
||||||
count = ${NUM_VALUE},
|
count = ${NUM_VALUE},
|
||||||
type = "float"
|
type = "float"
|
||||||
|
|
|
@ -15,7 +15,7 @@ source_node = {
|
||||||
target_node = {
|
target_node = {
|
||||||
type = "zeromq",
|
type = "zeromq",
|
||||||
|
|
||||||
in = {
|
in = {
|
||||||
signals = {
|
signals = {
|
||||||
count = ${NUM_VALUE},
|
count = ${NUM_VALUE},
|
||||||
type = "float"
|
type = "float"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
-- WebRTC demo
|
-- WebRTC demo
|
||||||
--
|
--
|
||||||
-- Author: Steffen Vogel <post@steffenvogel.de>
|
-- Author: Steffen Vogel <post@steffenvogel.de>
|
||||||
-- SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
|
-- SPDX-FileCopyrightText: 2014-2023 Institute for Automation of Complex Power Systems, RWTH Aachen University
|
||||||
-- SPDX-License-Identifier: Apache-2.0
|
-- SPDX-License-Identifier: Apache-2.0
|
||||||
|
@ -21,51 +21,51 @@
|
||||||
.filename {
|
.filename {
|
||||||
font-size: small !important;
|
font-size: small !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#log {
|
#log {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
#received-container {
|
#received-container {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
height: 300px;
|
height: 300px;
|
||||||
border: 1px solid darkgray;
|
border: 1px solid darkgray;
|
||||||
}
|
}
|
||||||
|
|
||||||
#log-container {
|
#log-container {
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
height: 300px;
|
height: 300px;
|
||||||
border: 1px solid darkgray;
|
border: 1px solid darkgray;
|
||||||
}
|
}
|
||||||
|
|
||||||
.log-warn {
|
.log-warn {
|
||||||
color: orange
|
color: orange
|
||||||
}
|
}
|
||||||
|
|
||||||
.log-error {
|
.log-error {
|
||||||
color: red
|
color: red
|
||||||
}
|
}
|
||||||
|
|
||||||
.log-info {
|
.log-info {
|
||||||
color: darkblue;
|
color: darkblue;
|
||||||
}
|
}
|
||||||
|
|
||||||
.log-log {
|
.log-log {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.log-warn,
|
.log-warn,
|
||||||
.log-error {
|
.log-error {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
.filename {
|
.filename {
|
||||||
background-color: #adadad;
|
background-color: #adadad;
|
||||||
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
||||||
margin-bottom: -8px;
|
margin-bottom: -8px;
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
h3,
|
h3,
|
||||||
h4,
|
h4,
|
||||||
h5 {
|
h5 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue