Saturday, July 21, 2007
JAVA test of port 9100
Since I don't know much about JAVA socket programming, I have to google similar codes and try to simplify them.
try
{
Socket socket=new Socket("192.168.1.100",9100);
String line;
PrintWriter os=new PrintWriter(socket.getOutputStream());
line=x get this from a String input x;
os.println(line);
os.flush();
System.out.println("Alarm:"+line);
os.close();
socket.close();
}
catch(Exception e)
{
System.out.println("Error:"+e);
}
Alarm service and BAlarmRecepient are a little complicate to me now. I think I will try BStatusString first. This is hard to go further without offical support or commercial stimulation.
By the way, I accidentally found this interesting BQL:
alarm:bql:select * from openAlarms
try
{
Socket socket=new Socket("192.168.1.100",9100);
String line;
PrintWriter os=new PrintWriter(socket.getOutputStream());
line=x get this from a String input x;
os.println(line);
os.flush();
System.out.println("Alarm:"+line);
os.close();
socket.close();
}
catch(Exception e)
{
System.out.println("Error:"+e);
}
Alarm service and BAlarmRecepient are a little complicate to me now. I think I will try BStatusString first. This is hard to go further without offical support or commercial stimulation.
By the way, I accidentally found this interesting BQL:
alarm:bql:select * from openAlarms