ISVP-SDK  3.12.0
Ingenic Smart Video Platform SDK
Data Structures | Macros | Functions
Sysutils_Base

System Basic Functions. More...

Collaboration diagram for Sysutils_Base:

Data Structures

struct  SUModelNum
 Device Model. More...
 
struct  SUVersion
 Device software version. More...
 
union  SUDevID
 Device ID. More...
 
struct  SUTime
 System time structure. More...
 

Macros

#define DEVICE_ID_MAGIC   "53ef"
 Magic device ID.
 
#define DEVICE_ID_MAGIC_LEN   4
 Length of magic device ID.
 
#define DEVICE_ID_LEN   32
 Length of device ID.
 
#define MAX_INFO_LEN   64
 Maxnum length of Device model,Device ID and Firmware version.
 

Functions

int SU_Base_GetModelNumber (SUModelNum *modelNum)
 Get device model. More...
 
int SU_Base_GetVersion (SUVersion *version)
 Get device version. More...
 
int SU_Base_GetDevID (SUDevID *devID)
 Get device ID. More...
 
int SU_Base_GetTime (SUTime *time)
 Get system time. More...
 
int SU_Base_SetTime (SUTime *time)
 Set system time. More...
 
int SU_Base_SUTime2Raw (SUTime *suTime, uint32_t *rawTime)
 Converts the time of the SUTime type to Raw time in seconds. More...
 
int SU_Base_Raw2SUTime (uint32_t *rawTime, SUTime *suTime)
 Converts the time of the Raw time in seconds to SUTime type. More...
 
int SU_Base_SetAlarm (SUTime *time)
 Set Alarm time. More...
 
int SU_Base_GetAlarm (SUTime *time)
 Get the current Alarm time. More...
 
int SU_Base_EnableAlarm (void)
 Enable Alarm. More...
 
int SU_Base_DisableAlarm (void)
 Disable Alarm. More...
 
int SU_Base_PollingAlarm (uint32_t timeoutMsec)
 Wait Alarm. More...
 
int SU_Base_Shutdown (void)
 Shutdown device. More...
 
int SU_Base_Reboot (void)
 Reboot device. More...
 
int SU_Base_Suspend ()
 Suspend device. More...
 

Detailed Description

System Basic Functions.

Function Documentation

int SU_Base_DisableAlarm ( void  )

Disable Alarm.

Parameters
None.
Return values
0Success.
Non-0Failure.
Remarks
None.
Attention
None.
int SU_Base_EnableAlarm ( void  )

Enable Alarm.

Parameters
None.
Return values
0Success.
Non-0Failure.
Remarks
Before calling this function, please call SU_Base_GetAlarm (SUTime * time) to set the alarm time.
Attention
If alarm time before the current system time ,this function will return failure.
int SU_Base_GetAlarm ( SUTime time)

Get the current Alarm time.

Parameters
[out]time.
Return values
0Success.
Non-0Failure.
Remarks
None.
Attention
None.
int SU_Base_GetDevID ( SUDevID devID)

Get device ID.

Parameters
[out]devIDDevice ID structure pointer.
Return values
0Success.
Non-0Failure.
Remarks
The device ID of each CPU is unique.
Attention
None.
int SU_Base_GetModelNumber ( SUModelNum modelNum)

Get device model.

Parameters
[out]modelNumDevice model structure pointer.
Return values
0Success.
Non-0Failure.
Remarks
None.
Attention
None.
int SU_Base_GetTime ( SUTime time)

Get system time.

Parameters
[in]timeSystem time structure pointer.
Return values
0Success.
Non-0Failure.
Remarks
None.
Attention
None.
int SU_Base_GetVersion ( SUVersion version)

Get device version.

Parameters
[out]versionDevice version structure pointer.
Return values
0Success.
Non-0Failure.
Remarks
None.
Attention
None.
int SU_Base_PollingAlarm ( uint32_t  timeoutMsec)

Wait Alarm.

Parameters
[in]timeout,unit:ms.
Return values
0Success.
Non-0Failure.
Remarks
After calling this function, the program will enter the blocked state until the alarm response or timeout Exit.
Attention
None.
int SU_Base_Raw2SUTime ( uint32_t *  rawTime,
SUTime suTime 
)

Converts the time of the Raw time in seconds to SUTime type.

Parameters
[in]rawTimeRaw time(Count from time 1970-01-01 00:00:00).
[out]suTimeSystem time structure pointer.
Return values
0Success.
Non-0Failure.
Remarks
This function can be used to set the relative number of seconds alarm.
Attention
None.
int SU_Base_Reboot ( void  )

Reboot device.

Parameters
None.
Return values
0Success.
Non-0Failure.
Remarks
The device will immediately reboot after calling this function.
Attention
Before calling this function make sure that all files have been saved.
int SU_Base_SetAlarm ( SUTime time)

Set Alarm time.

Parameters
[in]timeSystem time structure pointer.
Return values
0Success.
Non-0Failure.
Remarks
Temporarily support alarm time setting within 24 hours.
Attention
System time structure parameters should be in a reasonable time Range, otherwise the function call Failure.
int SU_Base_SetTime ( SUTime time)

Set system time.

Parameters
[out]timeSystem time structure pointer.
Return values
0Success.
Non-0Failure.
Remarks
None.
Attention
System time parameters should be in a reasonable range, otherwise the function will call failure.
int SU_Base_Shutdown ( void  )

Shutdown device.

Parameters
None.
Return values
0Success.
Non-0Failure.
Remarks
After calling this function the device will shut down immediately and turn off the main power.
Attention
Before calling this function make sure that all files have been saved.
int SU_Base_Suspend ( void  )

Suspend device.

Parameters
None.
Return values
0Success.
Non-0Failure.
Remarks
After calling this function the device will immediately enter suspend ,when the function exits normally indicates that the system wake.
Attention
None.
int SU_Base_SUTime2Raw ( SUTime suTime,
uint32_t *  rawTime 
)

Converts the time of the SUTime type to Raw time in seconds.

Parameters
[in]suTimeSystem time structure pointer.
[out]rawTimeRaw time(Count from the date 1970-01-01 00:00:00).
Return values
0Success.
Non-0Failure.
Remarks
This function can be used to set the relative number of seconds alarm.
Attention
None.