Ejemplo n.º 1
0
        private short angleValueTemp = 0;                      //!< Temporary angle that is set to the package

        /// Constructor of the Packager class
        public DataPackager(GlobalDataSet globalDataSet)
        {
            this.globalDataSet   = globalDataSet;
            dataPackage_out      = new byte[this.globalDataSet.MAX_MOTOR_AMOUNT][];
            dataPackage_conc_out = new byte[this.globalDataSet.MAX_MOTOR_AMOUNT * 5];

            // Initialize the packaged data array with default values
            for (int i = 0; i < this.globalDataSet.MAX_MOTOR_AMOUNT; i++)
            {
                dataPackage_out[i] = new byte[5];
                for (int j = 0; j < this.globalDataSet.MAX_DATAPACKAGE_ELEMENTS; j++)
                {
                    dataPackage_out[i][j] = 0;
                }
            }

            for (int j = 0; j < (this.globalDataSet.MAX_MOTOR_AMOUNT * 5); j++)
            {
                dataPackage_conc_out[j] = 0;
            }
        }
Ejemplo n.º 2
0
 public HelperFunctions(GlobalDataSet globalDataSet)
 {
     this.globalDataSet = globalDataSet;
 }