Package org.hampelratte.svdrp

Examples of org.hampelratte.svdrp.Response


   * @param cmd
   *            The SVDRP command to send
   * @return The SVDRP response or null, if the Command couldn't be sent
   */
  public Response send(final Command cmd) {
    Response res = null;
    Connection connection=null;
    try {
      logger.trace("New connection");
      connection = new Connection(mIp, mPort, timeout, charset);
      logger.debug("Try to send VDR command: {}", cmd.getCommand());

      res = connection.send(cmd);
      logger.debug("Recived Message from VDR: {}", res.getMessage());
    } catch (Exception e) {
      logger.error("Could not connect to VDR on {}: {}", mIp + ":" + mPort,
          e);
    } finally {
      if (connection != null) {
View Full Code Here


   *
   * @return true if recording is in process otherwise false
   */
  public Boolean isRecording() {
    // get list of timers
    Response response = send(new LSTT());
    Boolean ret = Boolean.FALSE;
    if (response != null && response.getCode()==250 && response.getMessage() != null) {
      List<VDRTimer> timerList = TimerParser.parse(response.getMessage());
      if (timerList != null && !timerList.isEmpty()) {
        // check each timer until found a time which is active and state is recording
        // do not use vdrTimer.isRecording because we need to add
        // enough time (e.g. 6 Minutes) because of wakeup time
        for (VDRTimer vdrTimer : timerList) {
View Full Code Here

TOP

Related Classes of org.hampelratte.svdrp.Response

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.