def main():
    parser = argparse.ArgumentParser(description='Pipeline processing server')
    parser.add_argument("-c", '--cam_server', default="http://0.0.0.0:8888", help="Cam server rest api address.")
    parser.add_argument('-p', '--port', default=8889, help="Server port")
    parser.add_argument('-i', '--interface', default='0.0.0.0', help="Hostname interface to bind to")
    parser.add_argument('-s', '--servers', default="",
                        help="Comma-separated list of servers (if not provided, configuration read from servers.json)")
    parser.add_argument('-t', '--client_timeout', default=config.DEFAULT_SERVER_CLIENT_TIMEOUT, help="Server client timeout in seconds")
    parser.add_argument('-m', '--update_timeout', default=config.DEFAULT_SERVER_INFO_TIMEOUT, help="Timeout for server info updates in seconds")
    parser.add_argument('-b', '--base', default=config.DEFAULT_PIPELINE_CONFIG_FOLDER,
                        help="(Pipeline) Configuration base directory")
    parser.add_argument('-g', '--background_base', default=config.DEFAULT_BACKGROUND_CONFIG_FOLDER)
    parser.add_argument('-l', '--background_files_days_to_live', default=config.DEFAULT_BACKGROUND_FILES_DAYS_TO_LIVE)
    parser.add_argument('-u', '--scripts_base', default=config.DEFAULT_USER_SCRIPT_FOLDER)
    parser.add_argument('-w', '--web_server', default=config.DEFAULT_WEB_SERVER)
    parser.add_argument('-a', '--web_server_args', default="")
    parser.add_argument("--log_level", default=config.DEFAULT_LOGGING_LEVEL,
                        choices=['CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG'],
                        help="Log level to use.")
    arguments = parser.parse_args()

    # Setup the logging level.
    logging.basicConfig(level=arguments.log_level)
    initialize_api_logger(arguments.log_level)
    start_pipeline_manager(arguments.interface, arguments.port, arguments.servers, arguments.base,
                          arguments.background_base, arguments.background_files_days_to_live, arguments.scripts_base,
                          arguments.cam_server, arguments.client_timeout, arguments.update_timeout,
                          arguments.web_server , string_to_dict(arguments.web_server_args))
def main():
    parser = argparse.ArgumentParser(description='Pipeline processing server')
    parser.add_argument("-c",
                        '--cam_server',
                        default="http://0.0.0.0:8888",
                        help="Cam server rest api address.")
    parser.add_argument('-p', '--port', default=8881, help="Server port")
    parser.add_argument('-i',
                        '--interface',
                        default='0.0.0.0',
                        help="Hostname interface to bind to")
    parser.add_argument('-g',
                        '--background_base',
                        default=config.DEFAULT_TEMP_BACKGROUND_CONFIG_FOLDER)
    parser.add_argument('-u',
                        '--scripts_base',
                        default=config.DEFAULT_USER_SCRIPT_FOLDER)
    parser.add_argument(
        '-n',
        '--hostname',
        default=None,
        help="Hostname to use when returning the stream address.")
    parser.add_argument('-w',
                        '--web_server',
                        default=config.DEFAULT_WEB_SERVER)
    parser.add_argument('-a', '--web_server_args', default="")
    parser.add_argument('-x', '--abort_on_error', default=None)
    parser.add_argument('-y', '--abort_on_timeout', default=None)
    parser.add_argument('-q', '--default_queue_size', default=None)
    parser.add_argument('-b', '--default_block', default=None)
    parser.add_argument(
        "--log_level",
        default=config.DEFAULT_LOGGING_LEVEL,
        choices=['CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG'],
        help="Log level to use.")
    arguments = parser.parse_args()

    # Setup the logging level.
    logging.basicConfig(level=arguments.log_level)
    initialize_api_logger(arguments.log_level)
    if arguments.abort_on_error is not None:
        config.ABORT_ON_ERROR = str(arguments.abort_on_error).lower() == "true"
    if arguments.abort_on_timeout is not None:
        config.ABORT_ON_TIMEOUT = not (str(arguments.abort_on_timeout).lower()
                                       == "false")
    if arguments.default_queue_size is not None:
        config.PIPELINE_DEFAULT_QUEUE_SIZE = int(arguments.default_queue_size)
    if arguments.default_block is not None:
        config.PIPELINE_DEFAULT_BLOCK = bool(arguments.default_queue_size)

    start_pipeline_worker(arguments.interface, arguments.port,
                          arguments.background_base, arguments.scripts_base,
                          arguments.cam_server, arguments.hostname, None,
                          arguments.web_server,
                          string_to_dict(arguments.web_server_args))
def main():
    parser = argparse.ArgumentParser(description='Camera proxy server')
    parser.add_argument('-p',
                        '--port',
                        default=8888,
                        help="Camera proxy server port")
    parser.add_argument('-i',
                        '--interface',
                        default='0.0.0.0',
                        help="Hostname interface to bind to")
    parser.add_argument(
        '-s',
        '--servers',
        default="",
        help=
        "Comma-separated list of servers (if not provided, configuration read from servers.json)"
    )
    parser.add_argument('-t',
                        '--client_timeout',
                        default=config.DEFAULT_SERVER_CLIENT_TIMEOUT,
                        help="Server client timeout in seconds")
    parser.add_argument('-m',
                        '--update_timeout',
                        default=config.DEFAULT_SERVER_INFO_TIMEOUT,
                        help="Timeout for server info updates in seconds")
    parser.add_argument('-b',
                        '--base',
                        default=config.DEFAULT_CAMERA_CONFIG_FOLDER,
                        help="(Camera) Configuration base directory")
    parser.add_argument('-u',
                        '--scripts_base',
                        default=config.DEFAULT_USER_SCRIPT_FOLDER)
    parser.add_argument('-w',
                        '--web_server',
                        default=config.DEFAULT_WEB_SERVER)
    parser.add_argument('-a', '--web_server_args', default="")
    parser.add_argument('-e', '--epics_timeout', default=None)
    parser.add_argument(
        "--log_level",
        default=config.DEFAULT_LOGGING_LEVEL,
        choices=['CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG'],
        help="Log level to use.")
    arguments = parser.parse_args()
    # Setup the logging level.
    logging.basicConfig(level=arguments.log_level)
    initialize_api_logger(arguments.log_level)
    if arguments.epics_timeout is not None:
        config.EPICS_TIMEOUT = float(arguments.epics_timeout)
    start_camera_manager(arguments.interface, arguments.port,
                         arguments.servers, arguments.base,
                         arguments.scripts_base, arguments.client_timeout,
                         arguments.update_timeout, arguments.web_server,
                         string_to_dict(arguments.web_server_args))
Ejemplo n.º 4
0
def main():
    parser = argparse.ArgumentParser(description='Camera acquisition server')
    parser.add_argument('-p', '--port', default=8880, help="Server cam_port")
    parser.add_argument('-i',
                        '--interface',
                        default='0.0.0.0',
                        help="Hostname interface to bind to")
    parser.add_argument(
        '-n',
        '--hostname',
        default=None,
        help="Hostname to use when returning the stream address.")
    parser.add_argument('-u',
                        '--scripts_base',
                        default=config.DEFAULT_USER_SCRIPT_FOLDER)
    parser.add_argument('-m', '--mode', default=0)
    parser.add_argument('-w',
                        '--web_server',
                        default=config.DEFAULT_WEB_SERVER)
    parser.add_argument('-a', '--web_server_args', default="")
    parser.add_argument('-e', '--epics_timeout', default=None)
    parser.add_argument('-f', '--ipc_feed_folder', default="/tmp")
    parser.add_argument('-x', '--abort_on_error', default=None)
    parser.add_argument('-q', '--default_queue_size', default=None)
    parser.add_argument(
        "--log_level",
        default=config.DEFAULT_LOGGING_LEVEL,
        choices=['CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG'],
        help="Log level to use.")
    arguments = parser.parse_args()

    # Setup the logging level.
    logging.basicConfig(level=arguments.log_level)
    initialize_api_logger(arguments.log_level)
    if arguments.abort_on_error is not None:
        config.ABORT_ON_ERROR = str(arguments.abort_on_error).lower() == "true"
    if arguments.epics_timeout is not None:
        config.EPICS_TIMEOUT = float(arguments.epics_timeout)
    if arguments.ipc_feed_folder is not None:
        config.IPC_FEEDS_FOLDER = str(arguments.ipc_feed_folder)
    if arguments.default_queue_size is not None:
        config.CAMERA_DEFAULT_QUEUE_SIZE = int(arguments.default_queue_size)
    start_camera_worker(arguments.interface, arguments.port,
                        arguments.scripts_base, arguments.hostname, None,
                        int(arguments.mode), arguments.web_server,
                        string_to_dict(arguments.web_server_args))
Ejemplo n.º 5
0
def main():
    parser = argparse.ArgumentParser(description='Pipeline processing server')
    parser.add_argument("-c",
                        '--cam_server',
                        default="http://0.0.0.0:8898",
                        help="Cam server rest api address.")
    parser.add_argument('-p', '--port', default=8899, help="Server port")
    parser.add_argument('-i',
                        '--interface',
                        default='0.0.0.0',
                        help="Hostname interface to bind to")
    parser.add_argument(
        '-s',
        '--servers',
        default="",
        help=
        "Comma-separated list of servers (if not provided, configuration read from servers.json)"
    )
    parser.add_argument('-b',
                        '--base',
                        default=config.DEFAULT_PIPELINE_CONFIG_FOLDER,
                        help="(Pipeline) Configuration base directory")
    parser.add_argument('-g',
                        '--background_base',
                        default=config.DEFAULT_BACKGROUND_CONFIG_FOLDER)
    parser.add_argument('-w',
                        '--web_server',
                        default=config.DEFAULT_WEB_SERVER)
    parser.add_argument('-a', '--web_server_args', default="")
    parser.add_argument(
        "--log_level",
        default=config.DEFAULT_LOGGING_LEVEL,
        choices=['CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG'],
        help="Log level to use.")
    arguments = parser.parse_args()

    # Setup the logging level.
    logging.basicConfig(level=arguments.log_level)
    initialize_api_logger(arguments.log_level)
    start_pipeline_proxy(arguments.interface, arguments.port,
                         arguments.servers, arguments.base,
                         arguments.background_base, arguments.scripts_base,
                         arguments.cam_server, arguments.web_server,
                         string_to_dict(arguments.web_server_args))
def main():
    parser = argparse.ArgumentParser(description='Camera acquisition server')
    parser.add_argument('-p', '--port', default=8888, help="Server cam_port")
    parser.add_argument('-i',
                        '--interface',
                        default='0.0.0.0',
                        help="Hostname interface to bind to")
    parser.add_argument('-b',
                        '--base',
                        default=config.DEFAULT_CAMERA_CONFIG_FOLDER,
                        help="(Camera) Configuration base directory")
    parser.add_argument('-u',
                        '--scripts_base',
                        default=config.DEFAULT_USER_SCRIPT_FOLDER)
    parser.add_argument(
        '-n',
        '--hostname',
        default=None,
        help="Hostname to use when returning the stream address.")
    parser.add_argument('-m', '--mode', default=0)
    parser.add_argument('-w',
                        '--web_server',
                        default=config.DEFAULT_WEB_SERVER)
    parser.add_argument('-a', '--web_server_args', default="")
    parser.add_argument(
        "--log_level",
        default=config.DEFAULT_LOGGING_LEVEL,
        choices=['CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG'],
        help="Log level to use.")
    arguments = parser.parse_args()

    # Setup the logging level.
    logging.basicConfig(level=arguments.log_level)
    initialize_api_logger(arguments.log_level)
    start_camera_server(arguments.interface, arguments.port, arguments.base,
                        arguments.scripts_base, arguments.hostname, None,
                        int(arguments.mode), arguments.web_server,
                        string_to_dict(arguments.web_server_args))
def main():
    parser = argparse.ArgumentParser(description='Camera proxy server')
    parser.add_argument('-p',
                        '--port',
                        default=8898,
                        help="Camera proxy server port")
    parser.add_argument('-i',
                        '--interface',
                        default='0.0.0.0',
                        help="Hostname interface to bind to")
    parser.add_argument(
        '-s',
        '--servers',
        default="",
        help=
        "Comma-separated list of servers (if not provided, configuration read from servers.json)"
    )
    parser.add_argument('-b',
                        '--base',
                        default=config.DEFAULT_CAMERA_CONFIG_FOLDER,
                        help="(Camera) Configuration base directory")
    parser.add_argument('-w',
                        '--web_server',
                        default=config.DEFAULT_WEB_SERVER)
    parser.add_argument('-a', '--web_server_args', default="")
    parser.add_argument(
        "--log_level",
        default=config.DEFAULT_LOGGING_LEVEL,
        choices=['CRITICAL', 'ERROR', 'WARNING', 'INFO', 'DEBUG'],
        help="Log level to use.")
    arguments = parser.parse_args()
    # Setup the logging level.
    logging.basicConfig(level=arguments.log_level)
    initialize_api_logger(arguments.log_level)
    start_camera_proxy(arguments.interface, arguments.port, arguments.servers,
                       arguments.base, arguments.web_server,
                       string_to_dict(arguments.web_server_args))