Skip to content

Latest commit

 

History

History
36 lines (26 loc) · 802 Bytes

README.md

File metadata and controls

36 lines (26 loc) · 802 Bytes

Comm

Library to exchange (RS232, TCP, HTTP, ...) LIS data (ASTM, XML, CVS, ...).

Example

IMessage msg = MessageFactory.getMessage("ASTM");
msg.addRecord(IRecord.Type.HEADER,      new String[]{"NG_LIS", "Host", "P", "1"});
msg.addRecord(IRecord.Type.QUERY,       new String[]{"ALL", null, null, null, "ALL", null, null, "R"});
msg.addRecord(IRecord.Type.TERMINATION, null);

IDriver driver = null;
try {
  driver = DriverFactory.getDriver("rs232", "COM5");
  
  IMessage res = driver.sendMessage(msg);
  
  System.out.println(res);
}
catch(Exception ex) {
  ex.printStackTrace();
}
finally {
  if(driver != null) driver.destroy();
}

Build

  • git clone https://github.com/giosil/comm.git
  • mvn clean install

Contributors