Battery Control Software

This question is answered

Hello all,

I am working with the terminal EP10 and am trying to control the option that is within the POWER that says "Turn off screen device if Not Used for" by software. I have reviewed the SDK but I have not found any option to help me do it.

Does anyone know how?,    I'm using the SDK 5.3.


Verified Answer
  • Hello,

    I do not have an example but below is the function to call if the SDK for the suspend timeout.

    static void PsionTeklogix::Power::PowerManagement::SetSuspendTimeout  ( string  PowerSource,  

     int  timeout  

    )   [inline, static]

    Sets the suspend timeout.

    The suspend timeout is used to determine how long the Psion Teklogix device should wait, after going into the system idle state, before it should place the device into the suspend (in order to conserve battery life). When the user wakes the device up (by pressing the 'On' button, etc.), the device will go back into the normal 'on' state, and turn the backlight, the display, and all peripheral devices back on. Any user activity before the device goes into the system idle timeout state will reset the suspend, system idle and user idle timers. File system activity and some network and radio operations will also cause system activity timer to be reset, preventing the terminal from going to suspend.

    The suspend timeout value only needs to be set here once. The suspend timer will be started the moment there is no system activity (after going into the system idle state), and will be reset when any user activity is seen. Changes to the suspend timeout take effect immediately.

    Parameters:

    PowerSource  The name of the power source to set the suspend timeout for. Must be one of the values returned by the EnumeratePowerSources method.

    timeout  The amount of time wait before going into the suspend state (in seconds).

    Exceptions:

    ArgumentException  Thrown when specified PowerSource is invalid.

    ApplicationException  Thrown on devices that do not allow configuration of the suspend timeout.

All Replies
  • Hello,

    I do not have an example but below is the function to call if the SDK for the suspend timeout.

    static void PsionTeklogix::Power::PowerManagement::SetSuspendTimeout  ( string  PowerSource,  

     int  timeout  

    )   [inline, static]

    Sets the suspend timeout.

    The suspend timeout is used to determine how long the Psion Teklogix device should wait, after going into the system idle state, before it should place the device into the suspend (in order to conserve battery life). When the user wakes the device up (by pressing the 'On' button, etc.), the device will go back into the normal 'on' state, and turn the backlight, the display, and all peripheral devices back on. Any user activity before the device goes into the system idle timeout state will reset the suspend, system idle and user idle timers. File system activity and some network and radio operations will also cause system activity timer to be reset, preventing the terminal from going to suspend.

    The suspend timeout value only needs to be set here once. The suspend timer will be started the moment there is no system activity (after going into the system idle state), and will be reset when any user activity is seen. Changes to the suspend timeout take effect immediately.

    Parameters:

    PowerSource  The name of the power source to set the suspend timeout for. Must be one of the values returned by the EnumeratePowerSources method.

    timeout  The amount of time wait before going into the suspend state (in seconds).

    Exceptions:

    ArgumentException  Thrown when specified PowerSource is invalid.

    ApplicationException  Thrown on devices that do not allow configuration of the suspend timeout.

  • I did some testing with this comado and exactly what I need, I have only put the value of the timeout parameter to zero and the terminal is no longer the automatic suspension

    Thanks, was helpful

    This is the code i use:

    Private bat2 As PsionTeklogix.Power.PowerManagement

    Public Sub AutoSuspendOff()

           bat2 = New PsionTeklogix.Power.PowerManagement

           Dim bts$() = Nothing

           bts$ = bat2.EnumeratePowerSources

           bat2.SetSuspendTimeout(bts$(0), 0)

    End Sub

  • Updating with Battery power, NoteDG tags