constants.py
770 Bytes
# -*- coding: utf-8 -*-
""" eddsctrl_server/constants.py """
import os.path as path
from socket import gethostname
APP_NAME = "eDdsControllerServer"
SERVER_PORT = 12345 # Server port
SERVERHOST = gethostname() # Hostname
DDS_DEVICE = 'Ad9912Dev' # DDS device used
DEFAULT_IFREQ = 1000000000.0 # 10^9 maximum
DEFAULT_OFREQ = 400000.0 # 40% of DEFAULT_IFREQ maximum
DEFAULT_PHY = 0 # Between 0 to 360
DEFAULT_AMP = 512 # Between 0 to 1023
PROJECT_PATH = path.expanduser("~") + "/.edds/" # Path to project directory
CFG_SERVER_FILE = PROJECT_PATH + APP_NAME + ".ini" # Server configuration file
LOG_SERVER_FILE = PROJECT_PATH + "eddsserver.log" # Server log file