Esempio n. 1
0
import sys
import os
from command.server import handler
from command.server import epoll_server
from ee.common import logger
from ee.common import utility
from ee.common import daemon

if __name__ == "__main__":
    utility.register_signal_handle()
    # set daemon 
    cmd_daemon = daemon.Daemon("cmd")
    cmd_daemon.start()
    
    logger.init("cmd.log")
    logger.setLevel('WARNING')#WARNING
   
    arg_len = len(sys.argv)
    for i in range(1, arg_len):
        epoll_server.create_srv(sys.argv[i])
    if arg_len > 1:
        handler.handle_init()
        epoll_server.run_server()
    os._exit(0)    
Esempio n. 2
0
    },
    "frequency": {
        "path": "AXI4_Signal_Meter_0",
        "id": "bp",
        "ipcore": "Axi4SignalMeter",
        "samplerate": "100000000Hz"
    },
    "adc": {
        "partno": "AD7608",
        "path": "AXI4_AD760x_0",
        "id": "bp",
        "ipcore": "axi4_ad760x"
    },
}


def init():
    config_file = open('sepyd.json')
    data = json.load(config_file)
    os.environ['ARM_BOARD_IP'] = data['ArmBoardIP']


if __name__ == "__main__":
    logger.init("debug.log")
    logger.setLevel('debug')
    init()

    #此处调用调试代码
device = SE2625BP01PC(profile)
device.adc7608_read('-v', 'nor', 'A', '10V', 1)
Esempio n. 3
0
import sys
import os
from command.server import handler
from command.server import epoll_server
from ee.common import logger
from ee.common import utility
from ee.common import daemon

channel_path = "/opt/seeing/dut_firmware/ch20"

if __name__ == "__main__":
    if (os.path.isdir(channel_path)) == False:
        os.mkdir(channel_path)
    
    utility.register_signal_handle()
    # set daemon 
    cmd_daemon = daemon.Daemon("fwdl20")
    cmd_daemon.start()
    
    logger.init("fwdl20.log")
    logger.setLevel('INFO')
    
    arg_len = len(sys.argv)
    for i in range(1, arg_len):
        epoll_server.create_srv(sys.argv[i])
    if arg_len > 1:
        handler.handle_init()
        epoll_server.run_server()
    os._exit(0)
Esempio n. 4
0
import sys
import os
from command.server import handler
from command.server import epoll_server
from ee.common import logger
from ee.common import utility
from ee.common import daemon

# channel_path = "/opt/seeing/log"

if __name__ == "__main__":
    #     if (os.path.isdir(channel_path)) == False:
    #         os.mkdir(channel_path)

    utility.register_signal_handle()
    # set daemon
    cmd_daemon = daemon.Daemon("cmd2")
    cmd_daemon.start()

    logger.init("cmd2.log")
    logger.setLevel('WARNING')

    arg_len = len(sys.argv)
    for i in range(1, arg_len):
        epoll_server.create_srv(sys.argv[i])
    if arg_len > 1:
        handler.handle_init()
        epoll_server.run_server()
    os._exit(0)