Beispiel #1
0
def micrOS():
    profiling_info(label='[1] MAIN BASELOAD')

    # BOOT HOOKs execution
    safe_boot_hook()
    profiling_info(label='[2] AFTER SAFE BOOT HOOK')

    # NETWORK setup
    auto_network_configuration()
    profiling_info(label='[3] AFTER NETWORK CONFIGURATION')

    # LOAD Singleton SocketServer [1]
    SocketServer()
    profiling_info(label='[4] AFTER SOCKET SERVER CREATION')

    # SET interrupt with timirqcbf from nodeconfig
    interrupt_handler()
    profiling_info(label='[5] AFTER TIMER INTERRUPT SETUP')

    # SET external interrupt with extirqcbf from nodeconfig
    external_interrupt_handler()
    profiling_info(label='[6] AFTER EXTERNAL INTERRUPT SETUP')

    # RUN Singleton SocketServer - main loop [2]
    SocketServer().run()
Beispiel #2
0
def __recovery_mode():
    # Recovery mode (webrepl) - dependencies: Network, ConfigHandler
    from Network import auto_network_configuration
    try:
        from ConfigHandler import cfgget
    except:
        cfgget = None
    # Set up network
    auto_network_configuration()
    # Start webrepl
    import webrepl
    webrepl.start(password='******' if cfgget is None else cfgget('appwd'))
Beispiel #3
0
def __recovery_mode():
    # Recovery/Update mode (webrepl) - dependencies: Network, ConfigHandler
    from Network import auto_network_configuration
    try:
        from ConfigHandler import cfgget
        pwd = cfgget('appwd')
    except:
        pwd = 'ADmin123'  # Default pwd
    # Set up network
    auto_network_configuration()
    # Start webrepl
    import webrepl
    webrepl.start(password=pwd)
Beispiel #4
0
def micrOS():
    profiling_info(label='[memUsage] MAIN LOAD')

    # BOOT HOOKs execution
    safe_boot_hook()

    # SET external interrupt with extirqcbf from nodeconfig
    external_interrupt_handler()

    # NETWORK setup
    auto_network_configuration()

    # LOAD Singleton SocketServer [1]
    SocketServer()

    # SET interrupt with timirqcbf from nodeconfig
    interrupt_handler()
    profiling_info(label='[memUsage] SYSTEM IS UP')

    # RUN Singleton SocketServer - main loop [2]
    SocketServer().run()

    # UNEXPECTED RESTART ???
    errlog_add("Unexpected micrOS restart")
Beispiel #5
0
            "=> [MAIN DEBUG] InterruptHandler.init_eventPIN error: {}".format(
                e))


#################################################################
#                      MAIN FUNCTION CALLS                      #
#################################################################

profiling_info(label='[1] MAIN BASELOAD')

# BOOT HOOKs execution
safe_boot_hook()
profiling_info(label='[2] AFTER SAFE BOOT HOOK')

# NETWORK setup
if auto_network_configuration is not None: auto_network_configuration()
profiling_info(label='[3] AFTER NETWORK CONFIGURATION')

# LOAD Singleton SocketServer [1]
SocketServer()
profiling_info(label='[4] AFTER SOCKET SERVER CREATION')

# SET interrupt with timirqcbf from nodeconfig
interrupt_handler()
profiling_info(label='[5] AFTER TIMER INTERRUPT SETUP')

# SET external interrupt with extirqcbf from nodeconfig
external_interrupt_handler()
profiling_info(label='[6] AFTER EXTERNAL INTERRUPT SETUP')

# RUN Singleton SocketServer - main loop [2]