/* JFlexiPix - Java implementation of FlexiPix output library
 *
 * Copyright 2010-2011 Stefan Schuermans <stefan schuermans info>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, version 3 of the License.
 *
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

package org.blinkenarea.JFlexiPix;

/// package global constants
class Constants
{
  // FlexiPix hardware constants
  static int distriMaxCnt = 4096; /**< maximum number of distributors
                                   *   that can be in the system,
                                   *   number of distributor addresses
                                   *   available */
  static int outputMaxCnt =  128; /**< maximum number of outputs per
                                   *   distributor */
  static int pixelMaxCnt  =  128; /**< maximum number of pixels that can
                                   *   be connected to an output of a
                                   *   distributor */

  // MCUF constants
  static byte [] mcufHdr    = {  ///< data of MCUF header
    (byte)0x23, (byte)0x54, (byte)0x26, (byte)0x66,
    (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00,
    (byte)0x00, (byte)0x03, (byte)0x00, (byte)0xFF
  };
  static int mcufOfsOutputs = 5; /**< offset of output count in MCUF data */
  static int mcufOfsPixels  = 7; /**< offset of pixel count in MCUF data */

  // fixed settings constants
  static int destIpBase   = 0x0A465000; /**< base IP address of distributors,
                                         *   i.e. IP address of distributor 0,
                                         *   10.70.80.0 */
  static int destIpStep   = 0x00000001; /**< IP adress step of distributors,
                                         *   i.e. increment of IP address for
                                         *   every distributor address,
                                         *   0.0.0.1 */
  static int destPort     = 2323;       /**< UDP port the distributors
                                         *   listen on */

  // default settings constants
  static byte [] bindIp   = {           /**< default IP to bind to */
    (byte)0, (byte)0, (byte)0, (byte)0
  };
  static int     bindPort = 0;          /**< default port to bind to */
}

