Commit a5ec05f6 authored by Claes Sjofors's avatar Claes Sjofors

Compile on Debian 64

parent 45ea6aef
......@@ -28,6 +28,8 @@ javac (jdk6)
Install the following packages
Mandatory:
make
flex
gcc
......@@ -38,23 +40,20 @@ libasound2-dev
libdb5.1-dev
libdb5.1++-dev
doxygen
libmysql++-dev (optional)
libantlr-dev (version 2.7.7)
java: Download jdk-6u10-linux-i586.bin from java.sun.com. Define the
environment variable jdk to the path where the package is
extracted (e.g. /usr/local) and put $jdk/bin in the PATH.
export jdk=/usr/local/jdk1.6.0_10
export PATH=$PATH:$jdk/bin
libantlr-dev
Optional:
libmysql++-dev
libsqlite3-dev
libusb-1.0-1-dev
librsvg2-dev
openjdk-6-jdk Web interface and java API
libmysql++-dev History database with mysql
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
openPOWERLINK-V1.08.2 Ethernet Powerlink zip-file. Build from sources.
libpcap-dev Ethernet Powerlink
There has to be a valid display when building proview.
......
......@@ -3024,7 +3024,7 @@ static int gdh_JidToPointer( int id, void **p)
static int gdh_JidStore( void *p, pwr_tRefId r, int *id)
{
#if (defined POSIX) && defined HW_X86_64
#if ( defined OS_POSIX) && defined HW_X86_64
sJid *jp;
pwr_tStatus sts;
......
......@@ -104,17 +104,17 @@ public class JopXttApplet extends JopApplet
URL url = this.getCodeBase();
Logg.loggTo = Logg.TO_SCREEN;
Logg.loggPrio = 0;
Logg.logg("JopXttApplet: Före XttTree-skapande", 6);
Logg.logg("JopXttApplet: Before XttTree-creation", 6);
this.xttTree = new XttTree( session, url, this);
this.getContentPane().add(this.xttTree);
this.xttTree.createUserInputs();
Logg.logg("JopXttApplet: XttTree-skapande klart", 6);
Logg.logg("JopXttApplet: XttTree-created", 6);
}
/** Description of the Method */
public void start()
{
Logg.logg("JopXttApplet: start() anropad", 6);
Logg.logg("JopXttApplet: start() called", 6);
this.xttTree.tree.requestFocus();
}
......
......@@ -81,11 +81,11 @@ public class JopXttFrame extends JFrame implements GdhApplIfc
URL url = null;
Logg.loggTo = Logg.TO_SCREEN;
Logg.loggPrio = 0;
Logg.logg("JopXttApplet: Fre XttTree-skapande", 6);
Logg.logg("JopXttApplet: Before XttTree-created", 6);
this.xttTree = new XttTree(this.session, url, this);
this.getContentPane().add(this.xttTree);
this.xttTree.createUserInputs();
Logg.logg("JopXttApplet: XttTree-skapande klart", 6);
Logg.logg("JopXttApplet: XttTree created", 6);
class WindowCatcher extends WindowAdapter
{
......
......@@ -101,7 +101,7 @@ public class Logg
{
Logg.loggTo = Logg.TO_SCREEN;
System.out.println(Logg.loggTo);
Logg.logg("Tjoflöjt", 3);
Logg.logg("Logg test", 3);
}
}
......@@ -156,9 +156,9 @@ public class MhClient extends JApplet
this.setSize(size);
messagePanel.add(labelMessage, BorderLayout.NORTH);
//Logg.logg("MhClient: Fre XttTree-skapande", 6);
//Logg.logg("MhClient: Before XttTree-creation", 6);
this.mhTable = new MhTable(this, false, this.labelMessage);
//Logg.logg("MhClient: mhTable-skapande klart", 6);
//Logg.logg("MhClient: mhTable created", 6);
this.contentPane.add(this.mhTable.splitPane, BorderLayout.CENTER);
}
......
......@@ -157,9 +157,9 @@ public class MhFrame extends JFrame implements GdhApplIfc {
this.setSize(size);
messagePanel.add(labelMessage, BorderLayout.NORTH);
//Logg.logg("MhClient: Fre XttTree-skapande", 6);
//Logg.logg("MhClient: Before XttTree-creation", 6);
this.mhTable = new MhTable(root, false, this.labelMessage);
//Logg.logg("MhClient: mhTable-skapande klart", 6);
//Logg.logg("MhClient: mhTable created", 6);
this.contentPane.add(this.mhTable.splitPane, BorderLayout.CENTER);
}
......
......@@ -94,7 +94,7 @@ public class MhTable extends JPanel
JopLang.transl("Time"),
JopLang.transl("Event Text"),
JopLang.transl("Object")};
//JLabel eventTableLbl = new JLabel("Hndelselista");
Color ALarmColor = new Color(255,100,100); // Color.red;
Color BLarmColor = Color.yellow;
Color CLarmColor = new Color(135,206,235); // Color.blue;
......@@ -346,8 +346,8 @@ public class MhTable extends JPanel
public final Object[] longValues = {"A", Boolean.TRUE,
"10-12-31 12:12:12.98",
"QWERTYUIOPLK_JHGFDSAZXCVBNM__P",
"QWERTYUIOPLK"};
"QWERTYUIOPAAOLK_JHGFDSAZXCVBNM__P",
"QWERTYUIOPAAOLK"};
/**
......@@ -588,8 +588,8 @@ public class MhTable extends JPanel
public final Object[] longValues = {"A", "Acknowledge",
"10-12-31 12:12:12.98",
"QWERTYUIOPLK_JHGFDSAZXCVBNM__POIUYTRQWERTYUIOPL",
"QWERTYUIOPLK"};
"QWERTYUIOPAAOLK_JHGFDSAZXCVBNM__POIUYTRQWERTYUIOPAAOL",
"QWERTYUIOPAAOLK"};
/**
......@@ -848,7 +848,7 @@ public class MhTable extends JPanel
{
out = new ObjectOutputStream( /*new BufferedOutputStream(*/socket.getOutputStream() /*)*/);
out.flush();
//varfr???
// why?
in = new ObjectInputStream( /*new BufferedInputStream(*/socket.getInputStream() /*)*/);
}
catch(IOException e)
......@@ -1015,7 +1015,7 @@ public class MhTable extends JPanel
//}
this.setText("D");
}
//annars mste det vara ett meddelande qqq??
// or this has to be a message qqq??
else
{
//if(isNotReturned)
......@@ -1101,7 +1101,7 @@ public class MhTable extends JPanel
}
this.setText("D");
}
//annars mste det vara ett meddelande qqq??
// or it has to be a message qqq??
else
{
if(setColor)
......
......@@ -172,14 +172,14 @@ public class XttObj extends DynamicObj implements JopDynamic
if( ((obj.flags & Pwr.mAdef_array) > 0) &&
((obj.flags & Pwr.mAdef_class) <= 0) )
{
Logg.logg("XttObj: Hittat array, vad ska jag gra nu?? " + s, 6);
Logg.logg("XttObj: Found array, what to do now?? " + s, 6);
XttArrayAttr arrayAttr = new XttArrayAttr(s);
DefaultMutableTreeNode arrayChildNode = new DefaultMutableTreeNode(arrayAttr);
obj.treeNode.add(arrayChildNode);
}
else if((obj.flags & Pwr.mAdef_class) > 0)
{
Logg.logg("XttObj: Hittat klass, vad ska jag gra nu?? " + this.fullName + " " + obj.name , 1);
Logg.logg("XttObj: Found class, what to do now?? " + this.fullName + " " + obj.name , 1);
// CdhrObjid cdhrObjid = gdh.nameToObjid(this.fullName + obj.name);
// System.out.println("nameToObjid " + cdhrObjid.getSts());
......@@ -206,14 +206,14 @@ public class XttObj extends DynamicObj implements JopDynamic
this.en,
this.fullName + obj.name,
obj.name,
"Tjofljt",
"Test",
cdhrObjid,
cdhrClassId);
*/
// DefaultMutableTreeNode classChildNode = new DefaultMutableTreeNode(classObj);
// obj.treeNode.add(classChildNode);
}
//p grund av bugg i nuvarande proviewversion DataPointer borde vara PRIVATE
// Data pointer should be PRIVATE but id not?
else if(obj.name.compareTo("DataPointer") != 0)
{
refVec.add(s);
......@@ -238,7 +238,7 @@ public class XttObj extends DynamicObj implements JopDynamic
Logg.logg("XttObj: refObjectInfo_Vector(" + s + ") Error ", 1);
}
//p grund av bugg i nuvarande proviewversion DataPointer borde vara PRIVATE
// DataPointer should be PRIVATE but is not?
while(j < attrVector.size() &&
(((XttObjAttr)attrVector.get(j)).name.compareTo("DataPointer") == 0 ||
((((XttObjAttr)attrVector.get(j)).flags & Pwr.mAdef_array) > 0) ||
......@@ -374,7 +374,7 @@ public class XttObj extends DynamicObj implements JopDynamic
}
*/
}
//p grund av bugg i nuvarande proviewversion DataPointer borde vara PRIVATE
// DataPointer should be PRIVATE but is not?
else if(obj.name.compareTo("DataPointer") != 0)
{
Logg.logg(" " + obj.refObj.refid.rix, 6);
......
......@@ -204,7 +204,7 @@ public class XttRefObj extends DynamicObj implements JopDynamic
// this.showableClassName = showableClassName;
if(index < 0)
{
Logg.logg("Fel vid frsk att debugga", 0);
Logg.logg("Error at debug attempt", 0);
return;
}
CdhrObjAttr oa = AttrObj[index];
......@@ -218,7 +218,7 @@ public class XttRefObj extends DynamicObj implements JopDynamic
}
else
{
Logg.logg("Kan ej debugga " + fullname + " cid: " + cid + " p index " + index, 0);
Logg.logg("Can not debug " + fullname + " cid: " + cid + " on index " + index, 0);
}
}
......
......@@ -59,7 +59,7 @@ import jpwr.rt.*;
public class XttTree extends JPanel
{
boolean findFieldEnable = false;
/*Mats frndringar ny boolean fr enterComm tillagd (enterFieldEnable)*/
/* Mats modification */
boolean enterFieldEnable = false;
JPanel userPanel = new JPanel();
BorderLayout borderLayout1 = new BorderLayout();
......@@ -82,9 +82,6 @@ public class XttTree extends JPanel
private DefaultTreeModel treeModel;
private URL url;
//Mats frndringar: popup borttagen
//final JPopupMenu popup = new JPopupMenu();
InputMap inputMap = new InputMap();
ActionMap actionMap = new ActionMap();
JMenuBar menubar = new JMenuBar();
......@@ -107,18 +104,18 @@ public class XttTree extends JPanel
String functions;
String language_EN = "Language";
String language_SW = "Sprk";
String language_SW = "Språk";
String language;
String swedish = "Svenska";
String english = "English";
String openObject_EN = "open object";
String openObject_SW = "ppna objekt";
String openObject_SW = "öppna objekt";
String openObject;
String changeValue_EN = "change value";
String changeValue_SW = "ndra vrde";
String changeValue_SW = "ändra värde";
String changeValue;
String debug_EN = "debug";
......@@ -130,7 +127,7 @@ public class XttTree extends JPanel
String working;
String openPlc_EN = "open PLC";
String openPlc_SW = "ppna PLC";
String openPlc_SW = "öppna PLC";
String openPlc;
String showCross_EN = "show cross";
......@@ -138,9 +135,9 @@ public class XttTree extends JPanel
String showCross;
String find_EN = "find...";
String find_SW = "sk...";
String find_SW = "sök...";
String find;
//Mats frndringar: strngar fr enterComm
// Mats modifications: stings enterComm
String enterComm_EN = "enter command";
String enterComm_SW = "kommandorad";
String enterComm;
......@@ -226,11 +223,11 @@ public class XttTree extends JPanel
tree.addTreeWillExpandListener(new MyTreeWillExpandListener());
tree.addTreeExpansionListener(new MyTreeExpansionListener());
/*---Bygg upp trdet--------------------------------------------------------------*/
/*---Build the tree--------------------------------------------------------------*/
CdhrObjid r = gdh.getRootList();
if(r.evenSts())
{
Logg.logg("XttTree: Kan inte hitta roten avslutar initieringen av trdet", 1);
Logg.logg("XttTree: Can't find the root, stopping the initialization", 1);
return;
}
tNodeRoot = new DefaultMutableTreeNode(createXttObj(r));
......@@ -246,7 +243,7 @@ public class XttTree extends JPanel
{
for(int i = 0; i < v.size(); i++)
{
//String loggStr = new String("XttTree: Brjar bygga root " + rootRow++);
//String loggStr = new String("XttTree: Börjar bygga root " + rootRow++);
//Logg.logg(loggStr, 0);
GdhrGetXttObj gdhr = (GdhrGetXttObj)v.get(i);
......@@ -266,7 +263,7 @@ public class XttTree extends JPanel
}
}
}
/*---slut p bygg upp trdet--------------------------------------------------------*/
/*---End build tree--------------------------------------------------------*/
//make the root invisible(it's just there becasue the JTree component must have exactly 1 root)
//then expand row 0 so we can se the rootlevel in the system
......@@ -285,8 +282,6 @@ public class XttTree extends JPanel
public void actionPerformed(ActionEvent evt)
{
/*Mats frndringar: Omstrukturering av ifsatser + en tillagd ifsats
fr enterFieldEnable*/
if(enterFieldEnable)
{
Logg.logg("XttTree: innan enterCommand:(" + userValue.getText() + ");", 6);
......@@ -336,13 +331,13 @@ public class XttTree extends JPanel
Vector v = this.gdh.getAllXttChildren(obj.objId.objid);
if(!(v instanceof Vector))
{
Logg.logg("XttTree: getAllXttChildren returnerar annat n Vector", 1);
Logg.logg("XttTree: getAllXttChildren returns object that is not a Vector", 1);
return;
}
//anvnds utifall anvndaren angett debug
// Used if the user has specified debug
//Vector<String> ref_vec = new Vector<String>();
Vector ref_vec = new Vector();
//anvnds utifall anvndaren angett debug
// Used if the user has specified debug
//Vector<XttRefObj> o_vec = new Vector<XttRefObj>();
Vector o_vec = new Vector();
......@@ -465,7 +460,7 @@ public class XttTree extends JPanel
tN.removeAllChildren();
Logg.logg("XttTree: Barnen borttagna", 6);
Logg.logg("XttTree: Fre getObjectAttributes", 6);
Logg.logg("XttTree: Less getObjectAttributes", 6);
PwrtObjid pwrobjid = new PwrtObjid(0, 0);
Vector v = (Vector)gdh.getAllClassAttributes(obj.fullName);
......@@ -486,7 +481,7 @@ public class XttTree extends JPanel
*/
if((cdhrobjattr.flags & Pwr.mAdef_class) > 0)
{
Logg.logg("XttTree: Hittat klass, vad ska jag gra nu?? " + obj.fullName + " " + cdhrobjattr.name , 1);
Logg.logg("XttTree: Found class, what to do now?? " + obj.fullName + " " + cdhrobjattr.name , 1);
CdhrObjid cdhrObjid = gdh.classIdToObjid(cdhrobjattr.type);
CdhrAttrRef aref = gdh.nameToAttrRef(obj.fullName + "." + cdhrobjattr.name);
......@@ -537,17 +532,17 @@ public class XttTree extends JPanel
*/
public void changeValue(String valueString)
{
Logg.logg("XttTree: Anvndare vill ndra vrde", 6);
Logg.logg("XttTree: User wants to change value", 6);
TreePath tp = this.tree.getSelectionPath();
//inget objekt r markerat
// No object selected
if(tp == null)
{
Logg.loggToApplet(JopLang.transl("Select an object"));
return;
}
DefaultMutableTreeNode tn = (DefaultMutableTreeNode)(tp.getLastPathComponent());
//inget objekt r markerat
// No object selected
if(tn == null)
{
Logg.loggToApplet(JopLang.transl("Select an object"));
......@@ -569,13 +564,13 @@ public class XttTree extends JPanel
name = obj.fullName;
type = obj.type;
}
//Markerat objekt kan ej ndra vrde
// Nothing to change on selected object
if(name == null)
{
Logg.loggToApplet(JopLang.transl("Unable to change value on selected object"));
return;
}
Logg.logg("XttTree: Anvndren vill ndra vrde p " + name, 6);
Logg.logg("XttTree: The user wants to change value of " + name, 6);
PwrtStatus sts = new PwrtStatus(1);
switch (type)
{
......@@ -652,7 +647,7 @@ public class XttTree extends JPanel
// break;
default:
Logg.logg("XttTree.changeValue: innan setObjectInfo(string, string);", 6);
//qqq borde kolla s att det gick bra
// return status should be checked...
sts = gdh.setObjectInfo(name, valueString);
Logg.logg("efter setObjectInfo(string, string)", 4);
break;
......@@ -665,9 +660,8 @@ public class XttTree extends JPanel
}
/**
* Anropas d en nod, oavsett typ, skall stngas. Kontrollerar om noden r
* expanderad och i s fall stnger d noden. Om noden ej r expanderad s
* stngs frldernoden.
* Called when a node is closed. Checks if the node is expanded and in that case
* closes the node. If the node isn't expanded the parent node is closed.
*/
public void collapseNode()
{
......@@ -678,15 +672,15 @@ public class XttTree extends JPanel
}
TreePath tp = tpc.getParentPath();
//om vi har en nod vars barn r r synliga
// If this is a node with visible children
if(!treeModel.isLeaf(tpc.getLastPathComponent()) && tree.isExpanded(tpc))
{
Logg.logg("XttTree: Frlderkollapsering " + tpc.toString(), 6);
Logg.logg("XttTree: Parenet collapsing " + tpc.toString(), 6);
tree.collapsePath(tpc);
tree.setSelectionPath(tpc);
tree.scrollPathToVisible(tpc);
}
//vi r ej p rootnivn
// We are not on root leve
else if(tp.getPathCount() > 1)
{
tree.collapsePath(tp);
......@@ -696,10 +690,10 @@ public class XttTree extends JPanel
}
/**
* Skapar ett XttObj genom ngra Gdh-anrop
* Creating an XttObj with some Gdh calls.
*
*@param c CdhrObjid fr det objektet som skall skapa XttObj.
*@return Det nya XttObj som skapats
*@param c CdhrObjid for the object that will be created.
*@return The new XttObj
*/
public XttObj createXttObj(CdhrObjid c)
{
......@@ -719,10 +713,10 @@ public class XttTree extends JPanel
}
/**
* Anropas d anvndaren vill gra debug p en hierarki. Stter debug-flaggan
* i XttObj-objektet som r userObject is treePath
* Is called when the user wants to debug an hierarchy. Sets the debug flag in
* the XttObj object that is userObject in treePath.
*
*@param treePath Hierarki som skall "debuggas"
*@param treePath Hierarchy to debug
*/
public void debugNode(TreePath treePath)
{
......@@ -1045,7 +1039,6 @@ public class XttTree extends JPanel
* @param keyStroke A string representing the key-combination that is to be associated with the method
*/
// Mats frndringar: booelan toPopup borttagen.
public void newMethod(String name, Action action, String actionName, /*boolean toPopup,*/ int toMenu, String keyStroke) {
if ( action != null) {
actionMap.put(actionName, action);
......@@ -1074,7 +1067,7 @@ public class XttTree extends JPanel
JMenu languageSel = new JMenu(language);
languageSel.setMnemonic('S');
// Skapa en menylist och lgg till ovan skapade "panes" i denna.
// Create a menu bar and add the created panes to this
menubar.add(file);
menubar.add(edit);
menubar.add(functions);
......@@ -1104,8 +1097,8 @@ public class XttTree extends JPanel
this.tree.setActionMap(actionMap);
// Ordna s att snabbmenyn visas d man klickar i huvudfnstret.
//och s att SHIFT + musklick ger "ppna objekt"
// Manage the fast menu to be shown when you click in the main window.
// Shift Click will give "Open object"
this.tree.addMouseListener(
new MouseAdapter()
{
......@@ -1135,7 +1128,6 @@ public class XttTree extends JPanel
}
if(e.isPopupTrigger())
{
//Mats frndringar: popup borttagen, JopMethodsMenu tillagd.
TreePath tp = tree.getSelectionPath();
if(tp == null) return;
DefaultMutableTreeNode tn = (DefaultMutableTreeNode)(tp.getLastPathComponent());
......@@ -1177,11 +1169,10 @@ public class XttTree extends JPanel
public void mouseReleased(MouseEvent e)
{
// Kontrollera om detta r rtt typ av hndelse fr att visa en snabbmeny
// Check if this is the correct type of event to display a fast menu.
if(e.isPopupTrigger())
{
//Mats frndringar: popup borttagen, JopMethodsMenu tillagd.
TreePath tp = tree.getSelectionPath();
if(tp == null) return;
DefaultMutableTreeNode tn = (DefaultMutableTreeNode)(tp.getLastPathComponent());
......@@ -1207,7 +1198,7 @@ public class XttTree extends JPanel
});
}
// En hjlpmethod fr att skapa menyobjekt.
// A help method to create the menu object
public static JMenuItem menuItem(String label,
Action action,
String keyStroke)
......@@ -1424,7 +1415,7 @@ public class XttTree extends JPanel
Logg.logg("JopXttApplet: find()", 6);
userValue.setText(null);
this.tree.setRequestFocusEnabled(false);
//Mats frndringar: Hantering av om enterFieldEnable =true
if (enterFieldEnable){
enterFieldEnable = false;
this.messagePanel.remove(userCommandLabel);
......@@ -1438,7 +1429,8 @@ public class XttTree extends JPanel
this.userValue.requestFocus();
this.findFieldEnable = true;
}
//Mats frndringar: Ny metod enterComm fr att hantera manuellt inskrivna kommandon.
// Method to handle manual typed commands.
public void enterComm()
{
Logg.loggToApplet(" ");
......@@ -1458,7 +1450,8 @@ public class XttTree extends JPanel
this.userValue.requestFocus();
this.enterFieldEnable = true;
}
//Mats frndringar: ny metod som exekverar kommandot com.
// Execute a comand
public void enterComm(String com){
session.executeCommand(com);
}
......@@ -1491,7 +1484,7 @@ public class XttTree extends JPanel
*/
public void treeExpanded(TreeExpansionEvent e)
{
//pga bugg som jag ej kan lsa fr tillfllet
// fix for bug that I can't solve for the moment
try
{
TreePath tp = e.getPath();
......@@ -1531,8 +1524,7 @@ public class XttTree extends JPanel
{
/**
* Ser till att alla grenar under den kollapserande noden ocks
* kollapseras.
* Collaps all branches below the collapsing node.
*
*@param e Description of the Parameter
*/
......@@ -1573,7 +1565,7 @@ public class XttTree extends JPanel
public void treeWillExpand(TreeExpansionEvent e)
{
Logg.logg("XttTree.treeWillExpand", 7);
//qqq br lggas i en egen metod
// should be in a separate method...
TreePath tp = e.getPath();
if(tree.hasBeenExpanded(tp))
{
......@@ -1615,7 +1607,7 @@ public class XttTree extends JPanel
Vector ret_vec;
//Vector<XttArrayAttr> attr_vec = new Vector<XttArrayAttr>();
Vector attr_vec = new Vector();
//qqq borde lggas i egen trd???
// should be in a separate tree??
for(int j = 0; j < obj.elements; j++)
{
XttArrayAttr arrayAttr = new XttArrayAttr(obj.name + "[" + j + "]", s + "#" + obj.elements + "[" + j + "]", obj.type,
......@@ -1768,7 +1760,7 @@ public class XttTree extends JPanel
{
setIcon(ObjAttrArrayIcon);
}
//qqq ndra flgga s att actual value visas rtt
// Change flag to show actual value correct
else if(((flags & (Pwr.mAdef_rtdbref | Pwr.mAdef_devbodyref)) > 0) || type == Pwr.eType_Objid)
{
setIcon(ObjAttrPointerIcon);
......
......@@ -168,7 +168,7 @@ void setup_io()
);
if ((long)clk_map < 0) {
printf("clk mmap error %d\n", (int)clk_map);
printf("clk mmap error %d\n", (int)((long int)clk_map));
exit (-1);
}
clk = (volatile unsigned *)clk_map;
......@@ -197,7 +197,7 @@ void setup_io()
);
if ((long)gpio_map < 0) {
printf("gpio mmap error %d\n", (int)gpio_map);
printf("gpio mmap error %d\n", (int)((long int)gpio_map));
exit (-1);
}
gpio = (volatile unsigned *)gpio_map;
......@@ -225,7 +225,7 @@ void setup_io()
);
if ((long)pwm_map < 0) {
printf("pwm mmap error %d\n", (int)pwm_map);
printf("pwm mmap error %d\n", (int)((long int)pwm_map));
exit (-1);
}
pwm = (volatile unsigned *)pwm_map;
......@@ -253,7 +253,7 @@ void setup_io()
);
if ((long)spi0_map < 0) {
printf("spi0 mmap error %d\n", (int)spi0_map);
printf("spi0 mmap error %d\n", (int)((long int)spi0_map));
exit (-1);
}
spi0 = (volatile unsigned *)spi0_map;
......@@ -281,7 +281,7 @@ void setup_io()
);
if ((long)uart_map < 0) {
printf("uart mmap error %d\n", (int)uart_map);
printf("uart mmap error %d\n", (int)((long int)uart_map));
exit (-1);
}
uart = (volatile unsigned *)uart_map;
......
......@@ -40,6 +40,7 @@
#include "pwr_basecomponentclasses.h"
#include "pwr_otherioclasses.h"
#include "co_time.h"
#include "co_cdh.h"
#include "rt_io_base.h"
#include "rt_io_card_init.h"
#include "rt_io_card_close.h"
......
......@@ -2214,7 +2214,7 @@ int ItemPnDevice::scan( GsdmlAttrNav *attrnav, void *p)
if ( !first_scan) {
if (old_value == 0) {
GsdmlAttrNav::device_changed_ok( attrnav, (void *)old_value);
GsdmlAttrNav::device_changed_ok( attrnav, (void *)((long int)old_value));
return 1;
}
else {
......@@ -2227,7 +2227,7 @@ int ItemPnDevice::scan( GsdmlAttrNav *attrnav, void *p)
"All configuration data will be lost when changing the device.\n"
"Do you really want to change the device ?",
GsdmlAttrNav::device_changed_ok, GsdmlAttrNav::device_changed_cancel,
(void *)old_value);
(void *)((long int)old_value));
attrnav->device_confirm_active = 1;
return 1;
}
......
......@@ -38,9 +38,9 @@ T_PNAK_RESULT pnak_mask_multiple_objects (unsigned short a1, c
T_PNAK_RESULT pnak_get_exception (unsigned short a1, T_PNAK_EXCEPTION* a2) {return PNAK_OK;}
T_PNAK_RESULT pnak_get_version (unsigned short a1, T_PNAK_VERSIONS* a2) {return PNAK_OK;}
T_PNAK_RESULT pnak_snmp_get_data (unsigned short a1, T_PNAK_OID* a2, void* a3, unsigned long* a4, unsigned long* a5, unsigned char a6, PN_BOOL a7) {return PNAK_OK;}
T_PNAK_RESULT pnak_snmp_check_data (unsigned short a1, T_PNAK_OID* a2, void* a3, unsigned long a4, unsigned long a5, unsigned char a6) {return PNAK_OK;}
T_PNAK_RESULT pnak_snmp_set_data (unsigned short a1, T_PNAK_OID* a2, void* a3, unsigned long a4, unsigned long a5) {return PNAK_OK;}
T_PNAK_RESULT pnak_snmp_get_data (unsigned short a1, T_PNAK_OID* a2, void* a3, unsigned int* a4, unsigned int* a5, unsigned char a6, PN_BOOL a7) {return PNAK_OK;}
T_PNAK_RESULT pnak_snmp_check_data (unsigned short a1, T_PNAK_OID* a2, void* a3, unsigned int a4, unsigned int a5, unsigned char a6) {return PNAK_OK;}
T_PNAK_RESULT pnak_snmp_set_data (unsigned short a1, T_PNAK_OID* a2, void* a3, unsigned int a4, unsigned int a5) {return PNAK_OK;}
/*--- Service interface functions -------------------------------------------*/
......
......@@ -98,9 +98,9 @@ int sev_repair::check()
int fail_cnt = 0;
printf( "-- Number of tables to check: %u\n", m_db->m_items.size());
printf( "-- Number of tables to check: %u\n", (unsigned int)m_db->m_items.size());
for ( unsigned int i = 0; i < m_db->m_items.size(); i++) {
printf( "\n-- Processing %u (%u) %s\n", i, m_db->m_items.size(), m_db->m_items[i].tablename);
printf( "\n-- Processing %u (%u) %s\n", i, (unsigned int)m_db->m_items.size(), m_db->m_items[i].tablename);
m_db->repair_table( &sts, m_db->m_items[i].tablename);
if ( EVEN(sts))
fail_cnt++;
......@@ -144,9 +144,9 @@ int sev_repair::alter_engine()
int fail_cnt = 0;
printf( "-- Number of tables to alter: %u\n", m_db->m_items.size());
printf( "-- Number of tables to alter: %u\n", (unsigned int)m_db->m_items.size());
for ( unsigned int i = 0; i < m_db->m_items.size(); i++) {
printf( "\n-- Processing %u (%u) %s\n", i, m_db->m_items.size(), m_db->m_items[i].tablename);
printf( "\n-- Processing %u (%u) %s\n", i, (unsigned int)m_db->m_items.size(), m_db->m_items[i].tablename);
m_db->alter_engine( &sts, m_db->m_items[i].tablename);
if ( EVEN(sts))
fail_cnt++;
......@@ -164,9 +164,9 @@ int sev_repair::optimize()
int fail_cnt = 0;
printf( "-- Number of tables to optimize: %u\n", m_db->m_items.size());
printf( "-- Number of tables to optimize: %u\n", (unsigned int)m_db->m_items.size());
for ( unsigned int i = 0; i < m_db->m_items.size(); i++) {
printf( "-- Processing %u (%u) %s\n", i, m_db->m_items.size(), m_db->m_items[i].tablename);
printf( "-- Processing %u (%u) %s\n", i, (unsigned int)m_db->m_items.size(), m_db->m_items[i].tablename);
m_db->optimize( &sts, m_db->m_items[i].tablename);
if ( EVEN(sts))
fail_cnt++;
......@@ -208,7 +208,7 @@ void sev_repair::clean()
{
int i;
printf( " \n-- Number of tables to clean: %u\n", m_db->m_items.size());
printf( " \n-- Number of tables to clean: %u\n", (unsigned int)m_db->m_items.size());
for ( i = 0; i < (int)m_db->m_items.size(); i++) {
clean_item( i, 1);
}
......@@ -246,7 +246,7 @@ void sev_repair::clean_item( int idx, int print_idx)
if( m_db->m_items[idx].attrnum > 1 ) {
if ( print_idx)
printf( "-- Processing %d (%u) %s\n", idx, m_db->m_items.size(), m_db->m_items[idx].tablename);
printf( "-- Processing %d (%u) %s\n", idx, (unsigned int)m_db->m_items.size(), m_db->m_items[idx].tablename);
else
printf( "-- Processing %s\n", m_db->m_items[idx].tablename);
m_db->delete_old_objectdata( &m_sts, m_db->m_items[idx].tablename,
......@@ -254,7 +254,7 @@ void sev_repair::clean_item( int idx, int print_idx)
}
else {
if ( print_idx)
printf( "-- Processing %d (%u) %s\n", idx, m_db->m_items.size(), m_db->m_items[idx].tablename);
printf( "-- Processing %d (%u) %s\n", idx, (unsigned int)m_db->m_items.size(), m_db->m_items[idx].tablename);
else
printf( "-- Processing %s\n", m_db->m_items[idx].tablename);
m_db->delete_old_data( &m_sts, m_db->m_items[idx].tablename,
......@@ -270,7 +270,7 @@ int sev_repair::list()
printf( " ");
printf( " %s\n", m_db->m_items[i].oname);
}
printf( "-- Number of tables: %u\n", m_db->m_items.size());
printf( "-- Number of tables: %u\n", (unsigned int)m_db->m_items.size());
return 1;
}
......
......@@ -3240,8 +3240,6 @@ isValidOutunit (
if (op->birthTime.tv_sec != hp->birthTime.tv_sec) {
if ( hp->type == mh_eMsg_OutunitInfo) {
printf( "Outunit restart old x%x qid %d,%d aid %d,%d\n", (unsigned int)op, op->link.qid.nid,op->link.qid.qix,op->link.aid.nid,op->link.aid.aix);
printf( " new x%x qid %d,%d aid %d,%d\n", (unsigned int)hp, hp->qid.nid,hp->qid.qix,aid->nid,aid->aix);
//sendToOutunit(op, mh_eMsg_OutunitClear, 0, NULL, 0);
if ( hp->nix == l.head.nix)
handlerEvent(pwr_eSystemEventTypeEnum_OutunitRestart, hp->nix, 1);
......
......@@ -122,7 +122,7 @@ log_done =
#cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) -I/usr/X11R6/include -I$(jdk)/include -I$(jdk)/include/linux \
`pkg-config --cflags gtk+-2.0` -DPREFIX=\"/usr/local\" -DSYSCONFDIR=\"/etc\" -DDATADIR=\"/usr/share\" -DLIBDIR=\"/usr/lib\" $(cmysql) $(cgtk) $(clibusb)
csetos := $(pwre_conf_cc_define)
cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) $(pwre_conf_incdir) $(pwre_conf_incdirgtk)
cinc := -I$(inc_dir) -I$(einc_dir) -I$(hw_source) -I$(os_source) -I$(co_source) $(pwre_conf_incdir) $(pwre_conf_incdirgtk) $(pwre_conf_incdirgst)
rm := rm
cp := cp
cpflags :=
......
......@@ -283,7 +283,7 @@ let lib_cnt=0
let i=0
hwpl=`eval uname -i`
machine=`eval uname -m`
if [ $machine == "i686" ]; then
if [ $machine == "i686" ] || [ $machine == "x86_64" ]; then
hwpl=$machine
fi
if [ ${machine:0:3} == "arm" ]; then
......@@ -301,6 +301,7 @@ else
hwpl=i386
fi
fi
echo "hwpl $hwpl"
# Bash
if [ "$SHELL" != "/bin/bash" ] && [ "$SHELL" != "/usr/local/bin/bash" ]; then
......@@ -468,8 +469,8 @@ else
pwre_config_check_lib powerlinkcn POWERLINKCN lib powerlinkcn 1 "$epl/buildcn/Examples/X86/Generic/powerlink_user_lib/libpowerlink.a"
pwre_config_check_lib libpcap LIBPCAP lib libpcap 1 "/usr/lib/libpcap.so:/usr/lib/$hwpl-linux-$gnu/libpcap.so"
pwre_config_check_lib librsvg LIBRSVG lib librsvg 1 "/usr/lib/librsvg-2.so:/usr/lib/$hwpl-linux-$gnu/librsvg-2.so"
pwre_config_check_include gst GST 1 "/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gst.h"
pwre_config_check_lib gst GST gst gst 0 "/opt/gstreamer-sdk/lib/libgstreamer-0.10.so"
pwre_config_check_include gst GST 1 "/usr/include/gstreamer-0.10/gst/gst.h:/opt/gstreamer-sdk/include/gstreamer-0.10/gst/gst.h"
pwre_config_check_lib gst GST gst gst 0 "/usr/lib/$hwpl-linux-$gnu/libgstreamer-0.10.so:/opt/gstreamer-sdk/lib/libgstreamer-0.10.so"
if [ $pwre_hw == "hw_arm" ]; then
pwre_config_check_lib libpiface LIBPIFACE lib libpiface 1 "/usr/local/lib/libpiface-1.0.a"
pwre_config_check_include piface PIFACE 1 "/usr/local/include/libpiface-1.0/pfio.h"
......
......@@ -3373,7 +3373,7 @@ GtkWidget *WttGtk::build_submenu( GtkWidget *Parent, int MenuType,
// Pushbutton
W = gtk_menu_item_new_with_label( Items[*idx].Name);
gtk_widget_set_sensitive( W, Items[*idx].Flags.f.Sensitive ? TRUE : FALSE);
g_object_set_data( (GObject *)W, "userdata", (gpointer)*idx);
g_object_set_data( (GObject *)W, "userdata", (gpointer)((long int)*idx));
if ( Callback)
g_signal_connect( W, "activate",
G_CALLBACK(Callback), CallbackData);
......
......@@ -3820,7 +3820,7 @@ int utl_set_object_parameter (
sts = trv_get_objects_hier_class_name( ldhses, hierobjdid, classp, name,
(trv_tBcFunc) utl_set_parameter, ldhses, parameter, valuestr,
(void *)element, utlctx);
(void *)((long int)element), utlctx);
if ( sts != FOE__ABORTSEARCH)
if (EVEN(sts)) return sts;
......@@ -4541,13 +4541,14 @@ pwr_tStatus utl_show_class_classhier (
if ( contents || all )
{
sts = trv_get_class_hier( ldhses, hierobjdid, name, classclass_ptr,
(trv_tBcFunc) utl_print_aref, ldhses, utlctx, (void *)contents, 0, 0);
(trv_tBcFunc) utl_print_aref, ldhses, utlctx,
(void *)((long int)contents), 0, 0);
if ( EVEN (sts)) return sts;
}
else
{
sts = trv_get_class_hier( ldhses, hierobjdid, name, classclass_ptr,
(trv_tBcFunc) utl_print_class, ldhses, utlctx, (void *)full, 0, 0);
(trv_tBcFunc) utl_print_class, ldhses, utlctx, (void *)((long int)full), 0, 0);
if ( EVEN (sts)) return sts;
}
......
......@@ -467,7 +467,7 @@ GtkWidget *XNavGtk::build_menu( GtkWidget *Parent,
// Pushbutton
W = gtk_menu_item_new_with_label( CoWowGtk::translate_utf8(Items[*idx].Name));
gtk_widget_set_sensitive( W, Items[*idx].Flags.f.Sensitive ? TRUE : FALSE);
g_object_set_data( (GObject *)W, "userdata", (gpointer)*idx);
g_object_set_data( (GObject *)W, "userdata", (gpointer)((long int)*idx));
if ( Callback)
g_signal_connect( W, "activate",
G_CALLBACK(Callback), CallbackData);
......
......@@ -61,7 +61,7 @@ class XttCameraControl {
public:
pwr_tURL url;
XttCameraControl( char *x_url) {}
~XttCameraControl() {}
virtual ~XttCameraControl() {}
virtual void zoom_relative( double factor) {}
virtual void zoom_absolute( double factor) {}
virtual void pan_relative( double value) {}
......
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