Ejemplo n.º 1
0
        private List<SubStrategy> _subStrategies = null; // Toutes les sous stratégies

        #endregion Fields

        #region Constructors

        // Public ---------------------------------------------------------------------------------
        public Strategy(String strategyName)
        {
            // Si le nom est non nul, on ajoute ce nom à la stratégie
            if (strategyName != null)
                _strategyName = strategyName;

            // Creation du premier objet pour la partie décisionnelle
            _subStrategies = new List<SubStrategy>();
            _subStrategies.Add(new SubStrategy(PrivateConst.mainStrategyName, 0));

            // Creation de la position du robot initial
            _initialPos = new RobotAction(0);
            _initialPos.cmdType = EnumCmdType.CmdType_Blocking;             // Blocking Action
            _initialPos.cmd = EnumCmd.App_SetNewPos;                        // Defines the first robot position
            _initialPos.param2 = "1500";                                    // X
            _initialPos.param3 = "1000";                                    // Y
            _initialPos.param4 = "0";                                       // Angle
            _initialPos.activeSensors.DesactivateAllSensors();              // Do not use bumpers

            // Creation de la vitesse par défaut
            _defaultSpeed = 50;
            _defaultPivotSpeed = 50;

            _debugTool = new DebugTool(DebugTool.EDebugToolType.Console);
        }
Ejemplo n.º 2
0
        private List<String> _fileContents; // Permet de stocker le contenu du fichier

        #endregion Fields

        #region Constructors

        // Constructeur ---------------------------------------------------------------------------
        ///<summary>
        /// Initialisation d'un objet vide
        ///</summary>
        public TextFile()
        {
            // Clear current content
            _fileContents = null;
            _currentFileName = null;
            _debugTool = new DebugTool(DebugTool.EDebugToolType.Disabled);
        }
Ejemplo n.º 3
0
 public StructuredFile(String patternFileName)
 {
     _debugTool = new DebugTool(DebugTool.EDebugToolType.Disabled);
     _group = null;
     _patternFile = new TextFile();
     if (_patternFile.Load(patternFileName) <= 0)
     {
         _debugTool.WriteLine("StructuredFile = Invalid patternFile");
         _patternFile = null;
     }
 }
Ejemplo n.º 4
0
        private TextFile _patternFile = null; // Fichier texte contenant le pattern du fichier utilisé

        #endregion Fields

        #region Constructors

        // Constructor ----------------------------------------------------------------------------
        public StructuredFile()
        {
            _patternFile = null;
            _group = null;
            _debugTool = new DebugTool(DebugTool.EDebugToolType.Disabled);
        }