コード例 #1
0
  /**
   * Sets up the test.
   *
   * @exception Exception An error occurred
   */
  protected final void setUp() throws Exception {
    super.setUp();

    PropertyConfigurator.configure("./target/classes/props/log4j.properties");

    if (SnmpAgent.getInstance() == null) {
      MessageLayer.main(new String[] {});
    }

    readerDevice = ReaderDevice.getInstance();

    rowStatusListener = new EpcgRdPntSrcTableRowStatusListener();

    readPoint =
        AntennaReadPoint.create(
            "EpcgRdPntSrcTableRowStatusListenerTestReadPoint", readerDevice, null);
    source = Source.create("EpcgRdPntSrcTableRowStatusListenerTestSource", readerDevice);
  }
コード例 #2
0
  /**
   * Sets up the test.
   *
   * @exception Exception An error occurred
   */
  protected final void setUp() throws Exception {
    super.setUp();

    PropertyConfigurator.configure("./target/classes/props/log4j.properties");

    if (SnmpAgent.getInstance() == null) {
      MessageLayer.main(new String[] {});
    }

    readerDevice = ReaderDevice.getInstance();

    ReadPoint[] readPoints = readerDevice.getAllReadPoints();
    for (int i = 0; i < readPoints.length; i++) {
      if (readPoints[i] instanceof AntennaReadPoint)
        antReadPoint = (AntennaReadPoint) readPoints[i];
      row =
          SnmpTableRow.getSnmpTableRow(
              new RowObjectContainer(
                  TableTypeEnum.EPCG_ANT_READ_POINT_TABLE, new Object[] {antReadPoint}));
      return;
    }
    fail();
  }