www.beck-ipc.com

GMLib - Storage


Storage

Functions for handling the internal storage of GM0x and the SIM card

  • gmInitBlockStorage
  • gmSetPhonebookDelay
  • gmGetPhonebookDelay
  • gmBlockdelete
  • gmBlockwrite
  • gmBlockread


  • int gmInitBlockStorage(void)

    This function initializes the storage. The phonebook of the GM0x and your SIM can be used as data storage with gmBlockwrite and gmBlockread.

    Return Value

    Return values are described here: Return values

    For successful usage a GM_EXIT_SUCCESS must be returned. In some case the GM0x may return GM_SIM_BUSY directly after startup. In this case, please retry the gmInitBlockStorage() again.


    Top
    Index page


    int gmSetPhonebookDelay(int delay)

    This function sets the delay for writing on the SIM card. Some SIM cards need a delay between writing information to the phonebook.

    Parameters

    delay

    Input parameter: Delay in ms between a line of information is written to the SIM card.

    Return Value

    Return values are described here: Return values


    Top
    Index page


    int gmGetPhonebookDelay(int * delay)

    This function retrieves the delay for writing on the SIM card.

    Parameters

    delay

    Output parameter: Delay in ms between a line of information is written to the SIM card.

    Return Value

    Return values are described here: Return values


    Top
    Index page


    int gmBlockdelete(int destination)

    This function deletes the complete internal storage of either the GM0x or the SIM card.

    Parameters

    destination

    Input parameter: GM0x (1) or SIM card (2), see gmStorageDestination

    Return Value

    Return values are described here: Return values


    Top
    Index page


    int gmBlockwrite(int destination, int index, int char*, int length)

    This function writes data to internal phone book storage of either the GM0x, the SIM card or both. A maximum of 512 byte can be written. The parameter index and length added together must not be larger then 512.

    Parameters

    destination

    Input parameter: GM0x (1), SIM card (2) or both (3), see gmStorageDestination

    index

    Input parameter: starting point where data shall be written to

    char*

    Input parameter: the data

    length

    Input parameter: length of the data

    Return Value

    Return values are described here: Return values


    Top
    Index page


    int gmBlockread(int destination, int index, int char*, int length)

    This function reads data from internal phone book storage of the GM0x or the SIM card. A maximum of 512 byte can be read. The parameter index and length added together must not be larger then 512. If the destination is GM_STORAGE_BOTH (3) the data is not read, but compared. In case both storages are the same GM_EXIT_SUCCESS is returned, otherwise GM_ENTRIES_NOT_EQUAL.

    Parameters

    destination

    Input parameter: GM0x (1), SIM card (2) or both (3), see gmStorageDestination

    index

    Input parameter: starting point where data shall be written to

    char*

    Input parameter: the data

    length

    Input parameter: length of the data

    Return Value

    Return values are described here: Return values


    Top
    Index page


    End of document