mil.dod.th.ose.bbb.platform/src/mil/dod/th/ose/bbb/platform/BeagleBoneBlackWakeManager.java
private void handleRtcWakeCommand() throws IOException
    {
        try
        {
            m_BegaleBoneBlackGpioMgr.setGpioState(POWER_STATUS_PIN, GpioState.LOW);
        }
        catch (final IllegalStateException ex)
        {
            m_LogService.warning(ex, "Cannot set wake status GPIO to low.");
        }
        
        final long sleepTime = determineSleepTime();
        final List<String> args = new ArrayList<String>();
        args.add("bash");
        args.add("-c");
        args.add(String.format("rtcwake -d rtc0 -m %s -s %s", m_StandbyMode.toString(), sleepTime));
        final Process process;

        m_LogService.debug(String.format("Executing RTC wake command with standby mode [%s] "
                + "for [%s] seconds...", m_StandbyMode.toString(), sleepTime));
        process = m_ProcessService.createProcess(args);
       
        try
        {
            m_LogService.debug("Waiting for RTC wake command...");
            process.waitFor();
        }
        catch (final InterruptedException ex)
        {
            m_LogService.warning(ex, "Wait for RTC wake interrupted.");
        }
        
        try
        {
            m_BegaleBoneBlackGpioMgr.setGpioState(POWER_STATUS_PIN, GpioState.HIGH);
        }
        catch (final IllegalStateException ex)
        {
            m_LogService.warning(ex, "Cannot set wake status GPIO to high.");
        }
    }
/**
     * Method that handles issuing an RTC wake command.
     * 
     * @throws IOException
     *      Thrown if the RTC wake command cannot be issued or if the power status GPIO cannot be set to high 
     *      or low.
     */
Method that handles issuing an RTC wake command.

@throws IOException
Thrown if the RTC wake command cannot be issued or if the power status GPIO cannot be set to high
or low.
Method that handles issuing an RTC wake command . @throws IOException Thrown if the RTC wake command cannot be issued or if the power status GPIO cannot be set to high or low .
private void handleRtcWakeCommand() throws IOException
    {
        try
        {
            m_BegaleBoneBlackGpioMgr.setGpioState(POWER_STATUS_PIN, GpioState.LOW);
        }
        catch (final IllegalStateException ex)
        {
            m_LogService.warning(ex, "Cannot set wake status GPIO to low.");
        }
        final long sleepTime = determineSleepTime();
        final List<String> args = new ArrayList<String>();
        args.add("bash");
        args.add("-c");
        args.add(String.format("rtcwake -d rtc0 -m %s -s %s", m_StandbyMode.toString(), sleepTime));
        final Process process;
        m_LogService.debug(String.format("Executing RTC wake command with standby mode [%s] "
                + "for [%s] seconds...", m_StandbyMode.toString(), sleepTime));
        process = m_ProcessService.createProcess(args);
        try
        {
            m_LogService.debug("Waiting for RTC wake command...");
            process.waitFor();
        }
        catch (final InterruptedException ex)
        {
            m_LogService.warning(ex, "Wait for RTC wake interrupted.");
        }
        try
        {
            m_BegaleBoneBlackGpioMgr.setGpioState(POWER_STATUS_PIN, GpioState.HIGH);
        }
        catch (final IllegalStateException ex)
        {
            m_LogService.warning(ex, "Cannot set wake status GPIO to high.");
        }
    }
private void handleRtcWakeCommand ( ) throws IOException { try { m_BegaleBoneBlackGpioMgr . setGpioState ( POWER_STATUS_PIN , GpioState . LOW ) ; } catch ( final IllegalStateException ex ) { m_LogService . warning ( ex , "Cannot set wake status GPIO to low." ) ; } final long sleepTime = determineSleepTime ( ) ; final List < String > args = new ArrayList < String > ( ) ; args . add ( "bash" ) ; args . add ( "-c" ) ; args . add ( String . format ( "rtcwake -d rtc0 -m %s -s %s" , m_StandbyMode . toString ( ) , sleepTime ) ) ; final Process process ; m_LogService . debug ( String . format ( "Executing RTC wake command with standby mode [%s] " + "for [%s] seconds..." , m_StandbyMode . toString ( ) , sleepTime ) ) ; process = m_ProcessService . createProcess ( args ) ; try { m_LogService . debug ( "Waiting for RTC wake command..." ) ; process . waitFor ( ) ; } catch ( final InterruptedException ex ) { m_LogService . warning ( ex , "Wait for RTC wake interrupted." ) ; } try { m_BegaleBoneBlackGpioMgr . setGpioState ( POWER_STATUS_PIN , GpioState . HIGH ) ; } catch ( final IllegalStateException ex ) { m_LogService . warning ( ex , "Cannot set wake status GPIO to high." ) ; } }
Method that handles issuing an RTC wake command.
Method that handles issuing an RTC wake command .