Commit c65141e0 authored by Marcus Nordenberg's avatar Marcus Nordenberg

Merge branch 'master' of /data1/x0-0-0/pwr

parents d652bcfd 9aefeb81
......@@ -36,8 +36,8 @@ g++
libgtk2.0-dev
cpp
libasound2-dev
libdb5.1-dev
libdb5.1++-dev
libdb5.3-dev
libdb5.3++-dev
doxygen
qt4-dev-tools
......@@ -52,8 +52,8 @@ libsqlite3-dev History database with sqlite
libhdf5-openmpi-dev History database with hdf5
libusb-1.0.0-dev USB I/O cards (Velleman)
librsvg2-dev SVG image support in Ge
libgstreamer0.10-dev Network video camera
libgstreamer-plugins-base0.10-dev Network video camera
libgstreamer1.0-dev Network video camera
libgstreamer-plugins-base1.0-dev Network video camera
openPOWERLINK-V1.08.2 Ethernet Powerlink zip-file. Build from sources.
libpcap-dev Ethernet Powerlink
......
......@@ -1975,23 +1975,64 @@ function OpWindMenu() {
console.log( "Menu received", sts, data, result.buttons.length);
var context = document.getElementById("opwindmenu");
var header = document.createElement("H1");
var title = document.createTextNode( result.title);
header.appendChild( title);
context.appendChild( header);
var text = document.createTextNode( result.text);
context.appendChild( text);
context.appendChild( document.createElement( "hr"));
document.getElementById("opwind_title").innerHTML = result.title;
document.getElementById("opwind_text").innerHTML = result.text;
if ( result.enable_login) {
self.user_text = document.createTextNode( self.user + " on " + self.host);
context.appendChild( self.user_text);
context.appendChild( document.createElement( "hr"));
document.getElementById("login_button").addEventListener( "click", function( event) {
if ( document.getElementById("login_frame").style.visibility == 'hidden') {
document.getElementById("login_user").value = "";
document.getElementById("login_passw").value = "";
document.getElementById("login_frame").style.visibility='visible';
document.getElementById("login_frame").style.height='120px';
document.getElementById("login_user").focus();
}
else {
document.getElementById("login_frame").style.visibility='hidden';
document.getElementById("login_frame").style.height='0px';
}
});
document.getElementById("apply_button").addEventListener( "click", function( event) {
var user = document.getElementById("login_user").value;
var passwd = document.getElementById("login_passw").value;
if ( user.trim() == "")
return;
document.getElementById("login_frame").style.visibility='hidden';
document.getElementById("login_frame").style.height='0px';
var c = new JopCrypt();
passwd = c.crypt( "aa", passwd);
self.user = user;
self.gdh.login( user, passwd, self.login_cb, self);
});
document.getElementById("cancel_button").addEventListener( "click", function( event) {
document.getElementById("login_frame").style.visibility='hidden';
document.getElementById("login_frame").style.height='0px';
});
document.getElementById("logout_button").addEventListener( "click", function( event) {
document.getElementById("login_frame").style.visibility='hidden';
document.getElementById("login_frame").style.height='0px';
self.priv = 0;
self.user = "Default";
self.gdh.login( "", "", self.login_cb, self);
});
document.getElementById("login_user").value = "";
document.getElementById("login_passw").value = "";
//document.getElementById("login_frame").setAttribute("style", "visibility:hidden;height:10px";
document.getElementById("login_frame").style.visibility='hidden';
document.getElementById("login_frame").style.height='0px';
}
else {
document.getElementById("login_button").remove();
document.getElementById("login_frame").remove();
}
if ( result.enable_language)
self.add_menu_button( context, "Language");
if ( result.enable_login)
self.add_menu_button( context, "Login");
if ( result.enable_alarmlist)
self.add_menu_button( context, "AlarmList");
if ( result.enable_eventlog)
......@@ -2008,8 +2049,6 @@ function OpWindMenu() {
var button;
for ( var i = 0; i < result.buttons.length; i++) {
console.log( "Child", result.buttons[i].name);
self.add_menu_button( context, result.buttons[i].text);
}
};
......@@ -2019,18 +2058,6 @@ function OpWindMenu() {
if ( self.info.enable_language && text == "Language") {
console.log("Language activated");
}
else if ( self.info.enable_login && text == "Login") {
console.log("Login activated");
var user = prompt( "Username");
var passwd = prompt( "Password");
var c = new JopCrypt();
passwd = c.crypt( "aa", passwd);
console.log( "Login", user, passwd);
self.user = user;
self.gdh.login( user, passwd, self.login_cb, self);
}
else if ( self.info.enable_alarmlist && text == "AlarmList") {
console.log("AlarmList activated");
if ( !(self.is_authorized( Pwr.mAccess_RtRead | Pwr.mAccess_RtWrite |
......@@ -2101,14 +2128,15 @@ function OpWindMenu() {
if ( self.user_text != null)
self.user_text.textContent = self.user + " on " + self.host;
console.log( "sessionStorage set");
console.log( "Login", self.user, "Priv", self.priv);
}
else {
self.priv = 0;
self.user = "none";
console.log("user_text", self.user_text);
sessionStorage.setItem("pwr_privilege", self.priv);
if ( self.user_text != null)
self.user_text.textContent = "None on " + self.host;
console.log( "Login failure", "Priv", self.priv);
}
};
}
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Xtt</title>
<title>Operator Menu</title>
<link rel="stylesheet" type="text/css" href="toolbar.css">
</head>
<body>
<div id="opwindmenu" width="120" height="800"></div>
<div id="opwindmenu" width="120" height="800">
<h1 id="opwind_title"></h1>
<p id="opwind_text"></p>
<hr>
<button id="login_button" type="button" class="leftmenu-button">Login</button>
<div id="login_frame" class="login-frame">
Username<br>
<input id="login_user" name="username" class="login-field" /><br>
Password<br>
<input id="login_passw" name="password" type="password" class="login-field" /><br>
<button id="apply_button" type="button" style="flex-grow:1">Apply</button>
<button id="cancel_button" type="button" style="float:right">Cancel</button><br>
<button id="logout_button" type="button" class="leftmenu-button">Logout</button>
</div>
</div>
<script src=opwind.js></script>
<hr>
<address><a href="mailto:claes@debian86.ssab.com"></a></address>
......
......@@ -52,3 +52,14 @@
.leftmenu-button {
width:100%;
}
.login-frame {
background-color: #ddeeff;
padding: 10px;
display: block;
overflow: hidden;
}
.login-field {
width:100%;
}
......@@ -57,6 +57,7 @@
#include "Epl.h"
#include <errno.h>
#include <math.h>
#include <unistd.h>
#include <rt_pwr_msg.h>
/***************************************************************************/
......
......@@ -51,6 +51,7 @@
#include "Epl.h"
#include <errno.h>
#include <math.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
......
......@@ -785,6 +785,7 @@ static void* mb_connect(void* arg)
continue;
}
}
return NULL;
}
/*----------------------------------------------------------------------------*\
......@@ -800,6 +801,7 @@ static pwr_tStatus IoRackInit(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
pwr_sClass_Modbus_TCP_Server* op;
int i;
unsigned short port;
io_sCard *cardp;
// Ignore SIGPIPE signal
signal(SIGPIPE, signal_callback_handler);
......@@ -818,6 +820,12 @@ static pwr_tStatus IoRackInit(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
if (op->DisableServer)
return IO__SUCCESS;
for ( cardp = rp->cardlist; cardp; cardp = cardp->next)
io_bus_card_area_size( ctx, cardp, &local->inputs_size, &local->outputs_size);
local->inputs = calloc(1, local->inputs_size);
local->outputs = calloc(1, local->output_size);
/* Create socket, store in local struct */
uid_t ruid;
ruid = getuid();
......@@ -892,23 +900,29 @@ static pwr_tStatus mb_init_channels(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
cardp = rp->cardlist;
unsigned int prev_input_area_offset = 0;
unsigned int prev_output_area_offset = 0;
unsigned int input_area_offset = 0;
unsigned int output_area_offset = 0;
unsigned int input_area_chansize = 0;
unsigned int output_area_chansize = 0;
unsigned int card_input_area_offset = 0;
unsigned int card_output_area_offset = 0;
while (cardp) {
while(cardp) {
local_card = calloc(1, sizeof(*local_card));
cardp->Local = local_card;
local_card->input_area
= (void*)&(op->Inputs) + input_area_offset + input_area_chansize;
local_card->output_area
= (void*)&(op->Outputs) + output_area_offset + output_area_chansize;
card_input_area_offset += input_area_offset + input_area_chansize;
card_output_area_offset += output_area_offset + output_area_chansize;
input_area_offset = 0;
output_area_offset = 0;
input_area_chansize = 0;
output_area_chansize = 0;
local_card->input_area = (char *)local->inputs + card_input_area_offset;
local_card->output_area = (char *)local->outputs + card_output_area_offset;
io_bus_card_init(ctx, cardp, &input_area_offset, &input_area_chansize,
io_bus_card_init( ctx, cardp, &input_area_offset, &input_area_chansize,
&output_area_offset, &output_area_chansize,
pwr_eByteOrderingEnum_BigEndian, io_eAlignment_Packed);
......@@ -916,7 +930,7 @@ static pwr_tStatus mb_init_channels(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
chanp = &cardp->chanlist[i];
switch (chanp->ChanClass) {
case pwr_cClass_ChanDi: {
pwr_sClass_ChanDi* chan_di = (pwr_sClass_ChanDi*)chanp->cop;
pwr_sClass_ChanDi *chan_di = (pwr_sClass_ChanDi *) chanp->cop;
if (local_card->di_size == 0)
local_card->di_offset = chanp->offset;
......@@ -926,7 +940,7 @@ static pwr_tStatus mb_init_channels(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
break;
}
case pwr_cClass_ChanDo: {
pwr_sClass_ChanDo* chan_do = (pwr_sClass_ChanDo*)chanp->cop;
pwr_sClass_ChanDo *chan_do = (pwr_sClass_ChanDo *) chanp->cop;
if (local_card->do_size == 0)
local_card->do_offset = chanp->offset;
......@@ -936,13 +950,14 @@ static pwr_tStatus mb_init_channels(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
break;
}
case pwr_cClass_ChanD: {
pwr_sClass_ChanD* chan_d = (pwr_sClass_ChanD*)chanp->cop;
if (chan_d->Type == pwr_eDChanTypeEnum_Di) {
pwr_sClass_ChanD *chan_d = (pwr_sClass_ChanD *) chanp->cop;
if ( chan_d->Type == pwr_eDChanTypeEnum_Di) {
if (local_card->di_size == 0)
local_card->di_offset = chanp->offset;
if (chan_d->Number == 0 || local_card->di_size == 0)
local_card->di_size += GetChanSize(chan_d->Representation);
} else {
}
else {
if (local_card->do_size == 0)
local_card->do_offset = chanp->offset;
if (chan_d->Number == 0 || local_card->do_size == 0)
......@@ -953,19 +968,15 @@ static pwr_tStatus mb_init_channels(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
}
}
local_card->input_size
= input_area_offset + input_area_chansize - prev_input_area_offset;
local_card->output_size
= output_area_offset + output_area_chansize - prev_output_area_offset;
prev_input_area_offset = input_area_offset + input_area_chansize;
prev_output_area_offset = output_area_offset + output_area_chansize;
local_card->input_size = input_area_offset + input_area_chansize;
local_card->output_size = output_area_offset + output_area_chansize;
cardp = cardp->next;
}
local->input_size = input_area_offset + input_area_chansize;
local->output_size = output_area_offset + output_area_chansize;
local->input_size = card_input_area_offset + input_area_offset + input_area_chansize;
local->output_size = card_output_area_offset + output_area_offset + output_area_chansize;
return IO__SUCCESS;
}
......@@ -1040,6 +1051,11 @@ void mb_shift_read(unsigned char* in, unsigned char* out, int sh, int quant)
\*----------------------------------------------------------------------------*/
static pwr_tStatus IoRackRead(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
{
io_sServerLocal *local = rp->Local;
pwr_sClass_Modbus_TCP_Server *op = (pwr_sClass_Modbus_TCP_Server *) rp->op;
/* For display */
memcpy( op->Inputs, local->inputs, MIN(sizeof(op->Inputs), local->inputs_size));
return IO__SUCCESS;
}
......@@ -1048,6 +1064,11 @@ static pwr_tStatus IoRackRead(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
\*----------------------------------------------------------------------------*/
static pwr_tStatus IoRackWrite(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
{
io_sServerLocal *local = rp->Local;
pwr_sClass_Modbus_TCP_Server *op = (pwr_sClass_Modbus_TCP_Server *) rp->op;
/* For display */
memcpy( op->Outputs, local->outputs, MIN(sizeof(op->Outputs), local->outputs_size));
return IO__SUCCESS;
}
......
......@@ -138,6 +138,10 @@ typedef struct {
int output_size;
thread_sMutex mutex;
io_sServerConnection connections[MB_MAX_CONNECTIONS];
void *inputs;
void *outputs;
unsigned int inputs_size;
unsigned int outputs_size;
} io_sServerLocal;
typedef struct {
......
......@@ -152,6 +152,7 @@ static void AddTransports()
tp[tpcount].cpid = -1;
tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++;
......@@ -175,6 +176,7 @@ static void AddTransports()
tp[tpcount].cpid = -1;
tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++;
......@@ -199,6 +201,7 @@ static void AddTransports()
tp[tpcount].cpid = -1;
tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++;
......@@ -223,6 +226,7 @@ static void AddTransports()
tp[tpcount].cpid = -1;
tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++;
......@@ -246,6 +250,7 @@ static void AddTransports()
tp[tpcount].cpid = -1;
tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++;
......@@ -269,6 +274,7 @@ static void AddTransports()
tp[tpcount].cpid = -1;
tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++;
......@@ -296,6 +302,7 @@ static void AddTransports()
tp[tpcount].cpid = -1;
tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++;
......@@ -319,6 +326,7 @@ static void AddTransports()
tp[tpcount].cpid = -1;
tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++;
......@@ -343,6 +351,7 @@ static void AddTransports()
tp[tpcount].cpid = -1;
tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++;
......@@ -367,6 +376,7 @@ static void AddTransports()
tp[tpcount].cpid = -1;
tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++;
......@@ -389,6 +399,7 @@ static void AddTransports()
tp[tpcount].cpid = -1;
tp[tpcount].first = true;
if ( tpcount < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]))
remcfgp->RemNodeObjects[tpcount] = objid;
tpcount++;
......@@ -527,7 +538,7 @@ int main()
errh_SetStatus(0);
exit(1);
}
for (i = 0; i < tpmax; i++)
for (i = 0; i < sizeof(remcfgp->RemNodeObjects)/sizeof(remcfgp->RemNodeObjects[0]); i++)
remcfgp->RemNodeObjects[i] = pwr_cNObjid;
} else {
errh_Info("No RemoteConfig object found, rs_remotehandler will not run");
......
......@@ -2845,7 +2845,7 @@ Volume Remote $ClassVolume 0.0.1.4
! Send messages will not removed from the queue unless an aknowlege is received
! from the receiver.
! For received messages an acknowlege messages is send to the broker.
! If Acknowlege is not sent, messages will be removed from the queue when they are sent.
! If Acknowlege is not set, messages will be removed from the queue when they are sent.
!*/
Object Acknowledge $Attribute 11 23-JAN-2018 17:01:41.00
Body SysBody 01-JAN-1970 01:00:00.00
......
ifndef link_rule_mk
link_rule_mk := 1
ifeq ($(PWRE_CONF_LIBHDF5),1)
ifndef pwre_cxx
ifeq ($(PWRE_CONF_LIBHDF5),1)
ldsev = mpic++
else
else
ldsev = $(ldxx)
endif
else
ldsev = $(pwre_cxx)
endif
link = $(ldsev) $(elinkflags) $(domap) -o $(export_exe) \
......
......@@ -5443,7 +5443,7 @@ representations of volumes:
- wbl, a textfile with extension .wb_load. The classvolumes are stored as wbl, and root and
sub volumes can be dumped in a wbl-file, for example when upgrading, and later reloaded. The
wbl representation is node editable. When editing a class volume you import the wbl
wbl representation is not editable. When editing a class volume you import the wbl
representation to a mem-represention, and then save it as wbl again.
- dbs, a loadfile. From rootvolumes, subvolumes and classvolumes, in db and wbl representation,
......@@ -9706,6 +9706,7 @@ Objects are selected by the name, class and hierarchy qualifiers.
<B> <t>[/noconfirm] [/nolog] [/output] [/noterminal]
/attribute <t>Name of attribute.
/name <t>Name of object.
/value <t>Value to insert in the attribute. If no value is given
<t>a question will be asked for each object.
/class <t>Select object of this class.
......@@ -9714,6 +9715,9 @@ Objects are selected by the name, class and hierarchy qualifiers.
/nolog <t>Operation is not logged to output device.
/output <t>Output file.
/noterminal <t>Operations will not be logged in terminal.
<b>Example
<c>wtt> set attribute /name=H1-Pump /attr=Description /value="Water pump" /noconf
</TOPIC>
<TOPIC> set db <style> function
......
......@@ -3704,7 +3704,7 @@ DigText.LowText <t><t>Text to write when the signal is low.
<topic>GeDynAnalogText <style>function
AnalogText
Shift between several texts depening on the value of an analog signal.
Shift between several texts depending on the value of an analog signal.
The object is connected to a database attribute of type float or int. To each text you specify
an Enum value. The text which Enum value matches the value of the database attribute, is
......
......@@ -9600,6 +9600,9 @@ Objekt v
/nolog <t>Operationen loggas inte.
/output <t>Ut fil.
/noterminal <t>Operationen loggas inte i terminal fönster.
<b>Exempel
<c>wtt> set attribute /name=H1-Pump /attr=Description /value="Water pump" /noconf
</TOPIC>
<TOPIC> set db <style> function
......
......@@ -1080,7 +1080,7 @@ SERVER_BASED_SEARCH = NO
# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
# generate Latex output.
GENERATE_LATEX = YES
GENERATE_LATEX = NO
# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
......
......@@ -63,6 +63,7 @@ int CnvClassDep::read()
int currentidx = 0;
sprintf(fname, "$pwre_broot/$pwre_target/bld/wbl/*.cdp");
str_ToLower(fname, fname);
// dcli_translate_filename( fname, fname);
// Create root;
......
......@@ -96,7 +96,7 @@ int cnv_get_image(char* fname, cnv_tImImage* image, cnv_tPixmap* pixmap)
void cnv_free_image(cnv_tImImage image, cnv_tPixmap pixmap)
{
#if defined PWRE_CONF_GTK
gdk_pixbuf_unref((GdkPixbuf*)image);
g_object_unref((GdkPixbuf*)image);
#elif defined PWRE_IMLIB
......
......@@ -63,6 +63,7 @@ int CnvWblToPs::init(char* first)
} else {
strcat(fname, ".ps");
}
str_ToLower(fname, fname);
if (ctx->generate_pdf) {
tops->set_filename(ps_eFile_Body, fname);
......
......@@ -103,6 +103,7 @@ int CnvWblToXtthelp::init(char* first)
strcpy(fname, ctx->dir);
strcat(fname, ctx->rw->volume_name);
strcat(fname, "_xtthelp.dat");
str_ToLower(fname, fname);
fp_xtthelp_index.open(fname);
......
......@@ -173,10 +173,7 @@ void* CnvXtthelpToHtml::insert(navh_eItemType item_type, const char* text1,
} else {
subject_to_fname(fname, link, 0);
if (!streq(link_bookmark, "")) {
strcat(fname, "#");
strcat(fname, link_bookmark);
} else if (file_name && !streq(file_name, "")) {
if (file_name && !streq(file_name, "")) {
char* s = (char*)strrchr(file_name, '/');
if (s)
strcpy(fname, s + 1);
......@@ -189,6 +186,10 @@ void* CnvXtthelpToHtml::insert(navh_eItemType item_type, const char* text1,
strcat(fname, link);
strcat(fname, ".html");
}
if (!streq(link_bookmark, "")) {
strcat(fname, "#");
strcat(fname, link_bookmark);
}
}
if (!in_table)
fp << "<A HREF=\"" << fname << "\">";
......@@ -259,6 +260,19 @@ void* CnvXtthelpToHtml::insert(navh_eItemType item_type, const char* text1,
strcpy(fname, link);
} else {
subject_to_fname(fname, link, 0);
if (file_name && !streq(file_name, "")) {
char* s = (char*)strrchr(file_name, '/');
if (s)
strcpy(fname, s + 1);
else
strcpy(fname, file_name);
s = strchr(fname, '.');
if (s)
*s = 0;
strcat(fname, "_");
strcat(fname, link);
strcat(fname, ".html");
}
if (!streq(link_bookmark, "")) {
strcat(fname, "#");
strcat(fname, link_bookmark);
......
......@@ -1084,7 +1084,7 @@ static sBlock* blockListAlloc()
bl = ll->next;
LstRemove(bl);
--l.emon->FreeCount;
return LstEntry(bl, sBlock, block_l);
return LstEntry(bl, sBlock, link.active_l);
}
static void blockListFree(sBlock* bp)
......@@ -2587,7 +2587,7 @@ static sApplActive* handlerListAlloc(pwr_eSystemEventTypeEnum event)
--l.emon->AlarmMaxCount;
l.handlerListCount++;
return LstEntry(hl, sApplActive, active_l);
return LstEntry(hl, sApplActive, link.active_l);
}
static void handlerListFree(sApplActive* hp)
......
......@@ -929,6 +929,7 @@ static void* import_thread()
que_Put(NULL, &sp->lp->q_in, &sp->c.le, sp);
sp = iseg_alloc();
}
return NULL;
}
static void ini_link_info(qdb_sLinkInfo* lp)
......
......@@ -1161,6 +1161,7 @@ static void* import_thread()
que_Put(NULL, &sp->lp->q_in, &sp->c.le, sp);
sp = iseg_alloc();
}
return NULL;
}
static void ini_link_info(qdb_sLinkInfo* lp)
......
......@@ -62,7 +62,7 @@ then
cinc="-I$pwr_inc -I$pwrp_rttbld"
cflags="-DOS_LINUX -DOS=linux -DHW_ARM=1 -DPOSIX_SOURCE -DWall"
${cc} -c -o $pwrp_obj/${name}.o $pwrp_rttbld/${name}.c ${cinc} ${cflags}
ar rc ${ar_name_pict} $pwrp_obj/${name}.o
ar rcU ${ar_name_pict} $pwrp_obj/${name}.o
else
# echo "Is rttsys"
ar_name_pict=${pwr_lib}/libpwr_dtt.a
......@@ -78,7 +78,7 @@ then
cflags="-DOS_LINUX -DOS=linux -DHW_ARM=1 -DPOSIX_SOURCE -DWall"
${cc} -c -o ${bld_dir}/${name}.o \
${bld_dir}/${name}.c ${cinc} ${cflags}
ar rc ${ar_name_pict} ${bld_dir}/${name}.o
ar rcU ${ar_name_pict} ${bld_dir}/${name}.o
fi
else
echo "Opsys ($opsys) is not linux, not yet supported"
......
......@@ -210,7 +210,14 @@ reload_classvolumes()
fi
if [ "$volume" != "" ]; then
echo "-- Creating structfile and loadfile for $volume"
if co_convert -sv -d $pwrp_inc $file
if co_convert -so -d $pwrp_inc $file
then
reload_status=$reload__success
else
reload_status=$reload__userclasses
return
fi
if co_convert -po -d $pwrp_inc $file
then
reload_status=$reload__success
else
......
......@@ -132,7 +132,14 @@ reload_classvolumes()
fi
if [ "$volume" != "" ]; then
echo "-- Creating structfile and loadfile for $volume"
if co_convert -sv -d $pwrp_inc $file
if co_convert -so -d $pwrp_inc $file
then
reload_status=$reload__success
else
reload_status=$reload__userclasses
return
fi
if co_convert -po -d $pwrp_inc $file
then
reload_status=$reload__success
else
......
......@@ -46,11 +46,14 @@ array_tCtx array_New(int elemsize, int alloc_incr)
if (!arr)
return NULL;
arr->data = calloc(1, elemsize * alloc_incr);
if (!arr->data)
if (!arr->data) {
free(arr);
return NULL;
}
arr->elemsize = elemsize;
arr->alloc_incr = alloc_incr;
arr->capacity = alloc_incr;
arr->size = 0;
return arr;
}
......@@ -68,11 +71,12 @@ int array_Push(array_tCtx arr, void* elem)
int array_Concat(array_tCtx arr, void* elems, int number)
{
if (arr->capacity <= arr->size + number - 1) {
void* a_tmp = realloc(arr->data, arr->elemsize * MAX(arr->capacity + arr->alloc_incr, arr->size + number));
int newCapacity = MAX(arr->capacity + arr->alloc_incr, arr->size + number);
void* a_tmp = realloc(arr->data, arr->elemsize * newCapacity);
if (!a_tmp)
return 0;
arr->data = a_tmp;
arr->capacity = number;
arr->capacity = newCapacity;
}
memcpy((char*)arr->data + arr->size * arr->elemsize, elems,
arr->elemsize * number);
......
......@@ -43,7 +43,7 @@
/* 1 redcom connect */
/* 2 redcom tables */
/* 4 alarms and events */
unsigned int tmlog = 1;
unsigned int tmlog = 0;
void tm_log(unsigned int level, const char* func, const char* str)
{
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -312,4 +312,5 @@ static void* log_thread(void* arg)
}
}
}
return NULL;
}
......@@ -505,6 +505,72 @@ pwr_tStatus io_bus_card_init(io_tCtx ctx, io_sCard* cp,
return IO__SUCCESS;
}
/*----------------------------------------------------------------------------*\
Get channel area size for a bus card.
\*----------------------------------------------------------------------------*/
void io_bus_card_area_size( io_tCtx ctx,
io_sCard *cp,
unsigned int *input_area_size,
unsigned int *output_area_size)
{
int i;
for ( i = 0; i < cp->ChanListSize; i++) {
io_sChannel *chanp = &cp->chanlist[i];
switch (chanp->ChanClass) {
case pwr_cClass_ChanDi:
if ( ((pwr_sClass_ChanDi *)chanp->cop)->Number == 0)
*input_area_size += GetChanSize( ((pwr_sClass_ChanDi *)chanp->cop)->Representation);
break;
case pwr_cClass_ChanAi:
*input_area_size += GetChanSize(((pwr_sClass_ChanAi *)chanp->cop)->Representation);
break;
case pwr_cClass_ChanAit:
*input_area_size += GetChanSize(((pwr_sClass_ChanAit *)chanp->cop)->Representation);
break;
case pwr_cClass_ChanIi:
*input_area_size += GetChanSize(((pwr_sClass_ChanIi *)chanp->cop)->Representation);
break;
case pwr_cClass_ChanBi:
*input_area_size += ((pwr_sClass_ChanBi *)chanp->cop)->Size;
break;
case pwr_cClass_ChanBo:
*output_area_size += ((pwr_sClass_ChanBo *)chanp->cop)->Size;
break;
case pwr_cClass_ChanBiBlob:
*input_area_size += ((pwr_sClass_ChanBiBlob *)chanp->cop)->Size;
break;
case pwr_cClass_ChanBoBlob:
*output_area_size += ((pwr_sClass_ChanBoBlob *)chanp->cop)->Size;
break;
case pwr_cClass_ChanDo:
if (((pwr_sClass_ChanDo *)chanp->cop)->Number == 0)
*output_area_size += GetChanSize( ((pwr_sClass_ChanDo *)chanp->cop)->Representation);
break;
case pwr_cClass_ChanAo:
*output_area_size += GetChanSize(((pwr_sClass_ChanAo *)chanp->cop)->Representation);
break;
case pwr_cClass_ChanIo:
*output_area_size += GetChanSize(((pwr_sClass_ChanIo *)chanp->cop)->Representation);
break;
case pwr_cClass_ChanD: {
pwr_sClass_ChanD *chan_d = (pwr_sClass_ChanD *) chanp->cop;
if ( chan_d->Type == pwr_eDChanTypeEnum_Di) {
if (chan_d->Number == 0)
*input_area_size += GetChanSize( chan_d->Representation);
}
else {
if (chan_d->Number == 0)
*output_area_size += GetChanSize( chan_d->Representation);
}
break;
}
}
}
}
/*----------------------------------------------------------------------------*\
Read method for bus-card
\*----------------------------------------------------------------------------*/
......
......@@ -77,6 +77,11 @@ pwr_tStatus io_bus_card_init(io_tCtx ctx, io_sCard* cp,
unsigned int* output_area_offset, unsigned int* output_area_chansize,
pwr_tByteOrderingEnum byte_order, io_eAlignment alignment);
void io_bus_card_area_size( io_tCtx ctx,
io_sCard *cp,
unsigned int *input_area_size,
unsigned int *output_area_size);
void io_bus_card_read(io_tCtx ctx, io_sRack* rp, io_sCard* cp, void* input_area,
void* diag_area, pwr_tByteOrderingEnum byte_order,
pwr_tFloatRepEnum float_rep);
......
......@@ -167,10 +167,8 @@ void rt_pvd_udb::load_systemgroup(SystemList* systemgroup)
strcpy(item.name, sname);
gu->get_system_data(sname, &body->Attributes, &item.oix, body->Description);
item.oix++;
item.oix = next_oix++;
if (next_oix <= item.oix)
next_oix = item.oix + 1;
item.cid = pwr_cClass_SystemGroupReg;
item.fthoix = menu_stack[menu_cnt - 1];
item.bwsoix = m_list[item.fthoix].lchoix;
......@@ -211,10 +209,7 @@ void rt_pvd_udb::load_user(UserList* user, SystemList* sg)
body = (pwr_sClass_UserReg*)calloc(1, sizeof(pwr_sClass_UserReg));
user->get_data(body->Password, &body->Privileges, &item.oix, body->FullName,
body->Description, body->Email, body->Phone, body->Sms);
item.oix++;
if (next_oix <= item.oix)
next_oix = item.oix + 1;
item.oix = next_oix++;
item.cid = pwr_cClass_UserReg;
item.fthoix = menu_stack[menu_cnt - 1];
......
......@@ -22,6 +22,7 @@ lis_dir := $(module_root)/lis
kit_dir := $(module_root)/kit
src_dir := $(module_root)/src
load_dir := $(module_root)/load
web_dir := $(module_root)/web
doc_dir := $(release_root)/exp/doc
elib_dir := $(release_root)/exp/lib
......
This diff is collapsed.
This diff is collapsed.
src/tools/pkg/deb/adm/proview_icon.png

2.91 KB | W: | H:

src/tools/pkg/deb/adm/proview_icon.png

5.86 KB | W: | H:

src/tools/pkg/deb/adm/proview_icon.png
src/tools/pkg/deb/adm/proview_icon.png
src/tools/pkg/deb/adm/proview_icon.png
src/tools/pkg/deb/adm/proview_icon.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Proview V5.1.0 (5.1.0-1)
\ No newline at end of file
Proview. See also normal changelog file.
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
src/tools/pkg/ubu/adm/proview_icon.png

2.91 KB | W: | H:

src/tools/pkg/ubu/adm/proview_icon.png

5.86 KB | W: | H:

src/tools/pkg/ubu/adm/proview_icon.png
src/tools/pkg/ubu/adm/proview_icon.png
src/tools/pkg/ubu/adm/proview_icon.png
src/tools/pkg/ubu/adm/proview_icon.png
  • 2-up
  • Swipe
  • Onion skin
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment