Examples of DataPoint


Examples of tcg.scada.sim.iecsim.datastore.DataPoint

  }

  //Set MI data point value (2 Word. Boolean) // TESTED
  public synchronized void SetMIPoint(String pointname, long value)
  {
    DataPoint dp = dsTable_.getDataPoint(pointname);
    if (dp == null) {
      logger_.error("Can not find datapoint " + pointname + " for datastore " + datastore_.getId());
      return;
    }

    try
    {
      dp.setLongValue(value);
    }
    catch (Exception ex)
    {
      //ignore
    }
View Full Code Here

Examples of tcg.scada.sim.iecsim.datastore.DataPoint

  public synchronized void SetAllMIPoints(long value)
  {
    Collection<DataPoint> dpList = dsTable_.getAllMIPoints();
    Iterator<DataPoint> it = dpList.iterator();
   
    DataPoint dp = null;
    while(it.hasNext())
    {
      dp = it.next();
      if (dp == null) continue;
     
      try
      {
        dp.setLongValue(value);
      }
      catch (Exception ex)
      {
        //ignore
      }     
View Full Code Here

Examples of tcg.scada.sim.iecsim.datastore.DataPoint

  }

  //Get MI data point value (2 Word) // TESTED
  public long GetMIPoint(String pointname) throws Exception
  {
    DataPoint dp = dsTable_.getDataPoint(pointname);
    if (dp == null) {
      logger_.error("Can not find datapoint " + pointname + " for datastore " + datastore_.getId());
      return 0;
    }

    return dp.getLongValue();
  }
View Full Code Here

Examples of tcg.scada.sim.iecsim.datastore.DataPoint

  }

  //Set UTC data point value (2 Word. Boolean)
  public synchronized void SetUTCPoint(String pointname)
  {
    DataPoint dp = dsTable_.getDataPoint(pointname);
    if (dp == null) {
      logger_.error("Can not find datapoint " + pointname + " for datastore " + datastore_.getId());
      return;
    }

    //additional validation
    if (dp.getDataPointType() != EDataPointType.TYPE_UTC)
      return;
   
    try
    {
      int value = (int)(new Date().getTime() / 1000);
      dp.setIntValue(value);
    }
    catch (Exception ex)
    {
      //ignore
    }
View Full Code Here

Examples of tcg.scada.sim.iecsim.datastore.DataPoint

    }
  }

  public synchronized void SetUTCPoint(String pointname, Date value)
  {
    DataPoint dp = dsTable_.getDataPoint(pointname);
    if (dp == null)
    {
      logger_.error("Can not find datapoint " + pointname + " for datastore " + datastore_.getId());
      return;
    }
   
    //additional validation
    if (dp.getDataPointType() != EDataPointType.TYPE_UTC)
      return;
   
    try
    {
      int intVal = (int)(value.getTime() / 1000);
      dp.setIntValue(intVal);
    }
    catch (Exception ex)
    {
      //ignore
    }
View Full Code Here

Examples of tcg.scada.sim.iecsim.datastore.DataPoint

  }


  public synchronized void SetUTCPoint(String pointname, String value)
  {
    DataPoint dp = dsTable_.getDataPoint(pointname);
    if (dp == null)
    {
      logger_.error("Can not find datapoint " + pointname + " for datastore " + datastore_.getId());
      return;
    }
   
    //additional validation
    if (dp.getDataPointType() != EDataPointType.TYPE_UTC)
      return;
   
    try
    {
      Date date = sdf_.parse(value);
      int intVal = (int)(date.getTime() / 1000);
      dp.setIntValue(intVal);
    }
    catch (ParseException pe)
    {
      logger_.error("Invalid date string format: " + value +
              ". Must be in '" + sdf_.toString() + "' format.");
View Full Code Here

Examples of tuwien.auto.calimero.datapoint.Datapoint

       
          String ga = (segments.length == 1) ? segments[0].trim() : segments[1].trim();
         
          // create group address and datapoint
          GroupAddress groupAddress = new GroupAddress(ga);
          Datapoint dp;
          if (j != 0 || item.getAcceptedCommandTypes().size() == 0) {
            dp = new StateDP(groupAddress, item.getName(), 0, dptID);
          } else {
            dp = new CommandDP(groupAddress, item.getName(), 0, dptID);
          }
         
          // assign datapoint to configuration item
          if (configItem.mainDataPoint == null) {
            configItem.mainDataPoint = dp;
          }
          if (isReadable) {
            configItem.readableDataPoint = dp;
          }
          if(!configItem.allDataPoints.contains(dp)) {
            configItem.allDataPoints.add(dp);
          } else {
            throw new BindingConfigParseException(
                "Datapoint '"+dp.getDPT() + "' already exists for item '"+item.getName()+"'.");
          }
        }
       
        config.add(configItem);
       
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.