![]() |
m2mb API docs
25.30.003
m2mb API sets documentation
|
App manager prototypes. More...
Go to the source code of this file.
Typedefs | |
| typedef enum M2MB_APPMNG_RESULT | M2MB_APPMNG_RESULT_E |
| typedef struct M2MB_APPMNG_HANDLE_TAG * | M2MB_APPMNG_HANDLE |
Functions | |
| M2MB_APPMNG_RESULT_E | m2mb_appMng_add (M2MB_APPMNG_HANDLE *pAppMngHandle, CHAR *appName, UINT32 delayStart) |
| m2mb_appMng_add More... | |
| M2MB_APPMNG_RESULT_E | m2mb_appMng_del (M2MB_APPMNG_HANDLE appMngHandle) |
| m2mb_appMng_del More... | |
| M2MB_APPMNG_RESULT_E | m2mb_appMng_start (M2MB_APPMNG_HANDLE appMngHandle) |
| m2mb_appMng_start More... | |
| M2MB_APPMNG_RESULT_E | m2mb_appMng_stop (M2MB_APPMNG_HANDLE appMngHandle) |
| m2mb_appMng_stop More... | |
| M2MB_APPMNG_RESULT_E | m2mb_appMng_setItem (M2MB_APPMNG_HANDLE appMngHandle, M2MB_APPMNG_SEL_CMD_E selCmd, void *pIn, void *pOption) |
| m2mb_appMng_setItem More... | |
| M2MB_APPMNG_RESULT_E | m2mb_appMng_getItem (M2MB_APPMNG_HANDLE appMngHandle, M2MB_APPMNG_SEL_CMD_E selCmd, MEM_W *pOut, void *pIn) |
| m2mb_appMng_getItem More... | |
| UINT8 | m2mb_appMng_appsNumber (void) |
| m2mb_appMng_appsNumber More... | |
| M2MB_APPMNG_HANDLE | m2mb_appMng_getHandleByN (UINT8 n) |
| m2mb_appMng_getHandleByN More... | |
| M2MB_APPMNG_HANDLE | m2mb_appMng_getHandleByName (char *name) |
| m2mb_appMng_getHandleByName More... | |
| M2MB_APPMNG_HANDLE | m2mb_appMng_getMyHandle (void) |
| m2mb_appMng_getMyHandle More... | |
| M2MB_APPMNG_RESULT_E | m2mb_appMng_checkIntegrity (CHAR *appName, MEM_W *pAddress, UINT32 *pTotRam) |
| Function to verify integrity of an application file. More... | |
App manager prototypes.
m2m/m2m_generic/privare/m2mb_inc/m2mb_appMng.h
Basic functions for App manager are provided
@notes Dependencies: m2mb_types.h m2m_os_types.h
| M2MB_APPMNG_RESULT_E m2mb_appMng_add | ( | M2MB_APPMNG_HANDLE * | pAppMngHandle, |
| CHAR * | appName, | ||
| UINT32 | delayStart | ||
| ) |
m2mb_appMng_add
Add an application file as executable in the permanent list and save the properties. Used to add an application as executable, provided it is present in file system in default folder /mod
| [in] | pAppMngHandle | pointer to handle to get |
| [in] | appName | filename of the application to add as executable |
| [in] | delayStart | delay start after reboot |
| UINT8 m2mb_appMng_appsNumber | ( | void | ) |
m2mb_appMng_appsNumber
This service returns the number of total executable applications.
| M2MB_APPMNG_RESULT_E m2mb_appMng_checkIntegrity | ( | CHAR * | appName, |
| MEM_W * | pAddress, | ||
| UINT32 * | pTotRam | ||
| ) |
Function to verify integrity of an application file.
the function opens the file and checks the integrity. In case of success provides virtual address of the application and total ram needed if pointer are provided. NULL is\are accepted for pAddress and\or totRam if no value\s is\are needed.
| [in] | appName | binary file name, only name not path which is by default "/mod" |
| [out] | pAddress | pointer to location where to write virtual address. Optional, can be NULL |
| [out] | pTotRam | pointer to location where to write total RAM needed from application. Optional, can be NULL |
| M2MB_APPMNG_RESULT_E m2mb_appMng_del | ( | M2MB_APPMNG_HANDLE | appMngHandle | ) |
m2mb_appMng_del
immediate stop of application (delay 0) and delete the app from permanent list of executables
| [in] | appMngHandle | handle of the application to be stopped and deleted from the permanent list as executable |
| M2MB_APPMNG_HANDLE m2mb_appMng_getHandleByN | ( | UINT8 | n | ) |
m2mb_appMng_getHandleByN
This service returns the handle of the specified application number, the index starts from 0.
| [in] | n | index of app to get the handle |
| M2MB_APPMNG_HANDLE m2mb_appMng_getHandleByName | ( | char * | name | ) |
m2mb_appMng_getHandleByName
This service returns the value handle of the application name saved in file system.
| [in] | name |
| M2MB_APPMNG_RESULT_E m2mb_appMng_getItem | ( | M2MB_APPMNG_HANDLE | appMngHandle, |
| M2MB_APPMNG_SEL_CMD_E | selCmd, | ||
| MEM_W * | pOut, | ||
| void * | pIn | ||
| ) |
m2mb_appMng_getItem
This service retrieve value for specified parameter of the specified application Selecting cmd, a parameter to be retrieved can be set
| [in] | appMngHandle | handle of application |
| [in] | selCmd | Select parameter to be set (see M2MB_APPMNG_SEL_CMD_E) |
| [in] | pOut | pointer Output parameter got: its meaning depend on selCmd used See examples as general pointer it is set to MEM_W |
| [in] | pIn | pointer to void, general Parameter to be specified, if any, to get right output See examples If parameter is not needed, use NULL |
| M2MB_APPMNG_HANDLE m2mb_appMng_getMyHandle | ( | void | ) |
m2mb_appMng_getMyHandle
This service returns the current running handle of the application that uses the api.
| [in] | void |
| M2MB_APPMNG_RESULT_E m2mb_appMng_setItem | ( | M2MB_APPMNG_HANDLE | appMngHandle, |
| M2MB_APPMNG_SEL_CMD_E | selCmd, | ||
| void * | pIn, | ||
| void * | pOption | ||
| ) |
m2mb_appMng_setItem
This service set value for specified parameter of the specified application if available. Selecting cmd, a parameter to be set can be selected. It's possible to set:
| [in] | appMngHandle | handle of application |
| [in] | selCmd | Select parameter to be set (see M2MB_APPMNG_SEL_CMD_E) |
| [in] | pIn | It is used generic pointer to void to cover all cases; can be used pointer ( name ) or direct value ( delay, auto start, length of argument ) depending by command |
| [in] | pOption |
| M2MB_APPMNG_RESULT_E m2mb_appMng_start | ( | M2MB_APPMNG_HANDLE | appMngHandle | ) |
m2mb_appMng_start
This service starts the specified application with appMngHandle and its properties. The delay must be set carefully, it uses the last volatile delay. If the volatile delay is not set, it uses delay to start from permanent value. To start immediately, set delay volatile to 0 before
| [in] | appMngHandle | handle of application |
| M2MB_APPMNG_RESULT_E m2mb_appMng_stop | ( | M2MB_APPMNG_HANDLE | appMngHandle | ) |
m2mb_appMng_stop
This service stops the specified application. If the app is already stopped, this service has no effect and return error. The application will be stopped after delay specified in last volatile delay ( see M2MB_APPMNG_SEL_CMD_DELAY command that set volatile delay). In case of success, application is deregistered and the relative resources released.
| [in] | appMngHandle | handle of application |