Hi,
Thanks for the reply. I already went thru that URL but it is for Linux platform it seems. When I try to RUN that tool on from command line in Windows, nothing happens.
Regards,
Girish
Hi,
Thanks for the reply. I already went thru that URL but it is for Linux platform it seems. When I try to RUN that tool on from command line in Windows, nothing happens.
Regards,
Girish
Yes, when i post it here at same instant i remember that was not running as root and now it's ok. Thanks !
you could include any applet via an HTML element which would have the applet tag.
Or did you mean an applet which would present data from mango?
I am just too curious... How can I add applets of my own or done by someone else to show up in mango's graphical view?
I am just too curious... How can I add applets of my own or done by someone else to show up in mango's graphical view?
Ensure that there is no other SNMP Trap service running on the Mango server except Mango SNMP Trap.
You can see this on a Linux system by executing the following command.
netstat -unatp |grep udp
udp 0 0 :::162 :::* 18938/java
There should be a UDP port listening on 162 and should be bound to java
Create a SNMP Data Source
Download TrapGen.exe from http://www.wtcs.org/informant/free_snmp_tools.htm
Create Trap Gen Command and note down the OID (-v .1.3.1.4.1.2854.1.2)
TrapGen.exe -d x.x.x.x -o .1.3.1.4.1.2854 -v .1.3.1.4.1.2854.1.2 INTEGER 20
Note : x.x.x.x ( Mango server IP Address)
Configure a Data Point with a SNMP Trap OID (.1.3.1.4.1.2854.1.2)
Execute the TrapGen command
TrapGen.exe -d x.x.x.x -o .1.3.1.4.1.2854 -v .1.3.1.4.1.2854.1.2 INTEGER 20
Note : Incase if the SNMP OID is not configured as in the trapgen command check the mango log file and you should see a warning like the one below.
/mango/apache-tomcat-6.0.20/logs/mango.log:WARN 2009-10-08 09:31:24,070 (com.serotonin.mango.rt.dataSource.snmp.SnmpDataSourceRT.receivedTrap:236) - Trap not handled: 1.3.1.4.1.2854.2.2 = 200
Ensure that there is no other SNMP Trap service running on the Mango server except Mango SNMP Trap.
You can see this on a Linux system by executing the following command.
netstat -unatp |grep udp
udp 0 0 :::162 :::* 18938/java
There should be a UDP port listening on 162 and should be bound to java
Create a SNMP Data Source
Download TrapGen.exe from http://www.wtcs.org/informant/free_snmp_tools.htm
Create Trap Gen Command and note down the OID (-v .1.3.1.4.1.2854.1.2)
TrapGen.exe -d x.x.x.x -o .1.3.1.4.1.2854 -v .1.3.1.4.1.2854.1.2 INTEGER 20
Note : x.x.x.x ( Mango server IP Address)
Configure a Data Point with a SNMP Trap OID (.1.3.1.4.1.2854.1.2)
Execute the TrapGen command
TrapGen.exe -d x.x.x.x -o .1.3.1.4.1.2854 -v .1.3.1.4.1.2854.1.2 INTEGER 20
Note : Incase if the SNMP OID is not configured as in the trapgen command check the mango log file and you should see a warning like the one below.
/mango/apache-tomcat-6.0.20/logs/mango.log:WARN 2009-10-08 09:31:24,070 (com.serotonin.mango.rt.dataSource.snmp.SnmpDataSourceRT.receivedTrap:236) - Trap not handled: 1.3.1.4.1.2854.2.2 = 200
Hello together
also from my side many thanks for open this project here in sourceforge.net. I downloaded the bacnet4J.jar file too and have seen that the jar file contains only precompiled classes? Is the source code open too? Perhaps I have not enough experience witch java but how can I get the java source?
Many thanks for your help in advance
Oliver
Thanks for posting this library. There was a mention of example code.
I downloaded the jar, but can not find the example code? Where is it, please?
Also, are there going to be Java DOCS?
Thanks again,
-David
Hi!
First of all I'd like to thank you for making your great work public.
I've played aroud with BACnet4J for a while and it makes a quite stable impression.
What I'm missing most is a documentation. However after having a close look at your example code I manged to set up a local device. I've tested it with a commercial BOWS.
By doing this I've encountered some problems:
-Binding BACnet device to a specific IP-Adress: Running the BOWS in a VMWare the device has to bind to the IP-Adress of the virtual network. I extended the LocalDevice and the IpMessageControl-Class in the following way:
LocalDevice
add String ownIP:
private String ownIP = "255.255.255.255";
adding a setter and a getter:
public String setOwnIP (String ownIP){
this.ownIP= ownIP;
}
public String getOwnIP () {
return ownIP;
}
adding initializeOwnIP:
public void initializeOwnIP() throws IOException {
eventHandler.initialize();
messageControl.setOwnIP(ownIP);
messageControl.initializeOwnIP();
}
IPMessageControl:
adding String ownIP:
private String ownIP = "255.255.255.255";
adding setter and getter
public String setOwnIP (String ownIP){
this.ownIP= ownIP;
}
public String getOwnIP () {
return ownIP;
}
adding InitializeOwnIP:
public void initializeOwnIP() throws IOException {
incomingExecutorService = Executors.newCachedThreadPool();
InetAddress IP = InetAddress.getByName(ownIP);
socket = new DatagramSocket(port,IP);
start();
}
-there's a bug in the AddListElementRequest-Class: Members of the list must be unique. There was no check for this condition. I've changed the handle method in the following way:
public AcknowledgementService handle(LocalDevice localDevice, Address from, Network network)
throws BACnetException {
BACnetObject obj = localDevice.getObject(objectIdentifier);
if (obj == null)
throw createException(ErrorClass.property, ErrorCode.writeAccessDenied, new UnsignedInteger(1));
Encodable e;
try {
e = obj.getProperty(propertyIdentifier, propertyArrayIndex);
}
catch (BACnetServiceException ex) {
throw createException(ErrorClass.property, ErrorCode.invalidArrayIndex, new UnsignedInteger(1));
}
if (!(e instanceof SequenceOf<?>))
throw createException(ErrorClass.property, ErrorCode.propertyIsNotAnArray, new UnsignedInteger(1));
SequenceOf<Encodable> propList = (SequenceOf<Encodable>)e;
PropertyValue pv = new PropertyValue(propertyIdentifier, propertyArrayIndex, listOfElements, null);
if (localDevice.getEventHandler().checkAllowPropertyWrite(obj, pv)) {
for (Encodable pr : listOfElements){
boolean isIn = false;
for (Encodable pl : propList) {
if (pl.equals(pr))
isIn = true;
}
if (!isIn)
propList.add(pr);
}
localDevice.getEventHandler().propertyWritten(obj, pv);
}
else
throw createException(ErrorClass.property, ErrorCode.writeAccessDenied, new UnsignedInteger(1));
return null;
}
Any comments about my patches are welcome. Maybe they make it into the distribution :-).
BR
Stefan