public TraciVariableAction(Connection connection,
                            TraciConstants.Command command,
                            TraciConstants.Variable variableName,
                            string variableValue)  : base(connection)
 {
     try
     {
         _command       = command;
         _variableName  = variableName;
         _variableValue = variableValue;
         SendMessage();
         ProcessResponse();
     }
     catch (Exception ex)
     {
         throw new SumoControllerException("Error whilst initialising Traci Variable Action class", ex);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Class for initialising a Change State message
 /// </summary>
 /// <param name="connection">the Sumo/Traci connection</param>
 /// <param name="command">Traci Command</param>
 /// <param name="variableName">Traci variable command (sub command)</param>
 /// <param name="variableValue">Valueassociated with variable, normally identifier of Sumo object</param>
 /// <param name="dataType">traci data type</param>
 /// <param name="newData">Value to set</param>
 public TraciChangeState(Connection connection,
                         TraciConstants.Command command,
                         TraciConstants.Variable variableName,
                         string variableValue,
                         TraciConstants.DataType dataType,
                         object newData) : base(connection)
 {
     try
     {
         _command       = command;
         _variableName  = variableName;
         _variableValue = variableValue;
         _dataType      = dataType;
         _newData       = newData;
         SendMessage();
     }
     catch (Exception ex)
     {
         throw new SumoControllerException("Error Initialising Traci Change State class", ex);
     }
 }